aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view-private.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-12-19 13:46:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-12-19 13:46:19 +0800
commit60e6ecbb42bf19c23638cd4b7643b2ec19320b57 (patch)
tree4505a8ff087ebe9ca71892abc3e968d437542270 /modules/mail/e-mail-shell-view-private.c
parent668db990795a7677afc0d0bcb7c463abe1571d5a (diff)
downloadgsoc2013-evolution-60e6ecbb42bf19c23638cd4b7643b2ec19320b57.tar.gz
gsoc2013-evolution-60e6ecbb42bf19c23638cd4b7643b2ec19320b57.tar.zst
gsoc2013-evolution-60e6ecbb42bf19c23638cd4b7643b2ec19320b57.zip
Remove some obsolete GConf keys.
/apps/evolution/mail/display/show_preview /apps/evolution/mail/display/thread_list These keys are no longer needed since we're storing the settings by folder now in ~/.evolution/mail/config/state. To simplify things we use hard-coded defaults: TRUE for PreviewVisible, FALSE for GroupByThreads.
Diffstat (limited to 'modules/mail/e-mail-shell-view-private.c')
-rw-r--r--modules/mail/e-mail-shell-view-private.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index f1e9805752..b198b69cd1 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -23,49 +23,6 @@
#include "widgets/menus/gal-view-factory-etable.h"
-static gboolean
-restore_action_bool_state (gpointer view, GtkToggleAction *action, GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *gconf_key)
-{
- gboolean value;
- GConfBridge *bridge;
-
- g_return_val_if_fail (action != NULL, FALSE);
- g_return_val_if_fail (GTK_IS_TOGGLE_ACTION (action), FALSE);
- g_return_val_if_fail (key_file != NULL, FALSE);
- g_return_val_if_fail (group_name != NULL, FALSE);
- g_return_val_if_fail (key != NULL, FALSE);
- g_return_val_if_fail (gconf_key != NULL, FALSE);
-
- bridge = gconf_bridge_get ();
-
- if (g_key_file_has_key (key_file, group_name, key, NULL)) {
- value = g_key_file_get_boolean (key_file, group_name, key, NULL);
- } else {
- GError *error = NULL;
-
- value = gconf_client_get_bool (gconf_bridge_get_client (bridge), gconf_key, &error);
-
- if (error) {
- g_error_free (error);
- value = gtk_toggle_action_get_active (action);
- }
- }
-
- if (value != gtk_toggle_action_get_active (action)) {
- /* block bindings to not store this change to gconf */
- gconf_bridge_block_property_bindings (bridge, gconf_key);
- /* block action to not store to key file for the previous folder */
- g_signal_handlers_block_matched (action, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
-
- gtk_toggle_action_set_active (action, value);
-
- g_signal_handlers_unblock_matched (action, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
- gconf_bridge_unblock_property_bindings (bridge, gconf_key);
- }
-
- return value;
-}
-
static void
mail_shell_view_folder_tree_selected_cb (EMailShellView *mail_shell_view,
const gchar *full_name,
@@ -90,33 +47,6 @@ mail_shell_view_folder_tree_selected_cb (EMailShellView *mail_shell_view,
e_mail_reader_set_folder (reader, NULL, NULL);
e_shell_view_update_actions (shell_view);
-
- if (folder_selected && uri) {
- EShellWindow *shell_window;
- GtkToggleAction *action;
- GKeyFile *key_file;
- gchar *group_name;
- gboolean value;
-
- shell_window = e_shell_view_get_shell_window (shell_view);
- key_file = e_shell_view_get_state_key_file (shell_view);
- group_name = g_strdup_printf ("Folder %s", uri);
-
- action = GTK_TOGGLE_ACTION (ACTION (MAIL_PREVIEW));
- restore_action_bool_state (mail_shell_view, action,
- key_file, group_name, STATE_KEY_PREVIEW,
- "/apps/evolution/mail/display/show_preview");
-
- action = GTK_TOGGLE_ACTION (ACTION (MAIL_THREADS_GROUP_BY));
- value = restore_action_bool_state (mail_shell_view, action,
- key_file, group_name, STATE_KEY_THREAD_LIST,
- "/apps/evolution/mail/display/thread_list");
-
- /* because the change is not propagated due to blocking the action signal */
- message_list_set_threaded (MESSAGE_LIST (e_mail_reader_get_message_list (reader)), value);
-
- g_free (group_name);
- }
}
static gboolean