mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
Fix STR #2596: Fluid generated improper callback member functions for
Fl_Menu_Item's in widget classes. Fixed with OP's patch. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8622 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -211,10 +211,14 @@ void Fl_Menu_Item_Type::write_static() {
|
||||
write_c("\n}\n");
|
||||
if (k) {
|
||||
write_c("void %s::%s(Fl_Menu_* o, %s v) {\n", k, cn, ut);
|
||||
write_c(" ((%s*)(o->", k);
|
||||
write_c(" ((%s*)(o", k);
|
||||
Fl_Type* t = parent; while (t->is_menu_item()) t = t->parent;
|
||||
for (t = t->parent; t && t->is_widget() && !is_class(); t = t->parent) write_c("parent()->");
|
||||
write_c("user_data()))->%s_i(o,v);\n}\n", cn);
|
||||
Fl_Type *q = 0;
|
||||
for (t = t->parent; t && t->is_widget() && !is_class(); q = t, t = t->parent)
|
||||
write_c("->parent()");
|
||||
if (!q || strcmp(q->type_name(), "widget_class"))
|
||||
write_c("->user_data()");
|
||||
write_c("))->%s_i(o,v);\n}\n", cn);
|
||||
}
|
||||
}
|
||||
if (image) {
|
||||
|
||||
Reference in New Issue
Block a user