aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-shell-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-10-25 07:02:33 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-10-25 07:02:33 +0800
commite7a31c5035a0afeed6c1675e30487c1e2bdc139f (patch)
treeeb1e733a6fe69773498725efa64304a9234270bc /mail/e-mail-shell-view.c
parent95cae9b166587d19db3aadde6a21cc12c30da6e6 (diff)
downloadgsoc2013-evolution-e7a31c5035a0afeed6c1675e30487c1e2bdc139f.tar
gsoc2013-evolution-e7a31c5035a0afeed6c1675e30487c1e2bdc139f.tar.gz
gsoc2013-evolution-e7a31c5035a0afeed6c1675e30487c1e2bdc139f.tar.bz2
gsoc2013-evolution-e7a31c5035a0afeed6c1675e30487c1e2bdc139f.tar.lz
gsoc2013-evolution-e7a31c5035a0afeed6c1675e30487c1e2bdc139f.tar.xz
gsoc2013-evolution-e7a31c5035a0afeed6c1675e30487c1e2bdc139f.tar.zst
gsoc2013-evolution-e7a31c5035a0afeed6c1675e30487c1e2bdc139f.zip
Commit recent work so I can merge from trunk.
svn path=/branches/kill-bonobo/; revision=36684
Diffstat (limited to 'mail/e-mail-shell-view.c')
-rw-r--r--mail/e-mail-shell-view.c59
1 files changed, 58 insertions, 1 deletions
diff --git a/mail/e-mail-shell-view.c b/mail/e-mail-shell-view.c
index 1097b280fe..9059bbb9e6 100644
--- a/mail/e-mail-shell-view.c
+++ b/mail/e-mail-shell-view.c
@@ -67,7 +67,64 @@ mail_shell_view_constructed (GObject *object)
static void
mail_shell_view_update_actions (EShellView *shell_view)
{
- /* FIXME */
+ EMailShellViewPrivate *priv;
+ EMailShellSidebar *mail_shell_sidebar;
+ EShellWindow *shell_window;
+ EMFolderTree *folder_tree;
+ GtkAction *action;
+ CamelURL *camel_url;
+ gchar *uri;
+ gboolean sensitive;
+ gboolean visible;
+
+ priv = E_MAIL_SHELL_VIEW_GET_PRIVATE (shell_view);
+
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ mail_shell_sidebar = priv->mail_shell_sidebar;
+ folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
+
+ uri = em_folder_tree_get_selected_uri (folder_tree);
+ camel_url = camel_url_new (uri, NULL);
+ g_free (uri);
+
+ action = ACTION (MAIL_EMPTY_TRASH);
+ visible = is_trash;
+ gtk_action_set_visible (action, visible);
+
+ action = ACTION (MAIL_FLUSH_OUTBOX);
+ visible = is_outbox;
+ gtk_action_set_visible (action, visible);
+
+ action = ACTION (MAIL_FOLDER_COPY);
+ sensitive = is_folder && is_selected;
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (MAIL_FOLDER_DELETE);
+ sensitive = is_folder && can_delete;
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (MAIL_FOLDER_MOVE);
+ sensitive = is_folder && can_delete;
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (MAIL_FOLDER_NEW);
+ sensitive = inferiors;
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (MAIL_FOLDER_PROPERTIES);
+ sensitive = is_folder && is_selected;
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (MAIL_FOLDER_REFRESH);
+ sensitive = is_folder && is_selected;
+ visible = nonstatic;
+ gtk_action_set_sensitive (action, sensitive);
+ gtk_action_set_visible (action, visible);
+
+ action = ACTION (MAIL_FOLDER_RENAME);
+ sensitive = is_folder && can_delete;
+ gtk_action_set_sensitive (action, sensitive);
}
static void