diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-07-12 20:02:18 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-08-20 02:17:55 +0800 |
commit | c85109fc322137596bf34cffc5445d568223c60d (patch) | |
tree | 711e6d5b2eb3d6c7780d1d01e20d980c67a77f9e /modules/prefer-plain | |
parent | 7d1751cc26a75166019917ec8c3b35e1083d27d6 (diff) | |
download | gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.gz gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.bz2 gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.lz gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.xz gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.zst gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'modules/prefer-plain')
-rw-r--r-- | modules/prefer-plain/e-mail-display-popup-prefer-plain.c | 34 | ||||
-rw-r--r-- | modules/prefer-plain/e-mail-parser-prefer-plain.c | 8 | ||||
-rw-r--r-- | modules/prefer-plain/plugin/config-ui.c | 2 |
3 files changed, 22 insertions, 22 deletions
diff --git a/modules/prefer-plain/e-mail-display-popup-prefer-plain.c b/modules/prefer-plain/e-mail-display-popup-prefer-plain.c index 889885cecc..58969a6b19 100644 --- a/modules/prefer-plain/e-mail-display-popup-prefer-plain.c +++ b/modules/prefer-plain/e-mail-display-popup-prefer-plain.c @@ -90,10 +90,9 @@ static const gchar *ui_reader = " </popup>" "</ui>"; - static void toggle_part (GtkAction *action, - EMailDisplayPopupExtension *extension) + EMailDisplayPopupExtension *extension) { EMailDisplayPopupPreferPlain *pp_extension = (EMailDisplayPopupPreferPlain *) extension; WebKitDOMDocument *doc = pp_extension->document; @@ -108,14 +107,16 @@ toggle_part (GtkAction *action, g_free (uri); query = soup_form_decode (soup_uri->query); - g_hash_table_replace (query, g_strdup ("part_id"), + g_hash_table_replace ( + query, g_strdup ("part_id"), pp_extension->text_html_id ? pp_extension->text_html_id : pp_extension->text_plain_id); - g_hash_table_replace (query, g_strdup ("mime_type"), - pp_extension->text_html_id ? - (gpointer) "text/html" : - (gpointer) "text/plain"); + g_hash_table_replace ( + query, g_strdup ("mime_type"), + pp_extension->text_html_id ? + (gpointer) "text/html" : + (gpointer) "text/plain"); soup_uri_set_query_from_form (soup_uri, query); g_hash_table_destroy (query); @@ -151,11 +152,11 @@ GtkActionEntry entries[] = { } }; -const gint ID_LEN = G_N_ELEMENTS(".alternative-prefer-plain."); +const gint ID_LEN = G_N_ELEMENTS (".alternative-prefer-plain."); static void set_text_plain_id (EMailDisplayPopupPreferPlain *extension, - const gchar *id) + const gchar *id) { g_free (extension->text_plain_id); extension->text_plain_id = g_strdup (id); @@ -163,14 +164,13 @@ set_text_plain_id (EMailDisplayPopupPreferPlain *extension, static void set_text_html_id (EMailDisplayPopupPreferPlain *extension, - const gchar *id) + const gchar *id) { g_free (extension->text_html_id); extension->text_html_id = g_strdup (id); } - -static GtkActionGroup* +static GtkActionGroup * create_group (EMailDisplayPopupExtension *extension) { EExtensible *extensible; @@ -192,14 +192,15 @@ create_group (EMailDisplayPopupExtension *extension) gtk_ui_manager_add_ui_from_string (ui_manager, ui_webview, -1, NULL); action = gtk_action_group_get_action (group, "show-plain-text-part"); - g_signal_connect (action, "activate", + g_signal_connect ( + action, "activate", G_CALLBACK (toggle_part), extension); action = gtk_action_group_get_action (group, "show-text-html-part"); - g_signal_connect (action, "activate", + g_signal_connect ( + action, "activate", G_CALLBACK (toggle_part), extension); - shell = e_shell_get_default (); shell_window = e_shell_get_active_window (shell); if (E_IS_SHELL_WINDOW (shell_window)) { @@ -218,7 +219,7 @@ create_group (EMailDisplayPopupExtension *extension) static void mail_display_popup_prefer_plain_update_actions (EMailDisplayPopupExtension *extension, - WebKitHitTestResult *context) + WebKitHitTestResult *context) { EMailDisplay *display; GtkAction *action; @@ -413,7 +414,6 @@ e_mail_display_popup_prefer_plain_class_finalize (EMailDisplayPopupPreferPlainCl } - static void e_mail_display_popup_prefer_plain_init (EMailDisplayPopupPreferPlain *extension) { diff --git a/modules/prefer-plain/e-mail-parser-prefer-plain.c b/modules/prefer-plain/e-mail-parser-prefer-plain.c index b5f8db2365..5237831675 100644 --- a/modules/prefer-plain/e-mail-parser-prefer-plain.c +++ b/modules/prefer-plain/e-mail-parser-prefer-plain.c @@ -69,7 +69,7 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED ( E_TYPE_MAIL_PARSER_EXTENSION, e_mail_parser_parser_extension_interface_init)); -static const gchar* parser_mime_types[] = { "multipart/alternative", +static const gchar * parser_mime_types[] = { "multipart/alternative", "text/html", NULL }; @@ -202,7 +202,8 @@ empe_prefer_plain_parse (EMailParserExtension *extension, /* Enforcing text/plain, but wants HTML as attachment */ if (emp_pp->show_suppressed) { - return make_part_attachment (parser, part, part_id, + return make_part_attachment ( + parser, part, part_id, FALSE, cancellable); } @@ -317,7 +318,7 @@ empe_prefer_plain_parse (EMailParserExtension *extension, parser, sp, part_id, cancellable); parts = g_slist_concat ( parts, - e_mail_parser_wrap_as_attachment ( + e_mail_parser_wrap_as_attachment ( parser, sp, sparts, part_id, cancellable)); } @@ -329,7 +330,6 @@ empe_prefer_plain_parse (EMailParserExtension *extension, parts = g_slist_concat (parts, plain_text_parts); - g_string_truncate (part_id, partidlen); return parts; diff --git a/modules/prefer-plain/plugin/config-ui.c b/modules/prefer-plain/plugin/config-ui.c index 29b81a60fe..411ef24dbd 100644 --- a/modules/prefer-plain/plugin/config-ui.c +++ b/modules/prefer-plain/plugin/config-ui.c @@ -120,7 +120,7 @@ prefer_plain_page_factory (EPlugin *epl, } gtk_cell_layout_pack_start ((GtkCellLayout *) dropdown, cell, TRUE); - gtk_cell_layout_set_attributes((GtkCellLayout *)dropdown, cell, "text", 0, NULL); + gtk_cell_layout_set_attributes ((GtkCellLayout *) dropdown, cell, "text", 0, NULL); gtk_combo_box_set_model (dropdown, (GtkTreeModel *) store); /*gtk_combo_box_set_active(dropdown, -1);*/ gtk_combo_box_set_active (dropdown, epp_mode); |