aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@ximian.com>2001-03-07 05:08:56 +0800
committerMiguel de Icaza <miguel@src.gnome.org>2001-03-07 05:08:56 +0800
commit789ed9286edc7f4455ce5fe87dfe7e33a841c5e7 (patch)
tree3cfa6b6fcb9de473d7a0bc1420f4df56022f4af5 /mail
parentb3dabe72df7ad9899cfe36383c7dfdb6794c58a0 (diff)
downloadgsoc2013-evolution-789ed9286edc7f4455ce5fe87dfe7e33a841c5e7.tar.gz
gsoc2013-evolution-789ed9286edc7f4455ce5fe87dfe7e33a841c5e7.tar.zst
gsoc2013-evolution-789ed9286edc7f4455ce5fe87dfe7e33a841c5e7.zip
Reorganize the menus to have entries always in a consistent fashion, as
2001-02-27 Miguel de Icaza <miguel@ximian.com> * gui/e-day-view.c (e_day_view_on_event_right_click): Reorganize the menus to have entries always in a consistent fashion, as reported to the genepool mailing list. (e_day_view_on_event_right_click): Added a FIXME comment to the FIXME comment without a FIXME. Now we use e_popup_menu. This allows us to hide/show items on demand, and to sensitize/de-sensitize items depending on their state. This will also let us add icon support (when we get nice icons for this) * gui/e-week-view.c (e_week_view_show_popup_menu): Ditto. The files popup-menu.c and popup-menu.h can now be removed. 2001-03-01 Miguel de Icaza <miguel@ximian.com> * folder-browser.c (on_right_click): Move the context menus to the toplevel code; Use enumerations for the various bitfield constants. Add support for hiding items that are not required (read/unread and delete/undelete). This requires my previous patch, as it assumes "Open" does the right thing instead of having two operations: Open and Edit. 2001-02-28 Miguel de Icaza <miguel@ximian.com> * folder-browser.c (on_right_click): Removed draft folders op here, since open_msg now does the right thing (edit or view). * folder-browser-factory.c (update_pixmaps): Removed MessageEdit from here. * mail-callbacks.c (open_msg): New function, does the "right thing" to a message (either, edit or open). * folder-browser-factory.c: Register new command here. (update_pixmaps): Rename keys that have been shuffled around. (update_pixmaps): Rename to match new updates on xml file. Rename MessageOpenNewWindow to MessageOpen. Change action from "view_message" to "open_message". * mail-callbacks.c (mark_all_as_seen): New command. Marks all messages as seen. 2001-03-06 Miguel de Icaza <miguel@ximian.com> * evolution-tasks.xml: Added "File/New/Task" as well. * evolution-mail.xml: Added "File/New/Mail Message" at the top with binding C-n. * evolution-calendar.xml: Set the binding for New Appointment to C-n * evolution-contact-editor.xml: Set the toolbar to hlook=text vlook=icon; Set all icons priority-text to 1. * evolution-addressbook.xml: Added "Contact" to the New menu. * evolution.xml: Provide an entry point to put "New" items on the first level. We are going to need some Bonobo support to "hide" objects when other objects appear (like, having Mail Message bound to C-S-X in the global space, and when we switch to Mail, we only show the entry that has C-n as the binding). 2001-02-28 Miguel de Icaza <miguel@ximian.com> * evolution.xml: Moved Importer after the Folder operations per Dan's proposal. * evolution-addressbook.xml: Renamed Settings/AddressBook Configuration to Tools/Settings. Make all the items have "Print" items that use the same icon instead of a collection of icons. * evolution-calendar.xml: Moved "Calendar Preferences" from "Settings" to "Tools/Settings". * evolution-mail.xml: Settings menu is fully gone. All things that run a dialog now end up in "Tools" while actions end up in "Actions". Hence I am right. Renamed "Mail Configuration..." to "Identieies and Servers" Move MessageMarkAsRead, MessageMarkAsUnRead to Edit menu. Add MessageMarkAllAsRead. Remove "Print Message" from Message menu. Remove "Print Preview Message" from Message menu. Leave them on the "File" menu. Renamed "Reply to Sender" to "Reply" (awaiting Ettore's permission). Renamed "Messages" to "Actions". Open Message renamed to "Open Selected Items" (as this is what it actually does). Moved "Save Message As" to "File" menu. Added "Properties" to the File/Folder submenu. Edit menu now looks like this: Message Move, Message Copy, Select All, Invert Selection, Delete, Undelete, Mark as Read, Mark as Unread. Some of them were moved from the "Messages" menu. "Forward message" shortcut changed to C-f Tools menu created. Create Rule From message moved to "Tools". * evolution.xml: Added Tools menu. Moved Edit/Customize to Tools/Customize Toolbar. Added File/Folder submenu. Duplicate "New Folder" in here. 2001-02-28 Miguel de Icaza <miguel@ximian.com> * menus/gal-view-menus.c (build_menus): Add translation string here. svn path=/trunk/; revision=8572
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog33
-rw-r--r--mail/folder-browser-factory.c49
-rw-r--r--mail/folder-browser.c184
-rw-r--r--mail/mail-callbacks.c38
-rw-r--r--mail/mail-callbacks.h4
-rw-r--r--mail/mail-config.glade8
6 files changed, 230 insertions, 86 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index c759729f69..0046b517cd 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,36 @@
+2001-03-01 Miguel de Icaza <miguel@ximian.com>
+
+ * folder-browser.c (on_right_click): Move the context menus to
+ the toplevel code; Use enumerations for the various bitfield
+ constants.
+
+ Add support for hiding items that are not required (read/unread
+ and delete/undelete).
+
+ This requires my previous patch, as it assumes "Open" does the
+ right thing instead of having two operations: Open and Edit.
+
+2001-02-28 Miguel de Icaza <miguel@ximian.com>
+
+ * folder-browser.c (on_right_click): Removed draft folders op
+ here, since open_msg now does the right thing (edit or view).
+
+ * folder-browser-factory.c (update_pixmaps): Removed MessageEdit
+ from here.
+
+ * mail-callbacks.c (open_msg): New function, does the "right
+ thing" to a message (either, edit or open).
+
+ * folder-browser-factory.c: Register new command here.
+ (update_pixmaps): Rename keys that have been shuffled around.
+ (update_pixmaps): Rename to match new updates on xml file.
+
+ Rename MessageOpenNewWindow to MessageOpen. Change action from
+ "view_message" to "open_message".
+
+ * mail-callbacks.c (mark_all_as_seen): New command. Marks all
+ messages as seen.
+
2001-03-06 Dan Winship <danw@ximian.com>
* mail-ops.c (get_folderinfo_got): If the folderinfo has no URL
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index 197baf2f19..0ba731bbe7 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -44,6 +44,8 @@ static EList *control_list = NULL;
BonoboUIVerb verbs [] = {
BONOBO_UI_UNSAFE_VERB ("PrintMessage", print_msg),
BONOBO_UI_UNSAFE_VERB ("PrintPreviewMessage", print_preview_msg),
+ BONOBO_UI_UNSAFE_VERB ("MailGetSend", send_receive_mail),
+ BONOBO_UI_UNSAFE_VERB ("MailCompose", compose_msg),
/* Edit Menu */
BONOBO_UI_UNSAFE_VERB ("EditSelectAll", select_all),
@@ -57,8 +59,7 @@ BonoboUIVerb verbs [] = {
BONOBO_UI_UNSAFE_VERB ("SetForgetPwd", mail_session_forget_passwords),
/* Message Menu */
- BONOBO_UI_UNSAFE_VERB ("MessageOpenNewWnd", view_message),
- BONOBO_UI_UNSAFE_VERB ("MessageEdit", edit_message),
+ BONOBO_UI_UNSAFE_VERB ("MessageOpen", open_message),
BONOBO_UI_UNSAFE_VERB ("MessageSaveAs", save_msg),
BONOBO_UI_UNSAFE_VERB ("MessagePrint", print_msg),
BONOBO_UI_UNSAFE_VERB ("MessageReplySndr", reply_to_sender),
@@ -68,6 +69,7 @@ BonoboUIVerb verbs [] = {
BONOBO_UI_UNSAFE_VERB ("MessageMarkAsRead", mark_as_seen),
BONOBO_UI_UNSAFE_VERB ("MessageMarkAsUnRead", mark_as_unseen),
+ BONOBO_UI_UNSAFE_VERB ("MessageMarkAllAsRead", mark_all_as_seen),
BONOBO_UI_UNSAFE_VERB ("MessageMove", move_msg),
BONOBO_UI_UNSAFE_VERB ("MessageCopy", copy_msg),
@@ -96,8 +98,6 @@ BonoboUIVerb verbs [] = {
BONOBO_UI_UNSAFE_VERB ("FolderConfig", configure_folder),
/* Toolbar specific */
- BONOBO_UI_UNSAFE_VERB ("MailGet", send_receive_mail),
- BONOBO_UI_UNSAFE_VERB ("MailCompose", compose_msg),
BONOBO_UI_UNSAFE_VERB ("MailStop", stop_threads),
BONOBO_UI_UNSAFE_VERB ("MailPrevious", previous_msg),
BONOBO_UI_UNSAFE_VERB ("MailNext", next_msg),
@@ -132,19 +132,15 @@ set_pixmap (BonoboUIComponent *uic,
static void
update_pixmaps (BonoboUIComponent *uic)
{
- set_pixmap (uic, "/menu/File/Print/Print", "16_print.xpm");
set_pixmap (uic, "/menu/File/Print/Print Preview", "16_print.xpm");
- set_pixmap (uic, "/menu/Component/Message/MessageEdit", "16_edit.xpm");
- set_pixmap (uic, "/menu/Component/Message/MessageSaveAs", "16_save.xpm");
- set_pixmap (uic, "/menu/Component/Message/MessagePrint", "16_print.xpm");
- set_pixmap (uic, "/menu/Component/Message/MessageMove", "16_move_message.xpm");
- set_pixmap (uic, "/menu/Component/Message/MessageReplyAll", "16_reply_to_all.xpm");
- set_pixmap (uic, "/menu/Component/Message/MessageReplySndr", "16_reply.xpm");
+ set_pixmap (uic, "/menu/Component/Actions/MessageMove", "16_move_message.xpm");
+ set_pixmap (uic, "/menu/Component/Actions/MessageReplyAll", "16_reply_to_all.xpm");
+ set_pixmap (uic, "/menu/Component/Actions/MessageReplySndr", "16_reply.xpm");
- set_pixmap (uic, "/menu/Component/Folder/FolderConfig", "16_configure_folder.xpm");
+ set_pixmap (uic, "/menu/File/Folder/FolderConfig", "16_configure_folder.xpm");
- set_pixmap (uic, "/menu/Settings/SetMailConfig", "16_configure_mail.xpm");
+ set_pixmap (uic, "/menu/Tools/Component/SetMailConfig", "16_configure_mail.xpm");
set_pixmap (uic, "/Toolbar/MailGet", "buttons/fetch-mail.png");
set_pixmap (uic, "/Toolbar/MailCompose", "buttons/compose-message.png");
@@ -167,8 +163,8 @@ display_view(GalViewCollection *collection,
}
static void
-folder_browser_setup_menus (FolderBrowser *fb,
- BonoboUIComponent *uic)
+folder_browser_setup_view_menus (FolderBrowser *fb,
+ BonoboUIComponent *uic)
{
GalViewCollection *collection;
GalViewMenus *views;
@@ -203,6 +199,26 @@ folder_browser_setup_menus (FolderBrowser *fb,
}
static void
+folder_browser_setup_property_menu (FolderBrowser *fb,
+ BonoboUIComponent *uic)
+{
+ char *name, *base = NULL;
+
+ if (fb->uri)
+ base = g_basename (fb->uri);
+
+ if (base && base [0] != 0)
+ name = g_strdup_printf (_("Properties for \"%s\""), base);
+ else
+ name = g_strdup (_("Properties"));
+
+ bonobo_ui_component_set_prop (
+ uic, "/menu/File/Folder/FolderConfig",
+ "label", name, NULL);
+ g_free (name);
+}
+
+static void
control_activate (BonoboControl *control,
BonoboUIComponent *uic,
FolderBrowser *fb)
@@ -250,7 +266,8 @@ control_activate (BonoboControl *control,
folder_browser_toggle_view_source,
folder_browser);
- folder_browser_setup_menus (fb, uic);
+ folder_browser_setup_view_menus (fb, uic);
+ folder_browser_setup_property_menu (fb, uic);
update_pixmaps (uic);
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 726b79705d..42fa8d35fa 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -489,6 +489,107 @@ hide_sender(GtkWidget *w, FolderBrowser *fb)
}
}
+enum {
+ SELECTION_SET = 2,
+ CAN_MARK_READ = 4,
+ CAN_MARK_UNREAD = 8,
+ CAN_DELETE = 16,
+ CAN_UNDELETE = 32,
+ IS_MAILING_LIST = 64,
+};
+
+#define SEPARATOR { "", NULL, (NULL), NULL, 0 }
+#define TERMINATOR { NULL, NULL, (NULL), NULL, 0 }
+
+#define MLIST_VFOLDER (3)
+#define MLIST_FILTER (8)
+
+static EPopupMenu filter_menu[] = {
+ { N_("VFolder on Subject"), NULL,
+ GTK_SIGNAL_FUNC (vfolder_subject), NULL,
+ SELECTION_SET },
+ { N_("VFolder on Sender"), 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 },
+
+ SEPARATOR,
+
+ { N_("Filter on Subject"), NULL,
+ GTK_SIGNAL_FUNC (filter_subject), NULL,
+ SELECTION_SET },
+ { N_("Filter on Sender"), NULL,
+ GTK_SIGNAL_FUNC (filter_sender), NULL,
+ SELECTION_SET },
+ { N_("Filter on Recipients"), 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 },
+
+ TERMINATOR
+};
+
+
+static EPopupMenu menu[] = {
+ { N_("Open"), NULL,
+ GTK_SIGNAL_FUNC (open_msg), NULL, 0 },
+ { N_("Save As..."), NULL,
+ GTK_SIGNAL_FUNC (save_msg), NULL, 0 },
+ { N_("Print"), NULL,
+ GTK_SIGNAL_FUNC (print_msg), NULL, 0 },
+
+ SEPARATOR,
+
+ { N_("Reply to Sender"), NULL,
+ GTK_SIGNAL_FUNC (reply_to_sender), NULL, 0 },
+ { N_("Reply to All"), NULL,
+ GTK_SIGNAL_FUNC (reply_to_all), NULL, 0 },
+ { N_("Forward"), NULL,
+ GTK_SIGNAL_FUNC (forward_attached), NULL, 0 },
+ { N_("Forward inline"), NULL,
+ GTK_SIGNAL_FUNC (forward_inlined), NULL, 0 },
+ { "", NULL, (NULL), NULL, 0 },
+ { N_("Mark as Read"), NULL,
+ GTK_SIGNAL_FUNC (mark_as_seen), NULL, CAN_MARK_READ },
+ { N_("Mark as Unread"), NULL,
+ GTK_SIGNAL_FUNC (mark_as_unseen), NULL, CAN_MARK_UNREAD },
+
+ 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 },
+
+ SEPARATOR,
+
+ /*{ _("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 Rule From Message"), NULL,
+ GTK_SIGNAL_FUNC (NULL), filter_menu, SELECTION_SET },
+
+ TERMINATOR
+};
+
+
/* handle context menu over message-list */
static gint
on_right_click (ETable *table, gint row, gint col, GdkEvent *event, FolderBrowser *fb)
@@ -497,69 +598,25 @@ on_right_click (ETable *table, gint row, gint col, GdkEvent *event, FolderBrowse
CamelMessageInfo *info;
GPtrArray *uids;
int enable_mask = 0;
+ int hide_mask = 0;
int i;
char *mailing_list_name = NULL;
char *subject_match = NULL, *from_match = NULL;
-#define MLIST_VFOLDER (3)
-#define MLIST_FILTER (8)
- EPopupMenu filter_menu[] = {
- { _("VFolder on Subject"), NULL, GTK_SIGNAL_FUNC (vfolder_subject), NULL, 2 },
- { _("VFolder on Sender"), NULL, GTK_SIGNAL_FUNC (vfolder_sender), NULL, 2 },
- { _("VFolder on Recipients"), NULL, GTK_SIGNAL_FUNC (vfolder_recipient), NULL, 2 },
- { _("VFolder on Mailing List"), NULL, GTK_SIGNAL_FUNC (vfolder_mlist), NULL, 66 },
- { "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },
- { _("Filter on Subject"), NULL, GTK_SIGNAL_FUNC (filter_subject), NULL, 2 },
- { _("Filter on Sender"), NULL, GTK_SIGNAL_FUNC (filter_sender), NULL, 2 },
- { _("Filter on Recipients"), NULL, GTK_SIGNAL_FUNC (filter_recipient), NULL, 2 },
- { _("Filter on Mailing List"), NULL, GTK_SIGNAL_FUNC (filter_mlist), NULL, 66 },
- { NULL, NULL, NULL, NULL, 0 }
- };
-
-
- EPopupMenu menu[] = {
- { _("Open"), NULL, GTK_SIGNAL_FUNC (view_msg), NULL, 0 },
- { _("Edit"), NULL, GTK_SIGNAL_FUNC (edit_msg), NULL, 1 },
- { _("Save As..."), NULL, GTK_SIGNAL_FUNC (save_msg), NULL, 0 },
- { _("Print"), NULL, GTK_SIGNAL_FUNC (print_msg), NULL, 0 },
- { "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },
- { _("Reply to Sender"), NULL, GTK_SIGNAL_FUNC (reply_to_sender), NULL, 0 },
- { _("Reply to All"), NULL, GTK_SIGNAL_FUNC (reply_to_all), NULL, 0 },
- { _("Forward"), NULL, GTK_SIGNAL_FUNC (forward_attached), NULL, 0 },
- { _("Forward inline"), NULL, GTK_SIGNAL_FUNC (forward_inlined), NULL, 0 },
- { "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },
- { _("Mark as Read"), NULL, GTK_SIGNAL_FUNC (mark_as_seen), NULL, 4 },
- { _("Mark as Unread"), NULL, GTK_SIGNAL_FUNC (mark_as_unseen), NULL, 8 },
- { "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },
- { _("Move to Folder..."), NULL, GTK_SIGNAL_FUNC (move_msg), NULL, 0 },
- { _("Copy to Folder..."), NULL, GTK_SIGNAL_FUNC (copy_msg), NULL, 0 },
- { _("Delete"), NULL, GTK_SIGNAL_FUNC (delete_msg), NULL, 16 },
- { _("Undelete"), NULL, GTK_SIGNAL_FUNC (undelete_msg), NULL, 32 },
- { "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },
- /*{ _("Add Sender to Address Book"), NULL, GTK_SIGNAL_FUNC (addrbook_sender), NULL, 0 },
- { "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },*/
- { _("Apply Filters"), NULL, GTK_SIGNAL_FUNC (apply_filters), NULL, 0 },
- { "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },
- { _("Create Rule From Message"), NULL, GTK_SIGNAL_FUNC (NULL), filter_menu, 2 },
- { NULL, NULL, NULL, NULL, 0 }
- };
-
if (fb->reconfigure) {
enable_mask = 0;
goto display_menu;
}
- if (fb->folder != drafts_folder)
- enable_mask |= 1;
-
if (fb->mail_display->current_message == NULL) {
- enable_mask |= 2;
+ enable_mask |= SELECTION_SET;
mailing_list_name = NULL;
} else {
const char *subject, *real, *addr;
const CamelInternetAddress *from;
- mailing_list_name = header_raw_check_mailing_list(&((CamelMimePart *)fb->mail_display->current_message)->headers);
+ mailing_list_name = header_raw_check_mailing_list(
+ &((CamelMimePart *)fb->mail_display->current_message)->headers);
if ((subject = camel_mime_message_get_subject(fb->mail_display->current_message))
&& (subject = strip_re(subject))
@@ -604,14 +661,30 @@ on_right_click (ETable *table, gint row, gint col, GdkEvent *event, FolderBrowse
}
if (!have_unseen)
- enable_mask |= 4;
+ enable_mask |= CAN_MARK_READ;
if (!have_seen)
- enable_mask |= 8;
+ enable_mask |= CAN_MARK_UNREAD;
if (!have_undeleted)
- enable_mask |= 16;
+ enable_mask |= CAN_DELETE;
if (!have_deleted)
- enable_mask |= 32;
+ enable_mask |= CAN_UNDELETE;
+
+ /*
+ * Hide items that wont get used.
+ */
+ if (!(have_unseen && have_seen)){
+ if (have_seen)
+ hide_mask |= CAN_MARK_READ;
+ else
+ hide_mask |= CAN_MARK_UNREAD;
+ }
+ if (!(have_undeleted && have_deleted)){
+ if (have_deleted)
+ hide_mask |= CAN_DELETE;
+ else
+ hide_mask |= CAN_UNDELETE;
+ }
}
/* free uids */
@@ -623,7 +696,7 @@ display_menu:
/* generate the "Filter on Mailing List menu item name */
if (mailing_list_name == NULL) {
- enable_mask |= 64;
+ enable_mask |= IS_MAILING_LIST;
filter_menu[MLIST_FILTER].name = g_strdup (_("Filter on Mailing List"));
filter_menu[MLIST_VFOLDER].name = g_strdup (_("VFolder on Mailing List"));
} else {
@@ -632,7 +705,7 @@ display_menu:
g_free(mailing_list_name);
}
- e_popup_menu_run (menu, event, enable_mask, 0, fb);
+ e_popup_menu_run (menu, event, enable_mask, hide_mask, fb);
g_free(filter_menu[MLIST_FILTER].name);
g_free(filter_menu[MLIST_VFOLDER].name);
@@ -724,7 +797,8 @@ folder_browser_gui_init (FolderBrowser *fb)
fb->vpaned = e_vpaned_new ();
gtk_widget_show (fb->vpaned);
- gtk_table_attach (GTK_TABLE (fb), fb->vpaned,
+ gtk_table_attach (
+ GTK_TABLE (fb), fb->vpaned,
0, 1, 1, 3,
GTK_FILL | GTK_EXPAND,
GTK_FILL | GTK_EXPAND,
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index b21ad96d51..dd7c629b0f 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -59,6 +59,8 @@
#include <sys/stat.h>
#endif
+extern CamelFolder *drafts_folder;
+
struct post_send_data {
CamelFolder *folder;
gchar *uid;
@@ -915,13 +917,20 @@ flag_messages(FolderBrowser *fb, guint32 mask, guint32 set)
void
mark_as_seen (BonoboUIComponent *uih, void *user_data, const char *path)
{
- flag_messages(FOLDER_BROWSER(user_data), CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
+ flag_messages (FOLDER_BROWSER(user_data), CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
}
void
mark_as_unseen (BonoboUIComponent *uih, void *user_data, const char *path)
{
- flag_messages(FOLDER_BROWSER(user_data), CAMEL_MESSAGE_SEEN, 0);
+ flag_messages (FOLDER_BROWSER(user_data), CAMEL_MESSAGE_SEEN, 0);
+}
+
+void
+mark_all_as_seen (BonoboUIComponent *uih, void *user_data, const char *path)
+{
+ select_all (uih, user_data, path);
+ flag_messages (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_SEEN, 0);
}
static void
@@ -949,7 +958,6 @@ edit_msg (GtkWidget *widget, gpointer user_data)
{
FolderBrowser *fb = FOLDER_BROWSER (user_data);
GPtrArray *uids;
- extern CamelFolder *drafts_folder;
if (fb->folder != drafts_folder) {
GtkWidget *message;
@@ -1316,17 +1324,28 @@ view_msg (GtkWidget *widget, gpointer user_data)
uids = g_ptr_array_new ();
message_list_foreach (fb->message_list, enumerate_msg, uids);
- for (i=0;i<uids->len;i++) {
- mail_get_message(fb->folder, uids->pdata[i], do_view_message, fb, mail_thread_queued);
- g_free(uids->pdata[i]);
+ for (i = 0; i < uids->len; i++) {
+ mail_get_message (fb->folder, uids->pdata [i], do_view_message, fb, mail_thread_queued);
+ g_free (uids->pdata [i]);
}
- g_ptr_array_free(uids, TRUE);
+ g_ptr_array_free (uids, TRUE);
}
void
-view_message (BonoboUIComponent *uih, void *user_data, const char *path)
+open_msg (GtkWidget *widget, gpointer user_data)
{
- view_msg (NULL, user_data);
+ FolderBrowser *fb = FOLDER_BROWSER (user_data);
+
+ if (fb->folder == drafts_folder)
+ edit_msg (NULL, user_data);
+ else
+ view_msg (NULL, user_data);
+}
+
+void
+open_message (BonoboUIComponent *uih, void *user_data, const char *path)
+{
+ open_msg (NULL, user_data);
}
void
@@ -1335,7 +1354,6 @@ edit_message (BonoboUIComponent *uih, void *user_data, const char *path)
edit_msg (NULL, user_data);
}
-
void
stop_threads(BonoboUIComponent *uih, void *user_data, const char *path)
{
diff --git a/mail/mail-callbacks.h b/mail/mail-callbacks.h
index e888d47899..5cfeb54b7b 100644
--- a/mail/mail-callbacks.h
+++ b/mail/mail-callbacks.h
@@ -55,6 +55,7 @@ void apply_filters (GtkWidget *widget, gpointer user_data);
void print_msg (GtkWidget *widget, gpointer user_data);
void print_preview_msg (GtkWidget *widget, gpointer user_data);
void edit_msg (GtkWidget *widget, gpointer user_data);
+void open_msg (GtkWidget *widget, gpointer user_data);
void save_msg (GtkWidget *widget, gpointer user_data);
void view_msg (GtkWidget *widget, gpointer user_data);
void view_source (GtkWidget *widget, gpointer user_data);
@@ -64,9 +65,10 @@ void previous_msg (GtkWidget *widget, gpointer user_data);
void select_all (BonoboUIComponent *uih, void *user_data, const char *path);
void invert_selection (BonoboUIComponent *uih, void *user_data, const char *path);
void mark_as_seen (BonoboUIComponent *uih, void *user_data, const char *path);
+void mark_all_as_seen (BonoboUIComponent *uih, void *user_data, const char *path);
void mark_as_unseen (BonoboUIComponent *uih, void *user_data, const char *path);
void edit_message (BonoboUIComponent *uih, void *user_data, const char *path);
-void view_message (BonoboUIComponent *uih, void *user_data, const char *path);
+void open_message (BonoboUIComponent *uih, void *user_data, const char *path);
void expunge_folder (BonoboUIComponent *uih, void *user_data, const char *path);
void filter_edit (BonoboUIComponent *uih, void *user_data, const char *path);
void vfolder_edit_vfolders (BonoboUIComponent *uih, void *user_data, const char *path);
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index eb8766afd8..8161fa372f 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -2973,7 +2973,7 @@ SMTP
<name>cmdMailAdd</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
- <label>Add</label>
+ <label>_Add</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
@@ -2982,7 +2982,7 @@ SMTP
<name>cmdMailEdit</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
- <label>Edit</label>
+ <label>_Edit</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
@@ -2991,7 +2991,7 @@ SMTP
<name>cmdMailDelete</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
- <label>Delete</label>
+ <label>_Delete</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
@@ -3000,7 +3000,7 @@ SMTP
<name>cmdMailDefault</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
- <label>Default</label>
+ <label>De_fault</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>