Mercurial > pidgin.yaz
diff src/gtkutils.c @ 5162:b8eafeb874a1
[gaim-migrate @ 5526]
After my last commit, Nathan promptly asked me if I remembered to move
the declarations for gaim_new_item and gaim_new_item_stock from one .h
file to the next, and I promptly cracked on his mom.
Robot101, or anyone else cool, if you want to fix the comments in
gtkutils.h for these 2 functions, that'd be terrif.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Fri, 18 Apr 2003 03:40:54 +0000 |
| parents | 91ea5ef2278b |
| children | 1f901484599d |
line wrap: on
line diff
--- a/src/gtkutils.c Fri Apr 18 03:26:42 2003 +0000 +++ b/src/gtkutils.c Fri Apr 18 03:40:54 2003 +0000 @@ -402,6 +402,27 @@ gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); } +GtkWidget *gaim_new_item(GtkWidget *menu, const char *str) +{ + GtkWidget *menuitem; + GtkWidget *label; + + menuitem = gtk_menu_item_new(); + if (menu) + gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); + gtk_widget_show(menuitem); + + label = gtk_label_new(str); + gtk_label_set_pattern(GTK_LABEL(label), "_"); + gtk_container_add(GTK_CONTAINER(menuitem), label); + gtk_widget_show(label); +/* FIXME: Go back and fix this + gtk_widget_add_accelerator(menuitem, "activate", accel, str[0], + GDK_MOD1_MASK, GTK_ACCEL_LOCKED); +*/ + return menuitem; +} + GtkWidget *gaim_new_item_from_stock(GtkWidget *menu, const char *str, const char *icon, GtkSignalFunc sf, gpointer data, guint accel_key, guint accel_mods, char *mod) { GtkWidget *menuitem; @@ -444,24 +465,3 @@ return menuitem; } - -GtkWidget *gaim_new_item(GtkWidget *menu, const char *str) -{ - GtkWidget *menuitem; - GtkWidget *label; - - menuitem = gtk_menu_item_new(); - if (menu) - gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); - gtk_widget_show(menuitem); - - label = gtk_label_new(str); - gtk_label_set_pattern(GTK_LABEL(label), "_"); - gtk_container_add(GTK_CONTAINER(menuitem), label); - gtk_widget_show(label); -/* FIXME: Go back and fix this - gtk_widget_add_accelerator(menuitem, "activate", accel, str[0], - GDK_MOD1_MASK, GTK_ACCEL_LOCKED); -*/ - return menuitem; -}
