aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-shell-view-actions.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-01-24 12:45:19 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-01-24 12:45:19 +0800
commitcbb3a71adc5551f4c600cfc6f53fc112f3022a78 (patch)
tree74aee71ae289b726bb9c1e5097dbdc29aa22c610 /mail/e-mail-shell-view-actions.c
parentbd9f473a896496b95b9896d30940f2ab27493432 (diff)
downloadgsoc2013-evolution-cbb3a71adc5551f4c600cfc6f53fc112f3022a78.tar
gsoc2013-evolution-cbb3a71adc5551f4c600cfc6f53fc112f3022a78.tar.gz
gsoc2013-evolution-cbb3a71adc5551f4c600cfc6f53fc112f3022a78.tar.bz2
gsoc2013-evolution-cbb3a71adc5551f4c600cfc6f53fc112f3022a78.tar.lz
gsoc2013-evolution-cbb3a71adc5551f4c600cfc6f53fc112f3022a78.tar.xz
gsoc2013-evolution-cbb3a71adc5551f4c600cfc6f53fc112f3022a78.tar.zst
gsoc2013-evolution-cbb3a71adc5551f4c600cfc6f53fc112f3022a78.zip
Get automatic message selection working.
Add a tooltip to the online button. svn path=/branches/kill-bonobo/; revision=37126
Diffstat (limited to 'mail/e-mail-shell-view-actions.c')
-rw-r--r--mail/e-mail-shell-view-actions.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/mail/e-mail-shell-view-actions.c b/mail/e-mail-shell-view-actions.c
index a3d7397372..5e923724a9 100644
--- a/mail/e-mail-shell-view-actions.c
+++ b/mail/e-mail-shell-view-actions.c
@@ -397,22 +397,10 @@ action_mail_preview_cb (GtkToggleAction *action,
EMailShellView *mail_shell_view)
{
EMailShellContent *mail_shell_content;
- MessageList *message_list;
- CamelFolder *folder;
- EMailReader *reader;
- const gchar *state;
gboolean active;
mail_shell_content = mail_shell_view->priv->mail_shell_content;
active = gtk_toggle_action_get_active (action);
- state = active ? "1" : "0";
-
- reader = E_MAIL_READER (mail_shell_content);
- message_list = e_mail_reader_get_message_list (reader);
- folder = message_list->folder;
-
- if (camel_object_meta_set (folder, "evolution:show_preview", state))
- camel_object_state_write (folder);
e_mail_shell_content_set_preview_visible (mail_shell_content, active);
}
@@ -470,20 +458,13 @@ action_mail_threads_group_by_cb (GtkToggleAction *action,
EMailShellContent *mail_shell_content;
MessageList *message_list;
EMailReader *reader;
- CamelFolder *folder;
- const gchar *state;
gboolean active;
mail_shell_content = mail_shell_view->priv->mail_shell_content;
active = gtk_toggle_action_get_active (action);
- state = active ? "1" : "0";
reader = E_MAIL_READER (mail_shell_content);
message_list = e_mail_reader_get_message_list (reader);
- folder = message_list->folder;
-
- if (camel_object_meta_set (folder, "evolution:thread_list", state))
- camel_object_state_write (folder);
message_list_set_threaded (message_list, active);
}
@@ -1033,6 +1014,8 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
GtkUIManager *ui_manager;
GConfBridge *bridge;
GObject *object;
+ GObject *src_object;
+ GObject *dst_object;
const gchar *domain;
const gchar *key;
@@ -1083,4 +1066,20 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
object = G_OBJECT (ACTION (MAIL_VIEW_VERTICAL));
key = "/apps/evolution/mail/display/layout";
gconf_bridge_bind_property (bridge, key, object, "current-value");
+
+ /* Fine tuning. */
+
+ src_object = G_OBJECT (ACTION (MAIL_THREADS_GROUP_BY));
+
+ dst_object = G_OBJECT (ACTION (MAIL_FOLDER_SELECT_THREAD));
+ e_binding_new (src_object, "active", dst_object, "sensitive");
+
+ dst_object = G_OBJECT (ACTION (MAIL_FOLDER_SELECT_SUBTHREAD));
+ e_binding_new (src_object, "active", dst_object, "sensitive");
+
+ dst_object = G_OBJECT (ACTION (MAIL_THREADS_COLLAPSE_ALL));
+ e_binding_new (src_object, "active", dst_object, "sensitive");
+
+ dst_object = G_OBJECT (ACTION (MAIL_THREADS_EXPAND_ALL));
+ e_binding_new (src_object, "active", dst_object, "sensitive");
}