[balsa/gtk3] Remember open mailboxes only if needed
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Remember open mailboxes only if needed
- Date: Wed, 27 Feb 2013 12:18:11 +0000 (UTC)
commit f83ceb4a6bb219245c7b6e358849605ff035880e
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Tue Feb 26 18:25:53 2013 -0500
Remember open mailboxes only if needed
* src/balsa-app.c (append_url_if_open): revert.
* src/main.c (scan_mailboxes_idle_cb): ditto.
* src/save-restore.c (save_view): remember open mailbox only if
balsa_app.remember_open_mboxes.
ChangeLog | 10 ++++++++++
src/balsa-app.c | 11 ++---------
src/main.c | 3 ++-
src/save-restore.c | 3 ++-
4 files changed, 16 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6f60394..606c5d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2013-02-26 Peter Bloomfield
+ Instead of forgetting open mailboxes, do not remember them in
+ the first place.
+
+ * src/balsa-app.c (append_url_if_open): revert.
+ * src/main.c (scan_mailboxes_idle_cb): ditto.
+ * src/save-restore.c (save_view): remember open mailbox only if
+ balsa_app.remember_open_mboxes.
+
+2013-02-26 Peter Bloomfield
+
* src/balsa-app.c (ask_password): use a mutex to make sure that
only one dialog pops up at a time.
diff --git a/src/balsa-app.c b/src/balsa-app.c
index 66e8664..77c3d83 100644
--- a/src/balsa-app.c
+++ b/src/balsa-app.c
@@ -499,15 +499,8 @@ static void
append_url_if_open(const gchar * url, LibBalsaMailboxView * view,
GPtrArray * array)
{
- if (view->open) {
- if (balsa_app.remember_open_mboxes) {
- g_ptr_array_add(array, g_strdup(url));
- } else {
- /* Forget that it was open */
- view->open = FALSE;
- view->in_sync = FALSE;
- }
- }
+ if (view->open)
+ g_ptr_array_add(array, g_strdup(url));
}
static void
diff --git a/src/main.c b/src/main.c
index a5df5b3..85d96e4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -406,7 +406,8 @@ scan_mailboxes_idle_cb()
balsa_check_open_mailboxes();
- g_idle_add((GSourceFunc) open_mailboxes_idle_cb, NULL);
+ if (balsa_app.remember_open_mboxes)
+ g_idle_add((GSourceFunc) open_mailboxes_idle_cb, NULL);
if (cmd_open_inbox || balsa_app.open_inbox_upon_startup)
g_idle_add((GSourceFunc) initial_open_inbox, NULL);
diff --git a/src/save-restore.c b/src/save-restore.c
index 80f3492..02864ab 100644
--- a/src/save-restore.c
+++ b/src/save-restore.c
@@ -1899,7 +1899,8 @@ save_view(const gchar * url, LibBalsaMailboxView * view)
libbalsa_conf_set_int("Subscribe", view->subscribe);
if (view->exposed != libbalsa_mailbox_get_exposed(NULL))
libbalsa_conf_set_bool("Exposed", view->exposed);
- if (view->open != libbalsa_mailbox_get_open(NULL))
+ if (balsa_app.remember_open_mboxes &&
+ view->open != libbalsa_mailbox_get_open(NULL))
libbalsa_conf_set_bool("Open", view->open);
#ifdef HAVE_GPGME
if (view->gpg_chk_mode != libbalsa_mailbox_get_crypto_mode(NULL))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]