diff -r db95c0104937 -r 06be29a56f8b ui/gtk/menu.c --- a/ui/gtk/menu.c Tue Apr 01 13:47:29 2014 +0200 +++ b/ui/gtk/menu.c Wed Apr 02 09:59:38 2014 +0200 @@ -95,6 +95,22 @@ cm->items = ucx_list_append(cm->items, item); } +void ui_menuitem_st(char *stockid, ui_callback f, void *userdata) { + if(!current) { + return; + } + + UiStMenuItem *item = malloc(sizeof(UiStMenuItem)); + item->item.add_to = (ui_menu_add_f)add_menuitem_st_widget; + + item->stockid = stockid; + item->userdata = userdata; + item->callback = f; + + UiMenu *cm = current->data; + cm->items = ucx_list_append(cm->items, item); +} + void ui_menuseparator() { if(!current) { return; @@ -221,7 +237,7 @@ { UiStMenuItem *i = (UiStMenuItem*)item; - GtkWidget *widget = gtk_image_menu_item_new_from_stock(i->stockid, NULL); + GtkWidget *widget = gtk_image_menu_item_new_from_stock(i->stockid, obj->ctx->accel_group); if(i->callback != NULL) { UiEventData *event = malloc(sizeof(UiEventData));