aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-04-26 14:04:06 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-04-26 14:04:06 +0800
commite2284d39ddc5a7199d7186dec3fb7877e1b20ac5 (patch)
tree4521e5e8ea9de757c3a0369413f1e3e1b4774353 /mail/mail-callbacks.c
parentcd0ca6cdb7a4c30a32e87b1ea4b0af9b50b2d5e9 (diff)
downloadgsoc2013-evolution-e2284d39ddc5a7199d7186dec3fb7877e1b20ac5.tar
gsoc2013-evolution-e2284d39ddc5a7199d7186dec3fb7877e1b20ac5.tar.gz
gsoc2013-evolution-e2284d39ddc5a7199d7186dec3fb7877e1b20ac5.tar.bz2
gsoc2013-evolution-e2284d39ddc5a7199d7186dec3fb7877e1b20ac5.tar.lz
gsoc2013-evolution-e2284d39ddc5a7199d7186dec3fb7877e1b20ac5.tar.xz
gsoc2013-evolution-e2284d39ddc5a7199d7186dec3fb7877e1b20ac5.tar.zst
gsoc2013-evolution-e2284d39ddc5a7199d7186dec3fb7877e1b20ac5.zip
Added "MessageSearch" verb.
2001-04-26 Jon Trowbridge <trow@ximian.com> * folder-browser-factory.c: Added "MessageSearch" verb. * mail-callbacks.c (search_msg): Added search callback. (are_you_sure): Added some casts to fix compiler warnings. * mail-search.c: Added. A simple search-in-message widget, that uses GtkHTML's searching capabilities. 2001-04-26 Jon Trowbridge <trow@ximian.com> * evolution-mail.xml: Added "Search Message" to "View" menu. svn path=/trunk/; revision=9575
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 6919ac32e9..18407ee6a4 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -51,6 +51,7 @@
#include "mail-tools.h"
#include "mail-ops.h"
#include "mail-local.h"
+#include "mail-search.h"
#include "mail-send-recv.h"
#include "mail-vfolder.h"
#include "folder-browser.h"
@@ -1124,14 +1125,14 @@ is_drafts_folder (CamelFolder *folder)
static gboolean
are_you_sure (const char *msg, GPtrArray *uids, FolderBrowser *fb)
{
- GtkWidget *window = gtk_widget_get_ancestor (fb, GTK_TYPE_WINDOW);
+ GtkWidget *window = gtk_widget_get_ancestor (GTK_WIDGET (fb), GTK_TYPE_WINDOW);
GtkWidget *dialog;
char *buf;
int button, i;
buf = g_strdup_printf (msg, uids->len);
dialog = gnome_ok_cancel_dialog_parented (buf, NULL, NULL, (GtkWindow *)window);
- button = gnome_dialog_run_and_close (dialog);
+ button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
if (button != 0) {
for (i = 0; i < uids->len; i++)
g_free (uids->pdata[i]);
@@ -1213,6 +1214,21 @@ resend_msg (GtkWidget *widget, gpointer user_data)
mail_get_messages (fb->folder, uids, do_resend_messages, fb);
}
+void
+search_msg (GtkWidget *widget, gpointer user_data)
+{
+ FolderBrowser *fb = FOLDER_BROWSER (user_data);
+ GtkWidget *w;
+
+ if (fb->mail_display->current_message == NULL) {
+ gtk_widget_show_all (gnome_warning_dialog (_("No Message Selected")));
+ return;
+ }
+
+ w = mail_search_new (fb->mail_display);
+ gtk_widget_show_all (w);
+}
+
static void
save_msg_ok (GtkWidget *widget, gpointer user_data)
{