diff options
-rw-r--r-- | mail/em-folder-tree.c | 3 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-settings.c | 12 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-sidebar.c | 13 |
3 files changed, 25 insertions, 3 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 96c2e13b3e..1c35699452 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -888,11 +888,9 @@ folder_tree_new (EMFolderTree *emft) GtkTreeViewColumn *column; GtkCellRenderer *renderer; GtkWidget *tree; - gboolean side_bar_search; GConfClient *gconf; gconf = mail_config_get_gconf_client (); - side_bar_search = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/side_bar_search", NULL); /* FIXME[KILL-BONOBO] Gross hack */ tree = GTK_WIDGET (emft); @@ -923,7 +921,6 @@ folder_tree_new (EMFolderTree *emft) gtk_tree_view_set_headers_visible ((GtkTreeView *) tree, FALSE); gtk_tree_view_set_search_column((GtkTreeView *)tree, COL_STRING_DISPLAY_NAME); - gtk_tree_view_set_enable_search((GtkTreeView *)tree, side_bar_search); return (GtkTreeView *) tree; } diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c index 897ccfc18b..7f73bf3f15 100644 --- a/modules/mail/e-mail-shell-settings.c +++ b/modules/mail/e-mail-shell-settings.c @@ -386,6 +386,18 @@ e_mail_shell_settings_init (EShell *shell) e_shell_settings_install_property ( g_param_spec_boolean ( + "mail-side-bar-search", + NULL, + NULL, + TRUE, + G_PARAM_READWRITE)); + + e_shell_settings_bind_to_gconf ( + shell_settings, "mail-side-bar-search", + "/apps/evolution/mail/display/side_bar_search"); + + e_shell_settings_install_property ( + g_param_spec_boolean ( "mail-use-custom-fonts", NULL, NULL, diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c index 2e5dffcb96..0f8e4f5783 100644 --- a/modules/mail/e-mail-shell-sidebar.c +++ b/modules/mail/e-mail-shell-sidebar.c @@ -24,6 +24,8 @@ #include <string.h> #include <camel/camel.h> +#include "e-util/e-binding.h" + #include "em-utils.h" #include "em-folder-utils.h" @@ -410,8 +412,11 @@ static void mail_shell_sidebar_constructed (GObject *object) { EMailShellSidebar *mail_shell_sidebar; + EShellSettings *shell_settings; EShellSidebar *shell_sidebar; + EShellWindow *shell_window; EShellView *shell_view; + EShell *shell; GtkTreeSelection *selection; GtkTreeView *tree_view; GtkTreeModel *model; @@ -423,6 +428,10 @@ mail_shell_sidebar_constructed (GObject *object) shell_sidebar = E_SHELL_SIDEBAR (object); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); + shell_window = e_shell_view_get_shell_window (shell_view); + + shell = e_shell_window_get_shell (shell_window); + shell_settings = e_shell_get_shell_settings (shell); mail_shell_sidebar = E_MAIL_SHELL_SIDEBAR (object); @@ -448,6 +457,10 @@ mail_shell_sidebar_constructed (GObject *object) mail_shell_sidebar->priv->folder_tree = g_object_ref (widget); gtk_widget_show (widget); + e_binding_new ( + G_OBJECT (shell_settings), "mail-side-bar-search", + G_OBJECT (widget), "enable-search"); + tree_view = GTK_TREE_VIEW (mail_shell_sidebar->priv->folder_tree); selection = gtk_tree_view_get_selection (tree_view); model = gtk_tree_view_get_model (tree_view); |