aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author5 <NotZed@Ximian.com>2001-10-06 05:50:12 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-06 05:50:12 +0800
commite2aaec85d0e2d4fe32a869725645983274a2931b (patch)
treea1a154a698de0f403777d6fd3434c10f9a02b463
parent5ad20324785610c9e45a5cee5a885e3a00bf78e9 (diff)
downloadgsoc2013-evolution-e2aaec85d0e2d4fe32a869725645983274a2931b.tar
gsoc2013-evolution-e2aaec85d0e2d4fe32a869725645983274a2931b.tar.gz
gsoc2013-evolution-e2aaec85d0e2d4fe32a869725645983274a2931b.tar.bz2
gsoc2013-evolution-e2aaec85d0e2d4fe32a869725645983274a2931b.tar.lz
gsoc2013-evolution-e2aaec85d0e2d4fe32a869725645983274a2931b.tar.xz
gsoc2013-evolution-e2aaec85d0e2d4fe32a869725645983274a2931b.tar.zst
gsoc2013-evolution-e2aaec85d0e2d4fe32a869725645983274a2931b.zip
reformatted the menu tables so they're a bit more bloody readable.
2001-10-05 <NotZed@Ximian.com> * folder-browser.c: reformatted the menu tables so they're a bit more bloody readable. * mail-folder-cache.c (mail_note_store): Hook into subscribed/unsubscribed events. Only 'add/remove' folders from the add/removed events if we aren't subscribed, otherwise use the subscribed events. Rest of fix for #11831 svn path=/trunk/; revision=13472
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/folder-browser.c97
-rw-r--r--mail/mail-callbacks.c8
-rw-r--r--mail/mail-folder-cache.c33
4 files changed, 66 insertions, 82 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index b68f4678c8..6ae2d17b7b 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,13 @@
+2001-10-05 <NotZed@Ximian.com>
+
+ * folder-browser.c: reformatted the menu tables so they're a bit
+ more bloody readable.
+
+ * mail-folder-cache.c (mail_note_store): Hook into
+ subscribed/unsubscribed events. Only 'add/remove' folders from
+ the add/removed events if we aren't subscribed, otherwise use the
+ subscribed events. Rest of fix for #11831
+
2001-10-05 Jon Trowbridge <trow@ximian.com>
* mail-config.glade: Add toggle button to config menu to turn the
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 9299b2fbb9..9efe6df832 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -1359,92 +1359,55 @@ enum {
#define MLIST_FILTER (8)
static EPopupMenu filter_menu[] = {
- { N_("VFolder on _Subject"), NULL,
- GTK_SIGNAL_FUNC (vfolder_subject), NULL,
- SELECTION_SET },
- { N_("VFolder on Se_nder"), NULL,
- GTK_SIGNAL_FUNC (vfolder_sender), NULL,
- SELECTION_SET },
- { N_("VFolder on _Recipients"), NULL,
- GTK_SIGNAL_FUNC (vfolder_recipient), NULL,
- SELECTION_SET },
- { N_("VFolder on Mailing _List"), NULL,
- GTK_SIGNAL_FUNC (vfolder_mlist), NULL,
- SELECTION_SET | IS_MAILING_LIST },
+ { N_("VFolder on _Subject"), NULL, GTK_SIGNAL_FUNC (vfolder_subject), NULL, SELECTION_SET },
+ { N_("VFolder on Se_nder"), NULL, GTK_SIGNAL_FUNC (vfolder_sender), NULL, SELECTION_SET },
+ { N_("VFolder on _Recipients"), NULL, GTK_SIGNAL_FUNC (vfolder_recipient), NULL, SELECTION_SET },
+ { N_("VFolder on Mailing _List"), NULL, GTK_SIGNAL_FUNC (vfolder_mlist), NULL, SELECTION_SET | IS_MAILING_LIST },
E_POPUP_SEPARATOR,
- { N_("Filter on Sub_ject"), NULL,
- GTK_SIGNAL_FUNC (filter_subject), NULL,
- SELECTION_SET },
- { N_("Filter on Sen_der"), NULL,
- GTK_SIGNAL_FUNC (filter_sender), NULL,
- SELECTION_SET },
- { N_("Filter on Re_cipients"), NULL,
- GTK_SIGNAL_FUNC (filter_recipient), NULL,
- SELECTION_SET },
- { N_("Filter on _Mailing List"), NULL,
- GTK_SIGNAL_FUNC (filter_mlist), NULL,
- SELECTION_SET | IS_MAILING_LIST },
+ { N_("Filter on Sub_ject"), NULL, GTK_SIGNAL_FUNC (filter_subject), NULL, SELECTION_SET },
+ { N_("Filter on Sen_der"), NULL, GTK_SIGNAL_FUNC (filter_sender), NULL, SELECTION_SET },
+ { N_("Filter on Re_cipients"), NULL, GTK_SIGNAL_FUNC (filter_recipient), NULL, SELECTION_SET },
+ { N_("Filter on _Mailing List"), NULL, GTK_SIGNAL_FUNC (filter_mlist), NULL, SELECTION_SET | IS_MAILING_LIST },
E_POPUP_TERMINATOR
};
static EPopupMenu context_menu[] = {
- { N_("_Open"), NULL,
- GTK_SIGNAL_FUNC (open_msg), NULL, 0 },
- { N_("_Edit as New Message..."), NULL,
- GTK_SIGNAL_FUNC (resend_msg), NULL, CAN_RESEND },
- { N_("_Save As..."), NULL,
- GTK_SIGNAL_FUNC (save_msg), NULL, 0 },
- { N_("_Print"), NULL,
- GTK_SIGNAL_FUNC (print_msg), NULL, 0 },
+ { N_("_Open"), NULL, GTK_SIGNAL_FUNC (open_msg), NULL, 0 },
+ { N_("_Edit as New Message..."), NULL, GTK_SIGNAL_FUNC (resend_msg), NULL, CAN_RESEND },
+ { N_("_Save As..."), NULL, GTK_SIGNAL_FUNC (save_msg), NULL, 0 },
+ { N_("_Print"), NULL, GTK_SIGNAL_FUNC (print_msg), NULL, 0 },
E_POPUP_SEPARATOR,
- { N_("_Reply to Sender"), NULL,
- GTK_SIGNAL_FUNC (reply_to_sender), NULL, 0 },
- { N_("Reply to _List"), NULL,
- GTK_SIGNAL_FUNC (reply_to_list), NULL, 0 },
- { N_("Reply to _All"), NULL,
- GTK_SIGNAL_FUNC (reply_to_all), NULL, 0 },
- { N_("_Forward"), NULL,
- GTK_SIGNAL_FUNC (forward), NULL, 0 },
+ { N_("_Reply to Sender"), NULL, GTK_SIGNAL_FUNC (reply_to_sender), NULL, 0 },
+ { N_("Reply to _List"), NULL, GTK_SIGNAL_FUNC (reply_to_list), NULL, 0 },
+ { N_("Reply to _All"), NULL, GTK_SIGNAL_FUNC (reply_to_all), NULL, 0 },
+ { N_("_Forward"), NULL, GTK_SIGNAL_FUNC (forward), NULL, 0 },
{ "", NULL, (NULL), NULL, 0 },
- { N_("Mar_k as Read"), NULL,
- GTK_SIGNAL_FUNC (mark_as_seen), NULL, CAN_MARK_READ },
- { N_("Mark as U_nread"), NULL,
- GTK_SIGNAL_FUNC (mark_as_unseen), NULL, CAN_MARK_UNREAD },
- { N_("Mark as _Important"), NULL,
- GTK_SIGNAL_FUNC (mark_as_important), NULL, CAN_MARK_IMPORTANT },
- { N_("Mark as Unim_portant"), NULL,
- GTK_SIGNAL_FUNC (mark_as_unimportant), NULL, CAN_MARK_UNIMPORTANT },
+ { N_("Mar_k as Read"), NULL, GTK_SIGNAL_FUNC (mark_as_seen), NULL, CAN_MARK_READ },
+ { N_("Mark as U_nread"), NULL, GTK_SIGNAL_FUNC (mark_as_unseen), NULL, CAN_MARK_UNREAD },
+ { N_("Mark as _Important"), NULL, GTK_SIGNAL_FUNC (mark_as_important), NULL, CAN_MARK_IMPORTANT },
+ { N_("Mark as Unim_portant"), NULL, GTK_SIGNAL_FUNC (mark_as_unimportant), NULL, CAN_MARK_UNIMPORTANT },
E_POPUP_SEPARATOR,
- { N_("_Move to Folder..."), NULL,
- GTK_SIGNAL_FUNC (move_msg), NULL, 0 },
- { N_("_Copy to Folder..."), NULL,
- GTK_SIGNAL_FUNC (copy_msg), NULL, 0 },
- { N_("_Delete"), NULL,
- GTK_SIGNAL_FUNC (delete_msg), NULL, CAN_DELETE },
- { N_("_Undelete"), NULL,
- GTK_SIGNAL_FUNC (undelete_msg), NULL, CAN_UNDELETE },
+ { N_("_Move to Folder..."), NULL, GTK_SIGNAL_FUNC (move_msg), NULL, 0 },
+ { N_("_Copy to Folder..."), NULL, GTK_SIGNAL_FUNC (copy_msg), NULL, 0 },
+ { N_("_Delete"), NULL, GTK_SIGNAL_FUNC (delete_msg), NULL, CAN_DELETE },
+ { N_("_Undelete"), NULL, GTK_SIGNAL_FUNC (undelete_msg), NULL, CAN_UNDELETE },
E_POPUP_SEPARATOR,
- { N_("Add Sender to Address Book"), NULL,
- GTK_SIGNAL_FUNC (addrbook_sender), NULL, 0 },
- { "", NULL,
- GTK_SIGNAL_FUNC (NULL), NULL, 0 },
-
- { N_("Apply Filters"), NULL,
- GTK_SIGNAL_FUNC (apply_filters), NULL, 0 },
- { "", NULL,
- GTK_SIGNAL_FUNC (NULL), NULL, 0 },
- { N_("Create Ru_le From Message"), NULL,
- GTK_SIGNAL_FUNC (NULL), filter_menu, SELECTION_SET },
+ { N_("Add Sender to Address Book"), NULL, GTK_SIGNAL_FUNC (addrbook_sender), NULL, 0 },
+ { "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },
+
+ { N_("Apply Filters"), NULL, GTK_SIGNAL_FUNC (apply_filters), NULL, 0 },
+ { "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },
+ { N_("Create Ru_le From Message"), NULL, GTK_SIGNAL_FUNC (NULL), filter_menu, SELECTION_SET },
E_POPUP_TERMINATOR
};
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 36011a8d57..6336d7102e 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1048,6 +1048,8 @@ reply_to_sender (GtkWidget *widget, gpointer user_data)
{
FolderBrowser *fb = FOLDER_BROWSER (user_data);
+ /* FIXME: make this always load the message based on cursor */
+
if (!check_send_configuration (fb))
return;
@@ -1062,6 +1064,8 @@ reply_to_list (GtkWidget *widget, gpointer user_data)
if (!check_send_configuration (fb))
return;
+
+ /* FIXME: make this always load the message based on cursor */
mail_reply (fb->folder, fb->mail_display->current_message,
fb->message_list->cursor_uid, REPLY_LIST);
@@ -1074,6 +1078,8 @@ reply_to_all (GtkWidget *widget, gpointer user_data)
if (!check_send_configuration (fb))
return;
+
+ /* FIXME: make this always load the message based on cursor */
mail_reply (fb->folder, fb->mail_display->current_message,
fb->message_list->cursor_uid, REPLY_ALL);
@@ -1301,6 +1307,8 @@ addrbook_sender (GtkWidget *widget, gpointer user_data)
GtkWidget *control;
GtkWidget *socket;
+ /* FIXME: make this use the cursor message id */
+
if (fb && fb->mail_display)
msg = fb->mail_display->current_message;
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 2c3474c817..2e292699b5 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -281,13 +281,15 @@ real_folder_created(CamelStore *store, void *event_data, CamelFolderInfo *fi)
static void
store_folder_created(CamelObject *o, void *event_data, void *data)
{
- CamelFolderInfo *info = event_data;
-
- d(printf("folder added: %s\n", info->full_name));
- d(printf("uri = '%s'\n", info->url));
+ /* we only want created events to do more work if we dont support subscriptions */
+ if (!camel_store_supports_subscriptions(CAMEL_STORE(o)))
+ mail_msg_wait(mail_proxy_event((CamelObjectEventHookFunc)real_folder_created, o, NULL, event_data));
+}
- /* dont need to copy info since we're waiting for it to complete */
- mail_msg_wait(mail_proxy_event((CamelObjectEventHookFunc)real_folder_created, o, NULL, info));
+static void
+store_folder_subscribed(CamelObject *o, void *event_data, void *data)
+{
+ mail_msg_wait(mail_proxy_event((CamelObjectEventHookFunc)real_folder_created, o, NULL, event_data));
}
static void
@@ -302,16 +304,15 @@ real_folder_deleted(CamelStore *store, void *event_data, CamelFolderInfo *fi)
static void
store_folder_deleted(CamelObject *o, void *event_data, void *data)
{
- CamelStore *store = (CamelStore *)o;
- CamelFolderInfo *info = event_data;
-
- store = store;
- info = info;
-
- /* should really remove it? */
- d(printf("folder deleted: %s\n", info->full_name));
+ /* we only want deleted events to do more work if we dont support subscriptions */
+ if (!camel_store_supports_subscriptions(CAMEL_STORE(o)))
+ mail_msg_wait(mail_proxy_event((CamelObjectEventHookFunc)real_folder_deleted, o, NULL, event_data));
+}
- mail_msg_wait(mail_proxy_event((CamelObjectEventHookFunc)real_folder_deleted, o, NULL, info));
+static void
+store_folder_unsubscribed(CamelObject *o, void *event_data, void *data)
+{
+ mail_msg_wait(mail_proxy_event((CamelObjectEventHookFunc)real_folder_deleted, o, NULL, event_data));
}
static void
@@ -409,6 +410,8 @@ mail_note_store(CamelStore *store, EvolutionStorage *storage, GNOME_Evolution_St
camel_object_hook_event((CamelObject *)store, "folder_created", store_folder_created, NULL);
camel_object_hook_event((CamelObject *)store, "folder_deleted", store_folder_deleted, NULL);
+ camel_object_hook_event((CamelObject *)store, "folder_subscribed", store_folder_subscribed, NULL);
+ camel_object_hook_event((CamelObject *)store, "folder_unsubscribed", store_folder_unsubscribed, NULL);
camel_object_hook_event((CamelObject *)store, "finalize", store_finalised, NULL);
}