From 115a2836e1dc2826e389d25e12f0ed5f96c86cef Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 6 Aug 2002 05:19:49 +0000 Subject: Set the query text into the filter name when saving it, for #10979. 2002-08-06 Not Zed * e-filter-bar.c (menubar_activated): Set the query text into the filter name when saving it, for #10979. svn path=/trunk/; revision=17710 --- widgets/misc/ChangeLog | 5 +++++ widgets/misc/e-filter-bar.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index baf814207e..4cf470a49a 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,8 @@ +2002-08-06 Not Zed + + * e-filter-bar.c (menubar_activated): Set the query text into the + filter name when saving it, for #10979. + 2002-07-24 Ettore Perazzoli * e-calendar-item.c (e_calendar_item_signal_emission_idle_cb): Add diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c index 261147d03c..e2e546fed7 100644 --- a/widgets/misc/e-filter-bar.c +++ b/widgets/misc/e-filter-bar.c @@ -196,9 +196,15 @@ menubar_activated (ESearchBar *esb, int id, void *data) GtkWidget *w; GtkWidget *gd; FilterRule *rule; - + char *name, *text; + rule = filter_rule_clone (efb->current_query); - + text = e_search_bar_get_text(esb); + name = g_strdup_printf("%s %s", rule->name, text&&text[0]?text:"''"); + g_free(text); + filter_rule_set_name(rule, name); + g_free(name); + w = filter_rule_get_widget (rule, efb->context); filter_rule_set_source (rule, FILTER_SOURCE_INCOMING); gd = gnome_dialog_new (_("Save Search"), GNOME_STOCK_BUTTON_OK, -- cgit v1.2.3