aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/ChangeLog7
-rw-r--r--widgets/misc/e-search-bar.c14
2 files changed, 21 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 4081b8c66a..ff9b1b6ef3 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,5 +1,12 @@
2002-03-18 Ettore Perazzoli <ettore@ximian.com>
+ * 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 <ettore@ximian.com>
+
* e-search-bar.c (clear_verb_cb): New.
(setup_standard_verbs): New.
(e_search_bar_set_ui_component): Call it if a 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
@@ -100,6 +100,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,
const char *verb_name)
@@ -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 ("<placeholder name=\"SearchBar\">");
+ 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) {