diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-05-25 22:15:32 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-05-25 22:15:32 +0800 |
commit | 96538878911586a9e9ca26b81e1916c04e538980 (patch) | |
tree | ffcfe184bab289d6917a65d850bc4ba310be0447 /mail | |
parent | 3e1b34841d3a699f77848f5de019f18ccb2d1ca1 (diff) | |
download | gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.gz gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.bz2 gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.lz gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.xz gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.zst gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-backend.c | 4 | ||||
-rw-r--r-- | mail/e-mail-reader-utils.c | 29 | ||||
-rw-r--r-- | mail/e-mail-reader.c | 6 | ||||
-rw-r--r-- | mail/em-account-editor.c | 5 | ||||
-rw-r--r-- | mail/em-folder-tree-model.c | 9 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 8 | ||||
-rw-r--r-- | mail/em-inline-filter.c | 2 |
7 files changed, 39 insertions, 24 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c index 734fefbd72..bac1beefdf 100644 --- a/mail/e-mail-backend.c +++ b/mail/e-mail-backend.c @@ -284,9 +284,9 @@ mail_backend_quit_requested_cb (EShell *shell, /* We can quit immediately if offline. */ if (!e_shell_get_online (shell)) return; - + /* In express mode, don't raise mail request in non mail window. */ - if (e_shell_get_express_mode(shell) && + if (e_shell_get_express_mode(shell) && strcmp(e_shell_window_get_active_view((EShellWindow *)window), "mail") != 0) return; diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index addc126285..12d87d97c8 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -669,7 +669,10 @@ e_mail_reader_header_free (EMailReaderHeader *header) } static void -headers_changed_cb (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMailReader *reader) +headers_changed_cb (GConfClient *gconf, + guint cnxn_id, + GConfEntry *entry, + EMailReader *reader) { EMFormat *emf; EMFormatHTMLDisplay *emfhd; @@ -685,16 +688,18 @@ headers_changed_cb (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMailR emf = EM_FORMAT (emfhd); g_return_if_fail (emf != NULL); - header_config_list = gconf_client_get_list (gconf, "/apps/evolution/mail/display/headers", GCONF_VALUE_STRING, NULL); + header_config_list = gconf_client_get_list ( + gconf, "/apps/evolution/mail/display/headers", + GCONF_VALUE_STRING, NULL); em_format_clear_headers (emf); for (p = header_config_list; p; p = g_slist_next(p)) { EMailReaderHeader *h; gchar *xml = (gchar *)p->data; h = e_mail_reader_header_from_xml (xml); - if (h && h->enabled) { - em_format_add_header (emf, h->name, EM_FORMAT_HEADER_BOLD); - } + if (h && h->enabled) + em_format_add_header ( + emf, h->name, EM_FORMAT_HEADER_BOLD); e_mail_reader_header_free (h); } @@ -738,10 +743,16 @@ e_mail_reader_connect_headers (EMailReader *reader) GConfClient *gconf = mail_config_get_gconf_client (); guint notify_id; - gconf_client_add_dir (gconf, "/apps/evolution/mail/display", GCONF_CLIENT_PRELOAD_NONE, NULL); - notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/display/headers", (GConfClientNotifyFunc) headers_changed_cb, reader, NULL, NULL); - - g_object_set_data_full (G_OBJECT (reader), "reader-header-notify-id", GINT_TO_POINTER (notify_id), remove_header_notify_cb); + gconf_client_add_dir ( + gconf, "/apps/evolution/mail/display", + GCONF_CLIENT_PRELOAD_NONE, NULL); + notify_id = gconf_client_notify_add ( + gconf, "/apps/evolution/mail/display/headers", + (GConfClientNotifyFunc) headers_changed_cb, + reader, NULL, NULL); + g_object_set_data_full ( + G_OBJECT (reader), "reader-header-notify-id", + GINT_TO_POINTER (notify_id), remove_header_notify_cb); headers_changed_cb (gconf, 0, NULL, reader); } diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 10f1864497..20448cc57f 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -2300,9 +2300,11 @@ mail_reader_update_actions (EMailReader *reader) gtk_action_set_sensitive (action, sensitive); action_name = "mail-mark-junk"; - sensitive = selection_has_not_junk_messages; + sensitive = + selection_has_not_junk_messages && + !(state & E_MAIL_READER_FOLDER_IS_JUNK); action = e_mail_reader_get_action (reader, action_name); - gtk_action_set_sensitive (action, sensitive && !(state & E_MAIL_READER_FOLDER_IS_JUNK)); + gtk_action_set_sensitive (action, sensitive); action_name = "mail-mark-not-junk"; sensitive = selection_has_junk_messages; diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 38be2f3dbd..2ceb77dbec 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -2087,7 +2087,7 @@ emae_create_basic_assistant_page (EMAccountEditor *emae, GtkAssistant *assistant gtk_widget_show (lbl); if (g_ascii_strcasecmp (page_id, "start_page") == 0) - g_hash_table_insert (emae->priv->widgets, (char *)"start_page_label", lbl); + g_hash_table_insert (emae->priv->widgets, (gchar *)"start_page_label", lbl); if (old) { /* keep page on its previous index */ @@ -2118,7 +2118,6 @@ static struct { { "identity_organization", E_ACCOUNT_ID_ORGANIZATION }, }; - static void emae_queue_widgets (EMAccountEditor *emae, GtkBuilder *builder, const gchar *first, ...) { @@ -2126,7 +2125,7 @@ emae_queue_widgets (EMAccountEditor *emae, GtkBuilder *builder, const gchar *fir va_start (ap, first); while (first) { - g_hash_table_insert (emae->priv->widgets, (char *)first, e_builder_get_widget (builder, first)); + g_hash_table_insert (emae->priv->widgets, (gchar *)first, e_builder_get_widget (builder, first)); first = va_arg (ap, const gchar *); } va_end (ap); diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index b779caf63a..222c1cebd7 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -274,10 +274,13 @@ add_new_store (gchar *uri, CamelStore *store, gpointer user_data) static void account_added_cb (EAccountList *accounts, - EAccount *account, - EMFolderTreeModel *model) + EAccount *account, + EMFolderTreeModel *model) { - mail_get_store (e_account_get_string (account, E_ACCOUNT_SOURCE_URL), NULL, add_new_store, account); + const gchar *uri; + + uri = e_account_get_string (account, E_ACCOUNT_SOURCE_URL); + mail_get_store (uri, NULL, add_new_store, account); } static void diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index fdd1b88ee0..371d764d74 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -2834,22 +2834,22 @@ em_folder_tree_restore_state (EMFolderTree *folder_tree, goto next; group_name = g_strdup_printf ("Store %s", uri); - + if (e_shell_get_express_mode (shell)) { gboolean system = FALSE; if (strncmp (uri, "vfolder", 7) == 0 || strncmp(uri, "mbox", 4) == 0) system = TRUE; - + if (!system && !g_key_file_has_key (key_file, group_name, key, NULL)) { GtkTreePath *path; - + path = gtk_tree_model_get_path (tree_model, &iter); gtk_tree_view_expand_row (tree_view, path, FALSE); gtk_tree_path_free (path); } - + } else if (!g_key_file_has_key (key_file, group_name, key, NULL)) { GtkTreePath *path; diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c index 43dee1f97e..4d3ac946f4 100644 --- a/mail/em-inline-filter.c +++ b/mail/em-inline-filter.c @@ -232,7 +232,7 @@ emif_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final) } rest_len = inend - start; - if (inptr < inend) + if (inptr < inend) *inptr++ = 0; #define restore_inptr() G_STMT_START { if (inptr < inend) inptr[-1] = '\n'; } G_STMT_END |