2006-03-18 [colin] 2.0.0cvs152
authorColin Leroy <colin@colino.net>
Sat, 18 Mar 2006 19:33:43 +0000 (19:33 +0000)
committerColin Leroy <colin@colino.net>
Sat, 18 Mar 2006 19:33:43 +0000 (19:33 +0000)
* src/summaryview.c
Set cursor to watch for execution (fixes lack
of watch-cursor when dnd'ing hundreds of mails)
* src/gtk/filesel.c
Check that mime type is 'image/*' before updating
the preview (maybe fix crashes on Solaris+gtk2.8.4 ?)

ChangeLog
PATCHSETS
configure.ac
src/gtk/filesel.c
src/summaryview.c

index 33084c0e7c40174a92d0fcc5cc6397681c3c0003..26374a14be08bbf36607d8b1b08cf30d60e8c241 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-03-18 [colin]     2.0.0cvs152
+
+       * src/summaryview.c
+               Set cursor to watch for execution (fixes lack
+               of watch-cursor when dnd'ing hundreds of mails)
+       * src/gtk/filesel.c
+               Check that mime type is 'image/*' before updating
+               the preview (maybe fix crashes on Solaris+gtk2.8.4 ?)
+
 2006-03-18 [colin]     2.0.0cvs151
 
        * src/mainwindow.c
index b0b2d62787e670e3c2f7b0ca2d8ebcc48abdae04..d826f3a16fc92cfb826299fc6db761ede7ae7955 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.274.2.102 -r 1.274.2.103 src/mainwindow.c;  cvs diff -u -r 1.39.2.14 -r 1.39.2.15 src/mainwindow.h;  cvs diff -u -r 1.1.2.17 -r 1.1.2.18 src/prefs_msg_colors.c;  cvs diff -u -r 1.395.2.182 -r 1.395.2.183 src/summaryview.c;  cvs diff -u -r 1.68.2.19 -r 1.68.2.20 src/summaryview.h;  cvs diff -u -r 1.2.2.11 -r 1.2.2.12 src/gtk/colorlabel.c;  cvs diff -u -r 1.1.4.3 -r 1.1.4.4 src/gtk/colorlabel.h;  ) > 2.0.0cvs149.patchset
 ( cvs diff -u -r 1.213.2.86 -r 1.213.2.87 src/folder.c;  ) > 2.0.0cvs150.patchset
 ( cvs diff -u -r 1.274.2.103 -r 1.274.2.104 src/mainwindow.c;  cvs diff -u -r 1.96.2.102 -r 1.96.2.103 src/textview.c;  cvs diff -u -r 1.12.2.10 -r 1.12.2.11 src/textview.h;  ) > 2.0.0cvs151.patchset
+( cvs diff -u -r 1.395.2.183 -r 1.395.2.184 src/summaryview.c;  cvs diff -u -r 1.2.2.22 -r 1.2.2.23 src/gtk/filesel.c;  ) > 2.0.0cvs152.patchset
index 39c010f0ae2718e70560583e45e500943359e696..9e00660eaa44e0dd129cb8d6fc2d81f2b2a10da6 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=151
+EXTRA_VERSION=152
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index d3ed92c484d11cc4141dc90b9af29f9536bbd3c2..5b92a5aa9184bbb78529b1975336252723f71e23 100644 (file)
 #include "gtkutils.h"
 #include "utils.h"
 #include "codeconv.h"
+#include "procmime.h"
 #include "prefs_common.h"
 
 static void
 update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
 {
        GtkWidget *preview;
-       char *filename;
-       GdkPixbuf *pixbuf;
-       gboolean have_preview;
+       char *filename = NULL, *type = NULL;
+       GdkPixbuf *pixbuf = NULL;
+       gboolean have_preview = FALSE;
 
        preview = GTK_WIDGET (data);
        filename = gtk_file_chooser_get_preview_filename (file_chooser);
@@ -56,13 +57,19 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
        if (filename == NULL)
                return;
 
-       pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
-       have_preview = (pixbuf != NULL);
+       type = procmime_get_mime_type(filename);
+       
+       if (type && !strncmp(type, "image/", 6)) 
+               pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
+       
+       g_free(type);
        g_free (filename);
 
-       gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
-       if (pixbuf)
+       if (pixbuf) {
+               have_preview = TRUE;
+               gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
                gdk_pixbuf_unref (pixbuf);
+       }
 
        gtk_file_chooser_set_preview_widget_active (file_chooser, have_preview);
 }
index 2ec755c18e17f710ea3c910f0c3699709dca4d94..084bcc3d1e7b1cc2df9fa61281f0ea13c4bea66e 100644 (file)
@@ -3835,6 +3835,8 @@ gboolean summary_execute(SummaryView *summaryview)
 
        gtk_clist_freeze(clist);
 
+       main_window_cursor_wait(summaryview->mainwin);
+
        if (summaryview->threaded)
                summary_unthread_for_exec(summaryview);
 
@@ -3903,7 +3905,9 @@ gboolean summary_execute(SummaryView *summaryview)
        gtk_ctree_node_moveto(ctree, summaryview->selected, 0, 0.5, 0);
 
        summary_unlock(summaryview);
-       
+
+       main_window_cursor_normal(summaryview->mainwin);
+
        if (move_val < 0) 
                summary_show(summaryview, summaryview->folder_item);
        return TRUE;