aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c3
-rw-r--r--calendar/gui/alarm-notify/alarm.c1
-rw-r--r--calendar/gui/alarm-notify/alarm.h1
-rw-r--r--calendar/gui/calendar-config.c2
-rw-r--r--calendar/gui/calendar-view-factory.c1
-rw-r--r--calendar/gui/calendar-view.c1
-rw-r--r--calendar/gui/comp-util.c1
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c1
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c1
-rw-r--r--calendar/gui/dialogs/cancel-comp.c1
-rw-r--r--calendar/gui/dialogs/changed-comp.c1
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c1
-rw-r--r--calendar/gui/dialogs/delete-comp.c1
-rw-r--r--calendar/gui/dialogs/delete-error.c1
-rw-r--r--calendar/gui/dialogs/recur-comp.c1
-rw-r--r--calendar/gui/dialogs/send-comp.c1
-rw-r--r--calendar/gui/e-day-view-time-item.c2
-rw-r--r--calendar/gui/itip-utils.c10
-rw-r--r--composer/e-composer-private.h24
-rw-r--r--composer/e-msg-composer.c30
-rw-r--r--e-util/e-datetime-format.c4
-rw-r--r--e-util/e-util.c2
-rw-r--r--libgnomecanvas/gnome-canvas-pixbuf.c1
-rw-r--r--libgnomecanvas/gnome-canvas-text.c1
-rw-r--r--mail/e-mail-label-list-store.c30
-rw-r--r--mail/e-mail-session.c8
-rw-r--r--mail/em-account-editor.c63
-rw-r--r--mail/em-config.c1
-rw-r--r--mail/em-subscription-editor.c45
-rw-r--r--mail/mail-config.c20
-rw-r--r--modules/addressbook/e-book-shell-view-private.c4
-rw-r--r--modules/calendar/e-cal-shell-backend.c2
-rw-r--r--modules/calendar/e-memo-shell-backend.c3
-rw-r--r--modules/calendar/e-task-shell-backend.c4
-rw-r--r--modules/online-accounts/e-online-accounts-google.c2
-rw-r--r--modules/spamassassin/evolution-spamassassin.c4
-rw-r--r--plugins/mail-to-task/mail-to-task.c8
-rw-r--r--plugins/mark-all-read/mark-all-read.c1
-rw-r--r--plugins/pst-import/pst-importer.c9
-rw-r--r--plugins/templates/templates.c2
-rw-r--r--shell/e-shell-backend.c11
-rw-r--r--shell/e-shell-searchbar.c9
-rw-r--r--shell/e-shell-settings.c17
-rw-r--r--shell/e-shell-sidebar.c17
-rw-r--r--shell/e-shell-switcher.c19
-rw-r--r--shell/e-shell-taskbar.c11
-rw-r--r--shell/e-shell-view.c11
-rw-r--r--shell/e-shell-window-private.h4
-rw-r--r--shell/e-shell-window.c3
49 files changed, 211 insertions, 190 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index 4f04974b33..eeca88e1b6 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -106,7 +106,8 @@ process_removal_in_hash (const gchar *uri,
}
static gint
-find_slist_source_uri_cb (gconstpointer a, gconstpointer b)
+find_slist_source_uri_cb (gconstpointer a,
+ gconstpointer b)
{
ESource *asource = (ESource *) a;
const gchar *buri = b;
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
index a05498532b..2797d44b0a 100644
--- a/calendar/gui/alarm-notify/alarm.c
+++ b/calendar/gui/alarm-notify/alarm.c
@@ -36,7 +36,6 @@
#include "alarm.h"
#include "config-data.h"
-
/* Our glib timeout */
static guint timeout_id;
diff --git a/calendar/gui/alarm-notify/alarm.h b/calendar/gui/alarm-notify/alarm.h
index 54a6e4c720..d6e9ff4a4e 100644
--- a/calendar/gui/alarm-notify/alarm.h
+++ b/calendar/gui/alarm-notify/alarm.h
@@ -29,7 +29,6 @@
#include <time.h>
#include <glib.h>
-
typedef void (* AlarmFunction) (gpointer alarm_id, time_t trigger, gpointer data);
typedef void (* AlarmDestroyNotify) (gpointer alarm_id, gpointer data);
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 15df6920ae..39431549dd 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -62,7 +62,7 @@ calendar_config_init (void)
void
calendar_config_remove_notification (CalendarConfigChangedFunc func,
- gpointer data)
+ gpointer data)
{
calendar_config_init ();
diff --git a/calendar/gui/calendar-view-factory.c b/calendar/gui/calendar-view-factory.c
index 4c92d6d8fc..8342475620 100644
--- a/calendar/gui/calendar-view-factory.c
+++ b/calendar/gui/calendar-view-factory.c
@@ -30,7 +30,6 @@
#include "calendar-view-factory.h"
#include "calendar-view.h"
-
/* Private part of the CalendarViewFactory structure */
struct _CalendarViewFactoryPrivate {
/* Type of views created by this factory */
diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c
index d238daf3df..6f9f2951f3 100644
--- a/calendar/gui/calendar-view.c
+++ b/calendar/gui/calendar-view.c
@@ -28,7 +28,6 @@
#include "calendar-view.h"
-
/* Private part of the CalendarView structure */
struct _CalendarViewPrivate {
/* Type of the view */
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index 8bb5500f23..f768335c3c 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -39,7 +39,6 @@
#include "shell/e-shell-window.h"
#include "shell/e-shell-view.h"
-
/**
* cal_comp_util_add_exdate:
* @comp: A calendar component object.
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index 4576f3df6f..1c76c79d83 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -45,7 +45,6 @@
#include "comp-editor-util.h"
#include "alarm-dialog.h"
-
typedef struct {
GtkBuilder *builder;
diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c
index 4fb5884026..065e865f92 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.c
+++ b/calendar/gui/dialogs/alarm-list-dialog.c
@@ -42,7 +42,6 @@
#include "alarm-dialog.h"
#include "alarm-list-dialog.h"
-
typedef struct {
GtkBuilder *builder;
diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c
index c5caa9371d..1bb37acf4b 100644
--- a/calendar/gui/dialogs/cancel-comp.c
+++ b/calendar/gui/dialogs/cancel-comp.c
@@ -31,7 +31,6 @@
#include "e-util/e-alert-dialog.h"
#include "cancel-comp.h"
-
/* is_past_event:
*
* returns TRUE if @comp is in the past, FALSE otherwise.
diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c
index bc25188f5d..f8a98c9908 100644
--- a/calendar/gui/dialogs/changed-comp.c
+++ b/calendar/gui/dialogs/changed-comp.c
@@ -29,7 +29,6 @@
#include <glib/gi18n.h>
#include "changed-comp.h"
-
/**
* changed_component_dialog:
* @parent: Parent window for the dialog.
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c
index 2c087bb2f6..58c649b7ee 100644
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ b/calendar/gui/dialogs/comp-editor-util.c
@@ -37,7 +37,6 @@
#include <shell/e-shell.h>
#include "comp-editor-util.h"
-
/**
* comp_editor_dates:
* @dates: A structure to be filled out with dates of a component
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
index 44c133afbe..87330ed0dd 100644
--- a/calendar/gui/dialogs/delete-comp.c
+++ b/calendar/gui/dialogs/delete-comp.c
@@ -30,7 +30,6 @@
#include "e-util/e-alert-dialog.h"
#include "delete-comp.h"
-
/**
* delete_component_dialog:
* @comp: A calendar component if a single component is to be deleted, or NULL
diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c
index a68fed8e1d..7dc53253fa 100644
--- a/calendar/gui/dialogs/delete-error.c
+++ b/calendar/gui/dialogs/delete-error.c
@@ -30,7 +30,6 @@
#include <glib/gi18n.h>
#include "delete-error.h"
-
/**
* delete_error_dialog:
*
diff --git a/calendar/gui/dialogs/recur-comp.c b/calendar/gui/dialogs/recur-comp.c
index 9652553ee3..434d552a40 100644
--- a/calendar/gui/dialogs/recur-comp.c
+++ b/calendar/gui/dialogs/recur-comp.c
@@ -29,7 +29,6 @@
#include <glib/gi18n.h>
#include "recur-comp.h"
-
gboolean
recur_component_dialog (ECalClient *client,
ECalComponent *comp,
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
index 524f4c8097..4e5e1668c1 100644
--- a/calendar/gui/dialogs/send-comp.c
+++ b/calendar/gui/dialogs/send-comp.c
@@ -30,7 +30,6 @@
#include "e-util/e-alert-dialog.h"
#include "send-comp.h"
-
static gboolean
component_has_new_attendees (ECalComponent *comp)
{
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index c901b82013..9b61f11649 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -729,7 +729,7 @@ e_day_view_time_item_event (GnomeCanvasItem *item,
static void
edvti_second_zone_changed_cb (GSettings *settings,
- const gchar *key,
+ const gchar *key,
gpointer user_data)
{
EDayViewTimeItem *time_item = user_data;
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 187757cece..4b2a8d262d 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -577,11 +577,11 @@ comp_to_list (ECalComponentItipMethod method,
ECalComponentAttendee *att = l->data;
/* Bugfix: 688711 - Varadhan
- Resource is also considered as a "attendee". If the respective backend
- is able to successfully book resources automagically, it will appear
- in the users list and thereby won't get added to the list of destinations
- to send the meeting invite, otherwise, as a safety measure, a meeting
- invite will be sent to the resources as well. */
+ * Resource is also considered as a "attendee". If the respective backend
+ * is able to successfully book resources automagically, it will appear
+ * in the users list and thereby won't get added to the list of destinations
+ * to send the meeting invite, otherwise, as a safety measure, a meeting
+ * invite will be sent to the resources as well. */
if (att->cutype != ICAL_CUTYPE_INDIVIDUAL &&
att->cutype != ICAL_CUTYPE_GROUP &&
att->cutype != ICAL_CUTYPE_RESOURCE)
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 040f8d8d10..695510949a 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -58,30 +58,6 @@
#include <X11/XF86keysym.h>
#endif
-/* Mail configuration keys */
-#define MAIL_GCONF_PREFIX \
- "/apps/evolution/mail"
-#define MAIL_GCONF_CHARSET_KEY \
- MAIL_GCONF_PREFIX "/format/charset"
-
-/* Composer configuration keys */
-#define COMPOSER_GCONF_PREFIX \
- MAIL_GCONF_PREFIX "/composer"
-#define COMPOSER_GCONF_INLINE_SPELLING_KEY \
- COMPOSER_GCONF_PREFIX "/inline_spelling"
-#define COMPOSER_GCONF_MAGIC_LINKS_KEY \
- COMPOSER_GCONF_PREFIX "/magic_links"
-#define COMPOSER_GCONF_MAGIC_SMILEYS_KEY \
- COMPOSER_GCONF_PREFIX "/magic_smileys"
-#define COMPOSER_GCONF_REQUEST_RECEIPT_KEY \
- COMPOSER_GCONF_PREFIX "/request_receipt"
-#define COMPOSER_GCONF_TOP_SIGNATURE_KEY \
- COMPOSER_GCONF_PREFIX "/top_signature"
-#define COMPOSER_GCONF_SEND_HTML_KEY \
- COMPOSER_GCONF_PREFIX "/send_html"
-#define COMPOSER_GCONF_WINDOW_PREFIX \
- COMPOSER_GCONF_PREFIX "/window"
-
/* Shorthand, requires a variable named "composer". */
#define ACTION(name) (E_COMPOSER_ACTION_##name (composer))
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index f3b4ddfa21..b7aaf883a5 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -128,8 +128,6 @@ static void handle_multipart_signed (EMsgComposer *composer,
static void e_msg_composer_alert_sink_init (EAlertSinkInterface *interface);
-gboolean check_blacklisted_file (gchar *filename);
-
G_DEFINE_TYPE_WITH_CODE (
EMsgComposer,
e_msg_composer,
@@ -4006,25 +4004,24 @@ merge_always_cc_and_bcc (EComposerHeaderTable *table,
e_destination_freev (addrv);
}
-static const gchar *blacklisted_files [] = {".", "etc", ".."};
+static const gchar *blacklisted_files [] = { ".", "etc", ".." };
-gboolean check_blacklisted_file (gchar *filename)
+static gboolean
+check_blacklisted_file (gchar *filename)
{
gboolean blacklisted = FALSE;
- gint i,j,len;
+ guint ii, jj, length;
gchar **filename_part;
filename_part = g_strsplit (filename, G_DIR_SEPARATOR_S, -1);
- len = g_strv_length(filename_part);
- for(i = 0; !blacklisted && i < G_N_ELEMENTS(blacklisted_files); i++)
- {
- for (j = 0; !blacklisted && j < len;j++)
- if (g_str_has_prefix (filename_part[j], blacklisted_files[i]))
+ length = g_strv_length (filename_part);
+ for (ii = 0; !blacklisted && ii < G_N_ELEMENTS (blacklisted_files); ii++) {
+ for (jj = 0; !blacklisted && jj < length; jj++)
+ if (g_str_has_prefix (filename_part[jj], blacklisted_files[ii]))
blacklisted = TRUE;
}
+ g_strfreev (filename_part);
- g_strfreev(filename_part);
-
return blacklisted;
}
@@ -4119,14 +4116,13 @@ handle_mailto (EMsgComposer *composer,
} else if (!g_ascii_strcasecmp (header, "attach") ||
!g_ascii_strcasecmp (header, "attachment")) {
EAttachment *attachment;
- gboolean check = FALSE;
camel_url_decode (content);
- check = check_blacklisted_file(content);
- if(check)
+ if (check_blacklisted_file (content))
e_alert_submit (
- E_ALERT_SINK (composer),
- "mail:blacklisted-file", content, NULL);
+ E_ALERT_SINK (composer),
+ "mail:blacklisted-file",
+ content, NULL);
if (g_ascii_strncasecmp (content, "file:", 5) == 0)
attachment = e_attachment_new_for_uri (content);
else
diff --git a/e-util/e-datetime-format.c b/e-util/e-datetime-format.c
index 877b170218..a1fb490fdd 100644
--- a/e-util/e-datetime-format.c
+++ b/e-util/e-datetime-format.c
@@ -664,7 +664,9 @@ e_datetime_format_format_tm (const gchar *component,
}
gboolean
-e_datetime_format_includes_day_name (const gchar *component, const gchar *part, DTFormatKind kind)
+e_datetime_format_includes_day_name (const gchar *component,
+ const gchar *part,
+ DTFormatKind kind)
{
gchar *key;
const gchar *fmt;
diff --git a/e-util/e-util.c b/e-util/e-util.c
index d41f43630e..0db804a618 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -1394,7 +1394,7 @@ e_binding_transform_color_to_string (GBinding *binding,
g_value_set_string (target_value, "");
} else {
/* encode color manually, because css styles expect colors in #rrggbb,
- not in #rrrrggggbbbb, which is a result of gdk_color_to_string()
+ * not in #rrrrggggbbbb, which is a result of gdk_color_to_string()
*/
string = g_strdup_printf ("#%02x%02x%02x",
(gint) color->red * 256 / 65536,
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c
index 71c7d95906..b9ece1f504 100644
--- a/libgnomecanvas/gnome-canvas-pixbuf.c
+++ b/libgnomecanvas/gnome-canvas-pixbuf.c
@@ -67,7 +67,6 @@ static void gnome_canvas_pixbuf_bounds (GnomeCanvasItem *item,
G_DEFINE_TYPE (GnomeCanvasPixbuf, gnome_canvas_pixbuf, GNOME_TYPE_CANVAS_ITEM)
-
/* Class initialization function for the pixbuf canvas item */
static void
gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class)
diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c
index 8f921a0d3c..d14effacca 100644
--- a/libgnomecanvas/gnome-canvas-text.c
+++ b/libgnomecanvas/gnome-canvas-text.c
@@ -46,7 +46,6 @@
#include "gnome-canvas-util.h"
#include "gnome-canvas-i18n.h"
-
/* Object argument IDs */
enum {
PROP_0,
diff --git a/mail/e-mail-label-list-store.c b/mail/e-mail-label-list-store.c
index 7e8c6f221a..bc9cb5ab3e 100644
--- a/mail/e-mail-label-list-store.c
+++ b/mail/e-mail-label-list-store.c
@@ -167,32 +167,43 @@ mail_label_list_store_get_stock_id (EMailLabelListStore *store,
}
static void
-mail_label_list_store_finalize (GObject *object)
+mail_label_list_store_dispose (GObject *object)
{
EMailLabelListStorePrivate *priv;
priv = E_MAIL_LABEL_LIST_STORE_GET_PRIVATE (object);
- g_hash_table_destroy (priv->tag_index);
-
if (priv->mail_settings != NULL) {
g_object_unref (priv->mail_settings);
priv->mail_settings = NULL;
}
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_mail_label_list_store_parent_class)->
+ dispose (object);
+}
+
+static void
+mail_label_list_store_finalize (GObject *object)
+{
+ EMailLabelListStorePrivate *priv;
+
+ priv = E_MAIL_LABEL_LIST_STORE_GET_PRIVATE (object);
+
+ g_hash_table_destroy (priv->tag_index);
+
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (e_mail_label_list_store_parent_class)->
finalize (object);
}
-
static void labels_settings_changed_cb (GSettings *settings, const gchar *key, gpointer user_data);
static void
labels_model_changed_cb (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer user_data)
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data)
{
EMailLabelListStore *store;
GPtrArray *array;
@@ -228,8 +239,8 @@ labels_model_changed_cb (GtkTreeModel *model,
static void
labels_settings_changed_cb (GSettings *settings,
- const gchar *key,
- gpointer user_data)
+ const gchar *key,
+ gpointer user_data)
{
EMailLabelListStore *store;
gchar **strv;
@@ -326,6 +337,7 @@ e_mail_label_list_store_class_init (EMailLabelListStoreClass *class)
g_type_class_add_private (class, sizeof (EMailLabelListStorePrivate));
object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = mail_label_list_store_dispose;
object_class->finalize = mail_label_list_store_finalize;
object_class->constructed = mail_label_list_store_constructed;
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 1169b1d461..03f4961206 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -483,7 +483,7 @@ mail_session_make_key (CamelService *service,
static void
mail_session_check_junk_notify (GSettings *settings,
- const gchar *key,
+ const gchar *key,
CamelSession *session)
{
if (strcmp (key, "junk-check-incoming") == 0)
@@ -1089,9 +1089,9 @@ mail_session_forward_to (CamelSession *session,
static void
mail_session_get_socks_proxy (CamelSession *session,
- const gchar *for_host,
- gchar **host_ret,
- gint *port_ret)
+ const gchar *for_host,
+ gchar **host_ret,
+ gint *port_ret)
{
EMailSession *mail_session;
gchar *uri;
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 2036025ce3..6bd96ef299 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -3786,8 +3786,12 @@ emae_defaults_page (EConfig *ec,
priv->trash_folder_button, "sensitive",
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "use-real-trash-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "use-real-trash-path");
+ else
+ pspec = NULL;
if (pspec != NULL)
g_object_bind_property (
@@ -3796,12 +3800,20 @@ emae_defaults_page (EConfig *ec,
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "real-trash-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "real-trash-path");
+ else
+ pspec = NULL;
if (pspec != NULL) {
- set_real_folder_path (priv->trash_folder_button, settings, "real-trash-path", account);
- g_signal_connect (priv->trash_folder_button, "notify::folder-uri", G_CALLBACK (update_real_folder_cb), emae);
+ set_real_folder_path (
+ priv->trash_folder_button,
+ settings, "real-trash-path", account);
+ g_signal_connect (
+ priv->trash_folder_button, "notify::folder-uri",
+ G_CALLBACK (update_real_folder_cb), emae);
}
flags = CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER;
@@ -3832,8 +3844,12 @@ emae_defaults_page (EConfig *ec,
priv->junk_folder_button, "sensitive",
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "use-real-junk-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "use-real-junk-path");
+ else
+ pspec = NULL;
if (pspec != NULL)
g_object_bind_property (
@@ -3842,12 +3858,20 @@ emae_defaults_page (EConfig *ec,
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "real-junk-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "real-junk-path");
+ else
+ pspec = NULL;
if (pspec != NULL) {
- set_real_folder_path (priv->junk_folder_button, settings, "real-junk-path", account);
- g_signal_connect (priv->junk_folder_button, "notify::folder-uri", G_CALLBACK (update_real_folder_cb), emae);
+ set_real_folder_path (
+ priv->junk_folder_button,
+ settings, "real-junk-path", account);
+ g_signal_connect (
+ priv->junk_folder_button, "notify::folder-uri",
+ G_CALLBACK (update_real_folder_cb), emae);
}
flags = CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER;
@@ -3861,7 +3885,9 @@ emae_defaults_page (EConfig *ec,
/* Special Folders "Reset Defaults" button */
priv->restore_folders_button = (GtkButton *)e_builder_get_widget (builder, "default_folders_button");
- g_signal_connect (priv->restore_folders_button, "clicked", G_CALLBACK (default_folders_clicked), emae);
+ g_signal_connect (
+ priv->restore_folders_button, "clicked",
+ G_CALLBACK (default_folders_clicked), emae);
/* Always Cc/Bcc */
emae_account_toggle (emae, "always_cc", E_ACCOUNT_CC_ALWAYS, builder);
@@ -3869,12 +3895,13 @@ emae_defaults_page (EConfig *ec,
emae_account_toggle (emae, "always_bcc", E_ACCOUNT_BCC_ALWAYS, builder);
emae_account_entry (emae, "bcc_addrs", E_ACCOUNT_BCC_ADDRS, builder);
- gtk_widget_set_sensitive ( (GtkWidget *) priv->sent_folder_button,
- (provider ? !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER): TRUE)
- );
+ gtk_widget_set_sensitive (
+ GTK_WIDGET (priv->sent_folder_button),
+ (provider ? !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER) : TRUE));
- gtk_widget_set_sensitive ((GtkWidget *) priv->restore_folders_button,
- (provider && !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)));
+ gtk_widget_set_sensitive (
+ GTK_WIDGET (priv->restore_folders_button),
+ (provider && !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)));
/* Receipt policy */
emae_setup_receipt_policy (emae, builder);
diff --git a/mail/em-config.c b/mail/em-config.c
index 6a133f1c56..352e16b4b1 100644
--- a/mail/em-config.c
+++ b/mail/em-config.c
@@ -121,7 +121,6 @@ em_config_class_init (EMConfigClass *class)
{
EConfigClass *config_class;
-
config_class = E_CONFIG_CLASS (class);
config_class->set_target = em_config_set_target;
config_class->target_free = em_config_target_free;
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c
index d92713f8be..1d201f5d40 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -374,10 +374,9 @@ subscription_editor_subscribe_folder_done (CamelSubscribable *subscribable,
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
}
-
static void
subscription_editor_subscribe_many (EMSubscriptionEditor *editor,
- GSList *async_datas)
+ GSList *async_datas)
{
AsyncData *async_data;
AsyncContext *context;
@@ -499,10 +498,9 @@ subscription_editor_unsubscribe_folder_done (CamelSubscribable *subscribable,
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
}
-
static void
subscription_editor_unsubscribe_many (EMSubscriptionEditor *editor,
- GSList *async_datas)
+ GSList *async_datas)
{
AsyncData *async_data;
AsyncContext *context;
@@ -552,9 +550,9 @@ subscription_editor_unsubscribe_many (EMSubscriptionEditor *editor,
static GtkWidget *
subscription_editor_create_menu_item (const gchar *label,
- gboolean sensitive,
- GCallback activate_cb,
- EMSubscriptionEditor *editor)
+ gboolean sensitive,
+ GCallback activate_cb,
+ EMSubscriptionEditor *editor)
{
GtkWidget *item;
@@ -570,10 +568,10 @@ subscription_editor_create_menu_item (const gchar *label,
static void
position_below_widget_cb (GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- gpointer under_widget)
+ gint *x,
+ gint *y,
+ gboolean *push_in,
+ gpointer under_widget)
{
GtkRequisition menu_requisition;
GtkTextDirection direction;
@@ -611,9 +609,9 @@ position_below_widget_cb (GtkMenu *menu,
static AsyncData *
subscription_editor_async_data_from_iter (GtkTreeView *tree_view,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- gboolean *is_expanded)
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gboolean *is_expanded)
{
AsyncData *data;
CamelFolderInfo *folder_info = NULL;
@@ -650,7 +648,8 @@ typedef enum {
} EPickMode;
static gboolean
-can_pick_folder_info (CamelFolderInfo *fi, EPickMode mode)
+can_pick_folder_info (CamelFolderInfo *fi,
+ EPickMode mode)
{
if (!FOLDER_CAN_SELECT (fi))
return FALSE;
@@ -670,9 +669,9 @@ struct PickAllData {
static gboolean
pick_all_cb (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer user_data)
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data)
{
struct PickAllData *data = user_data;
AsyncData *async_data;
@@ -696,13 +695,13 @@ pick_all_cb (GtkTreeModel *model,
}
/* skip_folder_infos contains CamelFolderInfo-s to skip;
- these should come from the tree view; can be NULL
- to include everything.
+ * these should come from the tree view; can be NULL
+ * to include everything.
*/
static GSList *
subscription_editor_pick_all (EMSubscriptionEditor *editor,
- EPickMode mode,
- GHashTable *skip_folder_infos)
+ EPickMode mode,
+ GHashTable *skip_folder_infos)
{
GtkTreeView *tree_view;
GtkTreeModel *tree_model;
@@ -723,7 +722,7 @@ subscription_editor_pick_all (EMSubscriptionEditor *editor,
static GSList *
subscription_editor_pick_shown (EMSubscriptionEditor *editor,
- EPickMode mode)
+ EPickMode mode)
{
GtkTreeView *tree_view;
GtkTreeModel *tree_model;
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 10b0f70c4d..bbad256d2f 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -58,8 +58,8 @@ static GSettings *mail_settings = NULL;
static void
settings_outlook_filenames_changed (GSettings *settings,
- const gchar *key,
- gpointer user_data)
+ const gchar *key,
+ gpointer user_data)
{
/* pass option to the camel */
if (g_settings_get_boolean (settings, key))
@@ -70,8 +70,8 @@ settings_outlook_filenames_changed (GSettings *settings,
static void
settings_jh_headers_changed (GSettings *settings,
- const gchar *key,
- EMailSession *session)
+ const gchar *key,
+ EMailSession *session)
{
GSList *node;
GPtrArray *name, *value;
@@ -110,8 +110,8 @@ settings_jh_headers_changed (GSettings *settings,
static void
settings_jh_check_changed (GSettings *settings,
- const gchar *key,
- EMailSession *session)
+ const gchar *key,
+ EMailSession *session)
{
config->jh_check = g_settings_get_boolean (settings, "junk-check-custom-header");
if (!config->jh_check) {
@@ -124,16 +124,16 @@ settings_jh_check_changed (GSettings *settings,
static void
settings_bool_value_changed (GSettings *settings,
- const gchar *key,
- gboolean *save_location)
+ const gchar *key,
+ gboolean *save_location)
{
*save_location = g_settings_get_boolean (settings, key);
}
static void
settings_int_value_changed (GSettings *settings,
- const gchar *key,
- gint *save_location)
+ const gchar *key,
+ gint *save_location)
{
*save_location = g_settings_get_int (settings, key);
}
diff --git a/modules/addressbook/e-book-shell-view-private.c b/modules/addressbook/e-book-shell-view-private.c
index b1895c4fb8..cb0cf60ab2 100644
--- a/modules/addressbook/e-book-shell-view-private.c
+++ b/modules/addressbook/e-book-shell-view-private.c
@@ -185,8 +185,8 @@ contacts_removed (EBookShellView *book_shell_view,
static void
model_query_changed_cb (EBookShellView *book_shell_view,
- GParamSpec *param,
- EAddressbookModel *model)
+ GParamSpec *param,
+ EAddressbookModel *model)
{
EBookShellContent *book_shell_content;
EAddressbookView *current_view;
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c
index 3e753904f3..af1ca215fd 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -903,7 +903,7 @@ e_cal_shell_backend_get_selected_calendars (ECalShellBackend *cal_shell_backend)
{
GSettings *settings;
GSList *selected_calendars = NULL;
- char **strv;
+ gchar **strv;
gint ii;
g_return_val_if_fail (
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c
index 05b76cdd88..c31689fec9 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -647,7 +647,7 @@ e_memo_shell_backend_get_selected_memo_lists (EMemoShellBackend *memo_shell_back
{
GSettings *settings;
GSList *selected_memo_lists = NULL;
- char **strv;
+ gchar **strv;
gint ii;
g_return_val_if_fail (
@@ -657,7 +657,6 @@ e_memo_shell_backend_get_selected_memo_lists (EMemoShellBackend *memo_shell_back
strv = g_settings_get_strv (settings, "selected-memos");
g_object_unref (settings);
-
if (strv != NULL) {
for (ii = 0; strv[ii] != NULL; ii++)
selected_memo_lists = g_slist_append (selected_memo_lists, g_strdup (strv[ii]));
diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c
index 68545a287e..deca594c08 100644
--- a/modules/calendar/e-task-shell-backend.c
+++ b/modules/calendar/e-task-shell-backend.c
@@ -652,7 +652,7 @@ e_task_shell_backend_get_selected_task_lists (ETaskShellBackend *task_shell_back
{
GSettings *settings;
GSList *selected_task_lists = NULL;
- char **strv;
+ gchar **strv;
gint ii;
g_return_val_if_fail (
@@ -690,5 +690,5 @@ e_task_shell_backend_set_selected_task_lists (ETaskShellBackend *task_shell_back
g_settings_set_strv (settings, "selected-tasks", (const gchar *const *) array->pdata);
g_object_unref (settings);
- g_ptr_array_free (array, FALSE);
+ g_ptr_array_free (array, FALSE);
}
diff --git a/modules/online-accounts/e-online-accounts-google.c b/modules/online-accounts/e-online-accounts-google.c
index 07c8923609..e71b8d16cb 100644
--- a/modules/online-accounts/e-online-accounts-google.c
+++ b/modules/online-accounts/e-online-accounts-google.c
@@ -144,7 +144,7 @@ online_accounts_google_sync_mail (GoaObject *goa_object,
if (account) {
/* the account is already configured,
- do not change user's changes */
+ * do not change user's changes */
return;
}
diff --git a/modules/spamassassin/evolution-spamassassin.c b/modules/spamassassin/evolution-spamassassin.c
index e722b0cc2e..1b88d0f558 100644
--- a/modules/spamassassin/evolution-spamassassin.c
+++ b/modules/spamassassin/evolution-spamassassin.c
@@ -1073,10 +1073,6 @@ e_spam_assassin_class_init (ESpamAssassinClass *class)
junk_filter_class->available = spam_assassin_available;
junk_filter_class->new_config_widget = spam_assassin_new_config_widget;
- /* XXX Argh, the boolean sense of the GSettings key is inverted from
- * that of the checkbox widget. The checkbox wording is more
- * natural, but GConfBridge doesn't support transform functions
- * so the property has to match the sense of the GConf key. */
g_object_class_install_property (
object_class,
PROP_LOCAL_ONLY,
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 29329d284e..a4713c5447 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -321,9 +321,13 @@ set_organizer (ECalComponent *comp,
gchar *res;
if (folder) {
- CamelStore *store = camel_folder_get_parent_store (folder);
+ CamelStore *store;
+ const gchar *uid;
- account = e_get_account_by_uid (camel_service_get_uid (CAMEL_SERVICE (store)));
+ store = camel_folder_get_parent_store (folder);
+ uid = camel_service_get_uid (CAMEL_SERVICE (store));
+
+ account = e_get_account_by_uid (uid);
}
if (!account)
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index 5e48a59920..476172d43e 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -408,7 +408,6 @@ mar_got_folder (CamelStore *store,
g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
camel_folder_freeze (folder);
uids = camel_folder_get_uids (folder);
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index d4054b573e..8ef601241f 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -385,7 +385,7 @@ add_source_list_with_check (GtkWidget *frame,
EClientSourceType source_type,
GCallback toggle_callback,
EImportTarget *target,
- gboolean active)
+ gboolean active)
{
GtkWidget *check, *hbox;
ESourceList *source_list = NULL;
@@ -1128,7 +1128,10 @@ dequote_string (gchar *str)
}
static gboolean
-lookup_address (pst_item *item, const gchar *str, gboolean is_unique, CamelAddress *addr)
+lookup_address (pst_item *item,
+ const gchar *str,
+ gboolean is_unique,
+ CamelAddress *addr)
{
gboolean res = FALSE;
gchar *address;
@@ -1983,7 +1986,7 @@ static void
pst_process_component (PstImporter *m,
pst_item *item,
const gchar *comp_type,
- ECalComponentVType vtype,
+ ECalComponentVType vtype,
ECalClient *cal)
{
ECalComponent *ec;
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index 593e5ec73d..d8921bcb11 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -396,7 +396,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkWidget *hbox;
- gchar **clue_list;
+ gchar **clue_list;
gint i;
GtkTreeModel *model;
GtkWidget *templates_configuration_box;
diff --git a/shell/e-shell-backend.c b/shell/e-shell-backend.c
index d8af58c6b3..e5700d4b2c 100644
--- a/shell/e-shell-backend.c
+++ b/shell/e-shell-backend.c
@@ -41,6 +41,10 @@
#include "e-shell.h"
#include "e-shell-view.h"
+#define E_SHELL_BACKEND_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_BACKEND, EShellBackendPrivate))
+
struct _EShellBackendPrivate {
/* We keep a reference to corresponding EShellView subclass
@@ -171,7 +175,7 @@ shell_backend_dispose (GObject *object)
{
EShellBackendPrivate *priv;
- priv = E_SHELL_BACKEND (object)->priv;
+ priv = E_SHELL_BACKEND_GET_PRIVATE (object);
if (priv->shell_view_class != NULL) {
g_type_class_unref (priv->shell_view_class);
@@ -187,7 +191,7 @@ shell_backend_finalize (GObject *object)
{
EShellBackendPrivate *priv;
- priv = E_SHELL_BACKEND (object)->priv;
+ priv = E_SHELL_BACKEND_GET_PRIVATE (object);
g_warn_if_fail (g_queue_is_empty (priv->activities));
g_queue_free (priv->activities);
@@ -294,8 +298,7 @@ e_shell_backend_class_init (EShellBackendClass *class)
static void
e_shell_backend_init (EShellBackend *shell_backend)
{
- shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_backend, E_TYPE_SHELL_BACKEND, EShellBackendPrivate);
+ shell_backend->priv = E_SHELL_BACKEND_GET_PRIVATE (shell_backend);
shell_backend->priv->activities = g_queue_new ();
}
diff --git a/shell/e-shell-searchbar.c b/shell/e-shell-searchbar.c
index 370d6b4f5e..ff3f06b403 100644
--- a/shell/e-shell-searchbar.c
+++ b/shell/e-shell-searchbar.c
@@ -39,6 +39,10 @@
#include "e-shell-window-actions.h"
+#define E_SHELL_SEARCHBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_SEARCHBAR, EShellSearchbarPrivate))
+
#define SEARCH_OPTION_ADVANCED (-1)
/* Default "state key file" group: [Search Bar] */
@@ -629,7 +633,7 @@ shell_searchbar_dispose (GObject *object)
{
EShellSearchbarPrivate *priv;
- priv = E_SHELL_SEARCHBAR (object)->priv;
+ priv = E_SHELL_SEARCHBAR_GET_PRIVATE (object);
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -911,8 +915,7 @@ e_shell_searchbar_init (EShellSearchbar *searchbar)
GtkLabel *label;
GtkWidget *widget;
- searchbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- searchbar, E_TYPE_SHELL_SEARCHBAR, EShellSearchbarPrivate);
+ searchbar->priv = E_SHELL_SEARCHBAR_GET_PRIVATE (searchbar);
gtk_box_set_spacing (GTK_BOX (searchbar), 24);
diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c
index 11d8eca3ad..a46123f325 100644
--- a/shell/e-shell-settings.c
+++ b/shell/e-shell-settings.c
@@ -31,6 +31,10 @@
#include "e-shell-settings.h"
+#define E_SHELL_SETTINGS_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate))
+
struct _EShellSettingsPrivate {
GArray *value_array;
guint debug : 1;
@@ -42,7 +46,7 @@ static gpointer parent_class;
static GParamSpec *
shell_settings_pspec_for_key (const gchar *property_name,
- const gchar *schema,
+ const gchar *schema,
const gchar *key)
{
GSettings *settings;
@@ -138,7 +142,7 @@ shell_settings_set_property (GObject *object,
EShellSettingsPrivate *priv;
GValue *dest_value;
- priv = E_SHELL_SETTINGS (object)->priv;
+ priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
dest_value = &g_array_index (
priv->value_array, GValue, property_id - 1);
@@ -166,7 +170,7 @@ shell_settings_get_property (GObject *object,
EShellSettingsPrivate *priv;
GValue *src_value;
- priv = E_SHELL_SETTINGS (object)->priv;
+ priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
src_value = &g_array_index (
priv->value_array, GValue, property_id - 1);
@@ -180,7 +184,7 @@ shell_settings_finalize (GObject *object)
EShellSettingsPrivate *priv;
guint ii;
- priv = E_SHELL_SETTINGS (object)->priv;
+ priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
for (ii = 0; ii < priv->value_array->len; ii++)
g_value_unset (&g_array_index (priv->value_array, GValue, ii));
@@ -218,8 +222,7 @@ shell_settings_init (EShellSettings *shell_settings,
value_array = g_array_new (FALSE, TRUE, sizeof (GValue));
g_array_set_size (value_array, property_count);
- shell_settings->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_settings, E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate);
+ shell_settings->priv = E_SHELL_SETTINGS_GET_PRIVATE (shell_settings);
shell_settings->priv->value_array = value_array;
g_object_freeze_notify (G_OBJECT (shell_settings));
@@ -338,7 +341,7 @@ e_shell_settings_install_property (GParamSpec *pspec)
**/
void
e_shell_settings_install_property_for_key (const gchar *property_name,
- const gchar *schema,
+ const gchar *schema,
const gchar *key)
{
GParamSpec *pspec;
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c
index 62652dee1f..b7e523f733 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -37,6 +37,10 @@
#include <e-util/e-unicode.h>
#include <shell/e-shell-view.h>
+#define E_SHELL_SIDEBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate))
+
struct _EShellSidebarPrivate {
gpointer shell_view; /* weak pointer */
@@ -157,7 +161,7 @@ shell_sidebar_dispose (GObject *object)
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR (object)->priv;
+ priv = E_SHELL_SIDEBAR_GET_PRIVATE (object);
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -184,7 +188,7 @@ shell_sidebar_finalize (GObject *object)
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR (object)->priv;
+ priv = E_SHELL_SIDEBAR_GET_PRIVATE (object);
g_free (priv->icon_name);
g_free (priv->primary_text);
@@ -249,7 +253,7 @@ shell_sidebar_get_preferred_height (GtkWidget *widget,
gint child_min, child_nat;
GtkWidget *child;
- priv = E_SHELL_SIDEBAR (widget)->priv;
+ priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget);
child = gtk_bin_get_child (GTK_BIN (widget));
gtk_widget_get_preferred_height (child, minimum, natural);
@@ -270,7 +274,7 @@ shell_sidebar_size_allocate (GtkWidget *widget,
GtkRequisition child_requisition;
GtkWidget *child;
- priv = E_SHELL_SIDEBAR (widget)->priv;
+ priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget);
gtk_widget_set_allocation (widget, allocation);
@@ -301,7 +305,7 @@ shell_sidebar_forall (GtkContainer *container,
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR (container)->priv;
+ priv = E_SHELL_SIDEBAR_GET_PRIVATE (container);
if (include_internals && callback && priv->event_box)
callback (priv->event_box, callback_data);
@@ -434,8 +438,7 @@ e_shell_sidebar_init (EShellSidebar *shell_sidebar)
const GdkColor *color;
const gchar *icon_name;
- shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_sidebar, E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate);
+ shell_sidebar->priv = E_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
gtk_widget_set_has_window (GTK_WIDGET (shell_sidebar), FALSE);
diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c
index 77c1fd2929..3a72851f97 100644
--- a/shell/e-shell-switcher.c
+++ b/shell/e-shell-switcher.c
@@ -34,6 +34,10 @@
#include <glib/gi18n.h>
#include <libebackend/e-extensible.h>
+#define E_SHELL_SWITCHER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate))
+
#define H_PADDING 6
#define V_PADDING 6
@@ -235,7 +239,7 @@ shell_switcher_dispose (GObject *object)
{
EShellSwitcherPrivate *priv;
- priv = E_SHELL_SWITCHER (object)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (object);
while (priv->proxies != NULL) {
GtkWidget *widget = priv->proxies->data;
@@ -255,7 +259,7 @@ shell_switcher_get_preferred_width (GtkWidget *widget,
GtkWidget *child;
GList *iter;
- priv = E_SHELL_SWITCHER (widget)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
*minimum = *natural = 0;
@@ -290,7 +294,7 @@ shell_switcher_get_preferred_height (GtkWidget *widget,
GtkWidget *child;
GList *iter;
- priv = E_SHELL_SWITCHER (widget)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
*minimum = *natural = 0;
@@ -351,7 +355,7 @@ shell_switcher_screen_changed (GtkWidget *widget,
EShellSwitcherPrivate *priv;
GtkSettings *settings;
- priv = E_SHELL_SWITCHER (widget)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
if (gtk_widget_has_screen (widget))
settings = gtk_widget_get_settings (widget);
@@ -386,7 +390,7 @@ shell_switcher_remove (GtkContainer *container,
EShellSwitcherPrivate *priv;
GList *link;
- priv = E_SHELL_SWITCHER (container)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (container);
/* Look in the internal widgets first. */
@@ -413,7 +417,7 @@ shell_switcher_forall (GtkContainer *container,
{
EShellSwitcherPrivate *priv;
- priv = E_SHELL_SWITCHER (container)->priv;
+ priv = E_SHELL_SWITCHER_GET_PRIVATE (container);
if (include_internals)
g_list_foreach (
@@ -551,8 +555,7 @@ e_shell_switcher_class_init (EShellSwitcherClass *class)
static void
e_shell_switcher_init (EShellSwitcher *switcher)
{
- switcher->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- switcher, E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate);
+ switcher->priv = E_SHELL_SWITCHER_GET_PRIVATE (switcher);
gtk_widget_set_has_window (GTK_WIDGET (switcher), FALSE);
diff --git a/shell/e-shell-taskbar.c b/shell/e-shell-taskbar.c
index adc0d27980..3dd995ded1 100644
--- a/shell/e-shell-taskbar.c
+++ b/shell/e-shell-taskbar.c
@@ -36,6 +36,10 @@
#include <e-shell-view.h>
#include <misc/e-activity-proxy.h>
+#define E_SHELL_TASKBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_TASKBAR, EShellTaskbarPrivate))
+
struct _EShellTaskbarPrivate {
gpointer shell_view; /* weak pointer */
@@ -204,7 +208,7 @@ shell_taskbar_dispose (GObject *object)
{
EShellTaskbarPrivate *priv;
- priv = E_SHELL_TASKBAR (object)->priv;
+ priv = E_SHELL_TASKBAR_GET_PRIVATE (object);
g_hash_table_foreach_remove (
priv->proxy_table, (GHRFunc)
@@ -243,7 +247,7 @@ shell_taskbar_finalize (GObject *object)
{
EShellTaskbarPrivate *priv;
- priv = E_SHELL_TASKBAR (object)->priv;
+ priv = E_SHELL_TASKBAR_GET_PRIVATE (object);
g_hash_table_destroy (priv->proxy_table);
@@ -371,8 +375,7 @@ e_shell_taskbar_init (EShellTaskbar *shell_taskbar)
{
GtkWidget *widget;
- shell_taskbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_taskbar, E_TYPE_SHELL_TASKBAR, EShellTaskbarPrivate);
+ shell_taskbar->priv = E_SHELL_TASKBAR_GET_PRIVATE (shell_taskbar);
shell_taskbar->priv->proxy_table = g_hash_table_new (NULL, NULL);
gtk_box_set_spacing (GTK_BOX (shell_taskbar), 12);
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index a2fc00e3b5..89ac929160 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -45,6 +45,10 @@
#include "e-shell-searchbar.h"
#include "e-shell-window-actions.h"
+#define E_SHELL_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_VIEW, EShellViewPrivate))
+
#define SIMPLE_SEARCHBAR_WIDTH 300
#define STATE_SAVE_TIMEOUT_SECONDS 3
@@ -502,7 +506,7 @@ shell_view_dispose (GObject *object)
{
EShellViewPrivate *priv;
- priv = E_SHELL_VIEW (object)->priv;
+ priv = E_SHELL_VIEW_GET_PRIVATE (object);
/* Expedite any pending state saves. */
if (priv->state_save_timeout_id > 0) {
@@ -568,7 +572,7 @@ shell_view_finalize (GObject *object)
{
EShellViewPrivate *priv;
- priv = E_SHELL_VIEW (object)->priv;
+ priv = E_SHELL_VIEW_GET_PRIVATE (object);
g_key_file_free (priv->state_key_file);
@@ -1107,8 +1111,7 @@ e_shell_view_init (EShellView *shell_view,
size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
- shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_view, E_TYPE_SHELL_VIEW, EShellViewPrivate);
+ shell_view->priv = E_SHELL_VIEW_GET_PRIVATE (shell_view);
shell_view->priv->state_key_file = g_key_file_new ();
shell_view->priv->size_group = size_group;
}
diff --git a/shell/e-shell-window-private.h b/shell/e-shell-window-private.h
index d36a3e64f6..e3a0e50665 100644
--- a/shell/e-shell-window-private.h
+++ b/shell/e-shell-window-private.h
@@ -49,6 +49,10 @@
#include <e-shell-window-actions.h>
#include <e-shell-utils.h>
+#define E_SHELL_WINDOW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_WINDOW, EShellWindowPrivate))
+
/* Shorthand, requires a variable named "shell_window". */
#define ACTION(name) \
(E_SHELL_WINDOW_ACTION_##name (shell_window))
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 1a969de8c9..19178f8292 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -958,8 +958,7 @@ e_shell_window_alert_sink_init (EAlertSinkInterface *interface)
static void
e_shell_window_init (EShellWindow *shell_window)
{
- shell_window->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- shell_window, E_TYPE_SHELL_WINDOW, EShellWindowPrivate);
+ shell_window->priv = E_SHELL_WINDOW_GET_PRIVATE (shell_window);
e_shell_window_private_init (shell_window);
}