/[gluid]/menu.c
ViewVC logotype

Diff of /menu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by ben, Fri Sep 25 18:47:59 2009 UTC revision 8 by ben, Fri Sep 25 21:04:28 2009 UTC
# Line 61  void menu_hide(GtkMenu* menu) Line 61  void menu_hide(GtkMenu* menu)
61          gtk_menu_popdown(GTK_MENU(menu));          gtk_menu_popdown(GTK_MENU(menu));
62          return;          return;
63  }  }
64    
65    /* append a stock imageitem to the menu, and connect its callback on "activate" event */
66    GtkMenuItem* menu_append_image_item(GtkMenu* menu, const gchar* stock_id, GCallback callback, gpointer cb_data)
67    {
68            GtkWidget* item;
69    
70            item = gtk_image_menu_item_new_from_stock(stock_id, NULL);
71            gtk_menu_shell_append ((GtkMenuShell*) (menu), item);
72            if (callback)
73                    g_signal_connect (G_OBJECT(item), "activate", G_CALLBACK(callback), cb_data);
74            gtk_widget_show (item);
75    
76            return GTK_MENU_ITEM(item);
77    }
78    

Legend:
Removed from v.1  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26