2006-08-09 [colin] 2.4.0cvs35
authorColin Leroy <colin@colino.net>
Wed, 9 Aug 2006 16:25:35 +0000 (16:25 +0000)
committerColin Leroy <colin@colino.net>
Wed, 9 Aug 2006 16:25:35 +0000 (16:25 +0000)
* src/messageview.c
* src/mimeview.c
* src/mimeview.h
Fix lack of part selection when automatically
jumping to a specific part
* src/msgcache.c
Little optimisation in cache reading

ChangeLog
PATCHSETS
configure.ac
src/messageview.c
src/mimeview.c
src/mimeview.h
src/msgcache.c

index 5a095ed5de25cb3ee0fad0f9ff7c6d542faf9e03..359c78de6ee7e8f9a9d8708d9f069ad67ed8d700 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-08-09 [colin]     2.4.0cvs35
+
+       * src/messageview.c
+       * src/mimeview.c
+       * src/mimeview.h
+               Fix lack of part selection when automatically 
+               jumping to a specific part
+       * src/msgcache.c
+               Little optimisation in cache reading
+
 2006-08-09 [colin]     2.4.0cvs34
 
        * src/compose.c
index fbbc1188d5a174fcbf3b460312bcd58dd6083052..e5a96797ba016b4b4ed0a3d6a8e4169abac33c79 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.9.2.41 -r 1.9.2.42 src/gtk/gtkaspell.c;  ) > 2.4.0cvs32.patchset
 ( cvs diff -u -r 1.83.2.76 -r 1.83.2.77 src/mimeview.c;  cvs diff -u -r 1.20.2.11 -r 1.20.2.12 src/mimeview.h;  cvs diff -u -r 1.49.2.78 -r 1.49.2.79 src/procmime.c;  cvs diff -u -r 1.5.2.3 -r 1.5.2.4 src/gtk/gtkvscrollbutton.c;  cvs diff -u -r 1.3 -r 1.4 src/gtk/gtkvscrollbutton.h;  ) > 2.4.0cvs33.patchset
 ( cvs diff -u -r 1.382.2.298 -r 1.382.2.299 src/compose.c;  ) > 2.4.0cvs34.patchset
+( cvs diff -u -r 1.94.2.95 -r 1.94.2.96 src/messageview.c;  cvs diff -u -r 1.83.2.77 -r 1.83.2.78 src/mimeview.c;  cvs diff -u -r 1.20.2.12 -r 1.20.2.13 src/mimeview.h;  cvs diff -u -r 1.16.2.33 -r 1.16.2.34 src/msgcache.c;  ) > 2.4.0cvs35.patchset
index 641c334a87b6345f59a0f8b6448e778b147a4857..16972b25bd2a5792ba8ca20bc5e3f8793992a35e 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=34
+EXTRA_VERSION=35
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 99fbc73c36ba9280640e681e1fa3dbf6c05d9e60..df177e180c4d50c3028c8c138f6e1144ae032926 100644 (file)
@@ -868,11 +868,11 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
 
        mimeinfo = procmime_mimeinfo_next(mimeinfo);
        if (mimeinfo && (mimeinfo->type != MIMETYPE_TEXT || 
-           strcmp(mimeinfo->subtype, "plain"))) {
-               if (strcmp(mimeinfo->subtype, "html"))
-                       mimeview_show_part(messageview->mimeview,mimeinfo);
+           strcasecmp(mimeinfo->subtype, "plain"))) {
+               if (strcasecmp(mimeinfo->subtype, "html"))
+                       mimeview_select_mimepart_icon(messageview->mimeview,mimeinfo);
                else if (prefs_common.invoke_plugin_on_html)
-                       mimeview_show_part(messageview->mimeview,mimeinfo);
+                       mimeview_select_mimepart_icon(messageview->mimeview,mimeinfo);
        }
 
        g_free(file);
index b4ea2f21a8a631833cb3dc93d5146856282f3222..788008531b7f0673c3ff30f1261fcc010e42c030 100644 (file)
@@ -1696,7 +1696,7 @@ static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo,
        } else if (MIMETYPE_AUDIO == partinfo->type) {
                cmd = prefs_common.mime_audio_player;
                def_cmd = default_audio_cmdline;
-       } else if (MIMETYPE_TEXT == partinfo->type && !strcmp(partinfo->subtype, "html")) {
+       } else if (MIMETYPE_TEXT == partinfo->type && !strcasecmp(partinfo->subtype, "html")) {
                cmd = prefs_common.uri_cmd;
                def_cmd = default_html_cmdline;
        } else {
@@ -1791,6 +1791,12 @@ static void icon_selected (MimeView *mimeview, gint num, MimeInfo *partinfo)
                gtk_ctree_select(GTK_CTREE(mimeview->ctree), node);
 }              
 
+void mimeview_select_mimepart_icon(MimeView *mimeview, MimeInfo *partinfo)
+{
+       icon_list_toggle_by_mime_info(mimeview, partinfo);
+       icon_selected(mimeview, -1, partinfo);
+}
+
 #undef  KEY_PRESS_EVENT_STOP
 #define KEY_PRESS_EVENT_STOP() \
         g_signal_stop_emission_by_name(G_OBJECT(button), \
index f9a067bbfd05e8a97673af6217e7c99026ee7d35..a32e03da1c9cf7a8b2fdc912820e9aa7caca9d11 100644 (file)
@@ -153,6 +153,8 @@ void mimeview_handle_cmd            (MimeView       *mimeview,
                                         const gchar    *cmd,
                                         GdkEventButton *event,
                                         gpointer        data);
+void mimeview_select_mimepart_icon     (MimeView       *mimeview, 
+                                        MimeInfo       *partinfo);
 
 
 #ifdef __cplusplus
index 275d328410cb49661e765cb2dde4389cd9f95ee0..0e8b91f22b10212b732312a415fbe4c2ba8a7027 100644 (file)
@@ -521,7 +521,7 @@ MsgCache *msgcache_read_cache(FolderItem *item, const gchar *cache_file)
 
                        READ_CACHE_DATA(ref, fp, memusage);
 
-                       if (ref && strlen(ref))
+                       if (ref && *ref)
                                msginfo->references =
                                        g_slist_prepend(msginfo->references, ref);
                }