[balsa/gtk3] Revert to separate most-recently-used lists



commit a356c4189fe4da44971d04ad12a8c0de73cdfaef
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Mon Apr 16 12:36:00 2012 -0400

    Revert to separate most-recently-used lists
    
    	Revert previous commit
    
    	* src/balsa-app.c (balsa_app_init):
    	* src/balsa-app.h:
    	* src/save-restore.c (config_mailbox_set_as_special),
    	(config_global_load), (config_save):
    	* src/sendmsg-window.c (create_info_pane):

 ChangeLog            |   10 ++++++++++
 src/balsa-app.c      |    3 ++-
 src/balsa-app.h      |    1 +
 src/save-restore.c   |    6 +++++-
 src/sendmsg-window.c |   16 ++++++++--------
 5 files changed, 26 insertions(+), 10 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8032106..58db697 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-04-16  Peter Bloomfield
+
+	Revert previous commit
+
+	* src/balsa-app.c (balsa_app_init):
+	* src/balsa-app.h:
+	* src/save-restore.c (config_mailbox_set_as_special),
+	(config_global_load), (config_save):
+	* src/sendmsg-window.c (create_info_pane):
+
 2012-03-27  Peter Bloomfield
 
 	Use a single MRU folder list
diff --git a/src/balsa-app.c b/src/balsa-app.c
index 88556e7..bab3bb0 100644
--- a/src/balsa-app.c
+++ b/src/balsa-app.c
@@ -418,7 +418,8 @@ balsa_app_init(void)
 #endif
 
     /* Message filing */
-    balsa_app.folder_mru = NULL;
+    balsa_app.folder_mru=NULL;
+    balsa_app.fcc_mru=NULL;
 
     g_object_set(gtk_settings_get_for_screen(gdk_screen_get_default()),
                  "gtk-fallback-icon-theme", "gnome", NULL);
diff --git a/src/balsa-app.h b/src/balsa-app.h
index 068a0b4..8a2af60 100644
--- a/src/balsa-app.h
+++ b/src/balsa-app.h
@@ -380,6 +380,7 @@ extern struct BalsaApplication {
 
     /* Most recently used lists */
     GList *folder_mru;
+    GList *fcc_mru;
     GList *pipe_cmds;
 
     gboolean expunge_on_close;
diff --git a/src/save-restore.c b/src/save-restore.c
index 75cfaca..96bfd4a 100644
--- a/src/save-restore.c
+++ b/src/save-restore.c
@@ -244,7 +244,7 @@ config_mailbox_set_as_special(LibBalsaMailbox * mailbox, specialType which)
 
     switch(which) {
     case SPECIAL_SENT: 
-	balsa_mblist_mru_add(&balsa_app.folder_mru, mailbox->url); break;
+	balsa_mblist_mru_add(&balsa_app.fcc_mru, mailbox->url); break;
     case SPECIAL_TRASH:
         libbalsa_filters_set_trash(balsa_app.trash); break;
     default: break;
@@ -1107,6 +1107,9 @@ config_global_load(void)
 	/* Folder MRU */
     load_mru(&balsa_app.folder_mru, "FolderMRU");
 
+	/* FCC MRU */
+    load_mru(&balsa_app.fcc_mru, "FccMRU");
+
     /* Pipe commands */
     load_mru(&balsa_app.pipe_cmds, "PipeCommands");
     if (!balsa_app.pipe_cmds)
@@ -1508,6 +1511,7 @@ config_save(void)
     libbalsa_conf_pop_group();
 
     save_mru(balsa_app.folder_mru, "FolderMRU");
+    save_mru(balsa_app.fcc_mru,    "FccMRU");
     save_mru(balsa_app.pipe_cmds,  "PipeCommands");
 
     libbalsa_conf_sync();
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index 618b366..620bded 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -2954,22 +2954,22 @@ create_info_pane(BalsaSendmsg * bsmsg)
     ++row;
     gtk_grid_attach(GTK_GRID(grid), bsmsg->fcc[0], 0, row, 1, 1);
 
-    if (!balsa_app.folder_mru)
-        balsa_mblist_mru_add(&balsa_app.folder_mru, balsa_app.sentbox->url);
-    balsa_mblist_mru_add(&balsa_app.folder_mru, "");
+    if (!balsa_app.fcc_mru)
+        balsa_mblist_mru_add(&balsa_app.fcc_mru, balsa_app.sentbox->url);
+    balsa_mblist_mru_add(&balsa_app.fcc_mru, "");
     if (balsa_app.copy_to_sentbox) {
         /* move the NULL option to the bottom */
-        balsa_app.folder_mru = g_list_reverse(balsa_app.folder_mru);
-        balsa_mblist_mru_add(&balsa_app.folder_mru, "");
-        balsa_app.folder_mru = g_list_reverse(balsa_app.folder_mru);
+        balsa_app.fcc_mru = g_list_reverse(balsa_app.fcc_mru);
+        balsa_mblist_mru_add(&balsa_app.fcc_mru, "");
+        balsa_app.fcc_mru = g_list_reverse(balsa_app.fcc_mru);
     }
     if (bsmsg->draft_message && bsmsg->draft_message->headers &&
 	bsmsg->draft_message->headers->fcc_url)
-        balsa_mblist_mru_add(&balsa_app.folder_mru,
+        balsa_mblist_mru_add(&balsa_app.fcc_mru,
                              bsmsg->draft_message->headers->fcc_url);
     bsmsg->fcc[1] =
         balsa_mblist_mru_option_menu(GTK_WINDOW(bsmsg->window),
-                                     &balsa_app.folder_mru);
+                                     &balsa_app.fcc_mru);
     gtk_label_set_mnemonic_widget(GTK_LABEL(bsmsg->fcc[0]), bsmsg->fcc[1]);
     gtk_grid_attach(GTK_GRID(grid), bsmsg->fcc[1] , 1, row, 1, 1);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]