summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2006-08-17 13:59:00 +0000
committerMatthias Melcher <fltk@matthiasm.com>2006-08-17 13:59:00 +0000
commit1cc3338a108cdfac480745e3dddb68a820777a46 (patch)
tree8458d1289474d030c27da6061d7f9311187678e9
parent2f4706602d53a964661a398d8774e95bdb09e044 (diff)
Changing the shorcut of a widget in fluid now marks the document as dirty (STR #1382)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5328 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES2
-rw-r--r--fluid/Fl_Menu_Type.cxx3
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 9ab46ed41..125203189 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.8
+ - Changing the shorcut of a widget in fluid now marks
+ the document as dirty (STR #1382)
- Fl_Text_Editor now correctly handles middle mouse
clicks (STR #1384)
- Added some GLUT4 functions (STR #1370)
diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx
index 17d98f48e..fe2bc73a9 100644
--- a/fluid/Fl_Menu_Type.cxx
+++ b/fluid/Fl_Menu_Type.cxx
@@ -583,12 +583,15 @@ void shortcut_in_cb(Shortcut_Button* i, void* v) {
i->svalue = ((Fl_Button*)(current_widget->o))->shortcut();
i->redraw();
} else {
+ int mod = 0;
for (Fl_Type *o = Fl_Type::first; o; o = o->next)
if (o->selected && o->is_button()) {
Fl_Button* b = (Fl_Button*)(((Fl_Widget_Type*)o)->o);
+ if (b->shortcut()!=i->svalue) mod = 1;
b->shortcut(i->svalue);
if (o->is_menu_item()) ((Fl_Widget_Type*)o)->redraw();
}
+ if (mod) set_modflag(1);
}
}