From ec587dd42837f286065ecd3f722b6dfc670f4d21 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 26 Sep 2007 12:40:10 +0000 Subject: 2007-09-26 mcrha Fix for bug #351333 svn path=/trunk/; revision=34309 --- widgets/misc/ChangeLog | 7 +++++++ widgets/misc/e-search-bar.c | 17 ++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'widgets') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index b38e6a0eb2..305c682578 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,10 @@ +2007-09-26 Milan Crha + + ** Fix for bug #351333 + + * e-search-bar.c: (paint_search_text), (option_activated_cb): + Added more descriptive hint over search bar's option button. + 2007-09-12 Matthew Barnes ** Fixes part of bug #476040 diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index ecb53340c6..f96efb06b4 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -338,11 +338,16 @@ paint_search_text (GtkWidget *widget, ESearchBar *esb) if (text && *text) { + gchar *t; + if (!GTK_WIDGET_HAS_FOCUS(esb->entry)) { gtk_entry_set_text (GTK_ENTRY (esb->entry), text); gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, &(style->text[GTK_STATE_INSENSITIVE])); } - gtk_tooltips_set_tip (esb->tooltips, esb->option_button, text, "Search type"); + + t = g_strdup_printf ("%s: %s\n%s", _("Search"), text, _("Click here to change the search type")); + gtk_tooltips_set_tip (esb->tooltips, esb->option_button, t, "Search type"); + g_free (t); gtk_widget_set_sensitive (esb->clear_button, FALSE); } @@ -466,9 +471,15 @@ option_activated_cb (GtkWidget *widget, e_search_bar_set_item_id (esb, id); if (GTK_IS_RADIO_MENU_ITEM (gtk_menu_get_active ( GTK_MENU (esb->option_menu)))) { + gchar *t; text = get_selected_item_label (esb->option_menu); - if (text && *text) - gtk_tooltips_set_tip (esb->tooltips, esb->option_button, text, "Search type"); + if (text && *text) + t = g_strdup_printf ("%s: %s\n%s", _("Search"), text, _("Click here to change the search type")); + else + t = g_strdup_printf ("%s: %s", _("Search"), _("Click here to change the search type")); + + gtk_tooltips_set_tip (esb->tooltips, esb->option_button, t, "Search type"); + g_free (t); } if (!esb->block_search) { -- cgit v1.2.3