Fixes to Fl_Menu_::item_pathname() code example; small changes to Albrecht's mods.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7160 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
f71f365268
commit
e582f8bb1c
@ -48,11 +48,11 @@
|
|||||||
Fl_Menu_Bar *menubar = 0;
|
Fl_Menu_Bar *menubar = 0;
|
||||||
void my_menu_callback(Fl_Widget*,void*) {
|
void my_menu_callback(Fl_Widget*,void*) {
|
||||||
char name[80];
|
char name[80];
|
||||||
if ( menubar->item_pathname(name, sizeof(name)-1) == 0 ) { // recently picked item
|
if ( menubar->item_pathname(name, sizeof(name)-1) == 0 ) { // recently picked item
|
||||||
if ( strcmp(name, "File/&Open") == 0 ) { /# open invoked #/ }
|
if ( strcmp(name, "File/&Open") == 0 ) { .. } // open invoked
|
||||||
if ( strcmp(name, "File/&Save") == 0 ) { /# save invoked #/ }
|
if ( strcmp(name, "File/&Save") == 0 ) { .. } // save invoked
|
||||||
if ( strcmp(name, "Edit/&Copy") == 0 ) { /# copy invoked #/ }
|
if ( strcmp(name, "Edit/&Copy") == 0 ) { .. } // copy invoked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int main() {
|
int main() {
|
||||||
[..]
|
[..]
|
||||||
|
Loading…
Reference in New Issue
Block a user