diff options
Diffstat (limited to 'mail-client/sylpheed-claws/files/sylpheed-0.8.3claws32-dillo.patch')
-rw-r--r-- | mail-client/sylpheed-claws/files/sylpheed-0.8.3claws32-dillo.patch | 292 |
1 files changed, 0 insertions, 292 deletions
diff --git a/mail-client/sylpheed-claws/files/sylpheed-0.8.3claws32-dillo.patch b/mail-client/sylpheed-claws/files/sylpheed-0.8.3claws32-dillo.patch deleted file mode 100644 index 0868c1da8ebc..000000000000 --- a/mail-client/sylpheed-claws/files/sylpheed-0.8.3claws32-dillo.patch +++ /dev/null @@ -1,292 +0,0 @@ -diff -r -c sylpheed-0.8.3claws.orig/src/messageview.c sylpheed-0.8.3claws/src/messageview.c ---- sylpheed-0.8.3claws.orig/src/messageview.c 23 Aug 2002 06:52:15 -+++ sylpheed-0.8.3claws/src/messageview.c 29 Sep 2002 08:16:45 -@@ -120,6 +120,7 @@ MessageView *messageview_create(MainWind - messageview->textview = textview; - messageview->imageview = imageview; - messageview->mimeview = mimeview; -+ messageview->plugview = gtk_socket_new(); - messageview->noticeview = noticeview; - - return messageview; -@@ -458,8 +459,8 @@ void messageview_show(MessageView *messa - textview_set_all_headers(messageview->textview, all_headers); - textview_set_all_headers(messageview->mimeview->textview, all_headers); - -- if (mimeinfo->mime_type != MIME_TEXT && -- mimeinfo->mime_type != MIME_TEXT_HTML) { -+ if (mimeinfo->mime_type != MIME_TEXT /*&& -+ mimeinfo->mime_type != MIME_TEXT_HTML*/) { - messageview_change_view_type(messageview, MVIEW_MIME); - mimeview_show_message(messageview->mimeview, mimeinfo, file); - } else { -@@ -481,29 +482,51 @@ static void messageview_change_view_type - { - TextView *textview = messageview->textview; - MimeView *mimeview = messageview->mimeview; -+ GtkWidget *plugview = messageview->plugview; - - if (messageview->type == type) return; - - if (type == MVIEW_MIME) { -- gtkut_container_remove -- (GTK_CONTAINER(GTK_WIDGET_PTR(messageview)), -- GTK_WIDGET_PTR(textview)); -+ if (messageview->type == MVIEW_TEXT) -+ gtkut_container_remove -+ (GTK_CONTAINER(GTK_WIDGET_PTR(messageview)), -+ GTK_WIDGET_PTR(textview)); -+ else if (messageview->type == MVIEW_PLUG) -+ gtkut_container_remove -+ (GTK_CONTAINER(GTK_WIDGET_PTR(messageview)), -+ GTK_WIDGET_PTR(plugview)); - gtk_box_pack_start(GTK_BOX(messageview->vbox), - GTK_WIDGET_PTR(mimeview), TRUE, TRUE, 0); - gtk_container_add(GTK_CONTAINER(mimeview->vbox), - GTK_WIDGET_PTR(textview)); - } else if (type == MVIEW_TEXT) { -- gtkut_container_remove -- (GTK_CONTAINER(GTK_WIDGET_PTR(messageview)), -- GTK_WIDGET_PTR(mimeview)); -- -+ if (messageview->type == MVIEW_MIME) -+ gtkut_container_remove -+ (GTK_CONTAINER(GTK_WIDGET_PTR(messageview)), -+ GTK_WIDGET_PTR(mimeview)); -+ else if (messageview->type == MVIEW_PLUG) -+ gtkut_container_remove -+ (GTK_CONTAINER(GTK_WIDGET_PTR(messageview)), -+ GTK_WIDGET_PTR(plugview)); -+ - if (mimeview->vbox == GTK_WIDGET_PTR(textview)->parent) - gtkut_container_remove(GTK_CONTAINER(mimeview->vbox), - GTK_WIDGET_PTR(textview)); - - gtk_box_pack_start(GTK_BOX(messageview->vbox), - GTK_WIDGET_PTR(textview), TRUE, TRUE, 0); -- } else -+ } else if (type == MVIEW_PLUG) { -+ if (messageview->type == MVIEW_MIME) -+ gtkut_container_remove -+ (GTK_CONTAINER(GTK_WIDGET_PTR(messageview)), -+ GTK_WIDGET_PTR(mimeview)); -+ else if (messageview->type == MVIEW_TEXT) -+ gtkut_container_remove -+ (GTK_CONTAINER(GTK_WIDGET_PTR(messageview)), -+ GTK_WIDGET_PTR(textview)); -+ gtk_box_pack_start(GTK_BOX(messageview->vbox), -+ GTK_WIDGET_PTR(plugview), TRUE, TRUE, 0); -+ } else - return; - - messageview->type = type; -@@ -528,6 +551,7 @@ void messageview_destroy(MessageView *me - textview_destroy(messageview->textview); - imageview_destroy(messageview->imageview); - mimeview_destroy(messageview->mimeview); -+ gtk_widget_destroy(messageview->plugview); - noticeview_destroy(messageview->noticeview); - - g_free(messageview); - -diff -r -c sylpheed-0.8.3claws.orig/src/messageview.h sylpheed-0.8.3claws/src/messageview.h ---- sylpheed-0.8.3claws.orig/src/messageview.h 23 Aug 2002 06:52:15 -+++ sylpheed-0.8.3claws/src/messageview.h 29 Sep 2002 08:16:45 -@@ -36,7 +36,8 @@ typedef struct _MessageView MessageView; - typedef enum - { - MVIEW_TEXT, -- MVIEW_MIME -+ MVIEW_MIME, -+ MVIEW_PLUG - } MessageType; - - struct _MessageView -@@ -51,6 +52,7 @@ struct _MessageView - TextView *textview; - ImageView *imageview; - MimeView *mimeview; -+ GtkWidget *plugview; - NoticeView *noticeview; - - MainWindow *mainwin; - -diff -r -c sylpheed-0.8.3claws.orig/src/mimeview.c sylpheed-0.8.3claws/src/mimeview.c ---- sylpheed-0.8.3claws.orig/src/mimeview.c 22 Sep 2002 10:53:49 -+++ sylpheed-0.8.3claws/src/mimeview.c 29 Sep 2002 08:16:45 -@@ -25,6 +25,7 @@ - - #include <glib.h> - #include <gdk/gdkkeysyms.h> -+#include <gdk/gdkx.h> - #include <gtk/gtknotebook.h> - #include <gtk/gtkscrolledwindow.h> - #include <gtk/gtkctree.h> -@@ -53,7 +54,6 @@ - #include "prefs_common.h" - #include "rfc2015.h" - #include "pgptext.h" -- - typedef enum - { - COL_MIMETYPE = 0, -@@ -215,6 +215,7 @@ MimeView *mimeview_create(void) - mimeview->popupmenu = popupmenu; - mimeview->popupfactory = popupfactory; - mimeview->type = -1; -+ mimeview->plugview = NULL; - - return mimeview; - } -@@ -346,6 +347,10 @@ void mimeview_show_message(MimeView *mim - void mimeview_destroy(MimeView *mimeview) - { - procmime_mimeinfo_free_all(mimeview->mimeinfo); -+ if (mimeview->plugview) { -+ printf("MIMVIEW destroyg %08x\n", mimeview->plugview); -+ gtk_widget_destroy(mimeview->plugview); -+ } - g_free(mimeview->file); - g_free(mimeview); - } -@@ -472,13 +477,67 @@ static void mimeview_show_image_part(Mim - g_free(filename); - } - -+static gint plugview_destroyed(GtkObject *o, gpointer data) -+{ -+ MimeView *m = (MimeView *) data; -+ printf("Destroy thingie %08x (%08x)\n", m->plugview, o); -+ m->plugview = NULL; -+ return TRUE; -+} -+ -+static void mimeview_show_dillo_part(MimeView *mimeview, MimeInfo *partinfo) -+{ -+ gchar *filename; -+ -+ if (!partinfo) return; -+ -+ filename = procmime_get_tmp_file_name(partinfo); -+ -+ if (procmime_get_part(filename, mimeview->file, partinfo) < 0) -+ alertpanel_error -+ (_("Can't get the part of multipart message.")); -+ else { -+ gchar *cmd; -+ /* Workaround for the GTK+ bug with handling scroll adjustments -+ * in GtkViewport */ -+ if (mimeview->plugview) -+ if (GTK_SOCKET(mimeview->plugview)->plug_window) { -+ gtk_widget_destroy(mimeview->plugview); -+ printf("Destroyed %08x\n", mimeview->plugview); -+ mimeview->plugview = NULL; -+ } -+ if (!mimeview->plugview) { -+ mimeview->plugview = gtk_socket_new(); -+ printf("Created %08x\n", mimeview->plugview); -+ gtk_signal_connect(GTK_OBJECT(mimeview->plugview), -+ "destroy", -+ GTK_SIGNAL_FUNC(plugview_destroyed), -+ mimeview); -+ } -+ mimeview_change_view_type(mimeview, MIMEVIEW_PLUG); -+ printf("SHowing %08x\n", mimeview->plugview); -+ gtk_widget_show(mimeview->plugview); -+ gtk_widget_realize(mimeview->plugview); -+ -+ cmd = g_strdup_printf("dillo -f -l -x %d \"%s\"", -+ GDK_WINDOW_XWINDOW(mimeview->plugview->window), -+ filename); -+ execute_command_line(cmd, TRUE); -+ g_free(cmd); -+ /*unlink(filename);*/ -+ } -+ -+ g_free(filename); -+} - static void mimeview_change_view_type(MimeView *mimeview, MimeViewType type) - { - TextView *textview = mimeview->textview; - ImageView *imageview = mimeview->imageview; -+ GtkWidget *plugview = mimeview->plugview; - GList *children; - -- if (mimeview->type == type) return; -+ if (mimeview->type == type && type != MIMEVIEW_PLUG) return; -+ printf("Changing... to "); - - children = gtk_container_children(GTK_CONTAINER(mimeview->mime_vbox)); - if (children) { -@@ -489,10 +548,17 @@ static void mimeview_change_view_type(Mi - - switch (type) { - case MIMEVIEW_IMAGE: -+ printf("Changing... to IMAGE\n"); - gtk_container_add(GTK_CONTAINER(mimeview->mime_vbox), - GTK_WIDGET_PTR(imageview)); - break; -+ case MIMEVIEW_PLUG: -+ printf("Changing... to PLUG\n"); -+ gtk_container_add(GTK_CONTAINER(mimeview->mime_vbox), -+ mimeview->plugview); -+ break; - case MIMEVIEW_TEXT: -+ printf("Changing... to TEXT\n"); - gtk_container_add(GTK_CONTAINER(mimeview->mime_vbox), - GTK_WIDGET_PTR(textview)); - break; -@@ -509,7 +575,11 @@ static void mimeview_clear(MimeView *mim - - procmime_mimeinfo_free_all(mimeview->mimeinfo); - mimeview->mimeinfo = NULL; -- -+ -+ printf("Clearing...\n"); -+ if (mimeview->plugview) -+ gtk_widget_destroy(mimeview->plugview); -+ - gtk_clist_clear(clist); - textview_clear(mimeview->textview); - imageview_clear(mimeview->imageview); -@@ -545,7 +615,7 @@ static void mimeview_selected(GtkCTree * - - switch (partinfo->mime_type) { - case MIME_TEXT: -- case MIME_TEXT_HTML: -+ /*case MIME_TEXT_HTML:*/ - case MIME_TEXT_ENRICHED: - case MIME_MESSAGE_RFC822: - case MIME_MULTIPART: -@@ -563,6 +633,9 @@ static void mimeview_selected(GtkCTree * - } - break; - #endif -+ case MIME_TEXT_HTML: -+ mimeview_show_dillo_part(mimeview, partinfo); -+ break; - default: - mimeview->textview->default_text = TRUE; - mimeview_change_view_type(mimeview, MIMEVIEW_TEXT); - -diff -r -c sylpheed-0.8.3claws.orig/src/mimeview.h sylpheed-0.8.3claws/src/mimeview.h ---- sylpheed-0.8.3claws.orig/src/mimeview.h 22 Sep 2002 10:53:44 -+++ sylpheed-0.8.3claws/src/mimeview.h 29 Sep 2002 08:16:45 -@@ -35,7 +35,8 @@ typedef struct _MimeView MimeView; - typedef enum - { - MIMEVIEW_TEXT, -- MIMEVIEW_IMAGE -+ MIMEVIEW_IMAGE, -+ MIMEVIEW_PLUG - } MimeViewType; - - struct _MimeView -@@ -57,6 +58,7 @@ struct _MimeView - - TextView *textview; - ImageView *imageview; -+ GtkWidget *plugview; - - MessageView *messageview; - |