2005-11-10 [wwp] 1.9.100cvs6
authorTristan Chabredier <wwp@claws-mail.org>
Thu, 10 Nov 2005 13:37:52 +0000 (13:37 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Thu, 10 Nov 2005 13:37:52 +0000 (13:37 +0000)
* src/gtk/description_window.c
fix a crash when closing description windows using the WM's [X] button

ChangeLog
PATCHSETS
configure.ac
src/gtk/description_window.c

index 842100c..ca8387b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-10 [wwp]       1.9.100cvs6
+
+       * src/gtk/description_window.c
+               fix a crash when closing description windows using the WM's [X] button
+
 2005-11-09 [colin]     1.9.100cvs5
 
        * src/common/ssl.c
index 3395e4f..c21d0e6 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.49.2.67 -r 1.49.2.68 src/procmime.c;  ) > 1.9.100cvs3.patchset
 ( cvs diff -u -r 1.382.2.192 -r 1.382.2.193 src/compose.c;  cvs diff -u -r 1.96.2.83 -r 1.96.2.84 src/textview.c;  cvs diff -u -r 1.36.2.47 -r 1.36.2.48 src/common/utils.c;  cvs diff -u -r 1.20.2.26 -r 1.20.2.27 src/common/utils.h;  ) > 1.9.100cvs4.patchset
 ( cvs diff -u -r 1.9.2.10 -r 1.9.2.11 src/common/ssl.c;  ) > 1.9.100cvs5.patchset
+( cvs diff -u -r 1.5.2.14 -r 1.5.2.15 src/gtk/description_window.c;  ) > 1.9.100cvs6.patchset
index 3de6175..78fdeca 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=5
+EXTRA_VERSION=6
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 2a3e349..94dfd68 100644 (file)
@@ -48,12 +48,20 @@ void description_window_create(DescriptionWindow *dwindow)
                description_create(dwindow);
        
                gtk_window_set_transient_for(GTK_WINDOW(dwindow->window), GTK_WINDOW(dwindow->parent));
-       
+
                gtk_widget_show(dwindow->window);
+
+               /* in case the description window is closed using the WM's [X] button */
+               g_signal_connect(G_OBJECT(dwindow->window), "destroy",
+                               GTK_SIGNAL_FUNC(gtk_widget_destroyed), &dwindow->window);
+
                gtk_main();
-               gtk_widget_hide(dwindow->window);
-               gtk_widget_destroy(dwindow->window);
-               dwindow->window = NULL; 
+
+               if (dwindow->window) {
+                       gtk_widget_hide(dwindow->window);
+                       gtk_widget_destroy(dwindow->window);
+                       dwindow->window = NULL; 
+               }
        } else printf("windows exist\n");
 }