2012-01-10 [wwp] 3.8.0cvs13
authorTristan Chabredier <wwp@claws-mail.org>
Tue, 10 Jan 2012 08:20:31 +0000 (08:20 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Tue, 10 Jan 2012 08:20:31 +0000 (08:20 +0000)
* src/mainwindow.c
* src/mainwindow.h
* src/toolbar.c
Fix sensitivity of toolbar's get_btn (retrieve mail from current
account) and of mainwindows's relevant entry when current account
is not able to retrieve (SMTP-only).

ChangeLog
PATCHSETS
configure.ac
src/mainwindow.c
src/mainwindow.h
src/toolbar.c

index e034680..c1642ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-01-10 [wwp]       3.8.0cvs13
+
+       * src/mainwindow.c
+       * src/mainwindow.h
+       * src/toolbar.c
+               Fix sensitivity of toolbar's get_btn (retrieve mail from current
+               account) and of mainwindows's relevant entry when current account
+               is not able to retrieve (SMTP-only).
+
 2012-01-09 [colin]     3.8.0cvs12
 
        * src/summaryview.c
 2012-01-09 [colin]     3.8.0cvs12
 
        * src/summaryview.c
index 205a8f8..26def15 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.27 -r 1.1.2.28 src/gtk/gtkcmctree.c;  ) > 3.8.0cvs10.patchset
 ( cvs diff -u -r 1.115.2.245 -r 1.115.2.246 src/main.c;  ) > 3.8.0cvs11.patchset
 ( cvs diff -u -r 1.395.2.442 -r 1.395.2.443 src/summaryview.c;  ) > 3.8.0cvs12.patchset
 ( cvs diff -u -r 1.1.2.27 -r 1.1.2.28 src/gtk/gtkcmctree.c;  ) > 3.8.0cvs10.patchset
 ( cvs diff -u -r 1.115.2.245 -r 1.115.2.246 src/main.c;  ) > 3.8.0cvs11.patchset
 ( cvs diff -u -r 1.395.2.442 -r 1.395.2.443 src/summaryview.c;  ) > 3.8.0cvs12.patchset
+( cvs diff -u -r 1.274.2.340 -r 1.274.2.341 src/mainwindow.c;  cvs diff -u -r 1.39.2.62 -r 1.39.2.63 src/mainwindow.h;  cvs diff -u -r 1.43.2.124 -r 1.43.2.125 src/toolbar.c;  ) > 3.8.0cvs13.patchset
index 4737593..aa294f4 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=8
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=12
+EXTRA_VERSION=13
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 558c8ec..1ece795 100644 (file)
@@ -6,12 +6,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -3128,6 +3128,9 @@ SensitiveCond main_window_get_current_state(MainWindow *mainwin)
        if (cur_account)
                state |= M_HAVE_ACCOUNT;
        
        if (cur_account)
                state |= M_HAVE_ACCOUNT;
        
+       if (cur_account && cur_account->protocol != A_NONE)
+               state |= M_HAVE_RETRIEVABLE_ACCOUNT;
+
        if (any_folder_want_synchronise())
                state |= M_WANT_SYNC;
 
        if (any_folder_want_synchronise())
                state |= M_WANT_SYNC;
 
@@ -3137,6 +3140,13 @@ SensitiveCond main_window_get_current_state(MainWindow *mainwin)
        if (g_list_length(account_list) > 1)
                state |= M_HAVE_MULTI_ACCOUNT;
 
        if (g_list_length(account_list) > 1)
                state |= M_HAVE_MULTI_ACCOUNT;
 
+       for ( ; account_list != NULL; account_list = account_list->next) {
+               if (((PrefsAccount*)account_list->data)->protocol != A_NONE) {
+                       state |= M_HAVE_ANY_RETRIEVABLE_ACCOUNT;
+                       break;
+               }
+       }
+
        for ( ; account_list != NULL; account_list = account_list->next) {
                if (((PrefsAccount*)account_list->data)->protocol == A_NNTP) {
                        state |= M_HAVE_NEWS_ACCOUNT;
        for ( ; account_list != NULL; account_list = account_list->next) {
                if (((PrefsAccount*)account_list->data)->protocol == A_NNTP) {
                        state |= M_HAVE_NEWS_ACCOUNT;
@@ -3234,9 +3244,9 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"Menu/View/Quotes"                    , M_SINGLE_TARGET_EXIST},
 
                {"Menu/Message/Receive/CurrentAccount"
                {"Menu/View/Quotes"                    , M_SINGLE_TARGET_EXIST},
 
                {"Menu/Message/Receive/CurrentAccount"
-                                                , M_HAVE_ACCOUNT|M_UNLOCKED},
+                                                , M_HAVE_ACCOUNT|M_UNLOCKED|M_HAVE_RETRIEVABLE_ACCOUNT},
                {"Menu/Message/Receive/AllAccounts"
                {"Menu/Message/Receive/AllAccounts"
-                                                , M_HAVE_ACCOUNT|M_UNLOCKED},
+                                                , M_HAVE_ACCOUNT|M_UNLOCKED|M_HAVE_ANY_RETRIEVABLE_ACCOUNT},
                {"Menu/Message/Receive/CancelReceiving"
                                                 , M_INC_ACTIVE},
                {"Menu/Message/SendQueue"  , M_HAVE_ACCOUNT|M_HAVE_QUEUED_MAILS},
                {"Menu/Message/Receive/CancelReceiving"
                                                 , M_INC_ACTIVE},
                {"Menu/Message/SendQueue"  , M_HAVE_ACCOUNT|M_HAVE_QUEUED_MAILS},
index 39dfbb9..f10548d 100644 (file)
@@ -67,7 +67,9 @@ typedef enum
        M_SESSION_PASSWORDS   = 1 << 26,
        M_DELETED_EXISTS      = 1 << 27,
        M_NOT_TRASH           = 1 << 28,
        M_SESSION_PASSWORDS   = 1 << 26,
        M_DELETED_EXISTS      = 1 << 27,
        M_NOT_TRASH           = 1 << 28,
-       M_HIDE_READ_THREADS   = 1 << 29
+       M_HIDE_READ_THREADS   = 1 << 29,
+       M_HAVE_RETRIEVABLE_ACCOUNT = 1 << 30,
+       M_HAVE_ANY_RETRIEVABLE_ACCOUNT = 1 << 31
 } SensitiveCond;
 
 typedef enum
 } SensitiveCond;
 
 typedef enum
index 8e89558..2e97201 100644 (file)
@@ -2348,11 +2348,11 @@ void toolbar_main_set_sensitive(gpointer data)
        
        if (toolbar->get_btn)
                SET_WIDGET_COND(toolbar->get_btn, 
        
        if (toolbar->get_btn)
                SET_WIDGET_COND(toolbar->get_btn, 
-                       M_HAVE_ACCOUNT|M_UNLOCKED);
+                       M_HAVE_ACCOUNT|M_UNLOCKED|M_HAVE_RETRIEVABLE_ACCOUNT);
 
        if (toolbar->getall_btn) {
                SET_WIDGET_COND(toolbar->getall_btn, 
 
        if (toolbar->getall_btn) {
                SET_WIDGET_COND(toolbar->getall_btn, 
-                       M_HAVE_ACCOUNT|M_UNLOCKED);
+                       M_HAVE_ACCOUNT|M_UNLOCKED|M_HAVE_ANY_RETRIEVABLE_ACCOUNT);
        }
        if (toolbar->send_btn) {
                SET_WIDGET_COND(toolbar->send_btn,
        }
        if (toolbar->send_btn) {
                SET_WIDGET_COND(toolbar->send_btn,