Author: greg.ercolano
Date: 2010-02-26 10:18:29 -0800 (Fri, 26 Feb 2010)
New Revision: 7160
Log:
Fixes to Fl_Menu_::item_pathname() code example; small changes to Albrecht's
mods.
Modified:
branches/branch-1.3/src/Fl_Menu_.cxx
Modified: branches/branch-1.3/src/Fl_Menu_.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Menu_.cxx 2010-02-26 18:10:54 UTC (rev
7159)
+++ branches/branch-1.3/src/Fl_Menu_.cxx 2010-02-26 18:18:29 UTC (rev
7160)
@@ -48,11 +48,11 @@
Fl_Menu_Bar *menubar = 0;
void my_menu_callback(Fl_Widget*,void*) {
char name[80];
- if ( menubar->item_pathname(name, sizeof(name)-1) == 0 ) {
// recently picked item
- if ( strcmp(name, "File/&Open") == 0 ) { /# open invoked #/ }
- if ( strcmp(name, "File/&Save") == 0 ) { /# save invoked #/ }
- if ( strcmp(name, "Edit/&Copy") == 0 ) { /# copy invoked #/ }
- }
+ if ( menubar->item_pathname(name, sizeof(name)-1) == 0 ) { //
recently picked item
+ if ( strcmp(name, "File/&Open") == 0 ) { .. } // open
invoked
+ if ( strcmp(name, "File/&Save") == 0 ) { .. } // save
invoked
+ if ( strcmp(name, "Edit/&Copy") == 0 ) { .. } // copy
invoked
+ }
}
int main() {
[..]
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit