diff options
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/ChangeLog | 7 | ||||
-rw-r--r-- | widgets/misc/e-search-bar.c | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index b22462e323..2f44eb6c3d 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,10 @@ +2005-12-21 Srinivasa Ragavan <sragavan@novell.com> + + ** Fixes bug #324590 + + * e-search-bar.c: (search_now_verb_cb), (clear_verb_cb): Added + code to clear search entry from menu. + 2005-12-20 Johnny Jacob <johnnyjacob@gmail.com> ** See Bug #246233 diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index 5f322fd25a..7945d90b92 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -200,8 +200,20 @@ search_now_verb_cb (BonoboUIComponent *ui_component, const char *verb_name) { ESearchBar *esb; + GtkStyle *style = gtk_widget_get_default_style (); + const char *text; esb = E_SEARCH_BAR (data); + text = gtk_entry_get_text (esb->entry); + + if (text && *text) { + gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED])); + gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, &(style->text[GTK_STATE_SELECTED])); + } else { + gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, NULL); + gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL); + } + emit_search_activated (esb); } @@ -212,6 +224,9 @@ clear_verb_cb (BonoboUIComponent *ui_component, { ESearchBar *esb; + gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, NULL); + gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL); + esb = E_SEARCH_BAR (data); clear_search (esb); } |