2006-10-24 [colin] 2.5.6cvs6
authorColin Leroy <colin@colino.net>
Tue, 24 Oct 2006 17:53:20 +0000 (17:53 +0000)
committerColin Leroy <colin@colino.net>
Tue, 24 Oct 2006 17:53:20 +0000 (17:53 +0000)
* src/textview.c
* src/gtk/gtkutils.c
Fix crash when printing emails with an
xface

ChangeLog
PATCHSETS
configure.ac
src/gtk/gtkutils.c
src/textview.c

index cd9771b4593f90f21c3e6a552c06dc510944c65b..ecb172c76b90954678cab7435ee9cd91c1c98241 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-10-24 [colin]     2.5.6cvs6
+
+       * src/textview.c
+       * src/gtk/gtkutils.c
+               Fix crash when printing emails with an
+               xface
+
 2006-10-24 [mones]     2.5.6cvs5
 
        * manual/es/advanced.xml
index 9534c4144c1d8e7d31540a570b22a600c317ae14..5afbfc97c41746f6677f9be7aeb63a08f6d05a89 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.654.2.2059 -r 1.654.2.2060 configure.ac;  cvs diff -u -r 1.179.2.133 -r 1.179.2.134 src/imap.c;  cvs diff -u -r 1.36.2.85 -r 1.36.2.86 src/common/utils.c;  cvs diff -u -r 1.20.2.39 -r 1.20.2.40 src/common/utils.h;  cvs diff -u -r 1.1.4.52 -r 1.1.4.53 src/etpan/imap-thread.c;  cvs diff -u -r 1.1.4.11 -r 1.1.4.12 src/etpan/imap-thread.h;  ) > 2.5.6cvs3.patchset
 ( cvs diff -u -r 1.1.2.26 -r 1.1.2.27 src/gtk/authors.h;  cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/plugins/pgpcore/pgp_viewer.c;  cvs diff -u -r 1.1.2.32 -r 1.1.2.33 src/plugins/pgpcore/sgpgme.c;  ) > 2.5.6cvs4.patchset
 ( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 manual/es/advanced.xml;  cvs diff -u -r 1.60.2.36 -r 1.60.2.37 po/es.po;  ) > 2.5.6cvs5.patchset
+( cvs diff -u -r 1.96.2.156 -r 1.96.2.157 src/textview.c;  cvs diff -u -r 1.5.2.40 -r 1.5.2.41 src/gtk/gtkutils.c;  ) > 2.5.6cvs6.patchset
index b139dde38e522835f02e95bcf029cbaf6dbe4f66..246d9aaf9075d5c60bdec30d7df6dfd32061c822 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=5
+EXTRA_VERSION=6
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 7cac212e16a4883d6cf29e87f2a79e2097e88ad0..ebb84483f1002c3ea81253c81812cb1a47706ea7 100644 (file)
@@ -1089,6 +1089,10 @@ GtkWidget *xface_get_from_header(const gchar *o_xface, GdkColor *background,
        gchar xface[2048];
        strncpy(xface, o_xface, sizeof(xface));
 
+       if (!window) {
+               g_warning("no window\n");
+               return NULL;
+       }
        if (uncompface(xface) < 0) {
                g_warning("uncompface failed\n");
                return NULL;
index 3a3ce795e7cdeae23018b5d00eb8601c871535f7..8af9f77996464d71b34b24520ded66d1f89daf38 100644 (file)
@@ -1801,7 +1801,8 @@ static void textview_show_xface(TextView *textview)
        MsgInfo *msginfo = textview->messageview->msginfo;
        GtkTextView *text = GTK_TEXT_VIEW(textview->text);
        int x = 0;
-
+       GdkWindow *window = NULL;
+       
        if (prefs_common.display_header_pane
        ||  !prefs_common.display_xface)
                goto bail;
@@ -1818,10 +1819,13 @@ static void textview_show_xface(TextView *textview)
 
        if (textview->image) 
                gtk_widget_destroy(textview->image);
-       
+
+       window = mainwindow_get_mainwindow() ?
+                       mainwindow_get_mainwindow()->window->window :
+                       textview->text->window;
        textview->image = xface_get_from_header(msginfo->extradata->xface,
                                &textview->text->style->white,
-                               textview->text->window);
+                               window);
        g_return_if_fail(textview->image != NULL);
 
        gtk_widget_show(textview->image);