aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view-actions.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-11-26 01:10:14 +0800
committerMilan Crha <mcrha@redhat.com>2010-11-26 01:10:14 +0800
commite39dd931bcff0dfd6964a75c5b23c8e89f75d297 (patch)
treebb5b75e8e18d8be0a07829d220151196bd55dd0f /modules/mail/e-mail-shell-view-actions.c
parenteeec90235abe465e9cc49194b55ee2635faf023f (diff)
downloadgsoc2013-evolution-e39dd931bcff0dfd6964a75c5b23c8e89f75d297.tar
gsoc2013-evolution-e39dd931bcff0dfd6964a75c5b23c8e89f75d297.tar.gz
gsoc2013-evolution-e39dd931bcff0dfd6964a75c5b23c8e89f75d297.tar.bz2
gsoc2013-evolution-e39dd931bcff0dfd6964a75c5b23c8e89f75d297.tar.lz
gsoc2013-evolution-e39dd931bcff0dfd6964a75c5b23c8e89f75d297.tar.xz
gsoc2013-evolution-e39dd931bcff0dfd6964a75c5b23c8e89f75d297.tar.zst
gsoc2013-evolution-e39dd931bcff0dfd6964a75c5b23c8e89f75d297.zip
Bug #207580 - Allow new mail check on individual accounts
Diffstat (limited to 'modules/mail/e-mail-shell-view-actions.c')
-rw-r--r--modules/mail/e-mail-shell-view-actions.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index b2c5b8d1bb..01c53bed6e 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -716,6 +716,24 @@ action_mail_label_none_cb (GtkAction *action,
}
static void
+action_mail_send_receive_cb (GtkAction *action, EMailShellView *mail_shell_view)
+{
+ e_mail_shell_view_send_receive (mail_shell_view, E_MAIL_SEND_RECEIVE_BOTH, NULL);
+}
+
+static void
+action_mail_send_receive_receive_all_cb (GtkAction *action, EMailShellView *mail_shell_view)
+{
+ e_mail_shell_view_send_receive (mail_shell_view, E_MAIL_SEND_RECEIVE_RECEIVE, NULL);
+}
+
+static void
+action_mail_send_receive_send_all_cb (GtkAction *action, EMailShellView *mail_shell_view)
+{
+ e_mail_shell_view_send_receive (mail_shell_view, E_MAIL_SEND_RECEIVE_SEND, NULL);
+}
+
+static void
action_mail_show_deleted_cb (GtkToggleAction *action,
EMailShellView *mail_shell_view)
{
@@ -1180,6 +1198,34 @@ static GtkActionEntry mail_entries[] = {
N_("Subscribe or unsubscribe to folders on remote servers"),
G_CALLBACK (action_mail_tools_subscriptions_cb) },
+ { "mail-send-receive",
+ "mail-send-receive",
+ N_("Send / _Receive"),
+ "F9",
+ N_("Send queued items and retrieve new items"),
+ G_CALLBACK (action_mail_send_receive_cb) },
+
+ { "mail-send-receive-receive-all",
+ NULL,
+ N_("R_eceive all"),
+ NULL,
+ N_("Receive new items from all accounts"),
+ G_CALLBACK (action_mail_send_receive_receive_all_cb) },
+
+ { "mail-send-receive-send-all",
+ "mail-send",
+ N_("_Send all"),
+ NULL,
+ N_("Send queued items in all accounts"),
+ G_CALLBACK (action_mail_send_receive_send_all_cb) },
+
+ { "mail-send-receive-submenu",
+ "mail-send-receive",
+ N_("Send / _Receive"),
+ NULL,
+ NULL,
+ NULL },
+
{ "mail-smart-backward",
NULL,
NULL, /* No menu item; key press only */
@@ -1570,6 +1616,8 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
e_shell_searchbar_set_search_option (
searchbar, GTK_RADIO_ACTION (action));
+ g_object_set (ACTION (MAIL_SEND_RECEIVE), "is-important", TRUE, NULL);
+
/* Bind GObject properties for GConf keys. */
bridge = gconf_bridge_get ();
@@ -1637,6 +1685,26 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
ACTION (MAIL_STOP), "sensitive",
G_BINDING_SYNC_CREATE);
+ g_object_bind_property (
+ shell, "online",
+ ACTION (MAIL_SEND_RECEIVE), "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell, "online",
+ ACTION (MAIL_SEND_RECEIVE_RECEIVE_ALL), "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell, "online",
+ ACTION (MAIL_SEND_RECEIVE_SEND_ALL), "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell, "online",
+ ACTION (MAIL_SEND_RECEIVE_SUBMENU), "sensitive",
+ G_BINDING_SYNC_CREATE);
+
/* Keep the sensitivity of "Create Search Folder from Search"
* in sync with "Save Search" so that its only selectable when
* showing search results. */