~ubuntu-branches/ubuntu/precise/evolution/precise

« back to all changes in this revision

Viewing changes to modules/mail/e-mail-shell-view.c

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-09-08 09:38:57 UTC
  • mfrom: (1.1.84 upstream)
  • Revision ID: package-import@ubuntu.com-20110908093857-6lfl04ke2ns3kx2o
Tags: 3.1.91-0ubuntu1
* New upstream release. (LP: #843769)
* debian/control: bump e-d-s Build-Depends to 3.1.91. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
828
828
        EMFolderTreeModel *model;
829
829
        EMailReader *reader;
830
830
        EMailView *mail_view;
 
831
        CamelStore *store;
831
832
        EAccount *account;
832
833
        GtkAction *action;
833
834
        GList *list, *link;
845
846
        gboolean folder_is_trash;
846
847
        gboolean folder_has_unread_rec = FALSE;
847
848
        gboolean folder_tree_and_message_list_agree = TRUE;
848
 
        gboolean store_supports_subscriptions;
849
 
        gboolean any_store_supports_subscriptions = FALSE;
 
849
        gboolean store_is_subscribable;
 
850
        gboolean any_store_is_subscribable = FALSE;
850
851
 
851
852
        /* Chain up to parent's update_actions() method. */
852
853
        E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view);
879
880
                (state & E_MAIL_SIDEBAR_FOLDER_IS_STORE);
880
881
        folder_is_trash =
881
882
                (state & E_MAIL_SIDEBAR_FOLDER_IS_TRASH);
882
 
        store_supports_subscriptions =
883
 
                (state & E_MAIL_SIDEBAR_STORE_SUPPORTS_SUBSCRIPTIONS);
 
883
        store_is_subscribable =
 
884
                (state & E_MAIL_SIDEBAR_STORE_IS_SUBSCRIBABLE);
884
885
 
885
886
        uri = em_folder_tree_get_selected_uri (folder_tree);
886
 
        account = em_folder_tree_get_selected_account (folder_tree);
 
887
        store = em_folder_tree_get_selected_store (folder_tree);
 
888
 
 
889
        if (store != NULL) {
 
890
                CamelService *service;
 
891
                const gchar *uid;
 
892
 
 
893
                service = CAMEL_SERVICE (store);
 
894
                uid = camel_service_get_uid (service);
 
895
                account = e_get_account_by_uid (uid);
 
896
        } else
 
897
                account = NULL;
887
898
 
888
899
        if (uri != NULL) {
889
900
                GtkTreeRowReference *reference;
934
945
        for (link = list; link != NULL; link = g_list_next (link)) {
935
946
                CamelStore *store = CAMEL_STORE (link->data);
936
947
 
937
 
                if (camel_store_supports_subscriptions (store)) {
938
 
                        any_store_supports_subscriptions = TRUE;
 
948
                if (CAMEL_IS_SUBSCRIBABLE (store)) {
 
949
                        any_store_is_subscribable = TRUE;
939
950
                        break;
940
951
                }
941
952
        }
1002
1013
 
1003
1014
        action = ACTION (MAIL_FOLDER_UNSUBSCRIBE);
1004
1015
        sensitive =
1005
 
                store_supports_subscriptions &&
 
1016
                store_is_subscribable &&
1006
1017
                !folder_is_store && folder_can_be_deleted;
1007
1018
        gtk_action_set_sensitive (action, sensitive);
1008
1019
 
1011
1022
        gtk_action_set_sensitive (action, sensitive);
1012
1023
 
1013
1024
        action = ACTION (MAIL_MANAGE_SUBSCRIPTIONS);
1014
 
        sensitive = folder_is_store && store_supports_subscriptions;
 
1025
        sensitive = folder_is_store && store_is_subscribable;
1015
1026
        gtk_action_set_sensitive (action, sensitive);
1016
1027
 
1017
1028
        action = ACTION (MAIL_TOOLS_SUBSCRIPTIONS);
1018
 
        sensitive = any_store_supports_subscriptions;
 
1029
        sensitive = any_store_is_subscribable;
1019
1030
        gtk_action_set_sensitive (action, sensitive);
1020
1031
 
1021
1032
        e_mail_shell_view_update_popup_labels (mail_shell_view);