[Commits] mainwindow.c 1.274.2.338 1.274.2.339 messageview.c 1.94.2.223 1.94.2.224 prefs_common.c 1.204.2.206 1.204.2.207 prefs_common.h 1.103.2.135 1.103.2.136 summaryview.c 1.395.2.439 1.395.2.440 textview.c 1.96.2.236 1.96.2.237 textview.h 1.12.2.28 1.12.2.29

pawel at claws-mail.org pawel at claws-mail.org
Sat Nov 19 18:47:49 CET 2011


Update of /home/claws-mail/claws/src
In directory claws-mail:/tmp/cvs-serv467/src

Modified Files:
      Tag: gtk2
	mainwindow.c messageview.c prefs_common.c prefs_common.h 
	summaryview.c textview.c textview.h 
Log Message:
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'

Index: prefs_common.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_common.c,v
retrieving revision 1.204.2.206
retrieving revision 1.204.2.207
diff -u -d -r1.204.2.206 -r1.204.2.207
--- prefs_common.c	18 Nov 2011 21:41:55 -0000	1.204.2.206
+++ prefs_common.c	19 Nov 2011 17:47:47 -0000	1.204.2.207
@@ -744,6 +744,8 @@
 	 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: textview.h
===================================================================
RCS file: /home/claws-mail/claws/src/textview.h,v
retrieving revision 1.12.2.28
retrieving revision 1.12.2.29
diff -u -d -r1.12.2.28 -r1.12.2.29
--- textview.h	7 Nov 2011 21:21:49 -0000	1.12.2.28
+++ textview.h	19 Nov 2011 17:47:47 -0000	1.12.2.29
@@ -70,8 +70,6 @@
 	GSList *uri_list;
 	gint body_pos;
 
-	gboolean show_all_headers;
-
 	MessageView *messageview;
 	gint last_buttonpress;
 
@@ -96,8 +94,6 @@
 				 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,

Index: summaryview.c
===================================================================
RCS file: /home/claws-mail/claws/src/summaryview.c,v
retrieving revision 1.395.2.439
retrieving revision 1.395.2.440
diff -u -d -r1.395.2.439 -r1.395.2.440
--- summaryview.c	19 Nov 2011 15:14:01 -0000	1.395.2.439
+++ summaryview.c	19 Nov 2011 17:47:47 -0000	1.395.2.440
@@ -1709,7 +1709,7 @@
 	&&  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: textview.c
===================================================================
RCS file: /home/claws-mail/claws/src/textview.c,v
retrieving revision 1.96.2.236
retrieving revision 1.96.2.237
diff -u -d -r1.96.2.236 -r1.96.2.237
--- textview.c	7 Nov 2011 21:21:48 -0000	1.96.2.236
+++ textview.c	19 Nov 2011 17:47:47 -0000	1.96.2.237
@@ -370,7 +370,6 @@
 	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 @@
 		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 @@
 	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 @@
 
 	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: prefs_common.h
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_common.h,v
retrieving revision 1.103.2.135
retrieving revision 1.103.2.136
diff -u -d -r1.103.2.135 -r1.103.2.136
--- prefs_common.h	18 Nov 2011 21:41:55 -0000	1.103.2.135
+++ prefs_common.h	19 Nov 2011 17:47:47 -0000	1.103.2.136
@@ -330,6 +330,7 @@
 	gboolean scroll_halfpage;
 	gboolean hide_quoted;
 	gboolean respect_flowed_format;
+	gboolean show_all_headers;
 
 	gboolean show_other_header;
 	GSList *disphdr_list;

Index: mainwindow.c
===================================================================
RCS file: /home/claws-mail/claws/src/mainwindow.c,v
retrieving revision 1.274.2.338
retrieving revision 1.274.2.339
diff -u -d -r1.274.2.338 -r1.274.2.339
--- mainwindow.c	19 Nov 2011 15:14:01 -0000	1.274.2.338
+++ mainwindow.c	19 Nov 2011 17:47:47 -0000	1.274.2.339
@@ -3377,7 +3377,7 @@
 	&&  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 @@
 {
 	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 @@
 	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: messageview.c
===================================================================
RCS file: /home/claws-mail/claws/src/messageview.c,v
retrieving revision 1.94.2.223
retrieving revision 1.94.2.224
diff -u -d -r1.94.2.223 -r1.94.2.224
--- messageview.c	6 Nov 2011 11:24:29 -0000	1.94.2.223
+++ messageview.c	19 Nov 2011 17:47:47 -0000	1.94.2.224
@@ -631,6 +631,9 @@
 	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 @@
 
 	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 @@
 	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)



More information about the Commits mailing list