Author: matt
Date: 2010-10-30 14:52:38 -0700 (Sat, 30 Oct 2010)
New Revision: 7783
Log:
Added callback when double-clicking file in a file chooser (STR#2346)

Modified:
   branches/branch-1.3/CHANGES
   branches/branch-1.3/FL/Fl_Preferences.H
   branches/branch-1.3/src/Fl_File_Chooser2.cxx
   branches/branch-1.3/src/Fl_Preferences.cxx
   branches/branch-1.3/test/pixmap_browser.cxx

Modified: branches/branch-1.3/CHANGES
===================================================================
--- branches/branch-1.3/CHANGES 2010-10-30 21:32:15 UTC (rev 7782)
+++ branches/branch-1.3/CHANGES 2010-10-30 21:52:38 UTC (rev 7783)
@@ -1,5 +1,7 @@
 CHANGES IN FLTK 1.3.0
 
+       - Added callback when double-clicking file in a file chooser
+         (STR #2346)
        - Fixed label alignment (STR #2436)
        - Added interface to set color chooser mode (STR #2407)
        - Fixed compile errors when HAVE_LIBJPEG was not defined 

Modified: branches/branch-1.3/FL/Fl_Preferences.H
===================================================================
--- branches/branch-1.3/FL/Fl_Preferences.H     2010-10-30 21:32:15 UTC (rev 
7782)
+++ branches/branch-1.3/FL/Fl_Preferences.H     2010-10-30 21:52:38 UTC (rev 
7783)
@@ -156,8 +156,6 @@
   // char export( const char *filename, Type fileFormat );
   // char import( const char *filename );
   
-  // char copyTo(class Fl_Tree*); // deprecated, use 
Fl_Tree::load(Fl_Preferences&)
-
   /**
      'Name' provides a simple method to create numerical or more complex 
      procedural names for entries and groups on the fly.

Modified: branches/branch-1.3/src/Fl_File_Chooser2.cxx
===================================================================
--- branches/branch-1.3/src/Fl_File_Chooser2.cxx        2010-10-30 21:32:15 UTC 
(rev 7782)
+++ branches/branch-1.3/src/Fl_File_Chooser2.cxx        2010-10-30 21:52:38 UTC 
(rev 7783)
@@ -727,6 +727,7 @@
     {
       // Hide the window - picked the file...
       window->hide();
+      if (callback_) (*callback_)(this, data_);
     }
   }
   else

Modified: branches/branch-1.3/src/Fl_Preferences.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Preferences.cxx  2010-10-30 21:32:15 UTC (rev 
7782)
+++ branches/branch-1.3/src/Fl_Preferences.cxx  2010-10-30 21:52:38 UTC (rev 
7783)
@@ -28,7 +28,6 @@
 #include <FL/Fl.H>
 #include <FL/Fl_Preferences.H>
 #include <FL/Fl_Plugin.H>
-#include <FL/Fl_Tree.H>
 #include <FL/filename.H>
 
 #include <stdio.h>

Modified: branches/branch-1.3/test/pixmap_browser.cxx
===================================================================
--- branches/branch-1.3/test/pixmap_browser.cxx 2010-10-30 21:32:15 UTC (rev 
7782)
+++ branches/branch-1.3/test/pixmap_browser.cxx 2010-10-30 21:52:38 UTC (rev 
7783)
@@ -88,7 +88,7 @@
 
 void button_cb(Fl_Widget *,void *) {
   fl_file_chooser_callback(file_cb);
-  fl_file_chooser("Image file?","*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm}", 
name);
+  puts(fl_file_chooser("Image 
file?","*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm}", name));
   fl_file_chooser_callback(0);
 }
 

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to