diff options
Diffstat (limited to 'modules/mail')
-rw-r--r-- | modules/mail/e-mail-attachment-handler.c | 20 | ||||
-rw-r--r-- | modules/mail/e-mail-config-web-view.c | 7 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-backend.c | 10 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-actions.c | 2 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-private.c | 2 | ||||
-rw-r--r-- | modules/mail/em-account-prefs.c | 10 | ||||
-rw-r--r-- | modules/mail/em-mailer-prefs.c | 45 | ||||
-rw-r--r-- | modules/mail/em-network-prefs.c | 87 |
8 files changed, 120 insertions, 63 deletions
diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c index 0c00279028..69d8898fc8 100644 --- a/modules/mail/e-mail-attachment-handler.c +++ b/modules/mail/e-mail-attachment-handler.c @@ -31,6 +31,10 @@ #include "mail/e-mail-backend.h" #include "mail/em-composer-utils.h" +#define E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE \ + ((obj), E_TYPE_MAIL_ATTACHMENT_HANDLER, EMailAttachmentHandlerPrivate)) + struct _EMailAttachmentHandlerPrivate { EShell *shell; EMailSession *session; @@ -71,7 +75,7 @@ mail_attachment_handler_forward (GtkAction *action, GList *selected; view = e_attachment_handler_get_view (handler); - priv = E_MAIL_ATTACHMENT_HANDLER (handler)->priv; + priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler); selected = e_attachment_view_get_selected_attachments (view); g_return_if_fail (g_list_length (selected) == 1); @@ -106,7 +110,7 @@ mail_attachment_handler_reply_all (GtkAction *action, GList *selected; view = e_attachment_handler_get_view (handler); - priv = E_MAIL_ATTACHMENT_HANDLER (handler)->priv; + priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler); selected = e_attachment_view_get_selected_attachments (view); g_return_if_fail (g_list_length (selected) == 1); @@ -142,7 +146,7 @@ mail_attachment_handler_reply_sender (GtkAction *action, GList *selected; view = e_attachment_handler_get_view (handler); - priv = E_MAIL_ATTACHMENT_HANDLER (handler)->priv; + priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler); selected = e_attachment_view_get_selected_attachments (view); g_return_if_fail (g_list_length (selected) == 1); @@ -286,7 +290,7 @@ mail_attachment_handler_x_uid_list (EAttachmentView *view, return; store = e_attachment_view_get_store (view); - priv = E_MAIL_ATTACHMENT_HANDLER (handler)->priv; + priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); parent = gtk_widget_is_toplevel (parent) ? parent : NULL; @@ -461,7 +465,7 @@ mail_attachment_handler_dispose (GObject *object) { EMailAttachmentHandlerPrivate *priv; - priv = E_MAIL_ATTACHMENT_HANDLER (object)->priv; + priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (object); if (priv->shell != NULL) { g_object_unref (priv->shell); @@ -491,7 +495,7 @@ mail_attachment_handler_constructed (GObject *object) GError *error = NULL; handler = E_ATTACHMENT_HANDLER (object); - priv = E_MAIL_ATTACHMENT_HANDLER (object)->priv; + priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (object); /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (parent_class)->constructed (object); @@ -571,9 +575,7 @@ mail_attachment_handler_class_init (EMailAttachmentHandlerClass *class) static void mail_attachment_handler_init (EMailAttachmentHandler *handler) { - handler->priv = G_TYPE_INSTANCE_GET_PRIVATE ( - handler, E_TYPE_MAIL_ATTACHMENT_HANDLER, - EMailAttachmentHandlerPrivate); + handler->priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler); } GType diff --git a/modules/mail/e-mail-config-web-view.c b/modules/mail/e-mail-config-web-view.c index 8f838b3295..80f3f65c0f 100644 --- a/modules/mail/e-mail-config-web-view.c +++ b/modules/mail/e-mail-config-web-view.c @@ -73,6 +73,8 @@ mail_config_web_view_load_style (EMailConfigWebView *extension) gchar *variable_font; gboolean custom_fonts; gboolean mark_citations; + EExtensible *extensible; + GtkStyleContext *style_context; GError *error = NULL; /* Some of our mail and composer preferences are passed down to @@ -138,8 +140,9 @@ mail_config_web_view_load_style (EMailConfigWebView *extension) g_free (citation_color); g_free (spell_color); - gtk_style_context_invalidate ( - gtk_widget_get_style_context (GTK_WIDGET (e_extension_get_extensible (E_EXTENSION (extension))))); + extensible = e_extension_get_extensible (E_EXTENSION (extension)); + style_context = gtk_widget_get_style_context (GTK_WIDGET (extensible)); + gtk_style_context_invalidate (style_context); } static void diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index 2012b25660..79832ab499 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -70,6 +70,10 @@ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_MAIL_SHELL_BACKEND, EMailShellBackendPrivate)) +#define E_MAIL_SHELL_BACKEND_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE \ + ((obj), E_TYPE_MAIL_SHELL_BACKEND, EMailShellBackendPrivate)) + #define BACKEND_NAME "mail" struct _EMailShellBackendPrivate { @@ -687,7 +691,7 @@ e_mail_shell_backend_type_register (GTypeModule *type_module) void e_mail_shell_backend_new_account (EMailShellBackend *mail_shell_backend, - GtkWindow *parent) + GtkWindow *parent) { EMailShellBackendPrivate *priv; @@ -735,8 +739,8 @@ e_mail_shell_backend_new_account (EMailShellBackend *mail_shell_backend, void e_mail_shell_backend_edit_account (EMailShellBackend *mail_shell_backend, - GtkWindow *parent, - EAccount *account) + GtkWindow *parent, + EAccount *account) { EMailShellBackendPrivate *priv; EMAccountEditor *emae; diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index c5c51a715a..b39d22d13d 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -115,7 +115,7 @@ action_mail_account_disable_cb (GtkAction *action, static void action_mail_account_properties_cb (GtkAction *action, - EMailShellView *mail_shell_view) + EMailShellView *mail_shell_view) { EMailShellSidebar *mail_shell_sidebar; EShellView *shell_view; diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c index f43734f175..8838f1a1ae 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -1516,7 +1516,7 @@ e_mail_shell_view_update_send_receive_menus (EMailShellView *mail_shell_view) g_return_if_fail (E_IS_MAIL_SHELL_VIEW (mail_shell_view)); - priv = mail_shell_view->priv; + priv = E_MAIL_SHELL_VIEW_GET_PRIVATE (mail_shell_view); shell_view = E_SHELL_VIEW (mail_shell_view); shell_window = e_shell_view_get_shell_window (shell_view); diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c index 08434d1a20..516b28aa8f 100644 --- a/modules/mail/em-account-prefs.c +++ b/modules/mail/em-account-prefs.c @@ -53,6 +53,10 @@ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), EM_TYPE_ACCOUNT_PREFS, EMAccountPrefsPrivate)) +#define EM_ACCOUNT_PREFS_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE \ + ((obj), EM_TYPE_ACCOUNT_PREFS, EMAccountPrefsPrivate)) + struct _EMAccountPrefsPrivate { EMailBackend *backend; }; @@ -173,7 +177,8 @@ account_prefs_add_account (EMailAccountManager *manager) parent = gtk_widget_get_toplevel (GTK_WIDGET (manager)); parent = gtk_widget_is_toplevel (parent) ? parent : NULL; - e_mail_shell_backend_new_account (E_MAIL_SHELL_BACKEND (priv->backend), parent); + e_mail_shell_backend_new_account ( + E_MAIL_SHELL_BACKEND (priv->backend), parent); } static void @@ -188,7 +193,8 @@ account_prefs_edit_account (EMailAccountManager *manager, parent = gtk_widget_get_toplevel (GTK_WIDGET (manager)); parent = gtk_widget_is_toplevel (parent) ? parent : NULL; - e_mail_shell_backend_edit_account (E_MAIL_SHELL_BACKEND (priv->backend), parent, account); + e_mail_shell_backend_edit_account ( + E_MAIL_SHELL_BACKEND (priv->backend), parent, account); } static void diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c index 1e7e672f1f..3f5e371296 100644 --- a/modules/mail/em-mailer-prefs.c +++ b/modules/mail/em-mailer-prefs.c @@ -194,10 +194,12 @@ jh_add_cb (GtkWidget *widget, jh_dialog_entry_changed_cb (NULL, builder); entry = e_builder_get_widget (builder, "junk-header-name"); - g_signal_connect (entry, "changed", + g_signal_connect ( + entry, "changed", G_CALLBACK (jh_dialog_entry_changed_cb), builder); entry = e_builder_get_widget (builder, "junk-header-content"); - g_signal_connect (entry, "changed", + g_signal_connect ( + entry, "changed", G_CALLBACK (jh_dialog_entry_changed_cb), builder); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { @@ -534,7 +536,8 @@ toggle_button_init (EMMailerPrefs *prefs, if (toggled) { g_object_set_data ((GObject *) toggle, "key", (gpointer) key); - g_signal_connect (toggle, "toggled", toggled, prefs); + g_signal_connect ( + toggle, "toggled", toggled, prefs); } if (!g_settings_is_writable (prefs->settings, key)) @@ -886,9 +889,15 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, if (locked) gtk_widget_set_sensitive ((GtkWidget *) prefs->images_always, FALSE); - g_signal_connect (prefs->images_never, "toggled", G_CALLBACK (http_images_changed), prefs); - g_signal_connect (prefs->images_sometimes, "toggled", G_CALLBACK (http_images_changed), prefs); - g_signal_connect (prefs->images_always, "toggled", G_CALLBACK (http_images_changed), prefs); + g_signal_connect ( + prefs->images_never, "toggled", + G_CALLBACK (http_images_changed), prefs); + g_signal_connect ( + prefs->images_sometimes, "toggled", + G_CALLBACK (http_images_changed), prefs); + g_signal_connect ( + prefs->images_always, "toggled", + G_CALLBACK (http_images_changed), prefs); widget = e_builder_get_widget (prefs->builder, "chkShowAnimatedImages"); g_object_bind_property ( @@ -951,18 +960,30 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, gtk_widget_set_sensitive ((GtkWidget *) prefs->header_list, !locked); selection = gtk_tree_view_get_selection (prefs->header_list); - g_signal_connect (selection, "changed", G_CALLBACK (emmp_header_list_row_selected), prefs); - g_signal_connect (prefs->entry_header, "changed", G_CALLBACK (emmp_header_entry_changed), prefs); - g_signal_connect (prefs->entry_header, "activate", G_CALLBACK (emmp_header_add_header), prefs); + g_signal_connect ( + selection, "changed", + G_CALLBACK (emmp_header_list_row_selected), prefs); + g_signal_connect ( + prefs->entry_header, "changed", + G_CALLBACK (emmp_header_entry_changed), prefs); + g_signal_connect ( + prefs->entry_header, + "activate", G_CALLBACK (emmp_header_add_header), prefs); /* initialise the tree with appropriate headings */ prefs->header_list_store = gtk_list_store_newv (HEADER_LIST_N_COLUMNS, col_types); - g_signal_connect (prefs->add_header, "clicked", G_CALLBACK (emmp_header_add_header), prefs); - g_signal_connect (prefs->remove_header, "clicked", G_CALLBACK (emmp_header_remove_header), prefs); + g_signal_connect ( + prefs->add_header, "clicked", + G_CALLBACK (emmp_header_add_header), prefs); + g_signal_connect ( + prefs->remove_header, "clicked", + G_CALLBACK (emmp_header_remove_header), prefs); gtk_tree_view_set_model (prefs->header_list, GTK_TREE_MODEL (prefs->header_list_store)); renderer = gtk_cell_renderer_toggle_new (); g_object_set (renderer, "activatable", TRUE, NULL); - g_signal_connect (renderer, "toggled", G_CALLBACK (emmp_header_list_enabled_toggled), prefs); + g_signal_connect ( + renderer, "toggled", + G_CALLBACK (emmp_header_list_enabled_toggled), prefs); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (prefs->header_list), -1, "Enabled", renderer, "active", HEADER_LIST_ENABLED_COLUMN, diff --git a/modules/mail/em-network-prefs.c b/modules/mail/em-network-prefs.c index b52c006ab8..3a7b335191 100644 --- a/modules/mail/em-network-prefs.c +++ b/modules/mail/em-network-prefs.c @@ -90,7 +90,9 @@ toggle_button_init (EMNetworkPrefs *prefs, gtk_toggle_button_set_active (toggle, bval); SET_KEY_NAME (toggle, key); - g_signal_connect (toggle, "toggled", G_CALLBACK (toggle_button_toggled), prefs); + g_signal_connect ( + toggle, "toggled", + G_CALLBACK (toggle_button_toggled), prefs); if (!g_settings_is_writable (prefs->proxy_settings, key)) gtk_widget_set_sensitive ((GtkWidget *) toggle, FALSE); @@ -368,7 +370,9 @@ em_network_prefs_construct (EMNetworkPrefs *prefs) gtk_toggle_button_set_active (prefs->auto_proxy, val == NETWORK_PROXY_AUTOCONFIG); SET_KEY_NAME (prefs->auto_proxy_url, "autoconfig-url"); - g_signal_connect (prefs->auto_proxy_url, "changed", G_CALLBACK(widget_entry_changed_cb), prefs->proxy_settings); + g_signal_connect ( + prefs->auto_proxy_url, "changed", + G_CALLBACK (widget_entry_changed_cb), prefs->proxy_settings); if (locked) gtk_widget_set_sensitive ((GtkWidget *) prefs->auto_proxy, FALSE); #endif @@ -399,49 +403,66 @@ em_network_prefs_construct (EMNetworkPrefs *prefs) /* Manual proxy options */ SET_KEY_NAME (prefs->http_host, "http-host"); - g_signal_connect (prefs->http_host, "changed", - G_CALLBACK (widget_entry_changed_cb), - prefs->proxy_settings); + g_signal_connect ( + prefs->http_host, "changed", + G_CALLBACK (widget_entry_changed_cb), + prefs->proxy_settings); SET_KEY_NAME (prefs->https_host, "secure-host"); - g_signal_connect (prefs->https_host, "changed", - G_CALLBACK (widget_entry_changed_cb), - prefs->proxy_settings); + g_signal_connect ( + prefs->https_host, "changed", + G_CALLBACK (widget_entry_changed_cb), + prefs->proxy_settings); SET_KEY_NAME (prefs->ignore_hosts, "ignore-hosts"); - g_signal_connect (prefs->ignore_hosts, "changed", - G_CALLBACK (ignore_hosts_entry_changed_cb), - prefs->proxy_settings); + g_signal_connect ( + prefs->ignore_hosts, "changed", + G_CALLBACK (ignore_hosts_entry_changed_cb), + prefs->proxy_settings); SET_KEY_NAME (prefs->http_port, "http-port"); - g_signal_connect (prefs->http_port, "value_changed", - G_CALLBACK (widget_entry_changed_cb), - prefs->proxy_settings); + g_signal_connect ( + prefs->http_port, "value_changed", + G_CALLBACK (widget_entry_changed_cb), + prefs->proxy_settings); SET_KEY_NAME (prefs->https_port, "secure-port"); - g_signal_connect (prefs->https_port, "value_changed", - G_CALLBACK (widget_entry_changed_cb), - prefs->proxy_settings); + g_signal_connect ( + prefs->https_port, "value_changed", + G_CALLBACK (widget_entry_changed_cb), + prefs->proxy_settings); SET_KEY_NAME (prefs->socks_host, "socks-host"); - g_signal_connect (prefs->socks_host, "changed", - G_CALLBACK (widget_entry_changed_cb), - prefs->proxy_settings); + g_signal_connect ( + prefs->socks_host, "changed", + G_CALLBACK (widget_entry_changed_cb), + prefs->proxy_settings); SET_KEY_NAME (prefs->socks_port, "socks-port"); - g_signal_connect (prefs->socks_port, "value_changed", - G_CALLBACK (widget_entry_changed_cb), - prefs->proxy_settings); + g_signal_connect ( + prefs->socks_port, "value_changed", + G_CALLBACK (widget_entry_changed_cb), + prefs->proxy_settings); SET_KEY_NAME (prefs->auth_user, "authentication-user"); - g_signal_connect (prefs->auth_user, "changed", - G_CALLBACK (widget_entry_changed_cb), - prefs->proxy_settings); + g_signal_connect ( + prefs->auth_user, "changed", + G_CALLBACK (widget_entry_changed_cb), + prefs->proxy_settings); SET_KEY_NAME (prefs->auth_pwd, "authentication-password"); - g_signal_connect (prefs->auth_pwd, "changed", - G_CALLBACK (widget_entry_changed_cb), - prefs->proxy_settings); + g_signal_connect ( + prefs->auth_pwd, "changed", + G_CALLBACK (widget_entry_changed_cb), + prefs->proxy_settings); gtk_toggle_button_set_active (prefs->manual_proxy, val == NETWORK_PROXY_MANUAL); - g_signal_connect (prefs->sys_proxy, "toggled", G_CALLBACK (notify_proxy_type_changed), prefs); - g_signal_connect (prefs->no_proxy, "toggled", G_CALLBACK (notify_proxy_type_changed), prefs); + g_signal_connect ( + prefs->sys_proxy, "toggled", + G_CALLBACK (notify_proxy_type_changed), prefs); + g_signal_connect ( + prefs->no_proxy, "toggled", + G_CALLBACK (notify_proxy_type_changed), prefs); #if 0 - g_signal_connect (prefs->auto_proxy, "toggled", G_CALLBACK (notify_proxy_type_changed), prefs); + g_signal_connect ( + prefs->auto_proxy, "toggled", + G_CALLBACK (notify_proxy_type_changed), prefs); #endif - g_signal_connect (prefs->manual_proxy, "toggled", G_CALLBACK (notify_proxy_type_changed), prefs); + g_signal_connect ( + prefs->manual_proxy, "toggled", + G_CALLBACK (notify_proxy_type_changed), prefs); if (locked) gtk_widget_set_sensitive ((GtkWidget *) prefs->manual_proxy, FALSE); |