diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-10-24 12:09:30 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-10-24 12:09:30 +0800 |
commit | e58630b14194b487c90a9995f10a98f93e88f9a8 (patch) | |
tree | c8a5f417c2f68d0f62b01c4ecfae3353b06f8302 /mail/folder-browser.c | |
parent | 5c99202e0b92d33db44720df655d593df4095ed2 (diff) | |
download | gsoc2013-evolution-e58630b14194b487c90a9995f10a98f93e88f9a8.tar gsoc2013-evolution-e58630b14194b487c90a9995f10a98f93e88f9a8.tar.gz gsoc2013-evolution-e58630b14194b487c90a9995f10a98f93e88f9a8.tar.bz2 gsoc2013-evolution-e58630b14194b487c90a9995f10a98f93e88f9a8.tar.lz gsoc2013-evolution-e58630b14194b487c90a9995f10a98f93e88f9a8.tar.xz gsoc2013-evolution-e58630b14194b487c90a9995f10a98f93e88f9a8.tar.zst gsoc2013-evolution-e58630b14194b487c90a9995f10a98f93e88f9a8.zip |
Unref the global search_context. (owner_set_cb): create the global
2001-10-23 Jeffrey Stedfast <fejj@ximian.com>
* component-factory.c (owner_unset_cb): Unref the global
search_context.
(owner_set_cb): create the global search_context.
* folder-browser.c (folder_browser_gui_init): Pass along the
global search_context to the e_filter_bar_new call.
svn path=/trunk/; revision=13976
Diffstat (limited to 'mail/folder-browser.c')
-rw-r--r-- | mail/folder-browser.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 89b6f43524..8a1734e222 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -1772,6 +1772,7 @@ fb_resize_cb (GtkWidget *w, GtkAllocation *a, FolderBrowser *fb) static void folder_browser_gui_init (FolderBrowser *fb) { + extern RuleContext *search_context; ESelectionModel *esm; /* The panned container */ @@ -1785,23 +1786,13 @@ folder_browser_gui_init (FolderBrowser *fb) 0, 0); /* quick-search bar */ - { - RuleContext *rc = (RuleContext *)rule_context_new (); - char *user = g_strdup_printf ("%s/searches.xml", evolution_dir); - /* we reuse the vfolder types here, they should match */ - char *system = EVOLUTION_DATADIR "/evolution/vfoldertypes.xml"; - - rule_context_add_part_set ((RuleContext *)rc, "partset", filter_part_get_type (), - rule_context_add_part, rule_context_next_part); - - rule_context_add_rule_set ((RuleContext *)rc, "ruleset", filter_rule_get_type (), - rule_context_add_rule, rule_context_next_rule); + if (search_context) { + const char *systemrules = gtk_object_get_data (GTK_OBJECT (search_context), "system"); + const char *userrules = gtk_object_get_data (GTK_OBJECT (search_context), "user"); - fb->search = e_filter_bar_new (rc, system, user, folder_browser_config_search, fb); + fb->search = e_filter_bar_new (search_context, systemrules, userrules, + folder_browser_config_search, fb); e_search_bar_set_menu ((ESearchBar *)fb->search, folder_browser_search_menu_items); - /*e_search_bar_set_option((ESearchBar *)fb->search, folder_browser_search_option_items);*/ - g_free (user); - gtk_object_unref (GTK_OBJECT (rc)); } gtk_widget_show (GTK_WIDGET (fb->search)); |