diff options
Diffstat (limited to 'mail')
33 files changed, 111 insertions, 338 deletions
diff --git a/mail/em-account-editor.h b/mail/em-account-editor.h index 9a5b09afe3..43e5c0652c 100644 --- a/mail/em-account-editor.h +++ b/mail/em-account-editor.h @@ -38,7 +38,7 @@ typedef struct _EMAccountEditorClass EMAccountEditorClass; typedef enum { EMAE_NOTEBOOK, - EMAE_DRUID, + EMAE_DRUID } em_account_editor_t; struct _EMAccountEditor { diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 0425645abe..f427feca6d 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -660,13 +660,18 @@ create_new_composer (const char *subject, const char *fromuri, gboolean use_defa EAccount *account = NULL; composer = e_msg_composer_new (); - if (composer == NULL) - return NULL; + table = e_msg_composer_get_header_table (composer); + + if (fromuri != NULL) { + GList *list; - if (fromuri) account = mail_config_get_account_by_source_url(fromuri); - table = e_msg_composer_get_header_table (composer); + list = g_list_prepend (NULL, (gpointer) fromuri); + e_composer_header_table_set_post_to_list (table, list); + g_list_free (list); + } + e_composer_header_table_set_account (table, account); e_composer_header_table_set_subject (table, subject); @@ -729,82 +734,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); - } - - em_composer_utils_setup_default_callbacks (composer); - - 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); - } - - em_composer_utils_setup_default_callbacks (composer); - - composer_set_no_change (composer, TRUE, TRUE); - - gtk_widget_show ((GtkWidget *) composer); -} - /* Editing messages... */ static void @@ -1763,18 +1692,12 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account, g_return_val_if_fail (to == NULL || CAMEL_IS_INTERNET_ADDRESS (to), NULL); g_return_val_if_fail (cc == NULL || CAMEL_IS_INTERNET_ADDRESS (cc), NULL); + composer = e_msg_composer_new (); + /* construct the tov/ccv */ tov = em_utils_camel_address_to_destination (to); ccv = em_utils_camel_address_to_destination (cc); - if (tov || ccv) { - if (postto && camel_address_length((CamelAddress *)postto)) - composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_MAIL_POST); - else - composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_MAIL); - } else - composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_POST); - /* Set the subject of the new message. */ if ((subject = (char *) camel_mime_message_get_subject (message))) { if (g_ascii_strncasecmp (subject, "Re: ", 4) != 0) @@ -1789,7 +1712,10 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account, 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); - e_composer_header_table_set_destinations_cc (table, ccv); + + /* Add destinations instead of setting, so we don't remove + * automatic CC addresses that have already been added. */ + e_composer_header_table_add_destinations_cc (table, ccv); g_free (subject); @@ -2047,7 +1973,7 @@ enum { ATTRIB_TM_YEAR, ATTRIB_TM_2YEAR, ATTRIB_TM_WDAY, /* not actually used */ - ATTRIB_TM_YDAY, + ATTRIB_TM_YDAY }; typedef void (* AttribFormatter) (GString *str, const char *attr, CamelMimeMessage *message); @@ -2400,124 +2326,3 @@ 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; - - 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); - - em_composer_utils_setup_callbacks (composer, real_folder, real_uid, flags, flags, NULL, NULL); - - 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); -} diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h index d17a98caa3..c46f808879 100644 --- a/mail/em-composer-utils.h +++ b/mail/em-composer-utils.h @@ -50,8 +50,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); @@ -79,8 +77,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); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/mail/em-config.h b/mail/em-config.h index 5530d27d00..ba19bb1c37 100644 --- a/mail/em-config.h +++ b/mail/em-config.h @@ -42,7 +42,7 @@ typedef struct _EMConfigClass EMConfigClass; enum _em_config_target_t { EM_CONFIG_TARGET_FOLDER, EM_CONFIG_TARGET_PREFS, - EM_CONFIG_TARGET_ACCOUNT, + EM_CONFIG_TARGET_ACCOUNT }; typedef struct _EMConfigTargetFolder EMConfigTargetFolder; diff --git a/mail/em-event.h b/mail/em-event.h index eb45050a27..21df1df42d 100644 --- a/mail/em-event.h +++ b/mail/em-event.h @@ -49,37 +49,37 @@ enum _em_event_target_t { EM_EVENT_TARGET_MESSAGE, EM_EVENT_TARGET_COMPOSER, EM_EVENT_TARGET_SEND_RECEIVE, - EM_EVENT_TARGET_CUSTOM_ICON, + EM_EVENT_TARGET_CUSTOM_ICON }; /* Flags for FOLDER BROWSER Events*/ enum { - EM_EVENT_FOLDER_BROWSER = 1<< 0, + EM_EVENT_FOLDER_BROWSER = 1<< 0 }; /* Flags that describe TARGET_FOLDER */ enum { - EM_EVENT_FOLDER_NEWMAIL = 1<< 0, + EM_EVENT_FOLDER_NEWMAIL = 1<< 0 }; /* Flags that describe TARGET_MESSAGE */ enum { - EM_EVENT_MESSAGE_REPLY_ALL = 1<< 0, + EM_EVENT_MESSAGE_REPLY_ALL = 1<< 0 }; /* Flags that describe TARGET_COMPOSER */ enum { - EM_EVENT_COMPOSER_SEND_OPTION = 1<< 0, + EM_EVENT_COMPOSER_SEND_OPTION = 1<< 0 }; /* Flags that describe TARGET_SEND_RECEIVE*/ enum { - EM_EVENT_SEND_RECEIVE = 1<< 0, + EM_EVENT_SEND_RECEIVE = 1<< 0 }; /* Flags that describe TARGET_CUSTOM_ICON*/ enum { - EM_EVENT_CUSTOM_ICON = 1<< 0, + EM_EVENT_CUSTOM_ICON = 1<< 0 }; typedef struct _EMEventTargetFolder EMEventTargetFolder; diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index 58e42a5834..9a80a0c254 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -164,7 +164,6 @@ static const EMFolderViewEnable emfb_enable_map[] = { { "FolderRename", EM_POPUP_SELECT_FOLDER }, { "FolderRefresh", EM_POPUP_SELECT_FOLDER }, { "ChangeFolderProperties", EM_POPUP_SELECT_FOLDER }, - { "MailPost", EM_POPUP_SELECT_FOLDER }, { "MessageMarkAllAsRead", EM_POPUP_SELECT_FOLDER }, { "ViewHideSelected", EM_POPUP_SELECT_MANY }, { "ViewThreadsCollapseAll", EM_FOLDER_VIEW_SELECT_THREADED}, @@ -181,7 +180,7 @@ enum { static guint folder_browser_signals [LAST_SIGNAL] = {0, }; enum { - ESB_SAVE, + ESB_SAVE }; static ESearchBarItem emfb_search_items[] = { @@ -1363,7 +1362,7 @@ emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, } if (!folder_choose && !emfb->view.preview->caret_mode && mail_config_get_enable_magic_spacebar ()) { - //check for unread messages. if yes .. rewindback to the folder + /* check for unread messages. if yes .. rewindback to the folder */ EMFolderTree *emft = g_object_get_data((GObject*)emfb, "foldertree"); switch (ev->key.keyval) { case GDK_space: @@ -1694,13 +1693,6 @@ emfb_mail_stop(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_mail_post(BonoboUIComponent *uid, void *data, const char *path) -{ - EMFolderView *emfv = data; - em_utils_post_to_folder (emfv->folder); -} - -static void emfb_tools_filters(BonoboUIComponent *uid, void *data, const char *path) { EMFolderBrowser *emfb = data; @@ -1779,7 +1771,6 @@ static BonoboUIVerb emfb_verbs[] = { BONOBO_UI_UNSAFE_VERB ("FolderCreate", emfb_folder_create), BONOBO_UI_UNSAFE_VERB ("HelpDebug", emfb_help_debug), - BONOBO_UI_UNSAFE_VERB ("MailPost", emfb_mail_post), BONOBO_UI_UNSAFE_VERB ("MailStop", emfb_mail_stop), BONOBO_UI_UNSAFE_VERB ("ToolsFilters", emfb_tools_filters), BONOBO_UI_UNSAFE_VERB ("ToolsSubscriptions", emfb_tools_subscriptions), diff --git a/mail/em-folder-selector.h b/mail/em-folder-selector.h index 06b1bc4520..7b011f588c 100644 --- a/mail/em-folder-selector.h +++ b/mail/em-folder-selector.h @@ -61,11 +61,11 @@ struct _EMFolderSelectorClass { }; enum { - EM_FOLDER_SELECTOR_CAN_CREATE = 1, + EM_FOLDER_SELECTOR_CAN_CREATE = 1 }; enum { - EM_FOLDER_SELECTOR_RESPONSE_NEW = 1, + EM_FOLDER_SELECTOR_RESPONSE_NEW = 1 }; GType em_folder_selector_get_type (void); diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index 8687b1cbd2..04e66e2c86 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -295,7 +295,7 @@ em_folder_tree_model_init (EMFolderTreeModel *model) model->account_hash = g_hash_table_new (g_direct_hash, g_direct_equal); model->account_changed_id = g_signal_connect (model->accounts, "account-changed", G_CALLBACK (account_changed), model); model->account_removed_id = g_signal_connect (model->accounts, "account-removed", G_CALLBACK (account_removed), model); - //g_signal_connect (model, "row-changed", G_CALLBACK (emft_model_unread_count_changed), NULL); + /* g_signal_connect (model, "row-changed", G_CALLBACK (emft_model_unread_count_changed), NULL); */ } static void diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 8e220955fa..e31d8d727c 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -185,7 +185,6 @@ static const EMFolderViewEnable emfv_enable_map[] = { { "MessageFollowUpClear", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_FLAG_CLEAR }, { "MessageMove", EM_POPUP_SELECT_MANY }, { "MessageOpen", EM_POPUP_SELECT_MANY }, - { "MessagePostReply", EM_POPUP_SELECT_ONE }, { "MessageReplyAll", EM_POPUP_SELECT_ONE }, { "MessageReplyList", EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_MAILING_LIST }, { "MessageReplySender", EM_POPUP_SELECT_ONE }, @@ -1726,20 +1725,6 @@ emfv_message_redirect (BonoboUIComponent *uic, void *data, const char *path) em_utils_redirect_message_by_uid (emfv->folder, emfv->list->cursor_uid); } -static void -emfv_message_post_reply (BonoboUIComponent *uic, void *data, const char *path) -{ - EMFolderView *emfv = data; - - if (emfv->list->cursor_uid == NULL) - return; - - if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv)) - return; - - em_utils_post_reply_to_message_by_uid (emfv->folder, emfv->list->cursor_uid); -} - static gboolean html_contains_nonwhitespace (const char *html, gint len) { @@ -2073,7 +2058,6 @@ static BonoboUIVerb emfv_message_verbs[] = { BONOBO_UI_UNSAFE_VERB ("MessageFollowUpClear", emfv_message_followup_clear), BONOBO_UI_UNSAFE_VERB ("MessageMove", emfv_message_move), BONOBO_UI_UNSAFE_VERB ("MessageOpen", emfv_message_open), - BONOBO_UI_UNSAFE_VERB ("MessagePostReply", emfv_message_post_reply), BONOBO_UI_UNSAFE_VERB ("MessageReplyAll", emfv_message_reply_all), BONOBO_UI_UNSAFE_VERB ("MessageReplyList", emfv_message_reply_list), BONOBO_UI_UNSAFE_VERB ("MessageReplySender", emfv_message_reply_sender), @@ -2752,7 +2736,6 @@ emp_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, void *data) } static EPopupItem emfv_uri_popups[] = { - { E_POPUP_ITEM, "00.uri.11", N_("C_all To..."), emp_uri_popup_link_copy, NULL, NULL, EM_POPUP_URI_CALLTO }, { E_POPUP_ITEM, "00.uri.15", N_("_Copy Link Location"), emp_uri_popup_link_copy, NULL, "edit-copy", EM_POPUP_URI_NOT_MAILTO }, { E_POPUP_SUBMENU, "99.uri.00", N_("Create _Search Folder"), NULL, NULL, NULL, EM_POPUP_URI_MAILTO }, @@ -2822,7 +2805,7 @@ emfv_append_menu (EMPopup *des_emp, GtkMenu *des_menu, EMPopup *src_emp, GtkMenu gtk_widget_destroy (GTK_WIDGET (src_menu)); /* free src_emp together with des_emp; name contains unique identifier */ - name = g_strdup_printf ("emp_%p", src_emp); + name = g_strdup_printf ("emp_%p", (gpointer) src_emp); g_object_set_data_full (G_OBJECT (des_emp), name, src_emp, emfv_free_em_popup); g_free (name); diff --git a/mail/em-folder-view.h b/mail/em-folder-view.h index 42ef20d296..4af4760cac 100644 --- a/mail/em-folder-view.h +++ b/mail/em-folder-view.h @@ -67,7 +67,7 @@ enum { EM_FOLDER_VIEW_SELECT_SELECTION = EM_POPUP_SELECT_LAST<<6, EM_FOLDER_VIEW_SELECT_NOSELECTION = EM_POPUP_SELECT_LAST<<7, EM_FOLDER_VIEW_PREVIEW_PRESENT = EM_POPUP_SELECT_LAST<<8, - EM_FOLDER_VIEW_SELECT_LAST = EM_POPUP_SELECT_LAST<<9, + EM_FOLDER_VIEW_SELECT_LAST = EM_POPUP_SELECT_LAST<<9 }; struct _EMFolderViewEnable { diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index bc2f4e25bf..aba9c64069 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -175,7 +175,7 @@ enum { EFHD_LINK_CLICKED, EFHD_POPUP_EVENT, EFHD_ON_URL, - EFHD_LAST_SIGNAL, + EFHD_LAST_SIGNAL }; static guint efhd_signals[EFHD_LAST_SIGNAL] = { 0 }; @@ -595,11 +595,11 @@ em_format_html_get_search_dialog (EMFormatHTMLDisplay *efhd) g_signal_connect (G_OBJECT (p->search_entry), "changed", (GCallback) icon_entry_changed_cb, clear_button); gtk_box_pack_start ((GtkBox *)(p->search_entry_box), icon_entry, FALSE, FALSE, 0); -// gtk_box_pack_start ((GtkBox *)(p->search_entry_box), icon_entry, TRUE, TRUE, 0); + /* gtk_box_pack_start ((GtkBox *)(p->search_entry_box), icon_entry, TRUE, TRUE, 0); */ hbox2 = gtk_hbox_new (FALSE, 0); gtk_box_pack_start ((GtkBox *)(hbox2), p->search_entry_box, FALSE, FALSE, 5); -// gtk_box_pack_start ((GtkBox *)(hbox2), p->search_entry_box, TRUE, TRUE, 5); + /* gtk_box_pack_start ((GtkBox *)(hbox2), p->search_entry_box, TRUE, TRUE, 5); */ button3 = gtk_button_new_with_mnemonic (_("_Previous")); gtk_button_set_image (GTK_BUTTON (button3), GTK_WIDGET(gtk_image_new_from_stock(GTK_STOCK_GO_BACK, GTK_ICON_SIZE_BUTTON))); diff --git a/mail/em-format-html.h b/mail/em-format-html.h index a34f7b6915..7cadd5e282 100644 --- a/mail/em-format-html.h +++ b/mail/em-format-html.h @@ -65,7 +65,7 @@ typedef struct _EMFormatHTMLPrivate EMFormatHTMLPrivate; enum _em_format_html_header_flags { EM_FORMAT_HTML_HEADER_TO = 1<<0, EM_FORMAT_HTML_HEADER_CC = 1<<1, - EM_FORMAT_HTML_HEADER_BCC = 1<<2, + EM_FORMAT_HTML_HEADER_BCC = 1<<2 }; typedef enum { diff --git a/mail/em-format.c b/mail/em-format.c index 89445ab35a..1d5570be96 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -82,7 +82,7 @@ static void emf_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart static gboolean emf_busy(EMFormat *emf); enum { EMF_COMPLETE, - EMF_LAST_SIGNAL, + EMF_LAST_SIGNAL }; static guint emf_signals[EMF_LAST_SIGNAL]; @@ -718,7 +718,7 @@ emf_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeM g_string_truncate(emf->part_id, 0); if (folder != NULL) /* TODO build some string based on the folder name/location? */ - g_string_append_printf(emf->part_id, ".%p", folder); + g_string_append_printf(emf->part_id, ".%p", (gpointer) folder); if (uid != NULL) g_string_append_printf(emf->part_id, ".%s", uid); } diff --git a/mail/em-format.h b/mail/em-format.h index 004d9c2e96..92c6b3dddf 100644 --- a/mail/em-format.h +++ b/mail/em-format.h @@ -71,7 +71,7 @@ typedef void (*EMFormatFunc) (EMFormat *md, CamelStream *stream, CamelMimePart * typedef enum _em_format_mode_t { EM_FORMAT_NORMAL, EM_FORMAT_ALLHEADERS, - EM_FORMAT_SOURCE, + EM_FORMAT_SOURCE } em_format_mode_t; /** @@ -103,7 +103,7 @@ struct _EMFormatHandler { **/ enum _em_format_handler_t { EM_FORMAT_HANDLER_INLINE = 1<<0, - EM_FORMAT_HANDLER_INLINE_DISPOSITION = 1<<1, + EM_FORMAT_HANDLER_INLINE_DISPOSITION = 1<<1 }; diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c index 07c7afa192..f671159369 100644 --- a/mail/em-inline-filter.c +++ b/mail/em-inline-filter.c @@ -102,7 +102,7 @@ enum { EMIF_BINHEX, EMIF_POSTSCRIPT, EMIF_PGPSIGNED, - EMIF_PGPENCRYPTED, + EMIF_PGPENCRYPTED }; static const struct { diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index e489e16826..9784f480b8 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -60,7 +60,7 @@ enum { HEADER_LIST_ENABLED_COLUMN, /* is the header enabled? */ HEADER_LIST_IS_DEFAULT_COLUMN, /* is this header a default header, eg From: */ HEADER_LIST_HEADER_COLUMN, /* the real name of this header */ - HEADER_LIST_N_COLUMNS, + HEADER_LIST_N_COLUMNS }; static GType col_types[] = { @@ -190,7 +190,7 @@ enum { enum { JH_LIST_COLUMN_NAME, - JH_LIST_COLUMN_VALUE, + JH_LIST_COLUMN_VALUE }; static void label_sensitive_buttons (EMMailerPrefs *prefs) @@ -356,7 +356,7 @@ jh_add_cb (GtkWidget *widget, gpointer user_data) char *tok; GSList *list = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL); - //FIXME: Validate the values + /* FIXME: Validate the values */ tok = g_strdup_printf ("%s=%s", name, value); list = g_slist_append (list, tok); @@ -842,18 +842,6 @@ custom_junk_button_toggled (GtkToggleButton *toggle, EMMailerPrefs *prefs) } -#if 0 -// not used at the moment, commenting out -static void -toggle_button_toggled_not (GtkToggleButton *toggle, EMMailerPrefs *prefs) -{ - const char *key; - - key = g_object_get_data ((GObject *) toggle, "key"); - gconf_client_set_bool (prefs->gconf, key, !gtk_toggle_button_get_active (toggle), NULL); -} -#endif - static void custom_font_changed (GtkToggleButton *toggle, EMMailerPrefs *prefs) { diff --git a/mail/em-menu.h b/mail/em-menu.h index 48fc96b7fc..08467fefd8 100644 --- a/mail/em-menu.h +++ b/mail/em-menu.h @@ -40,7 +40,7 @@ typedef struct _EMMenuClass EMMenuClass; /* Types of popup tagets */ enum _em_menu_target_t { EM_MENU_TARGET_SELECT, - EM_MENU_TARGET_WIDGET, + EM_MENU_TARGET_WIDGET }; /* Flags that describe a TARGET_SELECT */ diff --git a/mail/em-migrate.c b/mail/em-migrate.c index 8338bf56dc..1c58b6ca99 100644 --- a/mail/em-migrate.c +++ b/mail/em-migrate.c @@ -1347,7 +1347,7 @@ nofile: enum { CP_UNIQUE = 0, CP_OVERWRITE, - CP_APPEND, + CP_APPEND }; static int open_flags[3] = { @@ -2936,7 +2936,7 @@ migrate_to_db() i++; e_iterator_next (iter); } - //camel_session_set_online ((CamelSession *) session, TRUE); + /* camel_session_set_online ((CamelSession *) session, TRUE); */ g_object_unref (iter); em_migrate_close_progress_dialog (); } diff --git a/mail/em-popup.c b/mail/em-popup.c index debad8cb56..192ab7ac7b 100644 --- a/mail/em-popup.c +++ b/mail/em-popup.c @@ -261,10 +261,6 @@ em_popup_target_new_uri(EMPopup *emp, const char *uri) if (g_ascii_strncasecmp(uri, "http:", 5) == 0 || g_ascii_strncasecmp(uri, "https:", 6) == 0) mask &= ~EM_POPUP_URI_HTTP; - else if (g_ascii_strncasecmp(uri, "sip:", 3) == 0 - || g_ascii_strncasecmp(uri, "h323:", 5) == 0 - || g_ascii_strncasecmp(uri, "callto:", 7) == 0) - mask &= ~EM_POPUP_URI_CALLTO; if (g_ascii_strncasecmp(uri, "mailto:", 7) == 0) mask &= ~EM_POPUP_URI_MAILTO; @@ -824,7 +820,6 @@ static const EPopupHookTargetMask emph_uri_masks[] = { { "http", EM_POPUP_URI_HTTP }, { "mailto", EM_POPUP_URI_MAILTO }, { "notmailto", EM_POPUP_URI_NOT_MAILTO }, - { "callto", EM_POPUP_URI_CALLTO }, { NULL } }; diff --git a/mail/em-popup.h b/mail/em-popup.h index 77f80e5599..870055140b 100644 --- a/mail/em-popup.h +++ b/mail/em-popup.h @@ -104,7 +104,7 @@ enum _em_popup_target_select_t { EM_POPUP_SELECT_FOLDER = 1<<15, /* do we have any folder at all? */ EM_POPUP_SELECT_JUNK = 1<<16, EM_POPUP_SELECT_NOT_JUNK = 1<<17, - EM_POPUP_SELECT_LAST = 1<<18, + EM_POPUP_SELECT_LAST = 1<<18 }; /** @@ -113,14 +113,12 @@ enum _em_popup_target_select_t { * @EM_POPUP_URI_HTTP: This is a HTTP or HTTPS url. * @EM_POPUP_URI_MAILTO: This is a MAILTO url. * @EM_POPUP_URI_NOT_MAILTO: This is not a MAILTO url. - * @EM_POPUP_URI_CALLTO: This is a CALLTO url. * **/ enum _em_popup_target_uri_t { EM_POPUP_URI_HTTP = 1<<0, EM_POPUP_URI_MAILTO = 1<<1, - EM_POPUP_URI_NOT_MAILTO = 1<<2, - EM_POPUP_URI_CALLTO = 1<<3, + EM_POPUP_URI_NOT_MAILTO = 1<<2 }; /** @@ -132,7 +130,7 @@ enum _em_popup_target_uri_t { **/ enum _em_popup_target_part_t { EM_POPUP_PART_MESSAGE = 1<<0, - EM_POPUP_PART_IMAGE = 1<<1, + EM_POPUP_PART_IMAGE = 1<<1 }; /** @@ -153,7 +151,7 @@ enum _em_popup_target_folder_t { EM_POPUP_FOLDER_DELETE = 1<<3, /* folder can be deleted/renamed */ EM_POPUP_FOLDER_SELECT = 1<<4, /* folder can be selected/opened */ EM_POPUP_FOLDER_OUTBOX = 1<<5, /* Outbox folder */ - EM_POPUP_FOLDER_NONSTATIC = 1<<6, /* Except static folders like Outbox.*/ + EM_POPUP_FOLDER_NONSTATIC = 1<<6 /* Except static folders like Outbox.*/ }; typedef struct _EMPopupTargetSelect EMPopupTargetSelect; diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c index 724b9b4874..9842e32d0e 100644 --- a/mail/em-subscribe-editor.c +++ b/mail/em-subscribe-editor.c @@ -356,7 +356,8 @@ sub_folderinfo_exec (struct _emse_folderinfo_msg *m) if (m->seq == m->sub->seq) { camel_operation_register(m->base.cancel); - m->info = camel_store_get_folder_info(m->sub->store, m->node?m->node->info->full_name:pub_full_name, CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL, &m->base.ex); + m->info = camel_store_get_folder_info(m->sub->store, m->node?m->node->info->full_name:pub_full_name, + CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL | CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST, &m->base.ex); camel_operation_unregister(m->base.cancel); } } diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c index ce388eea42..311c2e1b7a 100644 --- a/mail/em-sync-stream.c +++ b/mail/em-sync-stream.c @@ -39,7 +39,7 @@ enum _write_msg_t { EMSS_WRITE, EMSS_FLUSH, - EMSS_CLOSE, + EMSS_CLOSE }; struct _write_msg { diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c index 6e12a0456d..a777faaefe 100644 --- a/mail/em-vfolder-rule.c +++ b/mail/em-vfolder-rule.c @@ -366,7 +366,7 @@ rule_copy(FilterRule *dest, FilterRule *src) enum { BUTTON_ADD, BUTTON_REMOVE, - BUTTON_LAST, + BUTTON_LAST }; struct _source_data { diff --git a/mail/em-vfolder-rule.h b/mail/em-vfolder-rule.h index 18f8c3156b..bc6a330c4b 100644 --- a/mail/em-vfolder-rule.h +++ b/mail/em-vfolder-rule.h @@ -37,7 +37,7 @@ enum _em_vfolder_rule_with_t { EM_VFOLDER_RULE_WITH_SPECIFIC, EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE, EM_VFOLDER_RULE_WITH_REMOTE_ACTIVE, - EM_VFOLDER_RULE_WITH_LOCAL, + EM_VFOLDER_RULE_WITH_LOCAL }; typedef struct _EMVFolderRule EMVFolderRule; diff --git a/mail/evolution-mail.schemas.in b/mail/evolution-mail.schemas.in index e63d9eec4a..fbc23eb746 100644 --- a/mail/evolution-mail.schemas.in +++ b/mail/evolution-mail.schemas.in @@ -116,71 +116,91 @@ </schema> <schema> - <key>/schemas/apps/evolution/mail/composer/view/From</key> - <applyto>/apps/evolution/mail/composer/view/From</applyto> + <key>/schemas/apps/evolution/mail/composer/show_mail_bcc</key> + <applyto>/apps/evolution/mail/composer/show_mail_bcc</applyto> + <owner>evolution-mail</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Show "Bcc" field when sending a mail message</short> + <long> + Show the "Bcc" field when sending a mail message. This is + controlled from the View menu when a mail account is chosen. + </long> + </locale> + </schema> + + <schema> + <key>/schemas/apps/evolution/mail/composer/show_mail_cc</key> + <applyto>/apps/evolution/mail/composer/show_mail_cc</applyto> <owner>evolution-mail</owner> <type>bool</type> <default>true</default> <locale name="C"> - <short>View/From menu item is checked</short> + <short>Show "Cc" field when sending a mail message</short> <long> - View/From menu item is checked. + Show the "Cc" field when sending a mail message. This is + controlled from the View menu when a mail account is chosen. </long> </locale> </schema> <schema> - <key>/schemas/apps/evolution/mail/composer/view/PostTo</key> - <applyto>/apps/evolution/mail/composer/view/PostTo</applyto> + <key>/schemas/apps/evolution/mail/composer/show_mail_from</key> + <applyto>/apps/evolution/mail/composer/show_mail_from</applyto> <owner>evolution-mail</owner> <type>bool</type> <default>true</default> <locale name="C"> - <short>View/PostTo menu item is checked</short> + <short>Show "From" field when sending a mail message</short> <long> - View/PostTo menu item is checked. + Show the "From" field when sending a mail message. This is + controlled from the View menu when a mail account is chosen. </long> </locale> </schema> <schema> - <key>/schemas/apps/evolution/mail/composer/view/ReplyTo</key> - <applyto>/apps/evolution/mail/composer/view/ReplyTo</applyto> + <key>/schemas/apps/evolution/mail/composer/show_mail_reply_to</key> + <applyto>/apps/evolution/mail/composer/show_mail_reply_to</applyto> <owner>evolution-mail</owner> <type>bool</type> <default>false</default> <locale name="C"> - <short>View/ReplyTo menu item is checked</short> + <short>Show "Reply To" field when sending a mail message</short> <long> - View/ReplyTo menu item is checked. + Show the "Reply To" field when sending a mail message. This + is controlled from the View menu when a mail account is chosen. </long> </locale> </schema> <schema> - <key>/schemas/apps/evolution/mail/composer/view/Cc</key> - <applyto>/apps/evolution/mail/composer/view/Cc</applyto> + <key>/schemas/apps/evolution/mail/composer/show_post_from</key> + <applyto>/apps/evolution/mail/composer/show_post_from</applyto> <owner>evolution-mail</owner> <type>bool</type> - <default>false</default> + <default>true</default> <locale name="C"> - <short>View/Cc menu item is checked</short> + <short>Show "From" field when posting to a newsgroup</short> <long> - View/Cc menu item is checked. + Show the "From" field when posting to a newsgroup. This is + controlled from the View menu when a news account is chosen. </long> </locale> </schema> <schema> - <key>/schemas/apps/evolution/mail/composer/view/Bcc</key> - <applyto>/apps/evolution/mail/composer/view/Bcc</applyto> + <key>/schemas/apps/evolution/mail/composer/show_post_reply_to</key> + <applyto>/apps/evolution/mail/composer/show_post_reply_to</applyto> <owner>evolution-mail</owner> <type>bool</type> <default>false</default> <locale name="C"> - <short>View/Bcc menu item is checked</short> + <short>Show "Reply To" field when posting to a newsgroup</short> <long> - View/Bcc menu item is checked. + Show the "Reply To" field when posting to a newsgroup. This + is controlled from the View menu when a news account is chosen. </long> </locale> </schema> diff --git a/mail/mail-autofilter.h b/mail/mail-autofilter.h index 9f2f66674a..bae8bd8313 100644 --- a/mail/mail-autofilter.h +++ b/mail/mail-autofilter.h @@ -35,7 +35,7 @@ enum { AUTO_SUBJECT = 1, AUTO_FROM = 2, AUTO_TO = 4, - AUTO_MLIST = 8, + AUTO_MLIST = 8 }; struct _FilterRule *em_vfolder_rule_from_message(struct _EMVFolderContext *context, struct _CamelMimeMessage *msg, int flags, const char *source); diff --git a/mail/mail-component.h b/mail/mail-component.h index 3aa088c890..c1215c61c4 100644 --- a/mail/mail-component.h +++ b/mail/mail-component.h @@ -47,7 +47,7 @@ enum _mail_component_folder_t { MAIL_COMPONENT_FOLDER_OUTBOX, MAIL_COMPONENT_FOLDER_SENT, MAIL_COMPONENT_FOLDER_TEMPLATES, - MAIL_COMPONENT_FOLDER_LOCAL_INBOX, + MAIL_COMPONENT_FOLDER_LOCAL_INBOX }; struct _MailComponent { diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index a1589cec79..ed3d583927 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -1048,10 +1048,7 @@ int mail_note_get_folder_from_uri(const char *uri, CamelFolder **folderp) gboolean mail_folder_cache_get_folder_info_flags (CamelFolder *folder, int *flags) { - char *uri; - - uri = mail_tools_folder_to_url (folder); - + char *uri = mail_tools_folder_to_url (folder); struct _find_info fi = { uri, NULL, NULL }; if (stores == NULL) diff --git a/mail/mail-mt.c b/mail/mail-mt.c index 5d26c13b3f..6388a56938 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -132,7 +132,7 @@ mail_msg_new (MailMsgInfo *info) #ifdef LOG_OPS if (log_ops) - fprintf(log, "%p: New\n", msg); + fprintf(log, "%p: New\n", (gpointer) msg); #endif MAIL_MT_UNLOCK(mail_msg_lock); diff --git a/mail/mail-mt.h b/mail/mail-mt.h index dba4adee16..b95620a000 100644 --- a/mail/mail-mt.h +++ b/mail/mail-mt.h @@ -100,7 +100,7 @@ typedef struct _MailAsyncEvent { typedef enum _mail_async_event_t { MAIL_ASYNC_GUI, - MAIL_ASYNC_THREAD, + MAIL_ASYNC_THREAD } mail_async_event_t; typedef void (*MailAsyncFunc)(void *, void *, void *); @@ -119,7 +119,7 @@ typedef enum { MAIL_CALL_p_ppp, MAIL_CALL_p_pppp, MAIL_CALL_p_ppppp, - MAIL_CALL_p_ppippp, + MAIL_CALL_p_ppippp } mail_call_t; typedef void *(*MailMainFunc)(); diff --git a/mail/mail-ops.c b/mail/mail-ops.c index a8aa14d278..6feadd5b9c 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -36,7 +36,6 @@ #include <glib.h> #include <glib/gstdio.h> -#include <libgnome/gnome-exec.h> #include <glib/gi18n.h> #include <camel/camel-mime-filter-from.h> @@ -1658,9 +1657,9 @@ refresh_folder_desc (struct _sync_folder_msg *m) static void refresh_folder_exec (struct _sync_folder_msg *m) { - //camel_folder_sync (m->folder, FALSE, &m->base.ex); + /* camel_folder_sync (m->folder, FALSE, &m->base.ex); */ - //if (!camel_exception_is_set (&m->base.ex)) + /* if (!camel_exception_is_set (&m->base.ex)) */ camel_folder_refresh_info(m->folder, &m->base.ex); } @@ -2514,7 +2513,7 @@ mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, vo if (argc <= 0) return; - gnome_execute_async_fds (NULL, argc, argv, TRUE); + g_spawn_async (NULL, argv, NULL, 0, NULL, data, NULL, NULL); } /* Async service-checking/authtype-lookup code. */ diff --git a/mail/message-list.c b/mail/message-list.c index 68177535e2..e2c23db51a 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -126,7 +126,7 @@ static struct { enum { DND_X_UID_LIST, /* x-uid-list */ DND_MESSAGE_RFC822, /* message/rfc822 */ - DND_TEXT_URI_LIST, /* text/uri-list */ + DND_TEXT_URI_LIST /* text/uri-list */ }; /* What we send */ @@ -170,7 +170,7 @@ enum { NORMALISED_SUBJECT, NORMALISED_FROM, NORMALISED_TO, - NORMALISED_LAST, + NORMALISED_LAST }; /* #define SMART_ADDRESS_COMPARE */ @@ -4169,7 +4169,7 @@ regen_list_exec (struct _regen_list_msg *m) e_profile_event_emit("list.threaduids", m->folder->full_name, 0); - //camel_folder_summary_reload_from_db (m->folder->summary, NULL); + /* camel_folder_summary_reload_from_db (m->folder->summary, NULL); */ if (!camel_operation_cancel_check(m->base.cancel)) { camel_folder_sort_uids (m->folder, showuids); diff --git a/mail/message-list.h b/mail/message-list.h index 47be897fd2..15dae0fcb7 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -73,7 +73,7 @@ enum { /* Invisible columns */ COL_DELETED, COL_UNREAD, - COL_COLOUR, + COL_COLOUR }; #define MESSAGE_LIST_COLUMN_IS_ACTIVE(col) (col == COL_MESSAGE_STATUS || \ @@ -178,7 +178,7 @@ typedef enum { MESSAGE_LIST_SELECT_NEXT = 0, MESSAGE_LIST_SELECT_PREVIOUS = 1, MESSAGE_LIST_SELECT_DIRECTION = 1, /* direction mask */ - MESSAGE_LIST_SELECT_WRAP = 1<<1, /* option bit */ + MESSAGE_LIST_SELECT_WRAP = 1<<1 /* option bit */ } MessageListSelectDirection; GType message_list_get_type (void); |