Mercurial > pidgin
diff src/util.c @ 3698:507eb0a2c7b2
[gaim-migrate @ 3829]
blah
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Mon, 14 Oct 2002 17:49:14 +0000 |
parents | 5b82f99d028d |
children | b401bd1701b4 |
line wrap: on
line diff
--- a/src/util.c Mon Oct 14 17:43:50 2002 +0000 +++ b/src/util.c Mon Oct 14 17:49:14 2002 +0000 @@ -1587,3 +1587,28 @@ return menuitem; } +GtkWidget *gaim_new_item(GtkWidget *menu, const char *str) +{ + GtkWidget *menuitem; + GtkWidget *label; + + menuitem = gtk_menu_item_new(); + if (menu) + gtk_menu_append(GTK_MENU(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); + + gtk_widget_add_accelerator(menuitem, "activate", accel, str[0], + GDK_MOD1_MASK, GTK_ACCEL_LOCKED); + + return menuitem; +} + + + + +