2007-02-27 [colin] 2.8.0cvs4
authorColin Leroy <colin@colino.net>
Tue, 27 Feb 2007 18:18:10 +0000 (18:18 +0000)
committerColin Leroy <colin@colino.net>
Tue, 27 Feb 2007 18:18:10 +0000 (18:18 +0000)
* src/inc.c
Fix "After receiving new mail, go to inbox" on IMAP,
and make it work only on manual reception

ChangeLog
PATCHSETS
configure.ac
src/inc.c

index 7643f37314a30e8f65e064ae368c68aa0ba937e8..d36a45204fa58065b7d6d750e1214ed65e4e6a92 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-27 [colin]     2.8.0cvs4
+
+       * src/inc.c
+               Fix "After receiving new mail, go to inbox" on IMAP,
+               and make it work only on manual reception
+
 2007-02-27 [wwp]       2.8.0cvs3
 
        * src/prefs_filtering.c
index 9f7a0fde0666a3d160ef4866001fdaad2b611343..6a1695e23f93b4a81e506177f1c6a631aea3abbe 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.13 -r 1.1.2.14 tools/claws.i18n.status.pl;  ) > 2.8.0cvs1.patchset
 ( cvs diff -u -r 1.179.2.155 -r 1.179.2.156 src/imap.c;  cvs diff -u -r 1.1.4.4 -r 1.1.4.5 src/etpan/etpan-thread-manager-types.h;  cvs diff -u -r 1.1.4.6 -r 1.1.4.7 src/etpan/etpan-thread-manager.c;  cvs diff -u -r 1.1.4.73 -r 1.1.4.74 src/etpan/imap-thread.c;  ) > 2.8.0cvs2.patchset
 ( cvs diff -u -r 1.59.2.53 -r 1.59.2.54 src/prefs_filtering.c;  cvs diff -u -r 1.1.4.33 -r 1.1.4.34 src/prefs_filtering_action.c;  cvs diff -u -r 1.43.2.55 -r 1.43.2.56 src/prefs_matcher.c;  ) > 2.8.0cvs3.patchset
+( cvs diff -u -r 1.149.2.65 -r 1.149.2.66 src/inc.c;  ) > 2.8.0cvs4.patchset
index 1717792bafd3730d7e7c22fba6fff22d5af34285..c6fe0a78e3aa261027a8d32e696b3b7d8277a16c 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=3
+EXTRA_VERSION=4
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5ae8eb5fce0cc62b169fb2d7686f2266eb133afc..821ce550b14f7782c9d3e6edede25edd6e6b1e9f 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -72,7 +72,8 @@ static GdkPixbuf *okpix;
 #define MSGBUFSIZE     8192
 
 static void inc_finished               (MainWindow             *mainwin,
-                                        gboolean                new_messages);
+                                        gboolean                new_messages,
+                                        gboolean                autocheck);
 static gint inc_account_mail_real      (MainWindow             *mainwin,
                                         PrefsAccount           *account);
 
@@ -143,19 +144,21 @@ static void inc_notify_cmd                (gint new_msgs,
  * messages.  If @new_messages is FALSE, this function avoids unneeded
  * updating.
  **/
-static void inc_finished(MainWindow *mainwin, gboolean new_messages)
+static void inc_finished(MainWindow *mainwin, gboolean new_messages, gboolean autocheck)
 {
        FolderItem *item;
 
        if (prefs_common.scan_all_after_inc)
                folderview_check_new(NULL);
 
-       if (!new_messages && !prefs_common.scan_all_after_inc) return;
+       if (!autocheck && prefs_common.open_inbox_on_inc) {
+               if (cur_account && cur_account->inbox)
+                       item = folder_find_item_from_identifier(cur_account->inbox);
+               if (item == NULL && cur_account->folder)
+                       item = cur_account->folder->inbox;
+               if (item == NULL)
+                       item = folder_get_default_inbox();
 
-       if (prefs_common.open_inbox_on_inc) {
-               item = cur_account && cur_account->inbox
-                       ? folder_find_item_from_identifier(cur_account->inbox)
-                       : folder_get_default_inbox();
                folderview_unselect(mainwin->folderview);
                folderview_select(mainwin->folderview, item);
        }
@@ -191,7 +194,7 @@ void inc_mail(MainWindow *mainwin, gboolean notify)
                        new_msgs += account_new_msgs;
        }
 
-       inc_finished(mainwin, new_msgs > 0);
+       inc_finished(mainwin, new_msgs > 0, FALSE);
        main_window_unlock(mainwin);
        inc_notify_cmd(new_msgs, notify);
        inc_autocheck_timer_set();
@@ -284,7 +287,7 @@ gint inc_account_mail(MainWindow *mainwin, PrefsAccount *account)
 
        new_msgs = inc_account_mail_real(mainwin, account);
 
-       inc_finished(mainwin, new_msgs > 0);
+       inc_finished(mainwin, new_msgs > 0, FALSE);
        main_window_unlock(mainwin);
        inc_autocheck_timer_set();
 
@@ -312,7 +315,7 @@ void inc_all_account_mail(MainWindow *mainwin, gboolean autocheck,
 
        list = account_get_list();
        if (!list) {
-               inc_finished(mainwin, new_msgs > 0);
+               inc_finished(mainwin, new_msgs > 0, autocheck);
                main_window_unlock(mainwin);
                inc_notify_cmd(new_msgs, notify);
                inc_autocheck_timer_set();
@@ -356,7 +359,7 @@ void inc_all_account_mail(MainWindow *mainwin, gboolean autocheck,
                new_msgs += inc_start(inc_dialog);
        }
 
-       inc_finished(mainwin, new_msgs > 0);
+       inc_finished(mainwin, new_msgs > 0, autocheck);
        main_window_unlock(mainwin);
        inc_notify_cmd(new_msgs, notify);
        inc_autocheck_timer_set();