diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-21 18:55:49 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-21 19:01:29 +0800 |
commit | aaa180af5abef44bb3e3d3c3c5968ca191a3dbda (patch) | |
tree | 87354ffb9ade305c156f72c66e050deea56c3612 /mail | |
parent | 657a8228ccedbded35c57c08f7d1549e30dceaf0 (diff) | |
download | gsoc2013-evolution-aaa180af5abef44bb3e3d3c3c5968ca191a3dbda.tar gsoc2013-evolution-aaa180af5abef44bb3e3d3c3c5968ca191a3dbda.tar.gz gsoc2013-evolution-aaa180af5abef44bb3e3d3c3c5968ca191a3dbda.tar.bz2 gsoc2013-evolution-aaa180af5abef44bb3e3d3c3c5968ca191a3dbda.tar.lz gsoc2013-evolution-aaa180af5abef44bb3e3d3c3c5968ca191a3dbda.tar.xz gsoc2013-evolution-aaa180af5abef44bb3e3d3c3c5968ca191a3dbda.tar.zst gsoc2013-evolution-aaa180af5abef44bb3e3d3c3c5968ca191a3dbda.zip |
Kill obsolete menu items.
URI Popup Menu -> Call To...
Message -> Post New Message to Folder
Message -> Post a Reply
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-reader.c | 52 | ||||
-rw-r--r-- | mail/e-mail-shell-view-actions.h | 4 | ||||
-rw-r--r-- | mail/em-composer-utils.c | 195 | ||||
-rw-r--r-- | mail/em-composer-utils.h | 4 |
4 files changed, 0 insertions, 255 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 499f8fa25a..3969f4babd 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -553,17 +553,6 @@ action_mail_message_open_cb (GtkAction *action, } static void -action_mail_message_post_cb (GtkAction *action, - EMailReader *reader) -{ - MessageList *message_list; - - message_list = e_mail_reader_get_message_list (reader); - - em_utils_post_to_folder (message_list->folder); -} - -static void action_mail_move_cb (GtkAction *action, EMailReader *reader) { @@ -786,28 +775,6 @@ action_mail_reply_list_cb (GtkAction *action, } static void -action_mail_reply_post_cb (GtkAction *action, - EMailReader *reader) -{ - MessageList *message_list; - CamelFolder *folder; - GtkWindow *window; - const gchar *uid; - - message_list = e_mail_reader_get_message_list (reader); - window = e_mail_reader_get_window (reader); - - folder = message_list->folder; - uid = message_list->cursor_uid; - g_return_if_fail (uid != NULL); - - if (!em_utils_check_user_can_send_mail (window)) - return; - - em_utils_post_reply_to_message_by_uid (folder, uid); -} - -static void action_mail_reply_sender_cb (GtkAction *action, EMailReader *reader) { @@ -1243,13 +1210,6 @@ static GtkActionEntry mail_reader_entries[] = { N_("Open the selected messages in a new window"), G_CALLBACK (action_mail_message_open_cb) }, - { "mail-message-post", - NULL, - N_("Pos_t New Message to Folder"), - NULL, - N_("Post a message to a public folder"), - G_CALLBACK (action_mail_message_post_cb) }, - { "mail-move", "mail-move", N_("_Move to Folder..."), @@ -1341,13 +1301,6 @@ static GtkActionEntry mail_reader_entries[] = { N_("Compose a reply to the mailing list of the selected message"), G_CALLBACK (action_mail_reply_list_cb) }, - { "mail-reply-post", - NULL, - N_("Post a Repl_y"), - NULL, - N_("Post a reply to a message in a public folder"), - G_CALLBACK (action_mail_reply_post_cb) }, - { "mail-reply-sender", "mail-reply-sender", N_("_Reply to Sender"), @@ -2544,11 +2497,6 @@ e_mail_reader_update_actions (EMailReader *reader) action = e_mail_reader_get_action (reader, action_name); gtk_action_set_sensitive (action, sensitive); - action_name = "mail-reply-post"; - sensitive = single_message_selected; - action = e_mail_reader_get_action (reader, action_name); - gtk_action_set_sensitive (action, sensitive); - action_name = "mail-reply-sender"; sensitive = single_message_selected; action = e_mail_reader_get_action (reader, action_name); diff --git a/mail/e-mail-shell-view-actions.h b/mail/e-mail-shell-view-actions.h index c6c1fa3c91..bf7410db5f 100644 --- a/mail/e-mail-shell-view-actions.h +++ b/mail/e-mail-shell-view-actions.h @@ -127,8 +127,6 @@ E_SHELL_WINDOW_ACTION ((window), "mail-message-new") #define E_SHELL_WINDOW_ACTION_MAIL_MESSAGE_OPEN(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-message-open") -#define E_SHELL_WINDOW_ACTION_MAIL_MESSAGE_POST(window) \ - E_SHELL_WINDOW_ACTION ((window), "mail-message-post") #define E_SHELL_WINDOW_ACTION_MAIL_MOVE(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-move") #define E_SHELL_WINDOW_ACTION_MAIL_NEXT(window) \ @@ -157,8 +155,6 @@ E_SHELL_WINDOW_ACTION ((window), "mail-reply-all") #define E_SHELL_WINDOW_ACTION_MAIL_REPLY_LIST(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-reply-list") -#define E_SHELL_WINDOW_ACTION_MAIL_REPLY_POST(window) \ - E_SHELL_WINDOW_ACTION ((window), "mail-reply-post") #define E_SHELL_WINDOW_ACTION_MAIL_REPLY_SENDER(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-reply-sender") #define E_SHELL_WINDOW_ACTION_MAIL_SEARCH_FOLDER_FROM_MAILING_LIST(window) \ diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 800717f41a..bf6834b278 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -737,78 +737,6 @@ em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri) gdk_window_raise (((GtkWidget *) composer)->window); } -/** - * em_utils_post_to_folder: - * @folder: folder - * - * Opens a new composer window as a child window of @parent's toplevel - * window. If @folder is non-NULL, the composer will default to posting - * mail to the folder specified by @folder. - **/ -void -em_utils_post_to_folder (CamelFolder *folder) -{ - EMsgComposer *composer; - EComposerHeaderTable *table; - EAccount *account; - - composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_POST); - table = e_msg_composer_get_header_table (composer); - - if (folder != NULL) { - char *url = mail_tools_folder_to_url (folder); - GList *list = g_list_prepend (NULL, url); - - e_composer_header_table_set_post_to_list (table, list); - - g_list_free (list); - g_free (url); - - url = camel_url_to_string (CAMEL_SERVICE (folder->parent_store)->url, CAMEL_URL_HIDE_ALL); - account = mail_config_get_account_by_source_url (url); - g_free (url); - - if (account) - e_composer_header_table_set_account_name ( - table, account->name); - } - - composer_set_no_change (composer, TRUE, TRUE); - - gtk_widget_show ((GtkWidget *) composer); - gdk_window_raise (((GtkWidget *) composer)->window); -} - -/** - * em_utils_post_to_url: - * @url: mailto url - * - * Opens a new composer window as a child window of @parent's toplevel - * window. If @url is non-NULL, the composer will default to posting - * mail to the folder specified by @url. - **/ -void -em_utils_post_to_url (const char *url) -{ - EMsgComposer *composer; - EComposerHeaderTable *table; - - composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_POST); - table = e_msg_composer_get_header_table (composer); - - if (url != NULL) { - GList *list = NULL; - - list = g_list_prepend (list, (gpointer) url); - e_composer_header_table_set_post_to_list (table, list); - g_list_free (list); - } - - composer_set_no_change (composer, TRUE, TRUE); - - gtk_widget_show ((GtkWidget *) composer); -} - /* Editing messages... */ static void @@ -2416,129 +2344,6 @@ em_utils_reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage gtk_widget_show (GTK_WIDGET (composer)); } -/* Posting replies... */ - -static void -post_reply_to_message (CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *user_data) -{ - /* FIXME: would be nice if this shared more code with reply_get_composer() */ - const char *message_id, *references; - CamelInternetAddress *to; - EDestination **tov = NULL; - CamelFolder *real_folder; - EMsgComposer *composer; - EComposerHeaderTable *table; - char *subject, *url; - EAccount *account; - char *real_uid; - guint32 flags; - GList *list = NULL; - struct emcs_t *emcs; - - if (message == NULL) - return; - - if (CAMEL_IS_VEE_FOLDER (folder)) { - CamelMessageInfo *info; - - info = camel_folder_get_message_info (folder, uid); - real_folder = camel_vee_folder_get_location ((CamelVeeFolder *) folder, (struct _CamelVeeMessageInfo *) info, &real_uid); - camel_folder_free_message_info (folder, info); - } else { - real_folder = folder; - camel_object_ref (folder); - real_uid = g_strdup (uid); - } - - account = guess_account (message, real_folder); - flags = CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_SEEN; - - to = camel_internet_address_new(); - get_reply_sender (message, to, NULL); - - composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_MAIL_POST); - - /* construct the tov/ccv */ - tov = em_utils_camel_address_to_destination (to); - - /* Set the subject of the new message. */ - if ((subject = (char *) camel_mime_message_get_subject (message))) { - if (g_ascii_strncasecmp (subject, "Re: ", 4) != 0) - subject = g_strdup_printf ("Re: %s", subject); - else - subject = g_strdup (subject); - } else { - subject = g_strdup (""); - } - - table = e_msg_composer_get_header_table (composer); - e_composer_header_table_set_account (table, account); - e_composer_header_table_set_subject (table, subject); - e_composer_header_table_set_destinations_to (table, tov); - - g_free (subject); - - url = mail_tools_folder_to_url (real_folder); - list = g_list_prepend (list, url); - - e_composer_header_table_set_post_to_list (table, list); - - g_list_free (list); - g_free (url); - - /* Add In-Reply-To and References. */ - message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-Id"); - references = camel_medium_get_header (CAMEL_MEDIUM (message), "References"); - if (message_id) { - char *reply_refs; - - e_msg_composer_add_header (composer, "In-Reply-To", message_id); - - if (references) - reply_refs = g_strdup_printf ("%s %s", references, message_id); - else - reply_refs = g_strdup (message_id); - - e_msg_composer_add_header (composer, "References", reply_refs); - g_free (reply_refs); - } else if (references) { - e_msg_composer_add_header (composer, "References", references); - } - - e_msg_composer_add_message_attachments (composer, message, TRUE); - - composer_set_body (composer, message, NULL); - - emcs = g_object_get_data (G_OBJECT (composer), "emcs"); - emcs_set_folder_info (emcs, real_folder, real_uid, flags, flags); - - composer_set_no_change (composer, TRUE, FALSE); - - gtk_widget_show (GTK_WIDGET (composer)); - - camel_object_unref (real_folder); - camel_object_unref(to); - g_free (real_uid); -} - -/** - * em_utils_post_reply_to_message_by_uid: - * @folder: folder containing message to reply to - * @uid: message uid - * @mode: reply mode - * - * Creates a new composer (post mode) ready to reply to the message - * referenced by @folder and @uid. - **/ -void -em_utils_post_reply_to_message_by_uid (CamelFolder *folder, const char *uid) -{ - g_return_if_fail (CAMEL_IS_FOLDER (folder)); - g_return_if_fail (uid != NULL); - - mail_get_message (folder, uid, post_reply_to_message, NULL, mail_msg_unordered_push); -} - static void post_header_clicked_cb (EComposerPostHeader *header, EMailShellBackend *mail_shell_backend) diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h index 00e7a10395..45df05194a 100644 --- a/mail/em-composer-utils.h +++ b/mail/em-composer-utils.h @@ -42,8 +42,6 @@ void em_utils_compose_new_message (const char *fromuri); /* FIXME: mailto? url? should make up its mind what its called. imho use 'uri' */ void em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri); -void em_utils_post_to_folder (struct _CamelFolder *folder); -void em_utils_post_to_url (const char *url); void em_utils_edit_message (struct _CamelMimeMessage *message, struct _CamelFolder *folder); void em_utils_edit_messages (struct _CamelFolder *folder, GPtrArray *uids, gboolean replace); @@ -71,8 +69,6 @@ enum { void em_utils_reply_to_message (struct _CamelFolder *, const char *uid, struct _CamelMimeMessage *message, int mode, struct _EMFormat *source); -void em_utils_post_reply_to_message_by_uid (struct _CamelFolder *folder, const char *uid); - void em_configure_new_composer (struct _EMsgComposer *composer); #ifdef __cplusplus |