Author: matt
Date: 2010-10-30 09:50:44 -0700 (Sat, 30 Oct 2010)
New Revision: 7774
Log:
Fl_Button shortcut handling would crash if the widget was deleted in the 
callback.

Modified:
   branches/branch-1.3/README.Unix.txt
   branches/branch-1.3/ide/Xcode3/FLTK.xcodeproj/project.pbxproj
   branches/branch-1.3/src/Fl_Button.cxx

Modified: branches/branch-1.3/README.Unix.txt
===================================================================
--- branches/branch-1.3/README.Unix.txt 2010-10-30 16:32:04 UTC (rev 7773)
+++ branches/branch-1.3/README.Unix.txt 2010-10-30 16:50:44 UTC (rev 7774)
@@ -32,6 +32,7 @@
 * TODO: we still need to write these chapters
 
 
+
  1  INTRODUCTION
 =================
 
@@ -42,7 +43,11 @@
     - Code::Blocks
     - ...
     
+The Symbol font and the Zapf Dingbats font do not work on X11. This is correct
+behavior for UTF-8 platforms.
 
+
+
  2  PREREQUISITES
 ==================
 
@@ -82,9 +87,7 @@
 
   svn update
 
-FIXME: no FL_SYMBOL font (-*-symbol-*),  font 15 (Zapf-Dingbats)
 
-
  2.2  Linux Mint 9
 -------------------
 

Modified: branches/branch-1.3/ide/Xcode3/FLTK.xcodeproj/project.pbxproj
===================================================================
--- branches/branch-1.3/ide/Xcode3/FLTK.xcodeproj/project.pbxproj       
2010-10-30 16:32:04 UTC (rev 7773)
+++ branches/branch-1.3/ide/Xcode3/FLTK.xcodeproj/project.pbxproj       
2010-10-30 16:50:44 UTC (rev 7774)
@@ -4192,7 +4192,7 @@
                590C56F672356072A5C86BC3 /* valuators.fl */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.fluid; name 
= valuators.fl; path = ../../test/valuators.fl; sourceTree = SOURCE_ROOT; };
                598DD70F89D7731D61BBD8EF /* fractals.cxx */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = fractals.cxx; path = ../../test/fractals.cxx; sourceTree = SOURCE_ROOT; 
};
                59EAC37D26FEC2AB49D79C08 /* Fl_Radio_Button.H */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name 
= Fl_Radio_Button.H; path = ../../FL/Fl_Radio_Button.H; sourceTree = 
SOURCE_ROOT; };
-               5A7532B3CDA46030885D1D14 /* Fl_Button.cxx */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = Fl_Button.cxx; path = ../../src/Fl_Button.cxx; sourceTree = SOURCE_ROOT; 
};
+               5A7532B3CDA46030885D1D14 /* Fl_Button.cxx */ = {isa = 
PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = 
sourcecode.cpp.cpp; name = Fl_Button.cxx; path = ../../src/Fl_Button.cxx; 
sourceTree = SOURCE_ROOT; tabWidth = 8; };
                5AE1F936F1C186E18C1B9C28 /* is_spacing.c */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = 
is_spacing.c; path = ../../src/xutf8/is_spacing.c; sourceTree = SOURCE_ROOT; };
                5AF5119D08DFC92EA1032671 /* Fl_Slider.cxx */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = Fl_Slider.cxx; path = ../../src/Fl_Slider.cxx; sourceTree = SOURCE_ROOT; 
};
                5B2B6ED6A3649923BAAFFDF1 /* Fl_visual.cxx */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = Fl_visual.cxx; path = ../../src/Fl_visual.cxx; sourceTree = SOURCE_ROOT; 
};

Modified: branches/branch-1.3/src/Fl_Button.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Button.cxx       2010-10-30 16:32:04 UTC (rev 
7773)
+++ branches/branch-1.3/src/Fl_Button.cxx       2010-10-30 16:50:44 UTC (rev 
7774)
@@ -128,22 +128,9 @@
     return 1;
   case FL_SHORTCUT:
     if (!(shortcut() ?
-         Fl::test_shortcut(shortcut()) : test_shortcut())) return 0;
-    
+         Fl::test_shortcut(shortcut()) : test_shortcut())) return 0;    
     if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this);
-
-    if (type() == FL_RADIO_BUTTON && !value_) {
-      setonly();
-      set_changed();
-      if (when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE) ) 
-         do_callback();
-    } else if (type() == FL_TOGGLE_BUTTON) {
-      value(!value());
-      set_changed();
-      if (when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE)) 
-         do_callback();
-    } else if (when() & FL_WHEN_RELEASE) do_callback();
-    return 1;
+    goto triggered_by_keyboard;
   case FL_FOCUS : /* FALLTHROUGH */
   case FL_UNFOCUS :
     if (Fl::visible_focus()) {
@@ -161,6 +148,7 @@
     if (Fl::focus() == this && Fl::event_key() == ' ' &&
         !(Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) {
       set_changed();
+    triggered_by_keyboard:
       Fl_Widget_Tracker wp(this);
       if (type() == FL_RADIO_BUTTON && !value_) {
        setonly();

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

Reply via email to