ui/gtk/menu.c

changeset 3
c04433993fbb
parent 0
804d8803eade
equal deleted inserted replaced
2:ea89bbb0c4c8 3:c04433993fbb
263 } 263 }
264 264
265 gtk_menu_shell_append(GTK_MENU_SHELL(parent), widget); 265 gtk_menu_shell_append(GTK_MENU_SHELL(parent), widget);
266 266
267 if(i->groups) { 267 if(i->groups) {
268 uic_add_group_widget(obj->ctx, widget, i->groups); 268 uic_add_group_widget(obj->ctx, widget, (ui_enablefunc)ui_set_enabled, i->groups);
269 } 269 }
270 } 270 }
271 271
272 void add_menuitem_st_widget( 272 void add_menuitem_st_widget(
273 GtkWidget *parent, 273 GtkWidget *parent,
299 } 299 }
300 300
301 gtk_menu_shell_append(GTK_MENU_SHELL(parent), widget); 301 gtk_menu_shell_append(GTK_MENU_SHELL(parent), widget);
302 302
303 if(i->groups) { 303 if(i->groups) {
304 uic_add_group_widget(obj->ctx, widget, i->groups); 304 uic_add_group_widget(obj->ctx, widget, (ui_enablefunc)ui_set_enabled, i->groups);
305 } 305 }
306 } 306 }
307 307
308 void add_menuseparator_widget( 308 void add_menuseparator_widget(
309 GtkWidget *parent, 309 GtkWidget *parent,
552 } 552 }
553 553
554 gtk_menu_shell_append(GTK_MENU_SHELL(ct->menu), widget); 554 gtk_menu_shell_append(GTK_MENU_SHELL(ct->menu), widget);
555 555
556 if(groups) { 556 if(groups) {
557 uic_add_group_widget(obj->ctx, widget, groups); 557 uic_add_group_widget(obj->ctx, widget, (ui_enablefunc)ui_set_enabled, groups);
558 } 558 }
559 } 559 }
560 560
561 void ui_widget_menuitem_st(UiObject *obj, char *stockid, ui_callback f, void *userdata) { 561 void ui_widget_menuitem_st(UiObject *obj, char *stockid, ui_callback f, void *userdata) {
562 ui_widget_menuitem_stgr(obj, stockid, f, userdata, -1); 562 ui_widget_menuitem_stgr(obj, stockid, f, userdata, -1);
602 } 602 }
603 603
604 gtk_menu_shell_append(GTK_MENU_SHELL(ct->menu), widget); 604 gtk_menu_shell_append(GTK_MENU_SHELL(ct->menu), widget);
605 605
606 if(groups) { 606 if(groups) {
607 uic_add_group_widget(obj->ctx, widget, groups); 607 uic_add_group_widget(obj->ctx, widget, (ui_enablefunc)ui_set_enabled, groups);
608 } 608 }
609 } 609 }

mercurial