aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c1
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c1
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c9
-rw-r--r--composer/e-msg-composer.c8
-rw-r--r--e-util/e-plugin.c6
-rw-r--r--e-util/e-signature-list.c6
-rw-r--r--e-util/e-signature-utils.c3
-rw-r--r--mail/e-mail-label-list-store.c26
-rw-r--r--mail/e-mail-session.c4
-rw-r--r--mail/em-utils.c7
-rw-r--r--mail/mail-config.c35
-rw-r--r--modules/bogofilter/evolution-bogofilter.c5
-rw-r--r--modules/calendar/e-cal-shell-backend.c14
-rw-r--r--modules/calendar/e-memo-shell-backend.c14
-rw-r--r--modules/calendar/e-task-shell-backend.c14
-rw-r--r--modules/mail/em-mailer-prefs.c22
-rw-r--r--shell/e-shell-settings.c4
-rw-r--r--shell/e-shell.c11
18 files changed, 110 insertions, 80 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
index 75ac692f3f..3595437f28 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.c
@@ -473,6 +473,7 @@ build_quick_add_dialog (QuickAdd *qa)
gconf_client, "/apps/evolution/addressbook/sources");
source = e_source_list_peek_default_source (qa->source_list);
g_object_unref (gconf_client);
+
qa->combo_box = e_source_combo_box_new (qa->source_list);
e_source_combo_box_set_active (
E_SOURCE_COMBO_BOX (qa->combo_box), source);
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
index b936c9810d..231a14281c 100644
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ b/addressbook/gui/merging/eab-contact-compare.c
@@ -833,6 +833,7 @@ eab_contact_locate_match_full (EBookClient *book_client,
return;
source = e_source_list_peek_default_source (info->source_list);
+
e_client_utils_open_new (
source, E_CLIENT_SOURCE_TYPE_CONTACTS, FALSE, NULL,
e_client_utils_authenticate_handler, NULL,
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index bc3af20e3c..4f04974b33 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -37,7 +37,9 @@
#include "alarm-queue.h"
#include "config-data.h"
-#define APPLICATION_ID "org.gnome.EvolutionAlarmNotify"
+#define ALARM_NOTIFY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_ALARM_NOTIFY, AlarmNotifyPrivate))
#define APPLICATION_ID "org.gnome.EvolutionAlarmNotify"
@@ -239,7 +241,7 @@ alarm_notify_finalize (GObject *object)
AlarmNotifyPrivate *priv;
gint ii;
- priv = ALARM_NOTIFY (object)->priv;
+ priv = ALARM_NOTIFY_GET_PRIVATE (object);
if (priv->offline_timeout_id)
g_source_remove (priv->offline_timeout_id);
@@ -334,8 +336,7 @@ alarm_notify_init (AlarmNotify *an)
{
gint ii;
- an->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- an, TYPE_ALARM_NOTIFY, AlarmNotifyPrivate);
+ an->priv = ALARM_NOTIFY_GET_PRIVATE (an);
an->priv->mutex = g_mutex_new ();
an->priv->selected_calendars = config_data_get_calendars (
"/apps/evolution/calendar/sources");
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index bdca1d8d5d..f3b4ddfa21 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -5034,7 +5034,7 @@ e_load_spell_languages (void)
GSettings *settings;
GList *spell_languages = NULL;
gchar **strv;
- gint i;
+ gint ii;
/* Ask GSettings for a list of spell check language codes. */
settings = g_settings_new ("org.gnome.evolution.mail");
@@ -5042,8 +5042,8 @@ e_load_spell_languages (void)
g_object_unref (settings);
/* Convert the codes to spell language structs. */
- for (i = 0; strv[i] != NULL; i++) {
- gchar *language_code = strv[i];
+ for (ii = 0; strv[ii] != NULL; ii++) {
+ gchar *language_code = strv[ii];
const GtkhtmlSpellLanguage *language;
language = gtkhtml_spell_language_lookup (language_code);
@@ -5094,7 +5094,7 @@ e_save_spell_languages (GList *spell_languages)
/* Save the language codes to GSettings. */
settings = g_settings_new ("org.gnome.evolution.mail");
- g_settings_set_strv (settings, "composer-spell-languages", (const char * const *) lang_array->pdata);
+ g_settings_set_strv (settings, "composer-spell-languages", (const gchar * const *) lang_array->pdata);
g_object_unref (settings);
g_ptr_array_free (lang_array, TRUE);
diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c
index f839591cc6..a125e6832d 100644
--- a/e-util/e-plugin.c
+++ b/e-util/e-plugin.c
@@ -107,7 +107,7 @@ ep_set_enabled (const gchar *id,
gint state)
{
GSettings *settings;
- GSList *l;
+ GSList *link;
GPtrArray *array;
/* Bail out if no change to state, when expressed as a boolean: */
@@ -128,8 +128,8 @@ ep_set_enabled (const gchar *id,
settings = g_settings_new ("org.gnome.evolution");
array = g_ptr_array_new ();
- for (l = ep_disabled; l != NULL; l = l->next)
- g_ptr_array_add (array, l->data);
+ for (link = ep_disabled; link != NULL; link = link->next)
+ g_ptr_array_add (array, link->data);
g_ptr_array_add (array, NULL);
g_settings_set_strv (
settings, "disabled-eplugins",
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index 7223178d24..afc1d9eefd 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -280,9 +280,13 @@ ESignatureList *
e_signature_list_new (void)
{
ESignatureList *signature_list;
+ GConfClient *client;
signature_list = g_object_new (E_TYPE_SIGNATURE_LIST, NULL);
- e_signature_list_construct (signature_list, gconf_client_get_default ());
+
+ client = gconf_client_get_default ();
+ e_signature_list_construct (signature_list, client);
+ g_object_unref (client);
return signature_list;
}
diff --git a/e-util/e-signature-utils.c b/e-util/e-signature-utils.c
index e7cb88f294..7a5a7829ac 100644
--- a/e-util/e-signature-utils.c
+++ b/e-util/e-signature-utils.c
@@ -38,9 +38,8 @@ static ESignatureList *global_signature_list;
ESignatureList *
e_get_signature_list (void)
{
- if (G_UNLIKELY (global_signature_list == NULL)) {
+ if (G_UNLIKELY (global_signature_list == NULL))
global_signature_list = e_signature_list_new ();
- }
g_return_val_if_fail (global_signature_list != NULL, NULL);
diff --git a/mail/e-mail-label-list-store.c b/mail/e-mail-label-list-store.c
index ed8efb72b1..673893ca87 100644
--- a/mail/e-mail-label-list-store.c
+++ b/mail/e-mail-label-list-store.c
@@ -160,6 +160,7 @@ mail_label_list_store_finalize (GObject *object)
priv = E_MAIL_LABEL_LIST_STORE (object)->priv;
g_hash_table_destroy (priv->tag_index);
+
if (priv->mail_settings != NULL) {
g_object_unref (priv->mail_settings);
priv->mail_settings = NULL;
@@ -250,19 +251,24 @@ mail_label_list_store_constructed (GObject *object)
/* Connect to GSettings' change notifications */
store->priv->mail_settings = g_settings_new ("org.gnome.evolution.mail");
- g_signal_connect (store->priv->mail_settings, "changed::labels",
- G_CALLBACK (labels_settings_changed_cb), store);
+ g_signal_connect (
+ store->priv->mail_settings, "changed::labels",
+ G_CALLBACK (labels_settings_changed_cb), store);
labels_settings_changed_cb (store->priv->mail_settings, "labels", store);
/* Connect to ListStore change notifications */
- g_signal_connect (store, "row-inserted",
- G_CALLBACK (labels_model_changed_cb), store);
- g_signal_connect (store, "row-changed",
- G_CALLBACK (labels_model_changed_cb), store);
- g_signal_connect (store, "row-deleted",
- G_CALLBACK (labels_model_changed_cb), store);
- g_signal_connect (store, "rows-reordered",
- G_CALLBACK (labels_model_changed_cb), store);
+ g_signal_connect (
+ store, "row-inserted",
+ G_CALLBACK (labels_model_changed_cb), store);
+ g_signal_connect (
+ store, "row-changed",
+ G_CALLBACK (labels_model_changed_cb), store);
+ g_signal_connect (
+ store, "row-deleted",
+ G_CALLBACK (labels_model_changed_cb), store);
+ g_signal_connect (
+ store, "rows-reordered",
+ G_CALLBACK (labels_model_changed_cb), store);
mail_label_list_store_ensure_defaults (store);
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 4f863af242..1169b1d461 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -1321,7 +1321,9 @@ e_mail_session_init (EMailSession *session)
camel_session_set_check_junk (
CAMEL_SESSION (session), g_settings_get_boolean (
settings, "junk-check-incoming"));
- g_signal_connect (settings, "changed", G_CALLBACK (mail_session_check_junk_notify), session);
+ g_signal_connect (
+ settings, "changed",
+ G_CALLBACK (mail_session_check_junk_notify), session);
mail_config_reload_junk_headers (session);
diff --git a/mail/em-utils.c b/mail/em-utils.c
index a3be92d4c0..c15f8b67b5 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -165,9 +165,10 @@ em_utils_prompt_user (GtkWindow *parent,
button = gtk_dialog_run (GTK_DIALOG (dialog));
if (promptkey)
- g_settings_set_boolean (settings, promptkey,
- !gtk_toggle_button_get_active (
- GTK_TOGGLE_BUTTON (check)));
+ g_settings_set_boolean (
+ settings, promptkey,
+ !gtk_toggle_button_get_active (
+ GTK_TOGGLE_BUTTON (check)));
gtk_widget_destroy (dialog);
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 1e628035a1..89c26eaaa5 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -253,34 +253,41 @@ mail_config_init (EMailSession *session)
/* Composer Configuration */
settings_outlook_filenames_changed (mail_settings, NULL, NULL);
- g_signal_connect (mail_settings, "changed::composer-outlook-filenames",
- G_CALLBACK (settings_outlook_filenames_changed), NULL);
+ g_signal_connect (
+ mail_settings, "changed::composer-outlook-filenames",
+ G_CALLBACK (settings_outlook_filenames_changed), NULL);
/* Display Configuration */
- g_signal_connect (mail_settings, "changed::address-compress",
- G_CALLBACK (settings_bool_value_changed), &config->address_compress);
+ g_signal_connect (
+ mail_settings, "changed::address-compress",
+ G_CALLBACK (settings_bool_value_changed), &config->address_compress);
config->address_compress = g_settings_get_boolean (mail_settings, "address-compress");
- g_signal_connect (mail_settings, "changed::address-count",
- G_CALLBACK (settings_int_value_changed), &config->address_count);
+ g_signal_connect (
+ mail_settings, "changed::address-count",
+ G_CALLBACK (settings_int_value_changed), &config->address_count);
config->address_count = g_settings_get_int (mail_settings, "address-count");
/* Junk Configuration */
- g_signal_connect (mail_settings, "changed::junk-check-custom-header",
- G_CALLBACK (settings_jh_check_changed), session);
+ g_signal_connect (
+ mail_settings, "changed::junk-check-custom-header",
+ G_CALLBACK (settings_jh_check_changed), session);
config->jh_check = g_settings_get_boolean (mail_settings, "junk-check-custom-header");
- g_signal_connect (mail_settings, "changed::junk-custom-header",
- G_CALLBACK (settings_jh_headers_changed), session);
+ g_signal_connect (
+ mail_settings, "changed::junk-custom-header",
+ G_CALLBACK (settings_jh_headers_changed), session);
- g_signal_connect (mail_settings, "changed::junk-lookup-addressbook",
- G_CALLBACK (settings_bool_value_changed), &config->book_lookup);
+ g_signal_connect (
+ mail_settings, "changed::junk-lookup-addressbook",
+ G_CALLBACK (settings_bool_value_changed), &config->book_lookup);
config->book_lookup = g_settings_get_boolean (mail_settings, "junk-lookup-addressbook");
- g_signal_connect (mail_settings, "changed::junk-lookup-addressbook-local-only",
- G_CALLBACK (settings_bool_value_changed), &config->book_lookup_local_only);
+ g_signal_connect (
+ mail_settings, "changed::junk-lookup-addressbook-local-only",
+ G_CALLBACK (settings_bool_value_changed), &config->book_lookup_local_only);
config->book_lookup_local_only = g_settings_get_boolean (mail_settings, "junk-lookup-addressbook-local-only");
settings_jh_check_changed (mail_settings, NULL, session);
diff --git a/modules/bogofilter/evolution-bogofilter.c b/modules/bogofilter/evolution-bogofilter.c
index 4521b7a6a1..0b6340296a 100644
--- a/modules/bogofilter/evolution-bogofilter.c
+++ b/modules/bogofilter/evolution-bogofilter.c
@@ -507,7 +507,10 @@ e_bogofilter_init (EBogofilter *extension)
GSettings *settings;
settings = g_settings_new ("org.gnome.evolution.eplugin.bogo-junk");
- g_settings_bind (settings, "utf8-for-spam-filter", G_OBJECT (extension), "convert-to-unicode", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ settings, "utf8-for-spam-filter",
+ G_OBJECT (extension), "convert-to-unicode",
+ G_SETTINGS_BIND_DEFAULT);
g_object_unref (settings);
}
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c
index 625969871f..3e753904f3 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -902,9 +902,9 @@ GSList *
e_cal_shell_backend_get_selected_calendars (ECalShellBackend *cal_shell_backend)
{
GSettings *settings;
- char **strv;
- gint i;
GSList *selected_calendars = NULL;
+ char **strv;
+ gint ii;
g_return_val_if_fail (
E_IS_CAL_SHELL_BACKEND (cal_shell_backend), NULL);
@@ -914,8 +914,8 @@ e_cal_shell_backend_get_selected_calendars (ECalShellBackend *cal_shell_backend)
g_object_unref (settings);
if (strv != NULL) {
- for (i = 0; strv[i] != NULL; i++)
- selected_calendars = g_slist_append (selected_calendars, g_strdup (strv[i]));
+ for (ii = 0; strv[ii] != NULL; ii++)
+ selected_calendars = g_slist_append (selected_calendars, g_strdup (strv[ii]));
g_strfreev (strv);
}
@@ -928,13 +928,13 @@ e_cal_shell_backend_set_selected_calendars (ECalShellBackend *cal_shell_backend,
GSList *selected_calendars)
{
GSettings *settings;
- GSList *l;
+ GSList *link;
GPtrArray *array = g_ptr_array_new ();
g_return_if_fail (E_IS_CAL_SHELL_BACKEND (cal_shell_backend));
- for (l = selected_calendars; l != NULL; l = l->next)
- g_ptr_array_add (array, l->data);
+ for (link = selected_calendars; link != NULL; link = link->next)
+ g_ptr_array_add (array, link->data);
g_ptr_array_add (array, NULL);
settings = g_settings_new ("org.gnome.evolution.calendar");
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c
index abbfdf7e0f..05b76cdd88 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -646,9 +646,9 @@ GSList *
e_memo_shell_backend_get_selected_memo_lists (EMemoShellBackend *memo_shell_backend)
{
GSettings *settings;
- char **strv;
- gint i;
GSList *selected_memo_lists = NULL;
+ char **strv;
+ gint ii;
g_return_val_if_fail (
E_IS_MEMO_SHELL_BACKEND (memo_shell_backend), NULL);
@@ -659,8 +659,8 @@ e_memo_shell_backend_get_selected_memo_lists (EMemoShellBackend *memo_shell_back
if (strv != NULL) {
- for (i = 0; strv[i] != NULL; i++)
- selected_memo_lists = g_slist_append (selected_memo_lists, g_strdup (strv[i]));
+ for (ii = 0; strv[ii] != NULL; ii++)
+ selected_memo_lists = g_slist_append (selected_memo_lists, g_strdup (strv[ii]));
g_strfreev (strv);
}
@@ -673,13 +673,13 @@ e_memo_shell_backend_set_selected_memo_lists (EMemoShellBackend *memo_shell_back
GSList *selected_memo_lists)
{
GSettings *settings;
- GSList *l;
+ GSList *link;
GPtrArray *array = g_ptr_array_new ();
g_return_if_fail (E_IS_MEMO_SHELL_BACKEND (memo_shell_backend));
- for (l = selected_memo_lists; l != NULL; l = l->next)
- g_ptr_array_add (array, l->data);
+ for (link = selected_memo_lists; link != NULL; link = link->next)
+ g_ptr_array_add (array, link->data);
g_ptr_array_add (array, NULL);
settings = g_settings_new ("org.gnome.evolution.calendar");
diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c
index 39dcf4e726..68545a287e 100644
--- a/modules/calendar/e-task-shell-backend.c
+++ b/modules/calendar/e-task-shell-backend.c
@@ -651,9 +651,9 @@ GSList *
e_task_shell_backend_get_selected_task_lists (ETaskShellBackend *task_shell_backend)
{
GSettings *settings;
- char **strv;
- gint i;
GSList *selected_task_lists = NULL;
+ char **strv;
+ gint ii;
g_return_val_if_fail (
E_IS_TASK_SHELL_BACKEND (task_shell_backend), NULL);
@@ -663,8 +663,8 @@ e_task_shell_backend_get_selected_task_lists (ETaskShellBackend *task_shell_back
g_object_unref (G_OBJECT (settings));
if (strv != NULL) {
- for (i = 0; strv[i] != NULL; i++)
- selected_task_lists = g_slist_append (selected_task_lists, g_strdup (strv[i]));
+ for (ii = 0; strv[ii] != NULL; ii++)
+ selected_task_lists = g_slist_append (selected_task_lists, g_strdup (strv[ii]));
g_strfreev (strv);
}
@@ -677,13 +677,13 @@ e_task_shell_backend_set_selected_task_lists (ETaskShellBackend *task_shell_back
GSList *selected_task_lists)
{
GSettings *settings;
- GSList *l;
+ GSList *link;
GPtrArray *array = g_ptr_array_new ();
g_return_if_fail (E_IS_TASK_SHELL_BACKEND (task_shell_backend));
- for (l = selected_task_lists; l != NULL; l = l->next)
- g_ptr_array_add (array, l->data);
+ for (link = selected_task_lists; link != NULL; link = link->next)
+ g_ptr_array_add (array, link->data);
g_ptr_array_add (array, NULL);
settings = g_settings_new ("org.gnome.evolution.calendar");
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index 4dabd0dacf..da715f3a7d 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -135,15 +135,15 @@ jh_tree_refill (EMMailerPrefs *prefs)
{
GtkListStore *store = prefs->junk_header_list_store;
gchar **strv;
- gint i;
+ gint ii;
strv = g_settings_get_strv (prefs->settings, "junk-custom-header");
gtk_list_store_clear (store);
- for (i = 0; strv[i] != NULL; i++) {
+ for (ii = 0; strv[ii] != NULL; ii++) {
GtkTreeIter iter;
- gchar **tokens = g_strsplit (strv[i], "=", 2);
+ gchar **tokens = g_strsplit (strv[ii], "=", 2);
gtk_list_store_append (store, &iter);
gtk_list_store_set (
@@ -200,15 +200,15 @@ jh_add_cb (GtkWidget *widget,
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
gchar **strv;
GPtrArray *array;
- gint i;
+ gint ii;
name = gtk_entry_get_text (GTK_ENTRY (e_builder_get_widget (builder, "junk-header-name")));
value = gtk_entry_get_text (GTK_ENTRY (e_builder_get_widget (builder, "junk-header-content")));
strv = g_settings_get_strv (prefs->settings, "junk-custom-header");
array = g_ptr_array_new ();
- for (i = 0; strv[i] != NULL; i++)
- g_ptr_array_add (array, strv[i]);
+ for (ii = 0; strv[ii] != NULL; ii++)
+ g_ptr_array_add (array, strv[ii]);
tok = g_strdup_printf ("%s=%s", name, value);
g_ptr_array_add (array, tok);
g_ptr_array_add (array, NULL);
@@ -237,17 +237,17 @@ jh_remove_cb (GtkWidget *widget,
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (prefs->junk_header_tree));
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
+ GPtrArray *array = g_ptr_array_new ();
gchar *name = NULL, *value = NULL;
gchar **strv;
- GPtrArray *array = g_ptr_array_new ();
- gint i;
+ gint ii;
strv = g_settings_get_strv (prefs->settings, "junk-custom-header");
gtk_tree_model_get (model, &iter, JH_LIST_COLUMN_NAME, &name, JH_LIST_COLUMN_VALUE, &value, -1);
- for (i = 0; strv[i] != NULL; i++) {
+ for (ii = 0; strv[ii] != NULL; ii++) {
gchar *test;
gint len = strlen (name);
- test = strncmp (strv[i], name, len) == 0 ? (gchar *) strv[i] + len : NULL;
+ test = strncmp (strv[ii], name, len) == 0 ? (gchar *) strv[ii] + len : NULL;
if (test) {
test++;
@@ -255,7 +255,7 @@ jh_remove_cb (GtkWidget *widget,
continue;
}
- g_ptr_array_add (array, strv[i]);
+ g_ptr_array_add (array, strv[ii]);
}
g_ptr_array_add (array, NULL);
diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c
index 0fd8d105e1..11d8eca3ad 100644
--- a/shell/e-shell-settings.c
+++ b/shell/e-shell-settings.c
@@ -365,7 +365,9 @@ e_shell_settings_install_property_for_key (const gchar *property_name,
shell_settings = E_SHELL_SETTINGS (iter->data);
- g_settings_bind (settings, key, G_OBJECT (shell_settings), property_name, G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ settings, key, G_OBJECT (shell_settings),
+ property_name, G_SETTINGS_BIND_DEFAULT);
}
for (iter = instances; iter != NULL; iter = next) {
diff --git a/shell/e-shell.c b/shell/e-shell.c
index ccc57f825c..cc1591337f 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -46,6 +46,10 @@
#include "e-shell-window.h"
#include "e-shell-utils.h"
+#define E_SHELL_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL, EShellPrivate))
+
struct _EShellPrivate {
GQueue alerts;
EShellSettings *settings;
@@ -693,7 +697,7 @@ shell_dispose (GObject *object)
EShellPrivate *priv;
EAlert *alert;
- priv = E_SHELL (object)->priv;
+ priv = E_SHELL_GET_PRIVATE (object);
while ((alert = g_queue_pop_head (&priv->alerts)) != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -747,7 +751,7 @@ shell_finalize (GObject *object)
{
EShellPrivate *priv;
- priv = E_SHELL (object)->priv;
+ priv = E_SHELL_GET_PRIVATE (object);
g_hash_table_destroy (priv->backends_by_name);
g_hash_table_destroy (priv->backends_by_scheme);
@@ -1162,8 +1166,7 @@ e_shell_init (EShell *shell)
GtkIconTheme *icon_theme;
EggSMClient *sm_client;
- shell->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell, E_TYPE_SHELL, EShellPrivate);
+ shell->priv = E_SHELL_GET_PRIVATE (shell);
backends_by_name = g_hash_table_new (g_str_hash, g_str_equal);
backends_by_scheme = g_hash_table_new (g_str_hash, g_str_equal);