2011-11-19 [pawel] 3.7.10cvs91
authorPaweł Pękala <c0rn@gazeta.pl>
Sat, 19 Nov 2011 17:47:48 +0000 (17:47 +0000)
committerPaweł Pękala <c0rn@gazeta.pl>
Sat, 19 Nov 2011 17:47:48 +0000 (17:47 +0000)
* src/mainwindow.c
* src/messageview.c
* src/prefs_common.c
* src/prefs_common.h
* src/summaryview.c
* src/textview.c
* src/textview.h
Fix bug #2377 'Show All Headers - make change persistent
between sessions'

ChangeLog
PATCHSETS
configure.ac
src/mainwindow.c
src/messageview.c
src/prefs_common.c
src/prefs_common.h
src/summaryview.c
src/textview.c
src/textview.h

index 0ff3ca3..f8963eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-11-19 [pawel]     3.7.10cvs91
+
+       * src/mainwindow.c
+       * src/messageview.c
+       * src/prefs_common.c
+       * src/prefs_common.h
+       * src/summaryview.c
+       * src/textview.c
+       * src/textview.h
+               Fix bug #2377 'Show All Headers - make change persistent
+               between sessions'
+
 2011-11-19 [pawel]     3.7.10cvs90
 
        * src/folder.c
index fb52377..8783a46 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.595 -r 1.382.2.596 src/compose.c;  cvs diff -u -r 1.274.2.336 -r 1.274.2.337 src/mainwindow.c;  cvs diff -u -r 1.83.2.181 -r 1.83.2.182 src/mimeview.c;  cvs diff -u -r 1.20.2.35 -r 1.20.2.36 src/mimeview.h;  cvs diff -u -r 1.204.2.205 -r 1.204.2.206 src/prefs_common.c;  cvs diff -u -r 1.103.2.134 -r 1.103.2.135 src/prefs_common.h;  ) > 3.7.10cvs88.patchset
 ( cvs diff -u -r 1.47.2.55 -r 1.47.2.56 src/procheader.c;  ) > 3.7.10cvs89.patchset
 ( cvs diff -u -r 1.213.2.202 -r 1.213.2.203 src/folder.c;  cvs diff -u -r 1.87.2.64 -r 1.87.2.65 src/folder.h;  cvs diff -u -r 1.2.2.37 -r 1.2.2.38 src/folder_item_prefs.c;  cvs diff -u -r 1.207.2.225 -r 1.207.2.226 src/folderview.c;  cvs diff -u -r 1.274.2.337 -r 1.274.2.338 src/mainwindow.c;  cvs diff -u -r 1.39.2.61 -r 1.39.2.62 src/mainwindow.h;  cvs diff -u -r 1.395.2.438 -r 1.395.2.439 src/summaryview.c;  cvs diff -u -r 1.68.2.57 -r 1.68.2.58 src/summaryview.h;  cvs diff -u -r 1.1.2.75 -r 1.1.2.76 src/gtk/authors.h;  ) > 3.7.10cvs90.patchset
+( cvs diff -u -r 1.274.2.338 -r 1.274.2.339 src/mainwindow.c;  cvs diff -u -r 1.94.2.223 -r 1.94.2.224 src/messageview.c;  cvs diff -u -r 1.204.2.206 -r 1.204.2.207 src/prefs_common.c;  cvs diff -u -r 1.103.2.135 -r 1.103.2.136 src/prefs_common.h;  cvs diff -u -r 1.395.2.439 -r 1.395.2.440 src/summaryview.c;  cvs diff -u -r 1.96.2.236 -r 1.96.2.237 src/textview.c;  cvs diff -u -r 1.12.2.28 -r 1.12.2.29 src/textview.h;  ) > 3.7.10cvs91.patchset
index d77d512..4976e04 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=90
+EXTRA_VERSION=91
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 0a8527e..7e1a24d 100644 (file)
@@ -3377,7 +3377,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
        &&  mainwin->messageview->mimeview
        &&  mainwin->messageview->mimeview->textview)
                cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/AllHeaders",
-                             mainwin->messageview->mimeview->textview->show_all_headers);
+                                               prefs_common.show_all_headers);
        cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/ThreadView", (state & M_THREADED) != 0);
        cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/ExpandThreads", (state & M_THREADED) != 0);
        cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/CollapseThreads", (state & M_THREADED) != 0);
@@ -4364,7 +4364,7 @@ static void show_all_header_cb(GtkAction *action, gpointer data)
 {
        MainWindow *mainwin = (MainWindow *)data;
        if (mainwin->menu_lock_count) return;
-       mainwin->summaryview->messageview->all_headers = 
+       prefs_common.show_all_headers = 
                        gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
        summary_display_msg_selected(mainwin->summaryview,
                                     gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
@@ -4497,7 +4497,7 @@ static void open_urls_cb(GtkAction *action, gpointer data)
        MainWindow *mainwin = (MainWindow *)data;
        if (!mainwin->summaryview->displayed && mainwin->summaryview->selected) {
                summary_display_msg_selected(mainwin->summaryview, 
-                       mainwin->messageview->mimeview->textview->show_all_headers);
+                                            prefs_common.show_all_headers);
        }
        messageview_list_urls(mainwin->messageview);
 }
index 5fafedb..133b55d 100644 (file)
@@ -631,6 +631,9 @@ static void messageview_add_toolbar(MessageView *msgview, GtkWidget *window)
        hildon_window_set_menu(HILDON_WINDOW(window), GTK_MENU(menubar));
 #endif
 
+       cm_toggle_menu_set_active_full(msgview->ui_manager, "Menu/View/AllHeaders",
+                                       prefs_common.show_all_headers);
+
        if (prefs_common.toolbar_detachable) {
                handlebox = gtk_handle_box_new();
        } else {
@@ -1239,9 +1242,6 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
 
        messageview_set_position(messageview, 0);
 
-       textview_set_all_headers(messageview->mimeview->textview, 
-                       messageview->all_headers);
-
 #ifdef MAEMO
        maemo_window_full_screen_if_needed(GTK_WINDOW(messageview->window));
 #endif
@@ -2548,13 +2548,14 @@ static void show_all_header_cb(GtkToggleAction *action, gpointer data)
        if (messageview->updating)
                return;
 
-       messageview->all_headers = 
+       messageview->all_headers = prefs_common.show_all_headers =
                        gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
        if (!msginfo) return;
        messageview->msginfo = NULL;
-       messageview_show(messageview, msginfo,gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
+       messageview_show(messageview, msginfo, messageview->all_headers);
        procmsg_msginfo_free(msginfo);
        main_window_set_menu_sensitive(messageview->mainwin);
+       summary_redisplay_msg(messageview->mainwin->summaryview);
 }
 
 static void msg_hide_quotes_cb(GtkToggleAction *action, gpointer data)
index 4b5d46b..25e11b2 100644 (file)
@@ -744,6 +744,8 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"respect_flowed_format", "FALSE", &prefs_common.respect_flowed_format, P_BOOL,
         NULL, NULL, NULL},
+       {"show_all_headers", "FALSE", &prefs_common.show_all_headers, P_BOOL,
+        NULL, NULL, NULL},
 
        {"show_other_header", "FALSE", &prefs_common.show_other_header, P_BOOL,
         NULL, NULL, NULL},
index b2a9daf..03761b5 100644 (file)
@@ -330,6 +330,7 @@ struct _PrefsCommon
        gboolean scroll_halfpage;
        gboolean hide_quoted;
        gboolean respect_flowed_format;
+       gboolean show_all_headers;
 
        gboolean show_other_header;
        GSList *disphdr_list;
index 2feeacd..a4f21d4 100644 (file)
@@ -1709,7 +1709,7 @@ void summary_set_menu_sensitive(SummaryView *summaryview)
        &&  summaryview->messageview->mimeview
        &&  summaryview->messageview->mimeview->textview)
                cm_toggle_menu_set_active_full(summaryview->mainwin->ui_manager, "Menus/SummaryViewPopup/View/AllHeaders",
-                       summaryview->messageview->mimeview->textview->show_all_headers);
+                       prefs_common.show_all_headers);
 #endif
        summary_unlock(summaryview);
 }
index 1e46886..c65afdf 100644 (file)
@@ -370,7 +370,6 @@ TextView *textview_create(void)
        textview->text               = text;
        textview->uri_list           = NULL;
        textview->body_pos           = 0;
-       textview->show_all_headers   = FALSE;
        textview->last_buttonpress   = GDK_NOTHING;
        textview->image              = NULL;
        return textview;
@@ -504,7 +503,6 @@ void textview_init(TextView *textview)
                watch_cursor = gdk_cursor_new(GDK_WATCH);
 
        textview_reflect_prefs(textview);
-       textview_set_all_headers(textview, FALSE);
        textview_set_font(textview, NULL);
        textview_create_tags(GTK_TEXT_VIEW(textview->text), textview);
 }
@@ -1671,11 +1669,6 @@ void textview_destroy(TextView *textview)
        g_free(textview);
 }
 
-void textview_set_all_headers(TextView *textview, gboolean all_headers)
-{
-       textview->show_all_headers = all_headers;
-}
-
 #define CHANGE_TAG_FONT(tagname, font) { \
        tag = gtk_text_tag_table_lookup(tags, tagname); \
        if (tag) \
@@ -1797,7 +1790,7 @@ static GPtrArray *textview_scan_header(TextView *textview, FILE *fp)
 
        cm_return_val_if_fail(fp != NULL, NULL);
 
-       if (textview->show_all_headers) {
+       if (prefs_common.show_all_headers) {
                headers = procheader_get_header_array_asis(fp);
                sorted_headers = g_ptr_array_new();
                for (i = 0; i < headers->len; i++) {
index 4d3432d..8110f46 100644 (file)
@@ -70,8 +70,6 @@ struct _TextView
        GSList *uri_list;
        gint body_pos;
 
-       gboolean show_all_headers;
-
        MessageView *messageview;
        gint last_buttonpress;
 
@@ -96,8 +94,6 @@ void textview_show_mime_part  (TextView       *textview,
                                 MimeInfo       *partinfo);
 void textview_clear            (TextView       *textview);
 void textview_destroy          (TextView       *textview);
-void textview_set_all_headers  (TextView       *textview,
-                                gboolean        all_headers);
 void textview_set_font         (TextView       *textview,
                                 const gchar    *codeset);
 void textview_set_text         (TextView       *textview,