diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-11-11 00:26:36 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-11-11 00:26:36 +0800 |
commit | 54ebbd37f39e660a4af5e97c1f0d25b0777eb142 (patch) | |
tree | 6aa8582885b2cc9bed2c56f3636e727572a2e999 /widgets | |
parent | e770585c6c97ce60ca3f78ad7f42ba9deb366d08 (diff) | |
download | gsoc2013-evolution-54ebbd37f39e660a4af5e97c1f0d25b0777eb142.tar gsoc2013-evolution-54ebbd37f39e660a4af5e97c1f0d25b0777eb142.tar.gz gsoc2013-evolution-54ebbd37f39e660a4af5e97c1f0d25b0777eb142.tar.bz2 gsoc2013-evolution-54ebbd37f39e660a4af5e97c1f0d25b0777eb142.tar.lz gsoc2013-evolution-54ebbd37f39e660a4af5e97c1f0d25b0777eb142.tar.xz gsoc2013-evolution-54ebbd37f39e660a4af5e97c1f0d25b0777eb142.tar.zst gsoc2013-evolution-54ebbd37f39e660a4af5e97c1f0d25b0777eb142.zip |
Made the underline show up properly in the main menu bar.
2000-11-10 Christopher James Lahey <clahey@helixcode.com>
* e-search-bar.c: Made the underline show up properly in the main
menu bar.
svn path=/trunk/; revision=6532
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/e-search-bar.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index 302b8de917..d2370cc1f6 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -135,6 +135,19 @@ esb_menubar_activated(GtkWidget *widget, ESearchBar *esb) } static void +esb_check_labels(GtkWidget *widget, gpointer data) +{ + if (GTK_IS_LABEL(widget)) { + char *text; + gtk_object_get(GTK_OBJECT(widget), + "label", &text, + NULL); + gtk_label_parse_uline(GTK_LABEL(widget), text); + g_free(text); + } +} + +static void esb_pack_menubar(ESearchBar *esb, ESearchBarItem *items) { GtkWidget *menu, *menuitem; @@ -144,7 +157,10 @@ esb_pack_menubar(ESearchBar *esb, ESearchBarItem *items) for (i = 0; items[i].id != -1; i++) { GtkWidget *item; - item = gtk_menu_item_new_with_label (_(items[i].text)); + if (items[i].text) + item = gtk_menu_item_new_with_label (_(items[i].text)); + else + item = gtk_menu_item_new(); gtk_menu_append (GTK_MENU (menu), item); @@ -156,7 +172,8 @@ esb_pack_menubar(ESearchBar *esb, ESearchBarItem *items) } gtk_widget_show_all (menu); - menuitem = gnome_stock_menu_item(GNOME_STOCK_MENU_SEARCH, _("Search")); + menuitem = gnome_stock_menu_item(GNOME_STOCK_MENU_SEARCH, _("Sear_ch")); + e_container_foreach_leaf(GTK_CONTAINER(menuitem), esb_check_labels); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu); gtk_widget_show (menuitem); @@ -190,7 +207,10 @@ esb_pack_option_menu(ESearchBar *esb, ESearchBarItem *items) for (i = 0; items[i].id != -1; i++) { GtkWidget *item; - item = gtk_menu_item_new_with_label (_(items[i].text)); + if (items[i].text) + item = gtk_menu_item_new_with_label (_(items[i].text)); + else + item = gtk_menu_item_new(); gtk_menu_append (GTK_MENU (menu), item); |