aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog13
-rw-r--r--mail/folder-browser-factory.c32
-rw-r--r--mail/mail-callbacks.c48
-rw-r--r--mail/mail.h9
4 files changed, 77 insertions, 25 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 648b921d80..a054333ce8 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,16 @@
+2000-09-25 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * folder-browser-factory.c: Added new menu items
+
+ * mail-callbacks.c (mark_as_seen): New callback to mark all
+ selected messages as Seen.
+ (mark_as_unseen): New callback to mark all selected messages as
+ Unseen.
+ (select_all): New callback to select all messages (not yet
+ finished)
+ (unselect_all): New callback to unselect all messages (not yet
+ finished)
+
2000-09-25 Not Zed <NotZed@HelixCode.com>
* message-list.c (folder_to_cachename): Function to convert a
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index c14dd999e0..564b2a1ae6 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -38,18 +38,18 @@ register_ondemand (RuleContext *f, FilterRule *rule, gpointer data)
BonoboUIHandler *uih = gtk_object_get_data (GTK_OBJECT (fb), "uih");
gchar *text;
struct fb_ondemand_closure *oc;
-
+
oc = g_new (struct fb_ondemand_closure, 1);
oc->rule = rule;
oc->fb = fb;
oc->path = g_strdup_printf ("/*Component Placeholder*/Folder/Filter-%s", rule->name);
-
+
if (fb->filter_menu_paths == NULL)
bonobo_ui_handler_menu_new_separator (uih, "/*Component Placeholder*/Folder/separator1", -1);
-
+
text = g_strdup_printf (_("Run filter \"%s\""), rule->name);
fb->filter_menu_paths = g_slist_prepend (fb->filter_menu_paths, oc);
-
+
bonobo_ui_handler_menu_new_item (uih, oc->path, text,
NULL, -1,
BONOBO_UI_HANDLER_PIXMAP_NONE,
@@ -62,7 +62,7 @@ static void
create_ondemand_hooks (FolderBrowser *fb, BonoboUIHandler *uih)
{
gchar *system, *user;
-
+
user = g_strdup_printf ("%s/filters.xml", evolution_dir);
system = EVOLUTION_DATADIR "/evolution/filtertypes.xml";
fb->filter_context = filter_context_new();
@@ -78,42 +78,46 @@ create_ondemand_hooks (FolderBrowser *fb, BonoboUIHandler *uih)
*/
BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("PrintMessage", print_msg),
-
+
/* Settings Menu */
BONOBO_UI_VERB ("SetMailFilter", filter_edit),
BONOBO_UI_VERB ("VFolderEdit", vfolder_edit_vfolders),
BONOBO_UI_VERB ("SetMailConfig", providers_config),
BONOBO_UI_VERB ("SetForgetPwd", forget_passwords),
-
+
/* Message Menu */
+ BONOBO_UI_VERB ("MessageSelectAll", select_all),
+ BONOBO_UI_VERB ("MessageUnSelectAll", unselect_all),
+
BONOBO_UI_VERB ("MessageOpenNewWnd", view_message),
BONOBO_UI_VERB ("MessageEdit", edit_message),
BONOBO_UI_VERB ("MessagePrint", print_msg),
BONOBO_UI_VERB ("MessageReplySndr", reply_to_sender),
BONOBO_UI_VERB ("MessageReplyAll", reply_to_all),
BONOBO_UI_VERB ("MessageForward", forward_msg),
+
+ BONOBO_UI_VERB ("MessageMarkAsRead", mark_as_seen),
+ BONOBO_UI_VERB ("MessageMarkAsUnRead", mark_as_unseen),
BONOBO_UI_VERB ("MessageDelete", delete_msg),
BONOBO_UI_VERB ("MessageMove", move_msg),
BONOBO_UI_VERB ("MessageCopy", copy_msg),
-
+
BONOBO_UI_VERB ("MessageVFolderSubj", vfolder_subject),
BONOBO_UI_VERB ("MessageVFolderSndr", vfolder_sender),
BONOBO_UI_VERB ("MessageVFolderRecip", vfolder_recipient),
-
+
BONOBO_UI_VERB ("MessageFilterSubj", filter_subject),
BONOBO_UI_VERB ("MessageFilderSndr", filter_sender),
BONOBO_UI_VERB ("MessageFilderRecip", filter_recipient),
-
+
/* Folder Menu */
- BONOBO_UI_VERB ("FolderMarkAllRead", mark_all_seen),
- BONOBO_UI_VERB ("FolderDeleteAll", mark_all_deleted),
BONOBO_UI_VERB ("FolderExpunge", expunge_folder),
BONOBO_UI_VERB ("FolderConfig", configure_folder),
-
+
/* Toolbar specific */
BONOBO_UI_VERB ("MailGet", send_receieve_mail),
BONOBO_UI_VERB ("MailCompose", compose_msg),
-
+
BONOBO_UI_VERB_END
};
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index c0aca477ec..c251f73ac2 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -524,31 +524,63 @@ copy_msg (GtkWidget *widget, gpointer user_data)
}
void
-mark_all_seen (BonoboUIHandler *uih, void *user_data, const char *path)
+select_all (BonoboUIHandler *uih, void *user_data, const char *path)
{
- FolderBrowser *fb = FOLDER_BROWSER(user_data);
+ FolderBrowser *fb = FOLDER_BROWSER (user_data);
MessageList *ml = fb->message_list;
if (ml->folder == NULL)
return;
- mail_do_flag_all_messages (ml->folder, FALSE,
- CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
+ message_list_select (ml, -1, MESSAGE_LIST_SELECT_NEXT, 0, 0);
+ /* FIXME: when clahey codes select all for e-table, finish this */
+ /* e_table_select_all (); */
}
void
-mark_all_deleted (BonoboUIHandler *uih, void *user_data, const char *path)
+unselect_all (BonoboUIHandler *uih, void *user_data, const char *path)
{
FolderBrowser *fb = FOLDER_BROWSER (user_data);
- MessageList *ml = fb->message_list;
+ MessageList *ml = fb->message_list;
if (ml->folder == NULL)
return;
- mail_do_flag_all_messages (ml->folder, FALSE,
- CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED);
+ /* FIXME: when clahey codes select all for e-table, finish this */
+ /* e_table_unselect_all (); */
}
+void
+mark_as_seen (BonoboUIHandler *uih, void *user_data, const char *path)
+{
+ FolderBrowser *fb = FOLDER_BROWSER(user_data);
+ MessageList *ml = fb->message_list;
+ GPtrArray *uids;
+
+ if (ml->folder == NULL)
+ return;
+
+ uids = g_ptr_array_new ();
+ message_list_foreach (ml, enumerate_msg, uids);
+ mail_do_flag_messages (ml->folder, uids, FALSE,
+ CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
+}
+
+void
+mark_as_unseen (BonoboUIHandler *uih, void *user_data, const char *path)
+{
+ FolderBrowser *fb = FOLDER_BROWSER(user_data);
+ MessageList *ml = fb->message_list;
+ GPtrArray *uids;
+
+ if (ml->folder == NULL)
+ return;
+
+ uids = g_ptr_array_new ();
+ message_list_foreach (ml, enumerate_msg, uids);
+ mail_do_flag_messages (ml->folder, uids, FALSE,
+ CAMEL_MESSAGE_SEEN, 0);
+}
void
edit_msg (GtkWidget *widget, gpointer user_data)
diff --git a/mail/mail.h b/mail/mail.h
index a6c5baf630..84e4e9679a 100644
--- a/mail/mail.h
+++ b/mail/mail.h
@@ -85,8 +85,11 @@ void print_msg (GtkWidget *widget, gpointer user_data);
void edit_msg (GtkWidget *widget, gpointer user_data);
void view_msg (GtkWidget *widget, gpointer user_data);
-void mark_all_seen (BonoboUIHandler *uih, void *user_data, const char *path);
-void mark_all_deleted (BonoboUIHandler *uih, void *user_data, const char *path);
+void select_all (BonoboUIHandler *uih, void *user_data, const char *path);
+void unselect_all (BonoboUIHandler *uih, void *user_data, const char *path);
+void mark_as_seen (BonoboUIHandler *uih, void *user_data, const char *path);
+void mark_as_unseen (BonoboUIHandler *uih, void *user_data, const char *path);
+
void edit_message (BonoboUIHandler *uih, void *user_data, const char *path);
void view_message (BonoboUIHandler *uih, void *user_data, const char *path);
void expunge_folder (BonoboUIHandler *uih, void *user_data, const char *path);
@@ -94,7 +97,7 @@ void filter_edit (BonoboUIHandler *uih, void *user_data, const char *path);
void vfolder_edit_vfolders (BonoboUIHandler *uih, void *user_data, const char *path);
void providers_config (BonoboUIHandler *uih, void *user_data, const char *path);
-void configure_folder(BonoboUIHandler *uih, void *user_data, const char *path);
+void configure_folder (BonoboUIHandler *uih, void *user_data, const char *path);
void mail_reply (CamelFolder *folder, CamelMimeMessage *msg, const char *uid, gboolean to_all);
void composer_send_cb (EMsgComposer *composer, gpointer data);