aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-06-09 01:18:04 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-06-09 01:47:22 +0800
commitb4fbbde6ab7deb247f1db19558489a868c75467d (patch)
treed8dd0d1950cf35719391ec60474e5fa0844e1165 /modules/mail
parentf92f3a1f453b037427539f2c0e3968d56fde8696 (diff)
downloadgsoc2013-evolution-b4fbbde6ab7deb247f1db19558489a868c75467d.tar
gsoc2013-evolution-b4fbbde6ab7deb247f1db19558489a868c75467d.tar.gz
gsoc2013-evolution-b4fbbde6ab7deb247f1db19558489a868c75467d.tar.bz2
gsoc2013-evolution-b4fbbde6ab7deb247f1db19558489a868c75467d.tar.lz
gsoc2013-evolution-b4fbbde6ab7deb247f1db19558489a868c75467d.tar.xz
gsoc2013-evolution-b4fbbde6ab7deb247f1db19558489a868c75467d.tar.zst
gsoc2013-evolution-b4fbbde6ab7deb247f1db19558489a868c75467d.zip
Remove "enable-local" and "enable-vfolders" GSettings key.
We have built-in ESources for the 'local' and 'vfolder' mail stores, and can now track their enabled state as we would any other mail store.
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/e-mail-config-reader.c9
-rw-r--r--modules/mail/e-mail-shell-backend.c12
-rw-r--r--modules/mail/e-mail-shell-settings.c10
3 files changed, 10 insertions, 21 deletions
diff --git a/modules/mail/e-mail-config-reader.c b/modules/mail/e-mail-config-reader.c
index 3926d05a7d..f732c7377a 100644
--- a/modules/mail/e-mail-config-reader.c
+++ b/modules/mail/e-mail-config-reader.c
@@ -35,11 +35,14 @@ mail_config_reader_idle_cb (EExtension *extension)
EExtensible *extensible;
GtkActionGroup *action_group;
EShellSettings *shell_settings;
+ ESourceRegistry *registry;
+ ESource *source;
EShell *shell;
extensible = e_extension_get_extensible (extension);
shell = e_shell_get_default ();
+ registry = e_shell_get_registry (shell);
shell_settings = e_shell_get_shell_settings (shell);
g_object_bind_property (
@@ -56,11 +59,15 @@ mail_config_reader_idle_cb (EExtension *extension)
E_MAIL_READER (extensible),
E_MAIL_READER_ACTION_GROUP_SEARCH_FOLDERS);
+ source = e_source_registry_ref_source (registry, "vfolder");
+
g_object_bind_property (
- shell_settings, "mail-enable-search-folders",
+ source, "enabled",
action_group, "visible",
G_BINDING_SYNC_CREATE);
+ g_object_unref (source);
+
return FALSE;
}
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 3aecfd91d8..95fea2edd1 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -519,27 +519,19 @@ static void
mail_shell_backend_start (EShellBackend *shell_backend)
{
EMailShellBackendPrivate *priv;
- EShell *shell;
- EShellSettings *shell_settings;
EMailBackend *backend;
EMailSession *session;
EMailAccountStore *account_store;
- gboolean enable_search_folders;
GError *error = NULL;
priv = E_MAIL_SHELL_BACKEND_GET_PRIVATE (shell_backend);
- shell = e_shell_backend_get_shell (shell_backend);
- shell_settings = e_shell_get_shell_settings (shell);
-
backend = E_MAIL_BACKEND (shell_backend);
session = e_mail_backend_get_session (backend);
account_store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION (session));
- enable_search_folders = e_shell_settings_get_boolean (
- shell_settings, "mail-enable-search-folders");
- if (enable_search_folders)
- vfolder_load_storage (session);
+ /* XXX Should we be calling this unconditionally? */
+ vfolder_load_storage (session);
if (!e_mail_account_store_load_sort_order (account_store, &error)) {
g_warning ("%s: %s", G_STRFUNC, error->message);
diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c
index 1838a06f26..8243f79e3a 100644
--- a/modules/mail/e-mail-shell-settings.c
+++ b/modules/mail/e-mail-shell-settings.c
@@ -141,16 +141,6 @@ e_mail_shell_settings_init (EShellBackend *shell_backend)
"enable-unmatched");
e_shell_settings_install_property_for_key (
- "mail-enable-search-folders",
- MAIL_SCHEMA,
- "enable-vfolders");
-
- e_shell_settings_install_property_for_key (
- "mail-enable-local-folders",
- MAIL_SCHEMA,
- "enable-local");
-
- e_shell_settings_install_property_for_key (
"mail-font-monospace",
MAIL_SCHEMA,
"monospace-font");