diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-12-01 10:53:20 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-02-20 23:04:25 +0800 |
commit | 23f5773903d64a554d977ae7d0ebbaca73528f1f (patch) | |
tree | 104e1a59da8bf96b004bce204b79f47bbe0a6d13 /modules | |
parent | 49bc4c2d765ee1780c23fdc9f42152850dabb220 (diff) | |
download | gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.gz gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.bz2 gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.lz gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.xz gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.zst gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'modules')
20 files changed, 224 insertions, 102 deletions
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c index 2d6a9255a6..52283ea523 100644 --- a/modules/addressbook/addressbook-config.c +++ b/modules/addressbook/addressbook-config.c @@ -416,7 +416,9 @@ query_for_supported_bases (GtkWidget *button, supported_bases_table = e_builder_get_widget (builder, "supported-bases-table"); model = gtk_tree_view_get_model (GTK_TREE_VIEW (supported_bases_table)); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (supported_bases_table)); - g_signal_connect (selection, "changed", G_CALLBACK (search_base_selection_model_changed), dialog); + g_signal_connect ( + selection, "changed", + G_CALLBACK (search_base_selection_model_changed), dialog); search_base_selection_model_changed (selection, dialog); if (do_ldap_root_dse_query (sdialog, GTK_LIST_STORE (model), sdialog->source)) { @@ -546,7 +548,9 @@ eabc_general_type (EConfig *ec, gtk_combo_box_set_model (dropdown, (GtkTreeModel *) store); gtk_combo_box_set_active (dropdown, -1); gtk_combo_box_set_active (dropdown, row); - g_signal_connect (dropdown, "changed", G_CALLBACK(eabc_type_changed), sdialog); + g_signal_connect ( + dropdown, "changed", + G_CALLBACK (eabc_type_changed), sdialog); gtk_widget_show ((GtkWidget *) dropdown); gtk_box_pack_start ((GtkBox *) w, (GtkWidget *) dropdown, TRUE, TRUE, 0); gtk_label_set_mnemonic_widget ((GtkLabel *) label, (GtkWidget *) dropdown); @@ -600,7 +604,9 @@ eabc_general_name (EConfig *ec, gtk_box_pack_start ((GtkBox *) parent, w, FALSE, FALSE, 0); sdialog->display_name = e_builder_get_widget (builder, "account-editor-display-name-entry"); - g_signal_connect (sdialog->display_name, "changed", G_CALLBACK(name_changed_cb), sdialog); + g_signal_connect ( + sdialog->display_name, "changed", + G_CALLBACK (name_changed_cb), sdialog); gtk_entry_set_text ((GtkEntry *) sdialog->display_name, e_source_peek_name (sdialog->source)); /* Hardcoded: groupwise can't edit the name (or anything else) */ @@ -652,7 +658,9 @@ eabc_general_use_in_cal (EConfig *ec, gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (use_in_cal_setting), (use_in_cal && g_str_equal (use_in_cal, "1")) || (!use_in_cal && base_uri && g_str_has_prefix (base_uri, "local:"))); - g_signal_connect (use_in_cal_setting, "toggled", G_CALLBACK (use_in_cal_changed_cb), sdialog); + g_signal_connect ( + use_in_cal_setting, "toggled", + G_CALLBACK (use_in_cal_changed_cb), sdialog); return use_in_cal_setting; } @@ -685,7 +693,9 @@ eabc_general_offline (EConfig *ec, offline_setting = gtk_check_button_new_with_mnemonic (_("Copy _book content locally for offline operation")); gtk_widget_show (offline_setting); gtk_container_add (GTK_CONTAINER (parent), offline_setting); - g_signal_connect (offline_setting, "toggled", G_CALLBACK (offline_status_changed_cb), sdialog); + g_signal_connect ( + offline_setting, "toggled", + G_CALLBACK (offline_status_changed_cb), sdialog); } gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (offline_setting), (offline_sync && g_str_equal (offline_sync, "1")) ? TRUE : FALSE); @@ -793,14 +803,19 @@ eabc_general_host (EConfig *ec, sdialog->host = e_builder_get_widget (builder, "server-name-entry"); gtk_entry_set_text((GtkEntry *)sdialog->host, lud && lud->lud_host ? lud->lud_host : ""); - g_signal_connect (sdialog->host, "changed", G_CALLBACK (host_changed_cb), sdialog); + g_signal_connect ( + sdialog->host, "changed", + G_CALLBACK (host_changed_cb), sdialog); sdialog->port_comboentry = e_builder_get_widget (builder, "port-comboentry"); gtk_widget_set_has_tooltip (sdialog->port_comboentry, TRUE); gtk_widget_set_tooltip_text (sdialog->port_comboentry, _("This is the port on the LDAP server that Evolution will try to connect to. A list of standard ports has been provided. Ask your system administrator what port you should specify.")); sprintf(port, "%u", lud && lud->lud_port? lud->lud_port : LDAP_PORT); gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (sdialog->port_comboentry))), port); - g_signal_connect (gtk_bin_get_child (GTK_BIN (sdialog->port_comboentry)), "changed", G_CALLBACK (port_entry_changed_cb), sdialog); + g_signal_connect ( + gtk_bin_get_child ( + GTK_BIN (sdialog->port_comboentry)), "changed", + G_CALLBACK (port_entry_changed_cb), sdialog); if (lud) ldap_free_urldesc (lud); @@ -812,7 +827,9 @@ eabc_general_host (EConfig *ec, gtk_combo_box_set_active (GTK_COMBO_BOX (sdialog->ssl_combobox), sdialog->ssl); gtk_widget_set_tooltip_text (sdialog->ssl_combobox, ldap_get_ssl_tooltip (sdialog->ssl)); gtk_widget_set_sensitive (sdialog->ssl_combobox, strcmp (port, LDAPS_PORT_STRING) != 0); - g_signal_connect (sdialog->ssl_combobox, "changed", G_CALLBACK (ssl_combobox_changed_cb), sdialog); + g_signal_connect ( + sdialog->ssl_combobox, "changed", + G_CALLBACK (ssl_combobox_changed_cb), sdialog); g_object_unref (builder); @@ -882,7 +899,9 @@ eabc_general_auth (EConfig *ec, tmp = e_source_get_property(sdialog->source, "auth"); sdialog->auth = tmp ? ldap_parse_auth (tmp) : ADDRESSBOOK_LDAP_AUTH_NONE; gtk_combo_box_set_active (GTK_COMBO_BOX (sdialog->auth_combobox), sdialog->auth); - g_signal_connect (sdialog->auth_combobox, "changed", G_CALLBACK(auth_combobox_changed_cb), sdialog); + g_signal_connect ( + sdialog->auth_combobox, "changed", + G_CALLBACK (auth_combobox_changed_cb), sdialog); sdialog->auth_principal = e_builder_get_widget (builder, "auth-entry"); switch (sdialog->auth) { @@ -898,7 +917,9 @@ eabc_general_auth (EConfig *ec, break; } gtk_entry_set_text((GtkEntry *)sdialog->auth_principal, tmp?tmp:""); - g_signal_connect (sdialog->auth_principal, "changed", G_CALLBACK (auth_entry_changed_cb), sdialog); + g_signal_connect ( + sdialog->auth_principal, "changed", + G_CALLBACK (auth_entry_changed_cb), sdialog); g_object_unref (builder); @@ -957,7 +978,9 @@ eabc_details_search (EConfig *ec, sdialog->rootdn = e_builder_get_widget (builder, "rootdn-entry"); gtk_entry_set_text((GtkEntry *)sdialog->rootdn, lud && lud->lud_dn ? lud->lud_dn : ""); - g_signal_connect (sdialog->rootdn, "changed", G_CALLBACK (rootdn_changed_cb), sdialog); + g_signal_connect ( + sdialog->rootdn, "changed", + G_CALLBACK (rootdn_changed_cb), sdialog); sdialog->scope_combobox = e_builder_get_widget (builder, "scope-combobox"); gtk_widget_set_has_tooltip (sdialog->scope_combobox, TRUE); @@ -977,14 +1000,19 @@ eabc_details_search (EConfig *ec, } } gtk_combo_box_set_active (GTK_COMBO_BOX (sdialog->scope_combobox), sdialog->scope); - g_signal_connect (sdialog->scope_combobox, "changed", G_CALLBACK(scope_combobox_changed_cb), sdialog); + g_signal_connect ( + sdialog->scope_combobox, "changed", + G_CALLBACK (scope_combobox_changed_cb), sdialog); sdialog->search_filter = e_builder_get_widget (builder, "search-filter-entry"); gtk_entry_set_text((GtkEntry *)sdialog->search_filter, lud && lud->lud_filter ? lud->lud_filter : ""); - g_signal_connect (sdialog->search_filter, "changed", G_CALLBACK (search_filter_changed_cb), sdialog); + g_signal_connect ( + sdialog->search_filter, "changed", + G_CALLBACK (search_filter_changed_cb), sdialog); - g_signal_connect (e_builder_get_widget(builder, "rootdn-button"), "clicked", - G_CALLBACK (query_for_supported_bases), sdialog); + g_signal_connect ( + e_builder_get_widget (builder, "rootdn-button"), "clicked", + G_CALLBACK (query_for_supported_bases), sdialog); if (lud) ldap_free_urldesc (lud); @@ -1065,11 +1093,15 @@ eabc_details_limit (EConfig *ec, sdialog->limit_spinbutton = e_builder_get_widget (builder, "download-limit-spinbutton"); tmp = e_source_get_property(sdialog->source, "limit"); gtk_spin_button_set_value ((GtkSpinButton *) sdialog->limit_spinbutton, tmp ? g_strtod (tmp, NULL) : 100.0); - g_signal_connect (sdialog->limit_spinbutton, "value_changed", G_CALLBACK (limit_changed_cb), sdialog); + g_signal_connect ( + sdialog->limit_spinbutton, "value_changed", + G_CALLBACK (limit_changed_cb), sdialog); sdialog->canbrowsecheck = e_builder_get_widget (builder, "canbrowsecheck"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sdialog->canbrowsecheck), e_source_get_property (sdialog->source, "can-browse") && strcmp (e_source_get_property (sdialog->source, "can-browse"), "1") == 0); - g_signal_connect (sdialog->canbrowsecheck, "toggled", G_CALLBACK (canbrowse_toggled_cb), sdialog->source); + g_signal_connect ( + sdialog->canbrowsecheck, "toggled", + G_CALLBACK (canbrowse_toggled_cb), sdialog->source); g_object_unref (builder); @@ -1288,7 +1320,9 @@ addressbook_config_edit_source (GtkWidget *parent, xml = e_source_to_standalone_xml (sdialog->source); printf("but working standalone xml: %s\n", xml); g_free (xml); - g_signal_connect (sdialog->source, "changed", source_changed, sdialog); + g_signal_connect ( + sdialog->source, "changed", + source_changed, sdialog); #endif sdialog->config = ec = eab_config_new(E_CONFIG_BOOK, "com.novell.evolution.addressbook.config.accountEditor"); diff --git a/modules/calendar/e-cal-attachment-handler.c b/modules/calendar/e-cal-attachment-handler.c index 24a73f6d1a..604bc737da 100644 --- a/modules/calendar/e-cal-attachment-handler.c +++ b/modules/calendar/e-cal-attachment-handler.c @@ -32,6 +32,10 @@ #include <libedataserverui/e-source-selector.h> #include <libedataserverui/e-client-utils.h> +#define E_CAL_ATTACHMENT_HANDLER_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE \ + ((obj), E_TYPE_CAL_ATTACHMENT_HANDLER, ECalAttachmentHandlerPrivate)) + typedef struct _ImportContext ImportContext; struct _ECalAttachmentHandlerPrivate { @@ -533,9 +537,7 @@ cal_attachment_handler_class_init (ECalAttachmentHandlerClass *class) static void cal_attachment_handler_init (ECalAttachmentHandler *handler) { - handler->priv = G_TYPE_INSTANCE_GET_PRIVATE ( - handler, E_TYPE_CAL_ATTACHMENT_HANDLER, - ECalAttachmentHandlerPrivate); + handler->priv = E_CAL_ATTACHMENT_HANDLER_GET_PRIVATE (handler); } GType diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c index f9400707a2..d538e9bd74 100644 --- a/modules/calendar/e-cal-shell-backend.c +++ b/modules/calendar/e-cal-shell-backend.c @@ -379,7 +379,9 @@ action_event_new_cb (GtkAction *action, view = gnome_calendar_get_calendar_view (gcal, view_type); if (view) { - g_object_set (G_OBJECT (shell_backend), "prefer-new-item", action_name, NULL); + g_object_set ( + G_OBJECT (shell_backend), + "prefer-new-item", action_name, NULL); e_calendar_view_new_appointment_full ( view, diff --git a/modules/calendar/e-cal-shell-settings.c b/modules/calendar/e-cal-shell-settings.c index 0c77063f46..392bb841cb 100644 --- a/modules/calendar/e-cal-shell-settings.c +++ b/modules/calendar/e-cal-shell-settings.c @@ -82,7 +82,8 @@ transform_icaltimezone_to_string (GBinding *binding, shell_settings, "cal-use-system-timezone"); if (use_system_timezone) { - location_str = e_shell_settings_get_string (shell_settings, "cal-timezone-string"); + location_str = e_shell_settings_get_string ( + shell_settings, "cal-timezone-string"); location = location_str; } else { timezone = g_value_get_pointer (source_value); diff --git a/modules/calendar/e-calendar-preferences.c b/modules/calendar/e-calendar-preferences.c index 55a91acd70..6df9b8bde3 100644 --- a/modules/calendar/e-calendar-preferences.c +++ b/modules/calendar/e-calendar-preferences.c @@ -233,7 +233,9 @@ day_second_zone_clicked (GtkWidget *widget, if (!second_zone) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - g_signal_connect (item, "toggled", G_CALLBACK (on_set_day_second_zone), prefs); + g_signal_connect ( + item, "toggled", + G_CALLBACK (on_set_day_second_zone), prefs); recent_zones = calendar_config_get_day_second_zones (); for (s = recent_zones; s != NULL; s = s->next) { @@ -248,7 +250,9 @@ day_second_zone_clicked (GtkWidget *widget, gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); g_object_set_data_full (G_OBJECT (item), "timezone", g_strdup (s->data), g_free); - g_signal_connect (item, "toggled", G_CALLBACK (on_set_day_second_zone), prefs); + g_signal_connect ( + item, "toggled", + G_CALLBACK (on_set_day_second_zone), prefs); } calendar_config_free_day_second_zones (recent_zones); @@ -256,7 +260,9 @@ day_second_zone_clicked (GtkWidget *widget, gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); item = gtk_menu_item_new_with_label (_("Select...")); - g_signal_connect (item, "activate", G_CALLBACK (on_select_day_second_zone), prefs); + g_signal_connect ( + item, "activate", + G_CALLBACK (on_select_day_second_zone), prefs); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); gtk_widget_show_all (menu); diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c index 93d2084885..2bdd3ef8ed 100644 --- a/modules/calendar/e-memo-shell-backend.c +++ b/modules/calendar/e-memo-shell-backend.c @@ -45,6 +45,10 @@ #include "e-memo-shell-migrate.h" #include "e-memo-shell-view.h" +#define E_MEMO_SHELL_BACKEND_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE \ + ((obj), E_TYPE_MEMO_SHELL_BACKEND, EMemoShellBackendPrivate)) + #define WEB_BASE_URI "webcal://" #define PERSONAL_RELATIVE_URI "system" diff --git a/modules/calendar/e-memo-shell-migrate.c b/modules/calendar/e-memo-shell-migrate.c index 171428f408..64b5263008 100644 --- a/modules/calendar/e-memo-shell-migrate.c +++ b/modules/calendar/e-memo-shell-migrate.c @@ -67,9 +67,11 @@ create_memo_sources (EShellBackend *shell_backend, if (groups) { /* groups are already there, we need to search for things... */ GSList *g; + const gchar *data_dir; gchar *base_dir, *base_uri; - base_dir = g_build_filename (e_shell_backend_get_data_dir (shell_backend), "local", NULL); + data_dir = e_shell_backend_get_data_dir (shell_backend); + base_dir = g_build_filename (data_dir, "local", NULL); base_uri = g_filename_to_uri (base_dir, NULL, NULL); for (g = groups; g; g = g->next) { diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c index 916494757d..560ce01940 100644 --- a/modules/calendar/e-task-shell-view-private.c +++ b/modules/calendar/e-task-shell-view-private.c @@ -47,9 +47,8 @@ task_shell_view_model_row_appended_cb (ETaskShellView *task_shell_view, } static gboolean -task_shell_view_process_completed_tasks (gpointer user_data) +task_shell_view_process_completed_tasks (ETaskShellView *task_shell_view) { - ETaskShellView *task_shell_view = user_data; ETaskShellContent *task_shell_content; ETaskShellSidebar *task_shell_sidebar; ETaskTable *task_table; @@ -77,11 +76,18 @@ task_shell_view_process_completed_tasks (gpointer user_data) static void task_shell_view_schedule_process_completed_tasks (ETaskShellView *task_shell_view) { - if (task_shell_view->priv->update_completed_timeout) - g_source_remove (task_shell_view->priv->update_completed_timeout); + guint source_id; - task_shell_view->priv->update_completed_timeout = - g_timeout_add_seconds (1, task_shell_view_process_completed_tasks, task_shell_view); + source_id = task_shell_view->priv->update_completed_timeout; + + if (source_id > 0) + g_source_remove (source_id); + + source_id = g_timeout_add_seconds ( + 1, (GSourceFunc) task_shell_view_process_completed_tasks, + task_shell_view); + + task_shell_view->priv->update_completed_timeout = source_id; } static void 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); diff --git a/modules/plugin-lib/e-plugin-lib.c b/modules/plugin-lib/e-plugin-lib.c index 8ca0fed570..82c8be58fc 100644 --- a/modules/plugin-lib/e-plugin-lib.c +++ b/modules/plugin-lib/e-plugin-lib.c @@ -117,7 +117,9 @@ plugin_lib_invoke (EPlugin *plugin, EPluginLibFunc func; if (!plugin->enabled) { - g_warning ("trying to invoke '%s' on disabled plugin '%s'", name, plugin->id); + g_warning ( + "Trying to invoke '%s' on disabled plugin '%s'", + name, plugin->id); return NULL; } diff --git a/modules/plugin-mono/e-plugin-mono.c b/modules/plugin-mono/e-plugin-mono.c index 1c4113504d..2179e95195 100644 --- a/modules/plugin-mono/e-plugin-mono.c +++ b/modules/plugin-mono/e-plugin-mono.c @@ -38,6 +38,10 @@ #include <mono/metadata/mono-config.h> #include <mono/jit/jit.h> +#define E_PLUGIN_MONO_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE \ + ((obj), E_TYPE_PLUGIN_MONO, EPluginMonoPrivate)) + struct _EPluginMonoPrivate { MonoAssembly *assembly; MonoClass *class; @@ -239,8 +243,7 @@ plugin_mono_init (EPluginMono *plugin_mono) (GDestroyNotify) g_free, (GDestroyNotify) NULL); - plugin_mono->priv = G_TYPE_INSTANCE_GET_PRIVATE ( - plugin_mono, E_TYPE_PLUGIN_MONO, EPluginMonoPrivate); + plugin_mono->priv = E_PLUGIN_MONO_GET_PRIVATE (plugin_mono); plugin_mono->priv->methods = methods; } diff --git a/modules/plugin-python/e-plugin-python.c b/modules/plugin-python/e-plugin-python.c index a00e629068..fc13ade627 100644 --- a/modules/plugin-python/e-plugin-python.c +++ b/modules/plugin-python/e-plugin-python.c @@ -32,6 +32,10 @@ #include <sys/types.h> #include <string.h> +#define E_PLUGIN_PYTHON_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE \ + ((obj), E_TYPE_PLUGIN_PYTHON, EPluginPythonPrivate)) + struct _EPluginPythonPrivate { PyObject *pModule; PyObject *pClass; @@ -199,8 +203,7 @@ plugin_python_init (EPluginPython *plugin_python) (GDestroyNotify) g_free, (GDestroyNotify) NULL); - plugin_python->priv = G_TYPE_INSTANCE_GET_PRIVATE ( - plugin_python, E_TYPE_PLUGIN_PYTHON, EPluginPythonPrivate); + plugin_python->priv = E_PLUGIN_PYTHON_GET_PRIVATE (plugin_python); plugin_python->priv->methods = methods; } diff --git a/modules/startup-wizard/evolution-startup-wizard.c b/modules/startup-wizard/evolution-startup-wizard.c index e5c1b8e50d..c0cac8d14a 100644 --- a/modules/startup-wizard/evolution-startup-wizard.c +++ b/modules/startup-wizard/evolution-startup-wizard.c @@ -565,7 +565,7 @@ startup_wizard_run (EStartupWizard *extension) gtk_main (); if (e_list_length (E_LIST (account_list)) <= 0) - exit(0); + exit (0); } |