diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-06-01 00:23:57 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-06-01 00:23:57 +0000 |
| commit | 9c7ec90412754b36441871b6869ba582b10bb51a (patch) | |
| tree | f77e17eec5e2e0dbfea3f7c7b5c3f8db1638d182 /fluid | |
| parent | 0aa85c540cc0b440d6ae46720f3496ce3733d4db (diff) | |
Fix open-documents callback stuff.
Add open documents callback to FLUID.
Add FLUID application to fltk.list file for packaging.
Add FLUID application icon and data files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3020 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/fluid.cxx | 32 | ||||
| -rw-r--r-- | fluid/fluid.icns | bin | 0 -> 44080 bytes | |||
| -rw-r--r-- | fluid/fluid.info | 1 | ||||
| -rw-r--r-- | fluid/fluid.plist | 68 |
4 files changed, 99 insertions, 2 deletions
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index edf298092..2cc9096a3 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1,5 +1,5 @@ // -// "$Id: fluid.cxx,v 1.15.2.13.2.37 2003/04/01 19:58:08 easysw Exp $" +// "$Id: fluid.cxx,v 1.15.2.13.2.38 2003/06/01 00:23:57 easysw Exp $" // // FLUID main entry for the Fast Light Tool Kit (FLTK). // @@ -178,6 +178,30 @@ void exit_cb(Fl_Widget *,void *) { exit(0); } +#ifdef __APPLE__ +# include <FL/x.H> + +void +apple_open_cb(const char *c) { + if (modflag && !fl_ask("Discard changes?")) return; + const char *oldfilename; + oldfilename = filename; + filename = NULL; + set_filename(c); + if (!read_file(c, 0)) { + fl_message("Can't read %s: %s", c, strerror(errno)); + free((void *)filename); + filename = oldfilename; + if (main_window) main_window->label(filename); + return; + } + + // Loaded a file; free the old filename... + modflag = 0; + if (oldfilename) free((void *)oldfilename); +} +#endif // __APPLE__ + void open_cb(Fl_Widget *, void *v) { if (!v && modflag && !fl_ask("Discard changes?")) return; const char *c; @@ -820,6 +844,10 @@ int main(int argc,char **argv) { make_main_window(); +#ifdef __APPLE__ + fl_open_callback(apple_open_cb); +#endif // __APPLE__ + if (c) set_filename(c); if (!compile_only) { Fl::visual((Fl_Mode)(FL_DOUBLE|FL_INDEX)); @@ -856,5 +884,5 @@ int main(int argc,char **argv) { } // -// End of "$Id: fluid.cxx,v 1.15.2.13.2.37 2003/04/01 19:58:08 easysw Exp $". +// End of "$Id: fluid.cxx,v 1.15.2.13.2.38 2003/06/01 00:23:57 easysw Exp $". // diff --git a/fluid/fluid.icns b/fluid/fluid.icns Binary files differnew file mode 100644 index 000000000..361eaa56a --- /dev/null +++ b/fluid/fluid.icns diff --git a/fluid/fluid.info b/fluid/fluid.info new file mode 100644 index 000000000..c5f93635d --- /dev/null +++ b/fluid/fluid.info @@ -0,0 +1 @@ +FLIDFlid diff --git a/fluid/fluid.plist b/fluid/fluid.plist new file mode 100644 index 000000000..b6fc19bdf --- /dev/null +++ b/fluid/fluid.plist @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plist version="0.9"> + <dict> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + + <key>CFBundleExecutable</key> + <string>fluid</string> + + <key>CFBundleIdentifier</key> + <string>org.fltk.fluid</string> + + <key>CFBundleVersion</key> + <string>1.1.4</string> + + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + + <key>NSHumanReadableCopyright</key> + <string>Copyright 1998-2003 by Bill Spitzak and others</string> + + <key>CFAppleHelpAnchor</key> + <string>help</string> + + <key>CFBundleName</key> + <string>FLUID</string> + + <key>CFBundlePackageType</key> + <string>APPL</string> + + <key>CFBundleSignature</key> + <string>FLID</string> + + <key>CFBundleIconFile</key> + <string>fluid.icns</string> + + <key>CFBundleShortVersionString</key> + <string>1.1.4</string> + + <key>CFBundleGetInfoString</key> + <string>1.1.4, Copyright 1998-2003 by Bill Spitzak and others</string> + + <key>CFBundleDocumentTypes</key> + <array> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>fl</string> + </array> + + <key>CFBundleTypeIconFile</key> + <string>fluid.icns</string> + + <key>CFBundleTypeName</key> + <string>FLUID Designer File</string> + + <key>CFBundleTypeOSTypes</key> + <array> + <string>Flid</string> + </array> + + <key>CFBundleTypeRole</key> + <string>Editor</string> + </dict> + </array> + + </dict> +</plist> |
