diff options
-rw-r--r-- | filter/ChangeLog | 5 | ||||
-rw-r--r-- | filter/e-search-bar.c | 26 | ||||
-rw-r--r-- | widgets/misc/e-search-bar.c | 26 |
3 files changed, 51 insertions, 6 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index db3844a24c..86010b0cd1 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,5 +1,10 @@ 2000-11-10 Christopher James Lahey <clahey@helixcode.com> + * e-search-bar.c: Made the underline show up properly in the main + menu bar. + +2000-11-10 Christopher James Lahey <clahey@helixcode.com> + * e-search-bar.c: Switched from using gtk_menu_item_new_with_label for the menu header to using gnome_stock_menu_item. diff --git a/filter/e-search-bar.c b/filter/e-search-bar.c index 302b8de917..d2370cc1f6 100644 --- a/filter/e-search-bar.c +++ b/filter/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); 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); |