From 6b5f07ff016b73f5f633604dea76a1f71161ede1 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 18 Mar 2002 20:14:42 +0000 Subject: New, implementation for a new "SearchNow" verb. (setup_standard_verbs): * e-search-bar.c (search_now_verb_cb): New, implementation for a new "SearchNow" verb. (setup_standard_verbs): Create verb here. (update_bonobo_menus): Add SearchNow menu item. svn path=/trunk/; revision=16197 --- widgets/misc/ChangeLog | 7 +++++++ widgets/misc/e-search-bar.c | 14 ++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'widgets') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 4081b8c66a..ff9b1b6ef3 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,10 @@ +2002-03-18 Ettore Perazzoli + + * e-search-bar.c (search_now_verb_cb): New, implementation for a + new "SearchNow" verb. + (setup_standard_verbs): Create verb here. + (update_bonobo_menus): Add SearchNow menu item. + 2002-03-18 Ettore Perazzoli * e-search-bar.c (clear_verb_cb): New. diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index 9254732905..98b6f8fe0e 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -99,6 +99,17 @@ emit_menu_activated (ESearchBar *esb, int item) /* Callbacks -- Standard verbs. */ +static void +search_now_verb_cb (BonoboUIComponent *ui_component, + void *data, + const char *verb_name) +{ + ESearchBar *esb; + + esb = E_SEARCH_BAR (data); + emit_search_activated (esb); +} + static void clear_verb_cb (BonoboUIComponent *ui_component, void *data, @@ -117,6 +128,8 @@ setup_standard_verbs (ESearchBar *search_bar) { bonobo_ui_component_add_verb (search_bar->ui_component, "ESearchBar:Clear", clear_verb_cb, search_bar); + bonobo_ui_component_add_verb (search_bar->ui_component, "ESearchBar:SearchNow", + search_now_verb_cb, search_bar); } /* Callbacks -- The verbs for all the definable items. */ @@ -360,6 +373,7 @@ update_bonobo_menus (ESearchBar *esb) xml = g_string_new (""); + append_xml_menu_item (xml, "SearchNow", _("Search Now"), "ESearchBar:SearchNow", "*Control*b"); append_xml_menu_item (xml, "Clear", _("Clear"), "ESearchBar:Clear", "*Control**Shift*b"); for (p = esb->menu_items; p != NULL; p = p->next) { -- cgit