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
This commit is contained in:
Colin Leroy 2006-08-23 17:21:00 +00:00
parent e60a1ed226
commit b2b4d6d3c2
7 changed files with 24 additions and 3 deletions

View file

@ -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

View file

@ -1769,3 +1769,4 @@
( 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

View 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=

View 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);

View file

@ -64,7 +64,7 @@
#include "stock_pixmap.h"
#include "gtk/gtkvscrollbutton.h"
#include "gtk/logwindow.h"
#include "timing.h"
typedef enum
{

View 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;
};

View 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)