2007-03-15 [colin] 2.8.1cvs15
authorColin Leroy <colin@colino.net>
Thu, 15 Mar 2007 16:10:17 +0000 (16:10 +0000)
committerColin Leroy <colin@colino.net>
Thu, 15 Mar 2007 16:10:17 +0000 (16:10 +0000)
* src/messageview.c
* src/mimeview.h
Add a way for mimeviewer plugins to
implement body search

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

index 4a30654..5685c71 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-03-15 [colin]     2.8.1cvs15
+
+       * src/messageview.c
+       * src/mimeview.h
+               Add a way for mimeviewer plugins to
+               implement body search
+
 2007-03-15 [paul]      2.8.1cvs14
 
        * src/prefs_spelling.c
index b1b9395..139abe8 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.4.11 -r 1.1.4.12 src/gtk/logwindow.h;  ) > 2.8.1cvs12.patchset
 ( cvs diff -u -r 1.3.2.12 -r 1.3.2.13 src/common/quoted-printable.c;  ) > 2.8.1cvs13.patchset
 ( cvs diff -u -r 1.5.2.32 -r 1.5.2.33 src/prefs_spelling.c;  ) > 2.8.1cvs14.patchset
+( cvs diff -u -r 1.94.2.124 -r 1.94.2.125 src/messageview.c;  cvs diff -u -r 1.20.2.18 -r 1.20.2.19 src/mimeview.h;  ) > 2.8.1cvs15.patchset
index 1b1e3f5..72aee2c 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=14
+EXTRA_VERSION=15
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9afc96a..5dcf0e9 100644 (file)
@@ -1103,6 +1103,13 @@ gboolean messageview_search_string(MessageView *messageview, const gchar *str,
 {
        TextView *text;
 
+       if (messageview->mimeview->type == MIMEVIEW_VIEWER) {
+               MimeViewer *viewer = messageview->mimeview->mimeviewer;
+               if (viewer && viewer->text_search) {
+                       return viewer->text_search(viewer, FALSE, str, case_sens);
+               }
+       }
+
        text = messageview_get_current_textview(messageview);
        if (text)
                return textview_search_string(text, str, case_sens);
@@ -1115,6 +1122,13 @@ gboolean messageview_search_string_backward(MessageView *messageview,
 {
        TextView *text;
 
+       if (messageview->mimeview->type == MIMEVIEW_VIEWER) {
+               MimeViewer *viewer = messageview->mimeview->mimeviewer;
+               if (viewer && viewer->text_search) {
+                       return viewer->text_search(viewer, TRUE, str, case_sens);
+               }
+       }
+
        text = messageview_get_current_textview(messageview);
        if (text)       
                return textview_search_string_backward(text,
index b4bf9a0..9d540c5 100644 (file)
@@ -125,6 +125,9 @@ struct _MimeViewer
        gchar           *(*get_selection)       (MimeViewer *);
        gboolean        (*scroll_page)          (MimeViewer *, gboolean up);
        void            (*scroll_one_line)      (MimeViewer *, gboolean up);
+       gboolean        (*text_search)          (MimeViewer *, gboolean backward,
+                                                const gchar *str, 
+                                                gboolean case_sensitive);
        MimeView        *mimeview;
 };