aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view-actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mail/e-mail-shell-view-actions.c')
-rw-r--r--modules/mail/e-mail-shell-view-actions.c71
1 files changed, 6 insertions, 65 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 103463b586..2ab36d46fb 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -485,28 +485,6 @@ action_mail_hide_selected_cb (GtkAction *action,
}
static void
-action_mail_preview_cb (GtkToggleAction *action, EMailShellView *mail_shell_view)
-{
- const gchar *folder_uri;
- EMailReader *reader;
-
- reader = E_MAIL_READER (mail_shell_view->priv->mail_shell_content);
- folder_uri = e_mail_reader_get_folder_uri (reader);
-
- if (folder_uri) {
- GKeyFile *key_file;
- const gchar *key;
- gchar *group_name;
-
- key_file = e_shell_view_get_state_key_file (E_SHELL_VIEW (mail_shell_view));
- key = STATE_KEY_PREVIEW;
- group_name = g_strdup_printf ("Folder %s", folder_uri);
- g_key_file_set_boolean (key_file, group_name, key, gtk_toggle_action_get_active (action));
- g_free (group_name);
- }
-}
-
-static void
action_mail_label_cb (GtkToggleAction *action,
EMailShellView *mail_shell_view)
{
@@ -839,39 +817,6 @@ action_mail_threads_expand_all_cb (GtkAction *action,
}
static void
-action_mail_threads_group_by_cb (GtkToggleAction *action,
- EMailShellView *mail_shell_view)
-{
- EMailShellContent *mail_shell_content;
- GtkWidget *message_list;
- EMailReader *reader;
- const gchar *folder_uri;
- gboolean active;
-
- mail_shell_content = mail_shell_view->priv->mail_shell_content;
- active = gtk_toggle_action_get_active (action);
-
- reader = E_MAIL_READER (mail_shell_content);
- message_list = e_mail_reader_get_message_list (reader);
-
- message_list_set_threaded (MESSAGE_LIST (message_list), active);
-
- folder_uri = e_mail_reader_get_folder_uri (reader);
-
- if (folder_uri) {
- GKeyFile *key_file;
- const gchar *key;
- gchar *group_name;
-
- key_file = e_shell_view_get_state_key_file (E_SHELL_VIEW (mail_shell_view));
- key = STATE_KEY_THREAD_LIST;
- group_name = g_strdup_printf ("Folder %s", folder_uri);
- g_key_file_set_boolean (key_file, group_name, key, active);
- g_free (group_name);
- }
-}
-
-static void
action_mail_tools_filters_cb (GtkAction *action,
EMailShellView *mail_shell_view)
{
@@ -1320,7 +1265,7 @@ static GtkToggleActionEntry mail_toggle_entries[] = {
N_("Show Message _Preview"),
"<Control>m",
N_("Show message preview pane"),
- G_CALLBACK (action_mail_preview_cb), /* Also handled by property bindings */
+ NULL, /* Handled by property bindings */
TRUE },
{ "mail-threads-group-by",
@@ -1328,7 +1273,7 @@ static GtkToggleActionEntry mail_toggle_entries[] = {
N_("_Group By Threads"),
"<Control>t",
N_("Threaded message list"),
- G_CALLBACK (action_mail_threads_group_by_cb),
+ NULL, /* Handled by property bindings */
FALSE }
};
@@ -1566,14 +1511,6 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
bridge = gconf_bridge_get ();
- object = G_OBJECT (ACTION (MAIL_PREVIEW));
- key = "/apps/evolution/mail/display/show_preview";
- gconf_bridge_bind_property (bridge, key, object, "active");
-
- object = G_OBJECT (ACTION (MAIL_THREADS_GROUP_BY));
- key = "/apps/evolution/mail/display/thread_list";
- gconf_bridge_bind_property (bridge, key, object, "active");
-
object = G_OBJECT (ACTION (MAIL_VIEW_VERTICAL));
key = "/apps/evolution/mail/display/layout";
gconf_bridge_bind_property (bridge, key, object, "current-value");
@@ -1600,6 +1537,10 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
ACTION (MAIL_PREVIEW), "active",
mail_shell_content, "preview-visible");
+ e_mutual_binding_new (
+ ACTION (MAIL_THREADS_GROUP_BY), "active",
+ mail_shell_content, "group-by-threads");
+
e_binding_new (
ACTION (MAIL_PREVIEW), "active",
ACTION (MAIL_VIEW_CLASSIC), "sensitive");