PATCH: fix for "Show all button"



Hi,

 somehow, a few lines of code got lost between my devel version and CVS...

This patch, against current CVS, should make the button work properly.

Melanie
diff -b -B -r -u -P --exclude-from=ignore ../balsa-cvs/src/main-window.c ./src/main-window.c
--- ../balsa-cvs/src/main-window.c	Wed Jul 18 23:03:01 2001
+++ ./src/main-window.c	Wed Jul 18 23:15:40 2001
@@ -2113,7 +2113,10 @@
 {
     BalsaWindow *bw;
 
-    if (!GTK_CHECK_MENU_ITEM(widget)->active)
+    if(GTK_IS_MENU_ITEM(widget))
+	reset_show_all_headers();
+    
+    if(GTK_IS_MENU_ITEM(widget) && !GTK_CHECK_MENU_ITEM(widget)->active)
 	return;
 
     balsa_app.shown_headers = HEADERS_NONE;
@@ -2130,7 +2133,10 @@
 {
     BalsaWindow *bw;
 
-    if (!GTK_CHECK_MENU_ITEM(widget)->active)
+    if(GTK_IS_MENU_ITEM(widget))
+	reset_show_all_headers();
+    
+    if(GTK_IS_MENU_ITEM(widget) && !GTK_CHECK_MENU_ITEM(widget)->active)
 	return;
 
     balsa_app.shown_headers = HEADERS_SELECTED;
@@ -2151,9 +2157,6 @@
     if(GTK_IS_MENU_ITEM(widget))
 	reset_show_all_headers();
     
-    if(GTK_IS_MENU_ITEM(widget))
-	reset_show_all_headers();
-    
     if(GTK_IS_MENU_ITEM(widget) && !GTK_CHECK_MENU_ITEM(widget)->active)
 	return;
     
diff -b -B -r -u -P --exclude-from=ignore ../balsa-cvs/src/message-window.c ./src/message-window.c
--- ../balsa-cvs/src/message-window.c	Wed Jul 18 23:03:01 2001
+++ ./src/message-window.c	Wed Jul 18 23:20:12 2001
@@ -156,6 +156,7 @@
 
     LibBalsaMessage *message;
     int show_all_headers_save;
+	int headers_shown;
 };
 
 void reset_show_all_headers(MessageWindow *mw);
@@ -202,6 +203,7 @@
     mw->window = gnome_app_new("balsa", "Message");
 
     mw->show_all_headers_save=-1;
+    mw->headers_shown=balsa_app.shown_headers;
     
     set_toolbar_button_callback(2, GNOME_STOCK_PIXMAP_MAIL_RPL,
 				GTK_SIGNAL_FUNC(replyto_message_cb), mw);
@@ -378,6 +380,8 @@
 {
     MessageWindow *mw = (MessageWindow *) data;
 
+	mw->headers_shown=HEADERS_NONE;
+
     reset_show_all_headers(mw);
     balsa_message_set_displayed_headers(BALSA_MESSAGE(mw->bmessage),
 					HEADERS_NONE);
@@ -388,6 +392,8 @@
 {
     MessageWindow *mw = (MessageWindow *) data;
 
+	mw->headers_shown=HEADERS_SELECTED;
+
     reset_show_all_headers(mw);
     balsa_message_set_displayed_headers(BALSA_MESSAGE(mw->bmessage),
 					HEADERS_SELECTED);
@@ -398,6 +404,8 @@
 {
     MessageWindow *mw = (MessageWindow *) data;
 
+	mw->headers_shown=HEADERS_ALL;
+
     reset_show_all_headers(mw);
     balsa_message_set_displayed_headers(BALSA_MESSAGE(mw->bmessage),
 					HEADERS_ALL);
@@ -540,7 +548,8 @@
         return;
    
     if(GTK_TOGGLE_BUTTON(btn)->active)  {
-        mw->show_all_headers_save=balsa_app.shown_headers;
+        mw->show_all_headers_save=mw->headers_shown;
+		mw->headers_shown=HEADERS_ALL;
 	balsa_message_set_displayed_headers(BALSA_MESSAGE(mw->bmessage),
 					    HEADERS_ALL);
     } else {


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