2006-08-23 [colin] 2.4.0cvs78
authorColin Leroy <colin@colino.net>
Wed, 23 Aug 2006 17:21:00 +0000 (17:21 +0000)
committerColin Leroy <colin@colino.net>
Wed, 23 Aug 2006 17:21:00 +0000 (17:21 +0000)
* src/messageview.c
* src/mimeview.c
* src/mimeview.h
* src/plugins/dillo_viewer/dillo_viewer.c
Provide an API for MimeViewer plugins to
return a text selection for replying

ChangeLog
PATCHSETS
configure.ac
src/messageview.c
src/mimeview.c
src/mimeview.h
src/plugins/dillo_viewer/dillo_viewer.c

index 15bbdd62082aeeb6922b6d9249ec4234e0715072..5b39dfd3aec35b2c6d494e39d8e859faa13a68d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-08-23 [colin]     2.4.0cvs78
+
+       * src/messageview.c
+       * src/mimeview.c
+       * src/mimeview.h
+       * src/plugins/dillo_viewer/dillo_viewer.c
+               Provide an API for MimeViewer plugins to
+               return a text selection for replying
+
 2006-08-23 [colin]     2.4.0cvs77
 
        * src/image_viewer.c
index bc3a1bcc5418cd0270f60dc928a453ef12568839..3f0282f27efdf874d5a40a4a4d3bfcf192cbb54f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.79.2.36 -r 1.79.2.37 src/mh.c;  ) > 2.4.0cvs75.patchset
 ( cvs diff -u -r 1.49.2.80 -r 1.49.2.81 src/procmime.c;  ) > 2.4.0cvs76.patchset
 ( cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/image_viewer.c;  cvs diff -u -r 1.96.2.139 -r 1.96.2.140 src/textview.c;  ) > 2.4.0cvs77.patchset
+( cvs diff -u -r 1.94.2.97 -r 1.94.2.98 src/messageview.c;  cvs diff -u -r 1.83.2.81 -r 1.83.2.82 src/mimeview.c;  cvs diff -u -r 1.20.2.13 -r 1.20.2.14 src/mimeview.h;  cvs diff -u -r 1.12.2.12 -r 1.12.2.13 src/plugins/dillo_viewer/dillo_viewer.c;  ) > 2.4.0cvs78.patchset
index 6b15bf4083e17159157b67c2945ddc432fe28b63..2fe4490dcee8a372d87485ecabcf2533deec1421 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=77
+EXTRA_VERSION=78
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index a2ce9ec49894fca0081417a5e7be28894d2d2793..d8fbbe6a62733730c02c496505f380dc2a17e4c1 100644 (file)
@@ -1381,6 +1381,15 @@ gchar *messageview_get_selection(MessageView *msgview)
        
        g_return_val_if_fail(msgview != NULL, NULL);
 
+       if (msgview->mimeview->type == MIMEVIEW_VIEWER) {
+               MimeViewer *viewer = msgview->mimeview->mimeviewer;
+               if (viewer && viewer->get_selection) {
+                       text = viewer->get_selection(viewer);
+                       if (text)
+                               return text;
+               }
+       }
+
        textview = messageview_get_current_textview(msgview);
        g_return_val_if_fail(textview != NULL, NULL);
 
index 84b51e6df7e892a4c05bb84e8fff7dc7c29c3f4d..3a3cff20eeee7a04710c7c179c81a18e8d035fab 100644 (file)
@@ -64,7 +64,7 @@
 #include "stock_pixmap.h"
 #include "gtk/gtkvscrollbutton.h"
 #include "gtk/logwindow.h"
-
+#include "timing.h"
 
 typedef enum
 {
index a32e03da1c9cf7a8b2fdc912820e9aa7caca9d11..c2cf339594e9e03633d7613f29c15f48d2659931 100644 (file)
@@ -122,6 +122,7 @@ struct _MimeViewer
        void            (*show_mimepart)        (MimeViewer *, const gchar *infile, MimeInfo *);
        void            (*clear_viewer)         (MimeViewer *);
        void            (*destroy_viewer)       (MimeViewer *);
+       gchar           *(*get_selection)       (MimeViewer *);
        MimeView        *mimeview;
 };
 
index bd08e62b9f247182e65ad956846ae298e51d2477..36c9f2ab7575df864fc4c5e4ed2fdc7cf26afa0b 100644 (file)
@@ -141,6 +141,7 @@ static MimeViewer *dillo_viewer_create(void)
        viewer->mimeviewer.show_mimepart = dillo_show_mimepart;
        viewer->mimeviewer.clear_viewer = dillo_clear_viewer;
        viewer->mimeviewer.destroy_viewer = dillo_destroy_viewer;       
+       viewer->mimeviewer.get_selection = NULL;
        viewer->widget = gtk_event_box_new();
 
        gtk_widget_show(viewer->widget);
@@ -159,7 +160,7 @@ static MimeViewerFactory dillo_viewer_factory =
        content_types,  
        0,
 
-       dillo_viewer_create
+       dillo_viewer_create,
 };
 
 gint plugin_init(gchar **error)