aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-11 02:42:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-11 02:42:53 +0800
commit6e7f42e0a60659411f2e10dbf8e84c705f0498a4 (patch)
treef006987a0cb4c32d1b3e93130e03c22ec942b1ed /modules
parent31fd01398cc76d3c00abbc05d419dfe873bc04c6 (diff)
downloadgsoc2013-evolution-6e7f42e0a60659411f2e10dbf8e84c705f0498a4.tar.gz
gsoc2013-evolution-6e7f42e0a60659411f2e10dbf8e84c705f0498a4.tar.zst
gsoc2013-evolution-6e7f42e0a60659411f2e10dbf8e84c705f0498a4.zip
Use an EShellSettings property for folder tree search.
Diffstat (limited to 'modules')
-rw-r--r--modules/mail/e-mail-shell-settings.c12
-rw-r--r--modules/mail/e-mail-shell-sidebar.c13
2 files changed, 25 insertions, 0 deletions
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);