summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2012-11-13 13:03:20 +0000
committerManolo Gouy <Manolo>2012-11-13 13:03:20 +0000
commit155e099f4a67f1031a1a77e9eba9789b74c15a44 (patch)
treed023a11a2a32c91a30ffbb053920e0c812d0e135 /test
parent82878a722527b129f78b148965b05b124351bd80 (diff)
Documented how to make a Mac OS FLTK application launchable by dropping files on its icon.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9718 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
-rw-r--r--test/editor.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/editor.cxx b/test/editor.cxx
index 3e38a5022..1c9db095f 100644
--- a/test/editor.cxx
+++ b/test/editor.cxx
@@ -789,16 +789,22 @@ Fl_Window* new_view() {
return w;
}
+void cb(const char *fname) {
+ load_file(fname, -1);
+}
+
int main(int argc, char **argv) {
textbuf = new Fl_Text_Buffer;
//textbuf->transcoding_warning_action = NULL;
style_init();
+ fl_open_callback(cb);
Fl_Window* window = new_view();
window->show(1, argv);
-
+#ifndef __APPLE__
if (argc > 1) load_file(argv[1], -1);
+#endif
return Fl::run();
}