aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/folder-browser-factory.c8
-rw-r--r--mail/mail-ops.c17
-rw-r--r--mail/mail.h1
4 files changed, 32 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d26439f1f2..24f8e89af6 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2000-07-28 Cody Russell <bratsche@gnome.org>
+ * mail-ops.c, mail.h: Added mark_all_seen(), to mark every
+ message in the list with CAMEL_MESSAGE_SEEN.
+
+ * folder-browser-factory.c: Added "Actions/Mark all seen".
+
2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
* mail-config.c: Lets fix Dan's kludge the Right Way (tm)
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index a941e6286e..43820e96b7 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -68,6 +68,13 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih,
#endif
);
+ bonobo_ui_handler_menu_new_item (uih, "/Actions/Mark all seen",
+ _("_Mark all messages seen"),
+ NULL, -1,
+ BONOBO_UI_HANDLER_PIXMAP_STOCK,
+ GNOME_STOCK_PIXMAP_CLEAR,
+ 0, 0, mark_all_seen, folder_browser);
+
bonobo_ui_handler_menu_new_item (uih, "/Actions/Expunge", _("_Expunge"),
NULL, -1,
BONOBO_UI_HANDLER_PIXMAP_STOCK,
@@ -130,6 +137,7 @@ control_deactivate (BonoboControl *control, BonoboUIHandler *uih,
char *toolbar_name = g_strdup_printf ("/Toolbar%d", fb->serial);
bonobo_ui_handler_menu_remove (uih, "/View/Threaded");
+ bonobo_ui_handler_menu_remove (uih, "/Actions/Mark all seen");
bonobo_ui_handler_menu_remove (uih, "/Actions/Expunge");
bonobo_ui_handler_menu_remove (uih, "/Tools/Filter Druid ...");
bonobo_ui_handler_menu_remove (uih, "/Tools/Virtual Folder Druid ...");
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index b48ea8fb4b..71d0431552 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -791,6 +791,23 @@ move_msg (GtkWidget *button, gpointer user_data)
camel_exception_free (rfd.ex);
}
+void
+mark_all_seen (BonoboUIHandler *uih, void *user_data, const char *path)
+{
+ FolderBrowser *fb = FOLDER_BROWSER(user_data);
+ MessageList *ml = fb->message_list;
+ GPtrArray *uids;
+ int i;
+
+ uids = camel_folder_get_uids (ml->folder);
+ for (i = 0; i < uids->len; i++)
+ {
+ camel_folder_set_message_flags (ml->folder, uids->pdata[i],
+ CAMEL_MESSAGE_SEEN,
+ CAMEL_MESSAGE_SEEN);
+ }
+}
+
static void
real_delete_msg (MessageList *ml, const char *uid, gpointer user_data)
{
diff --git a/mail/mail.h b/mail/mail.h
index 0c447f62d6..d079d6f4e9 100644
--- a/mail/mail.h
+++ b/mail/mail.h
@@ -56,6 +56,7 @@ void delete_msg (GtkWidget *button, gpointer user_data);
void move_msg (GtkWidget *button, gpointer user_data);
void print_msg (GtkWidget *button, gpointer user_data);
+void mark_all_seen (BonoboUIHandler *uih, void *user_data, const char *path);
void expunge_folder (BonoboUIHandler *uih, void *user_data, const char *path);
void filter_edit (BonoboUIHandler *uih, void *user_data, const char *path);
void vfolder_edit (BonoboUIHandler *uih, void *user_data, const char *path);