aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2002-07-25 05:31:50 +0800
committerPeter Williams <peterw@src.gnome.org>2002-07-25 05:31:50 +0800
commit65f894d915a8c3a1caab62365e09c35d97166b11 (patch)
tree039fbac10e9665b22c44c02bde031c7aae588b89 /mail
parent6dc1e9f71f7a9e3a876f56fadec03e35e5e5e214 (diff)
downloadgsoc2013-evolution-65f894d915a8c3a1caab62365e09c35d97166b11.tar
gsoc2013-evolution-65f894d915a8c3a1caab62365e09c35d97166b11.tar.gz
gsoc2013-evolution-65f894d915a8c3a1caab62365e09c35d97166b11.tar.bz2
gsoc2013-evolution-65f894d915a8c3a1caab62365e09c35d97166b11.tar.lz
gsoc2013-evolution-65f894d915a8c3a1caab62365e09c35d97166b11.tar.xz
gsoc2013-evolution-65f894d915a8c3a1caab62365e09c35d97166b11.tar.zst
gsoc2013-evolution-65f894d915a8c3a1caab62365e09c35d97166b11.zip
Check for whether current_message is NULL as well as preview_shown (if we
2002-07-24 Peter Williams <peterw@ximian.com> * mail-callbacks.c (do_mail_fetch_and_print): Check for whether current_message is NULL as well as preview_shown (if we tried to load the message and failed, as may happen in offline mode.) (done_message_selected): Only print if we actually got the message. * folder-browser.c (folder_browser_query_changed): New function, use this on the query_changed signal. Don't run the search if they only changed the dropdown. svn path=/trunk/; revision=17580
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/folder-browser.c11
-rw-r--r--mail/mail-callbacks.c5
3 files changed, 24 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 42112d8cd4..3e5f9e419f 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2002-07-24 Peter Williams <peterw@ximian.com>
+
+ * mail-callbacks.c (do_mail_fetch_and_print): Check for whether
+ current_message is NULL as well as preview_shown (if we tried to
+ load the message and failed, as may happen in offline mode.)
+ (done_message_selected): Only print if we actually got the message.
+
+ * folder-browser.c (folder_browser_query_changed): New function,
+ use this on the query_changed signal. Don't run the search if
+ they only changed the dropdown.
+
2002-07-23 Peter Williams <peterw@ximian.com>
* mail-ops.c (get_store_get): Call camel_session_get_service
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 53b410c9b0..c104cc2c17 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -1185,6 +1185,15 @@ folder_browser_search_do_search (ESearchBar *esb, FolderBrowser *fb)
return;
}
+static void
+folder_browser_query_changed (ESearchBar *esb, FolderBrowser *fb)
+{
+ if (e_search_bar_get_item_id (esb) != E_FILTERBAR_ADVANCED_ID)
+ return;
+
+ folder_browser_search_do_search (esb, fb);
+}
+
void
folder_browser_toggle_preview (BonoboUIComponent *component,
const char *path,
@@ -2289,7 +2298,7 @@ folder_browser_gui_init (FolderBrowser *fb)
gtk_signal_connect (GTK_OBJECT (fb->search), "search_activated",
GTK_SIGNAL_FUNC (folder_browser_search_do_search), fb);
gtk_signal_connect (GTK_OBJECT (fb->search), "query_changed",
- GTK_SIGNAL_FUNC (folder_browser_search_do_search), fb);
+ GTK_SIGNAL_FUNC (folder_browser_query_changed), fb);
gtk_table_attach (GTK_TABLE (fb), GTK_WIDGET (fb->search),
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 15a8fc22bf..6e3cbb88a5 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -2938,14 +2938,15 @@ done_message_selected (CamelFolder *folder, const char *uid, CamelMimeMessage *m
fb->loaded_uid = fb->loading_uid;
fb->loading_uid = NULL;
- do_mail_print (fb, preview);
+ if (msg)
+ do_mail_print (fb, preview);
}
/* Ack! Most of this is copied from folder-browser.c */
static void
do_mail_fetch_and_print (FolderBrowser *fb, gboolean preview)
{
- if (!fb->preview_shown) {
+ if (!fb->preview_shown || fb->mail_display->current_message == NULL) {
/* If the preview pane is closed, we have to do some
extra magic to load the message. */
struct blarg_this_sucks *blarg = g_new (struct blarg_this_sucks, 1);