[evolution/account-mgmt: 1/33] Revert "Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly"
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/account-mgmt: 1/33] Revert "Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly"
- Date: Wed, 2 Mar 2011 03:45:44 +0000 (UTC)
commit 500e2c1a9e8cd0480068f651a0ed546e09e22f82
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Feb 25 10:46:38 2011 -0500
Revert "Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly"
This reverts commit 1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.
addressbook/gui/contact-editor/eab-editor.c | 8 +++-
.../contact-list-editor/e-contact-list-editor.c | 16 +++++--
addressbook/gui/widgets/e-addressbook-model.c | 8 +++-
addressbook/gui/widgets/e-addressbook-selector.c | 10 +++-
addressbook/gui/widgets/e-addressbook-view.c | 8 +++-
addressbook/gui/widgets/eab-config.c | 9 ++--
addressbook/gui/widgets/eab-config.h | 7 ---
addressbook/gui/widgets/eab-contact-display.c | 8 +++-
calendar/gui/alarm-notify/alarm-notify.c | 8 +++-
calendar/gui/dialogs/comp-editor-page.c | 8 +++-
calendar/gui/dialogs/comp-editor.c | 14 ++++--
calendar/gui/dialogs/event-editor.c | 30 +++++++-----
calendar/gui/dialogs/event-page.c | 14 ++++--
calendar/gui/dialogs/memo-editor.c | 12 +++--
calendar/gui/dialogs/memo-page.c | 14 ++++--
calendar/gui/dialogs/recurrence-page.c | 14 ++++--
calendar/gui/dialogs/schedule-page.c | 8 +++-
calendar/gui/dialogs/task-details-page.c | 8 +++-
calendar/gui/dialogs/task-editor.c | 28 +++++++-----
calendar/gui/dialogs/task-page.c | 10 +++-
calendar/gui/e-cal-component-preview.c | 6 ++-
calendar/gui/e-cal-config.c | 9 ++--
calendar/gui/e-cal-config.h | 6 ---
calendar/gui/e-cal-model-tasks.c | 8 +++-
calendar/gui/e-cal-model.c | 14 +++++-
calendar/gui/e-calendar-selector.c | 6 ++-
calendar/gui/e-calendar-view.c | 10 +++-
calendar/gui/e-cell-date-edit-text.c | 6 ++-
calendar/gui/e-day-view-main-item.c | 8 +++-
calendar/gui/e-day-view-time-item.c | 8 +++-
calendar/gui/e-day-view-top-item.c | 8 +++-
calendar/gui/e-meeting-store.c | 8 +++-
calendar/gui/e-meeting-time-sel.c | 6 ++-
calendar/gui/e-memo-list-selector.c | 6 ++-
calendar/gui/e-memo-table.c | 8 +++-
calendar/gui/e-month-view.c | 6 ++-
calendar/gui/e-task-list-selector.c | 6 ++-
calendar/gui/e-task-table.c | 8 +++-
calendar/gui/e-timezone-entry.c | 10 +++-
calendar/gui/e-week-view-event-item.c | 6 ++-
calendar/gui/e-week-view-main-item.c | 8 +++-
calendar/gui/e-week-view-titles-item.c | 8 +++-
capplet/settings/mail-decoration.c | 41 +++++++++-------
composer/e-composer-activity.c | 6 ++-
composer/e-composer-header-table.c | 10 +++-
composer/e-composer-header.c | 10 +++-
composer/e-composer-name-header.c | 14 ++++--
composer/e-composer-post-header.c | 14 ++++--
composer/e-composer-private.h | 4 ++
composer/e-msg-composer.c | 8 ++--
e-util/e-activity.c | 10 +++-
e-util/e-alert-dialog.c | 8 +++-
e-util/e-alert.c | 10 +++-
e-util/e-config.c | 6 ++-
e-util/e-event.c | 6 ++-
e-util/e-extension.c | 8 +++-
e-util/e-module.c | 12 +++--
e-util/e-plugin-ui.c | 10 +++-
e-util/e-signature-list.c | 6 ++-
e-util/e-signature.c | 8 +++-
e-util/e-ui-manager.c | 6 ++-
em-format/em-format.c | 6 ++-
filter/e-filter-datespec.c | 12 +++--
filter/e-filter-rule.c | 6 ++-
filter/e-rule-context.c | 6 ++-
filter/e-rule-editor.c | 6 ++-
libgnomecanvas/gnome-canvas-pixbuf.c | 3 +-
libgnomecanvas/gnome-canvas-rect.c | 6 ++-
mail/e-mail-attachment-bar.c | 30 +++++++-----
mail/e-mail-backend.c | 10 +++-
mail/e-mail-browser.c | 22 +++++----
mail/e-mail-display.c | 14 ++++--
mail/e-mail-folder-pane.c | 6 ++-
mail/e-mail-label-action.c | 6 ++-
mail/e-mail-label-dialog.c | 8 +++-
mail/e-mail-label-list-store.c | 8 +++-
mail/e-mail-label-manager.c | 8 +++-
mail/e-mail-label-tree-view.c | 6 ++-
mail/e-mail-message-pane.c | 6 ++-
mail/e-mail-notebook-view.c | 48 +++++++++++---------
mail/e-mail-paned-view.c | 28 +++++++-----
mail/e-mail-session.c | 8 +++-
mail/e-mail-sidebar.c | 6 ++-
mail/e-mail-tab-picker.c | 5 ++-
mail/e-mail-tab.c | 5 ++-
mail/e-mail-tag-editor.c | 6 ++-
mail/e-mail-view.c | 8 +++-
mail/em-account-editor.c | 8 +++-
mail/em-filter-context.c | 10 +++-
mail/em-filter-folder-element.c | 10 +++-
mail/em-folder-selection-button.c | 12 +++--
mail/em-folder-tree-model.c | 10 +++-
mail/em-folder-tree.c | 18 +++++---
mail/em-format-html-display.c | 10 +++-
mail/em-format-html.c | 10 +++-
mail/em-subscription-editor.c | 10 +++-
mail/em-vfolder-context.c | 10 +++-
mail/em-vfolder-rule.c | 8 +++-
mail/mail-folder-cache.c | 6 ++-
mail/message-list.c | 8 +++-
modules/addressbook/e-book-shell-backend.c | 11 +++-
modules/addressbook/e-book-shell-content.c | 13 ++++--
modules/addressbook/e-book-shell-sidebar.c | 11 +++-
modules/addressbook/e-book-shell-view-private.h | 4 ++
modules/addressbook/e-book-shell-view.c | 9 ++--
modules/calendar/e-cal-attachment-handler.c | 6 ++-
modules/calendar/e-cal-shell-backend.c | 9 +++-
modules/calendar/e-cal-shell-content.c | 15 ++++--
modules/calendar/e-cal-shell-sidebar.c | 17 +++++---
modules/calendar/e-cal-shell-view-private.c | 2 +-
modules/calendar/e-cal-shell-view-private.h | 4 ++
modules/calendar/e-cal-shell-view.c | 5 +-
modules/calendar/e-memo-shell-backend.c | 9 +++-
modules/calendar/e-memo-shell-content.c | 17 +++++---
modules/calendar/e-memo-shell-sidebar.c | 17 +++++---
modules/calendar/e-memo-shell-view-private.h | 4 ++
modules/calendar/e-memo-shell-view.c | 3 +-
modules/calendar/e-task-shell-backend.c | 9 +++-
modules/calendar/e-task-shell-content.c | 17 +++++---
modules/calendar/e-task-shell-sidebar.c | 17 +++++---
modules/calendar/e-task-shell-view-private.h | 4 ++
modules/calendar/e-task-shell-view.c | 3 +-
modules/mail/e-mail-attachment-handler.c | 18 +++++---
modules/mail/e-mail-junk-hook.c | 10 +++-
modules/mail/e-mail-shell-backend.c | 11 +++-
modules/mail/e-mail-shell-content.c | 35 ++++++++------
modules/mail/e-mail-shell-sidebar.c | 11 +++-
modules/mail/e-mail-shell-view-private.c | 2 +-
modules/mail/e-mail-shell-view-private.h | 4 ++
modules/mail/e-mail-shell-view.c | 7 ++-
modules/mail/em-account-prefs.c | 14 ++++--
modules/plugin-mono/e-plugin-mono.c | 6 ++-
modules/plugin-python/e-plugin-python.c | 6 ++-
shell/e-shell-backend.c | 10 +++-
shell/e-shell-content.c | 20 +++++---
shell/e-shell-searchbar.c | 8 +++-
shell/e-shell-settings.c | 12 +++--
shell/e-shell-sidebar.c | 16 ++++---
shell/e-shell-switcher.c | 18 +++++---
shell/e-shell-taskbar.c | 10 +++-
shell/e-shell-view.c | 10 +++-
shell/e-shell-window-private.h | 4 ++
shell/e-shell-window.c | 2 +-
shell/e-shell.c | 10 +++-
shell/test/e-test-shell-backend.c | 7 +++-
shell/test/e-test-shell-view.c | 11 +++-
smclient/eggsmclient.c | 8 +++-
smclient/eggsmclient.h | 3 +-
widgets/menus/gal-view-factory-etable.c | 10 +++-
widgets/misc/e-account-combo-box.c | 12 +++--
widgets/misc/e-account-manager.c | 8 +++-
widgets/misc/e-account-tree-view.c | 12 +++--
widgets/misc/e-action-combo-box.c | 10 +++-
widgets/misc/e-activity-bar.c | 8 +++-
widgets/misc/e-activity-proxy.c | 8 +++-
widgets/misc/e-alert-bar.c | 8 +++-
widgets/misc/e-attachment-button.c | 8 +++-
widgets/misc/e-attachment-dialog.c | 10 +++-
widgets/misc/e-attachment-handler-image.c | 6 ++-
widgets/misc/e-attachment-handler.c | 6 ++-
widgets/misc/e-attachment-icon-view.c | 8 +++-
widgets/misc/e-attachment-paned.c | 30 +++++++-----
widgets/misc/e-attachment-store.c | 10 +++-
widgets/misc/e-attachment-tree-view.c | 8 +++-
widgets/misc/e-attachment.c | 10 +++-
widgets/misc/e-charset-combo-box.c | 12 +++--
widgets/misc/e-dateedit.c | 6 ++-
widgets/misc/e-focus-tracker.c | 8 +++-
widgets/misc/e-hinted-entry.c | 8 +++-
widgets/misc/e-image-chooser.c | 10 +++-
widgets/misc/e-import-assistant.c | 39 +++++++++-------
widgets/misc/e-online-button.c | 8 +++-
widgets/misc/e-paned.c | 8 +++-
widgets/misc/e-picture-gallery.c | 6 ++-
widgets/misc/e-popup-action.c | 8 +++-
widgets/misc/e-preferences-window.c | 14 ++++--
widgets/misc/e-preview-pane.c | 10 +++-
widgets/misc/e-search-bar.c | 12 +++--
widgets/misc/e-searching-tokenizer.c | 16 ++++---
widgets/misc/e-signature-combo-box.c | 12 +++--
widgets/misc/e-signature-editor.c | 10 +++-
widgets/misc/e-signature-manager.c | 8 +++-
widgets/misc/e-signature-preview.c | 8 +++-
widgets/misc/e-signature-script-dialog.c | 8 +++-
widgets/misc/e-signature-tree-view.c | 12 +++--
widgets/misc/e-web-view-preview.c | 12 ++++-
widgets/misc/e-web-view.c | 10 +++-
widgets/table/e-cell-toggle.c | 22 +++++----
widgets/table/e-table-extras.c | 8 +++-
widgets/table/e-table-memory-store.c | 8 +++-
widgets/table/e-table-memory.c | 8 +++-
widgets/table/e-table-search.c | 8 +++-
widgets/table/e-table-without.c | 8 +++-
widgets/table/e-tree-memory.c | 8 +++-
widgets/table/e-tree-selection-model.c | 8 +++-
widgets/table/e-tree-sorted.c | 10 +++-
widgets/table/e-tree-table-adapter.c | 10 +++-
widgets/table/e-tree.c | 8 +++-
198 files changed, 1388 insertions(+), 635 deletions(-)
---
diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c
index dcce405..b5e5232 100644
--- a/addressbook/gui/contact-editor/eab-editor.c
+++ b/addressbook/gui/contact-editor/eab-editor.c
@@ -31,6 +31,10 @@
#include "e-util/e-util.h"
#include "addressbook/gui/widgets/eab-gui-util.h"
+#define EAB_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EAB_TYPE_EDITOR, EABEditorPrivate))
+
struct _EABEditorPrivate {
EShell *shell;
};
@@ -123,7 +127,7 @@ eab_editor_dispose (GObject *object)
{
EABEditorPrivate *priv;
- priv = EAB_EDITOR (object)->priv;
+ priv = EAB_EDITOR_GET_PRIVATE (object);
if (priv->shell != NULL) {
g_signal_handlers_disconnect_matched (
@@ -214,7 +218,7 @@ eab_editor_class_init (EABEditorClass *class)
static void
eab_editor_init (EABEditor *editor)
{
- editor->priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, EAB_TYPE_EDITOR, EABEditorPrivate);
+ editor->priv = EAB_EDITOR_GET_PRIVATE (editor);
all_editors = g_slist_prepend (all_editors, editor);
}
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index 547e172..67c9c88 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -47,9 +47,13 @@
#include "e-contact-list-model.h"
#include "eab-contact-merging.h"
+#define E_CONTACT_LIST_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CONTACT_LIST_EDITOR, EContactListEditorPrivate))
+
#define CONTACT_LIST_EDITOR_WIDGET(editor, name) \
(e_builder_get_widget \
- (E_CONTACT_LIST_EDITOR (editor)->priv->builder, name))
+ (E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor)->builder, name))
/* More macros, less typos. */
#define CONTACT_LIST_EDITOR_WIDGET_ADD_BUTTON(editor) \
@@ -59,7 +63,7 @@
#define CONTACT_LIST_EDITOR_WIDGET_DIALOG(editor) \
CONTACT_LIST_EDITOR_WIDGET ((editor), "dialog")
#define CONTACT_LIST_EDITOR_WIDGET_EMAIL_ENTRY(editor) \
- editor->priv->email_entry
+ E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor)->email_entry
#define CONTACT_LIST_EDITOR_WIDGET_LIST_NAME_ENTRY(editor) \
CONTACT_LIST_EDITOR_WIDGET ((editor), "list-name-entry")
#define CONTACT_LIST_EDITOR_WIDGET_MEMBERS_VBOX(editor) \
@@ -877,7 +881,7 @@ setup_custom_widgets (EContactListEditor *editor)
g_return_if_fail (editor != NULL);
- priv = editor->priv;
+ priv = E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor);
combo_box = WIDGET (SOURCE_MENU);
client = gconf_client_get_default ();
@@ -1130,7 +1134,7 @@ contact_list_editor_is_valid (EABEditor *editor)
static gboolean
contact_list_editor_is_changed (EABEditor *editor)
{
- return E_CONTACT_LIST_EDITOR (editor)->priv->changed;
+ return E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor)->changed;
}
static GtkWindow *
@@ -1266,7 +1270,7 @@ contact_list_editor_init (EContactListEditor *editor)
GtkCellRenderer *renderer;
GtkTreeView *view;
- editor->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, E_TYPE_CONTACT_LIST_EDITOR, EContactListEditorPrivate);
+ priv = E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor);
priv->editable = TRUE;
priv->allows_contact_lists = TRUE;
@@ -1324,6 +1328,8 @@ contact_list_editor_init (EContactListEditor *editor)
gtk_widget_show_all (WIDGET (DIALOG));
setup_custom_widgets (editor);
+
+ editor->priv = priv;
}
/***************************** Public Interface ******************************/
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index b4afd76..e64848f 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -28,6 +28,10 @@
#include <e-util/e-util.h>
#include "eab-gui-util.h"
+#define E_ADDRESSBOOK_MODEL_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ADDRESSBOOK_MODEL, EAddressbookModelPrivate))
+
struct _EAddressbookModelPrivate {
EBook *book;
EBookQuery *query;
@@ -512,7 +516,7 @@ addressbook_model_finalize (GObject *object)
{
EAddressbookModelPrivate *priv;
- priv = E_ADDRESSBOOK_MODEL (object)->priv;
+ priv = E_ADDRESSBOOK_MODEL_GET_PRIVATE (object);
g_ptr_array_free (priv->contacts, TRUE);
@@ -670,7 +674,7 @@ addressbook_model_class_init (EAddressbookModelClass *class)
static void
addressbook_model_init (EAddressbookModel *model)
{
- model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, E_TYPE_ADDRESSBOOK_MODEL, EAddressbookModelPrivate);
+ model->priv = E_ADDRESSBOOK_MODEL_GET_PRIVATE (model);
model->priv->contacts = g_ptr_array_new ();
model->priv->first_get_view = TRUE;
diff --git a/addressbook/gui/widgets/e-addressbook-selector.c b/addressbook/gui/widgets/e-addressbook-selector.c
index 727bf3c..018205e 100644
--- a/addressbook/gui/widgets/e-addressbook-selector.c
+++ b/addressbook/gui/widgets/e-addressbook-selector.c
@@ -25,6 +25,10 @@
#include <eab-book-util.h>
#include <eab-contact-merging.h>
+#define E_ADDRESSBOOK_SELECTOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ADDRESSBOOK_SELECTOR, EAddressbookSelectorPrivate))
+
typedef struct _MergeContext MergeContext;
struct _EAddressbookSelectorPrivate {
@@ -215,7 +219,7 @@ addressbook_selector_dispose (GObject *object)
{
EAddressbookSelectorPrivate *priv;
- priv = E_ADDRESSBOOK_SELECTOR (object)->priv;
+ priv = E_ADDRESSBOOK_SELECTOR_GET_PRIVATE (object);
if (priv->current_view != NULL) {
g_object_unref (priv->current_view);
@@ -254,7 +258,7 @@ addressbook_selector_data_dropped (ESourceSelector *selector,
const gchar *string;
gboolean remove_from_source;
- priv = E_ADDRESSBOOK_SELECTOR (selector)->priv;
+ priv = E_ADDRESSBOOK_SELECTOR_GET_PRIVATE (selector);
g_return_val_if_fail (priv->current_view != NULL, FALSE);
string = (const gchar *) gtk_selection_data_get_data (selection_data);
@@ -320,7 +324,7 @@ addressbook_selector_class_init (EAddressbookSelectorClass *class)
static void
addressbook_selector_init (EAddressbookSelector *selector)
{
- selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector, E_TYPE_ADDRESSBOOK_SELECTOR, EAddressbookSelectorPrivate);
+ selector->priv = E_ADDRESSBOOK_SELECTOR_GET_PRIVATE (selector);
gtk_drag_dest_set (
GTK_WIDGET (selector), GTK_DEST_DEFAULT_ALL,
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 4e759f9..5d2636a 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -59,6 +59,10 @@
#include <ctype.h>
#include <string.h>
+#define E_ADDRESSBOOK_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ADDRESSBOOK_VIEW, EAddressbookViewPrivate))
+
#define d(x)
static void status_message (EAddressbookView *view,
@@ -494,7 +498,7 @@ addressbook_view_dispose (GObject *object)
{
EAddressbookViewPrivate *priv;
- priv = E_ADDRESSBOOK_VIEW (object)->priv;
+ priv = E_ADDRESSBOOK_VIEW_GET_PRIVATE (object);
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -844,7 +848,7 @@ addressbook_view_init (EAddressbookView *view)
{
GtkTargetList *target_list;
- view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view, E_TYPE_ADDRESSBOOK_VIEW, EAddressbookViewPrivate);
+ view->priv = E_ADDRESSBOOK_VIEW_GET_PRIVATE (view);
view->priv->model = e_addressbook_model_new ();
diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c
index e1f841a..79ba6c8 100644
--- a/addressbook/gui/widgets/eab-config.c
+++ b/addressbook/gui/widgets/eab-config.c
@@ -32,16 +32,17 @@ struct _EABConfigPrivate {
guint source_changed_id;
};
+#define _PRIVATE(o) (g_type_instance_get_private((GTypeInstance *)o, eab_config_get_type()))
+
static void
-ecp_init (EABConfig *cfg)
+ecp_init (GObject *o)
{
- cfg->priv = G_TYPE_INSTANCE_GET_PRIVATE (cfg, EAB_TYPE_CONFIG, EABConfigPrivate);
}
static void
ecp_target_free (EConfig *ec, EConfigTarget *t)
{
- struct _EABConfigPrivate *p = EAB_CONFIG (ec)->priv;
+ struct _EABConfigPrivate *p = _PRIVATE (ec);
if (ec->target == t) {
switch (t->type) {
@@ -77,7 +78,7 @@ ecp_source_changed (struct _ESource *source, EConfig *ec)
static void
ecp_set_target (EConfig *ec, EConfigTarget *t)
{
- struct _EABConfigPrivate *p = EAB_CONFIG (ec)->priv;
+ struct _EABConfigPrivate *p = _PRIVATE (ec);
((EConfigClass *)ecp_parent_class)->set_target (ec, t);
diff --git a/addressbook/gui/widgets/eab-config.h b/addressbook/gui/widgets/eab-config.h
index ef9bc07..fcf6b76 100644
--- a/addressbook/gui/widgets/eab-config.h
+++ b/addressbook/gui/widgets/eab-config.h
@@ -28,20 +28,13 @@
#include "e-util/e-config.h"
-#define EAB_TYPE_CONFIG (eab_config_get_type ())
-#define EAB_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EAB_TYPE_CONFIG, EABConfig))
-
-
G_BEGIN_DECLS
typedef struct _EABConfig EABConfig;
typedef struct _EABConfigClass EABConfigClass;
-typedef struct _EABConfigPrivate EABConfigPrivate;
struct _EABConfig {
EConfig config;
-
- EABConfigPrivate *priv;
};
struct _EABConfigClass {
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 449d112..47052f4 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -37,6 +37,10 @@
#include <gtkhtml/gtkhtml.h>
#include <gtkhtml/gtkhtml-stream.h>
+#define EAB_CONTACT_DISPLAY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EAB_TYPE_CONTACT_DISPLAY, EABContactDisplayPrivate))
+
#define TEXT_IS_RIGHT_TO_LEFT \
(gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL)
@@ -948,7 +952,7 @@ contact_display_dispose (GObject *object)
{
EABContactDisplayPrivate *priv;
- priv = EAB_CONTACT_DISPLAY (object)->priv;
+ priv = EAB_CONTACT_DISPLAY_GET_PRIVATE (object);
if (priv->contact != NULL) {
g_object_unref (priv->contact);
@@ -1194,7 +1198,7 @@ eab_contact_display_init (EABContactDisplay *display)
const gchar *domain = GETTEXT_PACKAGE;
GError *error = NULL;
- display->priv = G_TYPE_INSTANCE_GET_PRIVATE (display, EAB_TYPE_CONTACT_DISPLAY, EABContactDisplayPrivate);
+ display->priv = EAB_CONTACT_DISPLAY_GET_PRIVATE (display);
display->priv->mode = EAB_CONTACT_DISPLAY_RENDER_NORMAL;
display->priv->orientation = GTK_ORIENTATION_HORIZONTAL;
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index 1a990a1..7f39f48 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -34,6 +34,10 @@
#include "config-data.h"
#include "common/authentication.h"
+#define ALARM_NOTIFY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_ALARM_NOTIFY, AlarmNotifyPrivate))
+
struct _AlarmNotifyPrivate {
/* Mapping from EUri's to LoadedClient structures */
/* FIXME do we need per source type uri hashes? or perhaps we
@@ -204,7 +208,7 @@ alarm_notify_finalize (GObject *object)
AlarmNotifyPrivate *priv;
gint ii;
- priv = ALARM_NOTIFY (object)->priv;
+ priv = ALARM_NOTIFY_GET_PRIVATE (object);
for (ii = 0; ii < E_CAL_SOURCE_TYPE_LAST; ii++) {
g_hash_table_foreach (
@@ -238,7 +242,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/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c
index 657243d..2281e5d 100644
--- a/calendar/gui/dialogs/comp-editor-page.c
+++ b/calendar/gui/dialogs/comp-editor-page.c
@@ -31,6 +31,10 @@
#include "comp-editor.h"
#include "comp-editor-page.h"
+#define COMP_EDITOR_PAGE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_COMP_EDITOR_PAGE, CompEditorPagePrivate))
+
struct _CompEditorPagePrivate {
CompEditor *editor; /* not referenced */
gboolean updating;
@@ -58,7 +62,7 @@ comp_editor_page_set_property (GObject *object,
{
CompEditorPagePrivate *priv;
- priv = COMP_EDITOR_PAGE (object)->priv;
+ priv = COMP_EDITOR_PAGE_GET_PRIVATE (object);
switch (property_id) {
case PROP_EDITOR:
@@ -172,7 +176,7 @@ comp_editor_page_class_init (CompEditorPageClass *class)
static void
comp_editor_page_init (CompEditorPage *page)
{
- page->priv = G_TYPE_INSTANCE_GET_PRIVATE (page, TYPE_COMP_EDITOR_PAGE, CompEditorPagePrivate);
+ page->priv = COMP_EDITOR_PAGE_GET_PRIVATE (page);
page->accel_group = NULL;
}
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index b6be8bd..14b94eb 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -60,6 +60,10 @@
#include "e-util/e-alert-dialog.h"
#include "e-util/e-ui-manager.h"
+#define COMP_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_COMP_EDITOR, CompEditorPrivate))
+
#define d(x)
/* Private part of the CompEditor structure */
@@ -1439,7 +1443,7 @@ comp_editor_dispose (GObject *object)
{
CompEditorPrivate *priv;
- priv = COMP_EDITOR (object)->priv;
+ priv = COMP_EDITOR_GET_PRIVATE (object);
if (priv->shell != NULL) {
g_object_remove_weak_pointer (
@@ -1503,7 +1507,7 @@ comp_editor_finalize (GObject *object)
{
CompEditorPrivate *priv;
- priv = COMP_EDITOR (object)->priv;
+ priv = COMP_EDITOR_GET_PRIVATE (object);
g_free (priv->summary);
@@ -1604,7 +1608,7 @@ comp_editor_drag_motion (GtkWidget *widget,
CompEditorPrivate *priv;
EAttachmentView *view;
- priv = COMP_EDITOR (widget)->priv;
+ priv = COMP_EDITOR_GET_PRIVATE (widget);
view = E_ATTACHMENT_VIEW (priv->attachment_view);
return e_attachment_view_drag_motion (view, context, x, y, time);
@@ -1622,7 +1626,7 @@ comp_editor_drag_data_received (GtkWidget *widget,
CompEditorPrivate *priv;
EAttachmentView *view;
- priv = COMP_EDITOR (widget)->priv;
+ priv = COMP_EDITOR_GET_PRIVATE (widget);
view = E_ATTACHMENT_VIEW (priv->attachment_view);
/* Forward the data to the attachment view. Note that calling
@@ -1831,7 +1835,7 @@ comp_editor_init (CompEditor *editor)
express_mode = e_shell_get_express_mode (shell);
meego_mode = e_shell_get_meego_mode (shell);
- editor->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, TYPE_COMP_EDITOR, CompEditorPrivate);
+ editor->priv = priv = COMP_EDITOR_GET_PRIVATE (editor);
g_object_weak_ref (
G_OBJECT (editor), (GWeakNotify)
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 055fc22..7ee860f 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -43,6 +43,10 @@
#include "cancel-comp.h"
#include "event-editor.h"
+#define EVENT_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_EVENT_EDITOR, EventEditorPrivate))
+
struct _EventEditorPrivate {
EventPage *event_page;
RecurrencePage *recur_page;
@@ -117,7 +121,7 @@ create_schedule_page (CompEditor *editor)
CompEditorPage *page;
GtkWidget *content_area;
- priv = EVENT_EDITOR (editor)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (editor);
priv->sched_window = gtk_dialog_new_with_buttons (
_("Free/Busy"), GTK_WINDOW (editor), GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -296,7 +300,7 @@ event_editor_constructor (GType type,
type, n_construct_properties, construct_properties);
editor = COMP_EDITOR (object);
- priv = EVENT_EDITOR (object)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (object);
shell = comp_editor_get_shell (editor);
@@ -394,7 +398,7 @@ event_editor_dispose (GObject *object)
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR (object)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (object);
if (priv->event_page) {
g_object_unref (priv->event_page);
@@ -427,7 +431,7 @@ event_editor_constructed (GObject *object)
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR (object)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (object);
g_object_bind_property (
object, "client",
@@ -444,7 +448,7 @@ event_editor_show_categories (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR (editor)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (editor);
event_page_set_show_categories (priv->event_page, visible);
}
@@ -455,7 +459,7 @@ event_editor_show_role (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR (editor)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (editor);
event_page_set_view_role (priv->event_page, visible);
}
@@ -466,7 +470,7 @@ event_editor_show_rsvp (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR (editor)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (editor);
event_page_set_view_rsvp (priv->event_page, visible);
}
@@ -477,7 +481,7 @@ event_editor_show_status (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR (editor)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (editor);
event_page_set_view_status (priv->event_page, visible);
}
@@ -488,7 +492,7 @@ event_editor_show_time_zone (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR (editor)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (editor);
event_page_set_show_timezone (priv->event_page, visible);
}
@@ -499,7 +503,7 @@ event_editor_show_type (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR (editor)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (editor);
event_page_set_view_type (priv->event_page, visible);
}
@@ -539,7 +543,7 @@ event_editor_init (EventEditor *ee)
const gchar *id;
GError *error = NULL;
- ee->priv = G_TYPE_INSTANCE_GET_PRIVATE (ee, TYPE_EVENT_EDITOR, EventEditorPrivate);
+ ee->priv = EVENT_EDITOR_GET_PRIVATE (ee);
ee->priv->model = E_MEETING_STORE (e_meeting_store_new ());
ee->priv->meeting_shown = TRUE;
ee->priv->updating = FALSE;
@@ -605,7 +609,7 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
ECal *client;
GSList *attendees = NULL;
- priv = EVENT_EDITOR (editor)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (editor);
priv->updating = TRUE;
delegate = (comp_editor_get_flags (COMP_EDITOR (editor)) & COMP_EDITOR_DELEGATE);
@@ -718,7 +722,7 @@ event_editor_send_comp (CompEditor *editor,
EventEditorPrivate *priv;
ECalComponent *comp = NULL;
- priv = EVENT_EDITOR (editor)->priv;
+ priv = EVENT_EDITOR_GET_PRIVATE (editor);
/* Don't cancel more than once or when just publishing */
if (method == E_CAL_COMPONENT_METHOD_PUBLISH ||
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 5d340a7..0cbe3e3 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -58,6 +58,10 @@
#include "event-page.h"
#include "e-send-options-utils.h"
+#define EVENT_PAGE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_EVENT_PAGE, EventPagePrivate))
+
enum {
ALARM_NONE,
ALARM_15_MINUTES,
@@ -211,7 +215,7 @@ event_page_dispose (GObject *object)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE (object)->priv;
+ priv = EVENT_PAGE_GET_PRIVATE (object);
if (priv->comp != NULL) {
g_object_unref (priv->comp);
@@ -247,7 +251,7 @@ event_page_finalize (GObject *object)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE (object)->priv;
+ priv = EVENT_PAGE_GET_PRIVATE (object);
g_list_foreach (priv->address_strings, (GFunc) g_free, NULL);
g_list_free (priv->address_strings);
@@ -289,7 +293,7 @@ event_page_class_init (EventPageClass *class)
static void
event_page_init (EventPage *epage)
{
- epage->priv = G_TYPE_INSTANCE_GET_PRIVATE (epage, TYPE_EVENT_PAGE, EventPagePrivate);
+ epage->priv = EVENT_PAGE_GET_PRIVATE (epage);
epage->priv->deleted_attendees = g_ptr_array_new ();
epage->priv->alarm_interval = -1;
epage->priv->alarm_map = alarm_map_with_user_time;
@@ -334,7 +338,7 @@ event_page_get_widget (CompEditorPage *page)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE (page)->priv;
+ priv = EVENT_PAGE_GET_PRIVATE (page);
return priv->main;
}
@@ -345,7 +349,7 @@ event_page_focus_main_widget (CompEditorPage *page)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE (page)->priv;
+ priv = EVENT_PAGE_GET_PRIVATE (page);
gtk_widget_grab_focus (priv->summary);
}
diff --git a/calendar/gui/dialogs/memo-editor.c b/calendar/gui/dialogs/memo-editor.c
index 50f862a..0e3cfc5 100644
--- a/calendar/gui/dialogs/memo-editor.c
+++ b/calendar/gui/dialogs/memo-editor.c
@@ -38,6 +38,10 @@
#include "cancel-comp.h"
#include "memo-editor.h"
+#define MEMO_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_MEMO_EDITOR, MemoEditorPrivate))
+
struct _MemoEditorPrivate {
MemoPage *memo_page;
@@ -69,7 +73,7 @@ memo_editor_show_categories (CompEditor *editor,
{
MemoEditorPrivate *priv;
- priv = MEMO_EDITOR (editor)->priv;
+ priv = MEMO_EDITOR_GET_PRIVATE (editor);
memo_page_set_show_categories (priv->memo_page, visible);
}
@@ -79,7 +83,7 @@ memo_editor_dispose (GObject *object)
{
MemoEditorPrivate *priv;
- priv = MEMO_EDITOR (object)->priv;
+ priv = MEMO_EDITOR_GET_PRIVATE (object);
if (priv->memo_page) {
g_object_unref (priv->memo_page);
@@ -96,7 +100,7 @@ memo_editor_constructed (GObject *object)
MemoEditorPrivate *priv;
CompEditor *editor;
- priv = MEMO_EDITOR (object)->priv;
+ priv = MEMO_EDITOR_GET_PRIVATE (object);
editor = COMP_EDITOR (object);
priv->memo_page = memo_page_new (editor);
@@ -136,7 +140,7 @@ memo_editor_init (MemoEditor *me)
const gchar *id;
GError *error = NULL;
- me->priv = G_TYPE_INSTANCE_GET_PRIVATE (me, TYPE_MEMO_EDITOR, MemoEditorPrivate);
+ me->priv = MEMO_EDITOR_GET_PRIVATE (me);
me->priv->updating = FALSE;
ui_manager = comp_editor_get_ui_manager (editor);
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 45b18a5..03cf7e7 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -54,6 +54,10 @@
#include "e-send-options-utils.h"
#include "memo-page.h"
+#define MEMO_PAGE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_MEMO_PAGE, MemoPagePrivate))
+
/* Private part of the MemoPage structure */
struct _MemoPagePrivate {
GtkBuilder *builder;
@@ -136,7 +140,7 @@ memo_page_dispose (GObject *object)
{
MemoPagePrivate *priv;
- priv = MEMO_PAGE (object)->priv;
+ priv = MEMO_PAGE_GET_PRIVATE (object);
g_list_foreach (priv->address_strings, (GFunc) g_free, NULL);
g_list_free (priv->address_strings);
@@ -150,7 +154,7 @@ memo_page_finalize (GObject *object)
{
MemoPagePrivate *priv;
- priv = MEMO_PAGE (object)->priv;
+ priv = MEMO_PAGE_GET_PRIVATE (object);
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -171,7 +175,7 @@ memo_page_finalize (GObject *object)
static GtkWidget *
memo_page_get_widget (CompEditorPage *page)
{
- MemoPagePrivate *priv = MEMO_PAGE (page)->priv;
+ MemoPagePrivate *priv = MEMO_PAGE_GET_PRIVATE (page);
return priv->main;
}
@@ -179,7 +183,7 @@ memo_page_get_widget (CompEditorPage *page)
static void
memo_page_focus_main_widget (CompEditorPage *page)
{
- MemoPagePrivate *priv = MEMO_PAGE (page)->priv;
+ MemoPagePrivate *priv = MEMO_PAGE_GET_PRIVATE (page);
gtk_widget_grab_focus (priv->summary_entry);
}
@@ -315,7 +319,7 @@ memo_page_class_init (MemoPageClass *class)
static void
memo_page_init (MemoPage *mpage)
{
- mpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (mpage, TYPE_MEMO_PAGE, MemoPagePrivate);
+ mpage->priv = MEMO_PAGE_GET_PRIVATE (mpage);
}
/* returns whether changed info text */
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 3fd4811..e8deefa 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -46,6 +46,10 @@
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-util-private.h"
+#define RECURRENCE_PAGE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_RECURRENCE_PAGE, RecurrencePagePrivate))
+
enum month_num_options {
MONTH_NUM_FIRST,
MONTH_NUM_SECOND,
@@ -297,7 +301,7 @@ recurrence_page_dispose (GObject *object)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE (object)->priv;
+ priv = RECURRENCE_PAGE_GET_PRIVATE (object);
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -333,7 +337,7 @@ recurrence_page_finalize (GObject *object)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE (object)->priv;
+ priv = RECURRENCE_PAGE_GET_PRIVATE (object);
g_signal_handlers_disconnect_matched (
E_CALENDAR (priv->preview_calendar)->calitem,
@@ -377,7 +381,7 @@ recurrence_page_class_init (RecurrencePageClass *class)
static void
recurrence_page_init (RecurrencePage *rpage)
{
- rpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (rpage, TYPE_RECURRENCE_PAGE, RecurrencePagePrivate);
+ rpage->priv = RECURRENCE_PAGE_GET_PRIVATE (rpage);
}
/* get_widget handler for the recurrence page */
@@ -386,7 +390,7 @@ recurrence_page_get_widget (CompEditorPage *page)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE (page)->priv;
+ priv = RECURRENCE_PAGE_GET_PRIVATE (page);
return priv->main;
}
@@ -397,7 +401,7 @@ recurrence_page_focus_main_widget (CompEditorPage *page)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE (page)->priv;
+ priv = RECURRENCE_PAGE_GET_PRIVATE (page);
gtk_widget_grab_focus (priv->recurs);
}
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index 50fc7d1..4d23488 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -40,6 +40,10 @@
#include "e-delegate-dialog.h"
#include "schedule-page.h"
+#define SCHEDULE_PAGE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_SCHEDULE_PAGE, SchedulePagePrivate))
+
/* Private part of the SchedulePage structure */
struct _SchedulePagePrivate {
GtkBuilder *builder;
@@ -159,7 +163,7 @@ schedule_page_dispose (GObject *object)
{
SchedulePagePrivate *priv;
- priv = SCHEDULE_PAGE (object)->priv;
+ priv = SCHEDULE_PAGE_GET_PRIVATE (object);
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -271,7 +275,7 @@ schedule_page_class_init (SchedulePageClass *class)
static void
schedule_page_init (SchedulePage *spage)
{
- spage->priv = G_TYPE_INSTANCE_GET_PRIVATE (spage, TYPE_SCHEDULE_PAGE, SchedulePagePrivate);
+ spage->priv = SCHEDULE_PAGE_GET_PRIVATE (spage);
}
/* Gets the widgets from the XML file and returns if they are all available. */
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index 16f986c..43f38a2 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -41,6 +41,10 @@
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-util-private.h"
+#define TASK_DETAILS_PAGE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_TASK_DETAILS_PAGE, TaskDetailsPagePrivate))
+
struct _TaskDetailsPagePrivate {
GtkBuilder *builder;
@@ -173,7 +177,7 @@ task_details_page_dispose (GObject *object)
{
TaskDetailsPagePrivate *priv;
- priv = TASK_DETAILS_PAGE (object)->priv;
+ priv = TASK_DETAILS_PAGE_GET_PRIVATE (object);
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -436,7 +440,7 @@ task_details_page_class_init (TaskDetailsPageClass *class)
static void
task_details_page_init (TaskDetailsPage *tdpage)
{
- tdpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (tdpage, TYPE_TASK_DETAILS_PAGE, TaskDetailsPagePrivate);
+ tdpage->priv = TASK_DETAILS_PAGE_GET_PRIVATE (tdpage);
}
/* Gets the widgets from the XML file and returns if they are all available. */
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 1d8bec3..933299f 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -40,6 +40,10 @@
#include "cancel-comp.h"
#include "task-editor.h"
+#define TASK_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_TASK_EDITOR, TaskEditorPrivate))
+
struct _TaskEditorPrivate {
TaskPage *task_page;
TaskDetailsPage *task_details_page;
@@ -152,7 +156,7 @@ task_editor_constructor (GType type,
type, n_construct_properties, construct_properties);
editor = COMP_EDITOR (object);
- priv = TASK_EDITOR (object)->priv;
+ priv = TASK_EDITOR_GET_PRIVATE (object);
client = comp_editor_get_client (editor);
flags = comp_editor_get_flags (editor);
@@ -177,7 +181,7 @@ task_editor_dispose (GObject *object)
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR (object)->priv;
+ priv = TASK_EDITOR_GET_PRIVATE (object);
if (priv->task_page) {
g_object_unref (priv->task_page);
@@ -203,7 +207,7 @@ task_editor_constructed (GObject *object)
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR (object)->priv;
+ priv = TASK_EDITOR_GET_PRIVATE (object);
g_object_bind_property (
object, "client",
@@ -220,7 +224,7 @@ task_editor_show_categories (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR (editor)->priv;
+ priv = TASK_EDITOR_GET_PRIVATE (editor);
task_page_set_show_categories (priv->task_page, visible);
}
@@ -231,7 +235,7 @@ task_editor_show_role (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR (editor)->priv;
+ priv = TASK_EDITOR_GET_PRIVATE (editor);
task_page_set_view_role (priv->task_page, visible);
}
@@ -242,7 +246,7 @@ task_editor_show_rsvp (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR (editor)->priv;
+ priv = TASK_EDITOR_GET_PRIVATE (editor);
task_page_set_view_rsvp (priv->task_page, visible);
}
@@ -253,7 +257,7 @@ task_editor_show_status (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR (editor)->priv;
+ priv = TASK_EDITOR_GET_PRIVATE (editor);
task_page_set_view_status (priv->task_page, visible);
}
@@ -264,7 +268,7 @@ task_editor_show_time_zone (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR (editor)->priv;
+ priv = TASK_EDITOR_GET_PRIVATE (editor);
task_page_set_show_timezone (priv->task_page, visible);
}
@@ -275,7 +279,7 @@ task_editor_show_type (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR (editor)->priv;
+ priv = TASK_EDITOR_GET_PRIVATE (editor);
task_page_set_view_type (priv->task_page, visible);
}
@@ -316,7 +320,7 @@ task_editor_init (TaskEditor *te)
const gchar *id;
GError *error = NULL;
- te->priv = G_TYPE_INSTANCE_GET_PRIVATE (te, TYPE_TASK_EDITOR, TaskEditorPrivate);
+ te->priv = TASK_EDITOR_GET_PRIVATE (te);
te->priv->model = E_MEETING_STORE (e_meeting_store_new ());
te->priv->assignment_shown = TRUE;
te->priv->updating = FALSE;
@@ -390,7 +394,7 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
ECal *client;
GSList *attendees = NULL;
- priv = TASK_EDITOR (editor)->priv;
+ priv = TASK_EDITOR_GET_PRIVATE (editor);
priv->updating = TRUE;
@@ -473,7 +477,7 @@ task_editor_send_comp (CompEditor *editor,
TaskEditorPrivate *priv;
ECalComponent *comp = NULL;
- priv = TASK_EDITOR (editor)->priv;
+ priv = TASK_EDITOR_GET_PRIVATE (editor);
/* Don't cancel more than once or when just publishing */
if (method == E_CAL_COMPONENT_METHOD_PUBLISH ||
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 2bc4988..e56c74e 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -54,6 +54,10 @@
#include "../e-meeting-store.h"
#include "../e-meeting-list-view.h"
+#define TASK_PAGE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), TYPE_TASK_PAGE, TaskPagePrivate))
+
/* Private part of the TaskPage structure */
struct _TaskPagePrivate {
GtkBuilder *builder;
@@ -148,7 +152,7 @@ task_page_dispose (GObject *object)
{
TaskPagePrivate *priv;
- priv = TASK_PAGE (object)->priv;
+ priv = TASK_PAGE_GET_PRIVATE (object);
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -179,7 +183,7 @@ task_page_finalize (GObject *object)
{
TaskPagePrivate *priv;
- priv = TASK_PAGE (object)->priv;
+ priv = TASK_PAGE_GET_PRIVATE (object);
g_list_foreach (priv->address_strings, (GFunc) g_free, NULL);
g_list_free (priv->address_strings);
@@ -217,7 +221,7 @@ task_page_class_init (TaskPageClass *class)
static void
task_page_init (TaskPage *tpage)
{
- tpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (tpage, TYPE_TASK_PAGE, TaskPagePrivate);
+ tpage->priv = TASK_PAGE_GET_PRIVATE (tpage);
tpage->priv->deleted_attendees = g_ptr_array_new ();
}
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c
index b9cb7f3..636e734 100644
--- a/calendar/gui/e-cal-component-preview.c
+++ b/calendar/gui/e-cal-component-preview.c
@@ -34,6 +34,10 @@
#include <e-util/e-util.h>
#include <e-util/e-categories-config.h>
+#define E_CAL_COMPONENT_PREVIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_COMPONENT_PREVIEW, ECalComponentPreviewPrivate))
+
struct _ECalComponentPreviewPrivate {
/* information about currently showing component in a preview;
if it didn't change then the preview is not updated */
@@ -400,7 +404,7 @@ cal_component_preview_class_init (ECalComponentPreviewClass *class)
static void
cal_component_preview_init (ECalComponentPreview *preview)
{
- preview->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview, E_TYPE_CAL_COMPONENT_PREVIEW, ECalComponentPreviewPrivate);
+ preview->priv = E_CAL_COMPONENT_PREVIEW_GET_PRIVATE (preview);
}
GType
diff --git a/calendar/gui/e-cal-config.c b/calendar/gui/e-cal-config.c
index 213041b..10dc316 100644
--- a/calendar/gui/e-cal-config.c
+++ b/calendar/gui/e-cal-config.c
@@ -33,16 +33,17 @@ struct _ECalConfigPrivate {
guint source_changed_id;
};
+#define _PRIVATE(o) (g_type_instance_get_private ((GTypeInstance *)o, e_cal_config_get_type ()))
+
static void
-ecp_init (ECalConfig *cfg)
+ecp_init (GObject *o)
{
- cfg->priv = G_TYPE_INSTANCE_GET_PRIVATE (cfg, E_TYPE_CAL_CONFIG, ECalConfigPrivate);
}
static void
ecp_target_free (EConfig *ec, EConfigTarget *t)
{
- struct _ECalConfigPrivate *p = E_CAL_CONFIG (ec)->priv;
+ struct _ECalConfigPrivate *p = _PRIVATE (ec);
if (ec->target == t) {
switch (t->type) {
@@ -84,7 +85,7 @@ ecp_source_changed (struct _ESource *source, EConfig *ec)
static void
ecp_set_target (EConfig *ec, EConfigTarget *t)
{
- struct _ECalConfigPrivate *p = E_CAL_CONFIG (ec)->priv;
+ struct _ECalConfigPrivate *p = _PRIVATE (ec);
((EConfigClass *)ecp_parent_class)->set_target (ec, t);
diff --git a/calendar/gui/e-cal-config.h b/calendar/gui/e-cal-config.h
index 828bcf4..73514ec 100644
--- a/calendar/gui/e-cal-config.h
+++ b/calendar/gui/e-cal-config.h
@@ -29,19 +29,13 @@
#include <libecal/e-cal.h>
#include "e-util/e-config.h"
-#define E_TYPE_CAL_CONFIG (e_cal_config_get_type())
-#define E_CAL_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_CONFIG, ECalConfig))
-
G_BEGIN_DECLS
typedef struct _ECalConfig ECalConfig;
typedef struct _ECalConfigClass ECalConfigClass;
-typedef struct _ECalConfigPrivate ECalConfigPrivate;
struct _ECalConfig {
EConfig config;
-
- ECalConfigPrivate *priv;
};
struct _ECalConfigClass {
diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c
index 55548f4..38aa812 100644
--- a/calendar/gui/e-cal-model-tasks.c
+++ b/calendar/gui/e-cal-model-tasks.c
@@ -37,6 +37,10 @@
#include "e-cell-date-edit-text.h"
#include "misc.h"
+#define E_CAL_MODEL_TASKS_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_MODEL_TASKS, ECalModelTasksPrivate))
+
struct _ECalModelTasksPrivate {
gchar *color_due_today;
gchar *color_overdue;
@@ -118,7 +122,7 @@ cal_model_tasks_finalize (GObject *object)
{
ECalModelTasksPrivate *priv;
- priv = E_CAL_MODEL_TASKS (object)->priv;
+ priv = E_CAL_MODEL_TASKS_GET_PRIVATE (object);
g_free (priv->color_due_today);
g_free (priv->color_overdue);
@@ -180,7 +184,7 @@ e_cal_model_tasks_class_init (ECalModelTasksClass *class)
static void
e_cal_model_tasks_init (ECalModelTasks *model)
{
- model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, E_TYPE_CAL_MODEL_TASKS, ECalModelTasksPrivate);
+ model->priv = E_CAL_MODEL_TASKS_GET_PRIVATE (model);
e_cal_model_set_component_kind (
E_CAL_MODEL (model), ICAL_VTODO_COMPONENT);
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 26d8889..0b32987 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -40,6 +40,14 @@
#include "e-util/e-extensible.h"
#include "e-util/e-util-enumtypes.h"
+#define E_CAL_MODEL_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_MODEL, ECalModelPrivate))
+
+#define E_CAL_MODEL_COMPONENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_MODEL_COMPONENT, ECalModelComponentPrivate))
+
typedef struct {
ECal *client;
ECalView *query;
@@ -377,7 +385,7 @@ cal_model_dispose (GObject *object)
{
ECalModelPrivate *priv;
- priv = E_CAL_MODEL (object)->priv;
+ priv = E_CAL_MODEL_GET_PRIVATE (object);
if (priv->clients) {
while (priv->clients != NULL) {
@@ -411,7 +419,7 @@ cal_model_finalize (GObject *object)
ECalModelPrivate *priv;
gint ii;
- priv = E_CAL_MODEL (object)->priv;
+ priv = E_CAL_MODEL_GET_PRIVATE (object);
g_free (priv->search_sexp);
g_free (priv->full_sexp);
@@ -690,7 +698,7 @@ e_cal_model_class_init (ECalModelClass *class)
static void
e_cal_model_init (ECalModel *model)
{
- model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, E_TYPE_CAL_MODEL, ECalModelPrivate);
+ model->priv = E_CAL_MODEL_GET_PRIVATE (model);
/* match none by default */
model->priv->start = -1;
diff --git a/calendar/gui/e-calendar-selector.c b/calendar/gui/e-calendar-selector.c
index a920554..915c970 100644
--- a/calendar/gui/e-calendar-selector.c
+++ b/calendar/gui/e-calendar-selector.c
@@ -24,6 +24,10 @@
#include "e-util/e-selection.h"
#include "common/authentication.h"
+#define E_CALENDAR_SELECTOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CALENDAR_SELECTOR, ECalendarSelectorPrivate))
+
struct _ECalendarSelectorPrivate {
gint dummy_value;
};
@@ -158,7 +162,7 @@ calendar_selector_class_init (ECalendarSelectorClass *class)
static void
calendar_selector_init (ECalendarSelector *selector)
{
- selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector, E_TYPE_CALENDAR_SELECTOR, ECalendarSelectorPrivate);
+ selector->priv = E_CALENDAR_SELECTOR_GET_PRIVATE (selector);
gtk_drag_dest_set (
GTK_WIDGET (selector), GTK_DEST_DEFAULT_ALL,
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 7a8a4ea..8134dd2 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -61,6 +61,10 @@
#include "goto.h"
#include "misc.h"
+#define E_CALENDAR_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CALENDAR_VIEW, ECalendarViewPrivate))
+
struct _ECalendarViewPrivate {
/* The GnomeCalendar we are associated to */
GnomeCalendar *calendar;
@@ -318,7 +322,7 @@ calendar_view_dispose (GObject *object)
{
ECalendarViewPrivate *priv;
- priv = E_CALENDAR_VIEW (object)->priv;
+ priv = E_CALENDAR_VIEW_GET_PRIVATE (object);
if (priv->model != NULL) {
g_signal_handlers_disconnect_matched (
@@ -347,7 +351,7 @@ calendar_view_finalize (GObject *object)
{
ECalendarViewPrivate *priv;
- priv = E_CALENDAR_VIEW (object)->priv;
+ priv = E_CALENDAR_VIEW_GET_PRIVATE (object);
g_free (priv->default_category);
@@ -913,7 +917,7 @@ e_calendar_view_init (ECalendarView *calendar_view)
{
GtkTargetList *target_list;
- calendar_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (calendar_view, E_TYPE_CALENDAR_VIEW, ECalendarViewPrivate);
+ calendar_view->priv = E_CALENDAR_VIEW_GET_PRIVATE (calendar_view);
/* Set this early to avoid a divide-by-zero during init. */
calendar_view->priv->time_divisions = 30;
diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c
index fc56271..724e154 100644
--- a/calendar/gui/e-cell-date-edit-text.c
+++ b/calendar/gui/e-cell-date-edit-text.c
@@ -38,6 +38,10 @@
#include "e-cell-date-edit-text.h"
+#define E_CELL_DATE_EDIT_TEXT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CELL_DATE_EDIT_TEXT, ECellDateEditTextPrivate))
+
struct _ECellDateEditTextPrivate {
/* The timezone to display the date in. */
@@ -266,7 +270,7 @@ cell_date_edit_text_class_init (ECellDateEditTextClass *class)
static void
cell_date_edit_text_init (ECellDateEditText *ecd)
{
- ecd->priv = G_TYPE_INSTANCE_GET_PRIVATE (ecd, E_TYPE_CELL_DATE_EDIT_TEXT, ECellDateEditTextPrivate);
+ ecd->priv = E_CELL_DATE_EDIT_TEXT_GET_PRIVATE (ecd);
ecd->priv->timezone = icaltimezone_get_utc_timezone ();
ecd->priv->use_24_hour_format = TRUE;
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index da5296c..838295c 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -40,6 +40,10 @@
#include "e-calendar-view.h"
#include "comp-util.h"
+#define E_DAY_VIEW_MAIN_ITEM_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_DAY_VIEW_MAIN_ITEM, EDayViewMainItemPrivate))
+
struct _EDayViewMainItemPrivate {
EDayView *day_view;
};
@@ -931,7 +935,7 @@ day_view_main_item_dispose (GObject *object)
{
EDayViewMainItemPrivate *priv;
- priv = E_DAY_VIEW_MAIN_ITEM (object)->priv;
+ priv = E_DAY_VIEW_MAIN_ITEM_GET_PRIVATE (object);
if (priv->day_view != NULL) {
g_object_unref (priv->day_view);
@@ -1257,7 +1261,7 @@ day_view_main_item_class_init (EDayViewMainItemClass *class)
static void
day_view_main_item_init (EDayViewMainItem *main_item)
{
- main_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (main_item, E_TYPE_DAY_VIEW_MAIN_ITEM, EDayViewMainItemPrivate);
+ main_item->priv = E_DAY_VIEW_MAIN_ITEM_GET_PRIVATE (main_item);
}
GType
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index 6cf379f..cfe808f 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -54,6 +54,10 @@
#define E_DVTMI_LARGE_HOUR_Y_PAD 1
#define E_DVTMI_SMALL_FONT_Y_PAD 1
+#define E_DAY_VIEW_TIME_ITEM_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_DAY_VIEW_TIME_ITEM, EDayViewTimeItemPrivate))
+
struct _EDayViewTimeItemPrivate {
/* The parent EDayView widget. */
EDayView *day_view;
@@ -145,7 +149,7 @@ day_view_time_item_dispose (GObject *object)
{
EDayViewTimeItemPrivate *priv;
- priv = E_DAY_VIEW_TIME_ITEM (object)->priv;
+ priv = E_DAY_VIEW_TIME_ITEM_GET_PRIVATE (object);
if (priv->day_view != NULL) {
g_object_unref (priv->day_view);
@@ -208,7 +212,7 @@ day_view_time_item_init (EDayViewTimeItem *time_item)
{
gchar *last;
- time_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (time_item, E_TYPE_DAY_VIEW_TIME_ITEM, EDayViewTimeItemPrivate);
+ time_item->priv = E_DAY_VIEW_TIME_ITEM_GET_PRIVATE (time_item);
time_item->priv->dragging_selection = FALSE;
time_item->priv->second_zone = NULL;
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index 12b1bc4..d6faa61 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -37,6 +37,10 @@
#include "e-calendar-view.h"
#include "e-day-view-top-item.h"
+#define E_DAY_VIEW_TOP_ITEM_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_DAY_VIEW_TOP_ITEM, EDayViewTopItemPrivate))
+
struct _EDayViewTopItemPrivate {
/* The parent EDayView widget. */
EDayView *day_view;
@@ -519,7 +523,7 @@ day_view_top_item_dispose (GObject *object)
{
EDayViewTopItemPrivate *priv;
- priv = E_DAY_VIEW_TOP_ITEM (object)->priv;
+ priv = E_DAY_VIEW_TOP_ITEM_GET_PRIVATE (object);
if (priv->day_view != NULL) {
g_object_unref (priv->day_view);
@@ -784,7 +788,7 @@ day_view_top_item_class_init (EDayViewTopItemClass *class)
static void
day_view_top_item_init (EDayViewTopItem *top_item)
{
- top_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (top_item, E_TYPE_DAY_VIEW_TOP_ITEM, EDayViewTopItemPrivate);
+ top_item->priv = E_DAY_VIEW_TOP_ITEM_GET_PRIVATE (top_item);
}
GType
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 71806dd..ccf8fe2 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -44,6 +44,10 @@
#define ROW_VALID(store, row) \
(row >= 0 && row < store->priv->attendees->len)
+#define E_MEETING_STORE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MEETING_STORE, EMeetingStorePrivate))
+
struct _EMeetingStorePrivate {
GPtrArray *attendees;
gint stamp;
@@ -711,7 +715,7 @@ meeting_store_finalize (GObject *object)
EMeetingStorePrivate *priv;
gint i;
- priv = E_MEETING_STORE (object)->priv;
+ priv = E_MEETING_STORE_GET_PRIVATE (object);
for (i = 0; i < priv->attendees->len; i++)
g_object_unref (g_ptr_array_index (priv->attendees, i));
@@ -818,7 +822,7 @@ e_meeting_store_class_init (EMeetingStoreClass *class)
static void
e_meeting_store_init (EMeetingStore *store)
{
- store->priv = G_TYPE_INSTANCE_GET_PRIVATE (store, E_TYPE_MEETING_STORE, EMeetingStorePrivate);
+ store->priv = E_MEETING_STORE_GET_PRIVATE (store);
store->priv->attendees = g_ptr_array_new ();
store->priv->refresh_queue = g_ptr_array_new ();
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index ce75870..1e9ddf9 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -46,6 +46,10 @@
#include "e-meeting-list-view.h"
#include "e-meeting-time-sel-item.h"
+#define E_MEETING_TIME_SELECTOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MEETING_TIME_SELECTOR, EMeetingTimeSelectorPrivate))
+
struct _EMeetingTimeSelectorPrivate {
gint week_start_day;
guint show_week_numbers : 1;
@@ -361,7 +365,7 @@ e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * class)
static void
e_meeting_time_selector_init (EMeetingTimeSelector * mts)
{
- mts->priv = G_TYPE_INSTANCE_GET_PRIVATE (mts, E_TYPE_MEETING_TIME_SELECTOR, EMeetingTimeSelectorPrivate);
+ mts->priv = E_MEETING_TIME_SELECTOR_GET_PRIVATE (mts);
/* The shadow is drawn in the border so it must be >= 2 pixels. */
gtk_container_set_border_width (GTK_CONTAINER (mts), 2);
diff --git a/calendar/gui/e-memo-list-selector.c b/calendar/gui/e-memo-list-selector.c
index e518ec3..8e0ae7c 100644
--- a/calendar/gui/e-memo-list-selector.c
+++ b/calendar/gui/e-memo-list-selector.c
@@ -26,6 +26,10 @@
#include "calendar/common/authentication.h"
#include "calendar/gui/comp-util.h"
+#define E_MEMO_LIST_SELECTOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MEMO_LIST_SELECTOR, EMemoListSelectorPrivate))
+
struct _EMemoListSelectorPrivate {
gint dummy_value;
};
@@ -229,7 +233,7 @@ memo_list_selector_class_init (EMemoListSelectorClass *class)
static void
memo_list_selector_init (EMemoListSelector *selector)
{
- selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector, E_TYPE_MEMO_LIST_SELECTOR, EMemoListSelectorPrivate);
+ selector->priv = E_MEMO_LIST_SELECTOR_GET_PRIVATE (selector);
gtk_drag_dest_set (
GTK_WIDGET (selector), GTK_DEST_DEFAULT_ALL,
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index 1482d25..9260c65 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -60,6 +60,10 @@
#include <e-util/e-icon-factory.h>
#include "misc.h"
+#define E_MEMO_TABLE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MEMO_TABLE, EMemoTablePrivate))
+
struct _EMemoTablePrivate {
gpointer shell_view; /* weak pointer */
ECalModel *model;
@@ -293,7 +297,7 @@ memo_table_dispose (GObject *object)
{
EMemoTablePrivate *priv;
- priv = E_MEMO_TABLE (object)->priv;
+ priv = E_MEMO_TABLE_GET_PRIVATE (object);
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -1125,7 +1129,7 @@ memo_table_init (EMemoTable *memo_table)
{
GtkTargetList *target_list;
- memo_table->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_table, E_TYPE_MEMO_TABLE, EMemoTablePrivate);
+ memo_table->priv = E_MEMO_TABLE_GET_PRIVATE (memo_table);
target_list = gtk_target_list_new (NULL, 0);
e_target_list_add_calendar_targets (target_list, 0);
diff --git a/calendar/gui/e-month-view.c b/calendar/gui/e-month-view.c
index bc82048..238492c 100644
--- a/calendar/gui/e-month-view.c
+++ b/calendar/gui/e-month-view.c
@@ -23,6 +23,10 @@
#include <libecal/e-cal-time-util.h>
+#define E_MONTH_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MONTH_VIEW, EMonthViewPrivate))
+
struct _EMonthViewPrivate {
gint placeholder;
};
@@ -171,7 +175,7 @@ month_view_class_init (EMonthViewClass *class)
static void
month_view_init (EMonthView *month_view)
{
- month_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (month_view, E_TYPE_MONTH_VIEW, EMonthViewPrivate);
+ month_view->priv = E_MONTH_VIEW_GET_PRIVATE (month_view);
}
GType
diff --git a/calendar/gui/e-task-list-selector.c b/calendar/gui/e-task-list-selector.c
index 58096e2..317d7ca 100644
--- a/calendar/gui/e-task-list-selector.c
+++ b/calendar/gui/e-task-list-selector.c
@@ -26,6 +26,10 @@
#include "calendar/common/authentication.h"
#include "calendar/gui/comp-util.h"
+#define E_TASK_LIST_SELECTOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TASK_LIST_SELECTOR, ETaskListSelectorPrivate))
+
struct _ETaskListSelectorPrivate {
gint dummy_value;
};
@@ -230,7 +234,7 @@ task_list_selector_class_init (ETaskListSelectorClass *class)
static void
task_list_selector_init (ETaskListSelector *selector)
{
- selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector, E_TYPE_TASK_LIST_SELECTOR, ETaskListSelectorPrivate);
+ selector->priv = E_TASK_LIST_SELECTOR_GET_PRIVATE (selector);
gtk_drag_dest_set (
GTK_WIDGET (selector), GTK_DEST_DEFAULT_ALL,
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index 8fbd4d9..1af19e0 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -63,6 +63,10 @@
#include <e-util/e-icon-factory.h>
#include "misc.h"
+#define E_TASK_TABLE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TASK_TABLE, ETaskTablePrivate))
+
struct _ETaskTablePrivate {
gpointer shell_view; /* weak pointer */
ECalModel *model;
@@ -371,7 +375,7 @@ task_table_dispose (GObject *object)
{
ETaskTablePrivate *priv;
- priv = E_TASK_TABLE (object)->priv;
+ priv = E_TASK_TABLE_GET_PRIVATE (object);
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -1427,7 +1431,7 @@ task_table_init (ETaskTable *task_table)
{
GtkTargetList *target_list;
- task_table->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_table, E_TYPE_TASK_TABLE, ETaskTablePrivate);
+ task_table->priv = E_TASK_TABLE_GET_PRIVATE (task_table);
target_list = gtk_target_list_new (NULL, 0);
e_target_list_add_calendar_targets (target_list, 0);
diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c
index 56872ea..c281a4a 100644
--- a/calendar/gui/e-timezone-entry.c
+++ b/calendar/gui/e-timezone-entry.c
@@ -33,6 +33,10 @@
#include <glib/gi18n.h>
#include "e-timezone-entry.h"
+#define E_TIMEZONE_ENTRY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TIMEZONE_ENTRY, ETimezoneEntryPrivate))
+
struct _ETimezoneEntryPrivate {
/* The current timezone, set in e_timezone_entry_set_timezone()
or from the timezone dialog. Note that we don't copy it or
@@ -213,7 +217,7 @@ timezone_entry_mnemonic_activate (GtkWidget *widget,
{
ETimezoneEntryPrivate *priv;
- priv = E_TIMEZONE_ENTRY (widget)->priv;
+ priv = E_TIMEZONE_ENTRY_GET_PRIVATE (widget);
if (gtk_widget_get_can_focus (widget)) {
if (priv->button != NULL)
@@ -229,7 +233,7 @@ timezone_entry_focus (GtkWidget *widget,
{
ETimezoneEntryPrivate *priv;
- priv = E_TIMEZONE_ENTRY (widget)->priv;
+ priv = E_TIMEZONE_ENTRY_GET_PRIVATE (widget);
if (direction == GTK_DIR_TAB_FORWARD) {
if (gtk_widget_has_focus (priv->entry))
@@ -298,7 +302,7 @@ e_timezone_entry_init (ETimezoneEntry *timezone_entry)
AtkObject *a11y;
GtkWidget *widget;
- timezone_entry->priv = G_TYPE_INSTANCE_GET_PRIVATE (timezone_entry, E_TYPE_TIMEZONE_ENTRY, ETimezoneEntryPrivate);
+ timezone_entry->priv = E_TIMEZONE_ENTRY_GET_PRIVATE (timezone_entry);
gtk_widget_set_can_focus (GTK_WIDGET (timezone_entry), TRUE);
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 7f1807e..8461576 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -39,6 +39,10 @@
#include <text/e-text.h>
+#define E_WEEK_VIEW_EVENT_ITEM_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_WEEK_VIEW_EVENT_ITEM, EWeekViewEventItemPrivate))
+
struct _EWeekViewEventItemPrivate {
/* The event index in the EWeekView events array. */
gint event_num;
@@ -1153,7 +1157,7 @@ week_view_event_item_class_init (EWeekViewEventItemClass *class)
static void
week_view_event_item_init (EWeekViewEventItem *event_item)
{
- event_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (event_item, E_TYPE_WEEK_VIEW_EVENT_ITEM, EWeekViewEventItemPrivate);
+ event_item->priv = E_WEEK_VIEW_EVENT_ITEM_GET_PRIVATE (event_item);
event_item->priv->event_num = -1;
event_item->priv->span_num = -1;
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c
index 13ce34b..ae4316c 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -33,6 +33,10 @@
#include "ea-calendar.h"
#include "calendar-config.h"
+#define E_WEEK_VIEW_MAIN_ITEM_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_WEEK_VIEW_MAIN_ITEM, EWeekViewMainItemPrivate))
+
struct _EWeekViewMainItemPrivate {
EWeekView *week_view;
};
@@ -330,7 +334,7 @@ week_view_main_item_dispose (GObject *object)
{
EWeekViewMainItemPrivate *priv;
- priv = E_WEEK_VIEW_MAIN_ITEM (object)->priv;
+ priv = E_WEEK_VIEW_MAIN_ITEM_GET_PRIVATE (object);
if (priv->week_view != NULL) {
g_object_unref (priv->week_view);
@@ -445,7 +449,7 @@ week_view_main_item_class_init (EWeekViewMainItemClass *class)
static void
week_view_main_item_init (EWeekViewMainItem *main_item)
{
- main_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (main_item, E_TYPE_WEEK_VIEW_MAIN_ITEM, EWeekViewMainItemPrivate);
+ main_item->priv = E_WEEK_VIEW_MAIN_ITEM_GET_PRIVATE (main_item);
}
GType
diff --git a/calendar/gui/e-week-view-titles-item.c b/calendar/gui/e-week-view-titles-item.c
index 2b9a040..fab2007 100644
--- a/calendar/gui/e-week-view-titles-item.c
+++ b/calendar/gui/e-week-view-titles-item.c
@@ -29,6 +29,10 @@
#include <e-util/e-util.h>
#include "e-week-view-titles-item.h"
+#define E_WEEK_VIEW_TITLES_ITEM_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_WEEK_VIEW_TITLES_ITEM, EWeekViewTitlesItemPrivate))
+
struct _EWeekViewTitlesItemPrivate {
EWeekView *week_view;
};
@@ -80,7 +84,7 @@ week_view_titles_item_dispose (GObject *object)
{
EWeekViewTitlesItemPrivate *priv;
- priv = E_WEEK_VIEW_TITLES_ITEM (object)->priv;
+ priv = E_WEEK_VIEW_TITLES_ITEM_GET_PRIVATE (object);
if (priv->week_view != NULL) {
g_object_unref (priv->week_view);
@@ -275,7 +279,7 @@ week_view_titles_item_class_init (EWeekViewTitlesItemClass *class)
static void
week_view_titles_item_init (EWeekViewTitlesItem *titles_item)
{
- titles_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (titles_item, E_TYPE_WEEK_VIEW_TITLES_ITEM, EWeekViewTitlesItemPrivate);
+ titles_item->priv = E_WEEK_VIEW_TITLES_ITEM_GET_PRIVATE (titles_item);
}
GType
diff --git a/capplet/settings/mail-decoration.c b/capplet/settings/mail-decoration.c
index ab63ce2..51a71d1 100644
--- a/capplet/settings/mail-decoration.c
+++ b/capplet/settings/mail-decoration.c
@@ -29,6 +29,8 @@
#include <gdk/gdkkeysyms.h>
#include <gconf/gconf-client.h>
+#define MAIL_DECORATION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), MAIL_DECORATION_TYPE, MailDecorationPrivate))
+
struct _MailDecorationPrivate
{
GdkCursor *cursors[8];
@@ -337,22 +339,25 @@ mail_decoration_class_init (MailDecorationClass *klass)
static void
mail_decoration_init (MailDecoration *md)
{
- md->priv = G_TYPE_INSTANCE_GET_PRIVATE (md, MAIL_DECORATION_TYPE, MailDecorationPrivate);
-
- md->priv->cursors[0]= gdk_cursor_new (GDK_TOP_LEFT_CORNER);
- md->priv->cursors[1]= gdk_cursor_new (GDK_TOP_SIDE);
- md->priv->cursors[2]= gdk_cursor_new (GDK_TOP_RIGHT_CORNER);
- md->priv->cursors[3]= gdk_cursor_new (GDK_LEFT_SIDE);
- md->priv->cursors[4]= gdk_cursor_new (GDK_RIGHT_SIDE);
- md->priv->cursors[5]= gdk_cursor_new (GDK_BOTTOM_LEFT_CORNER);
- md->priv->cursors[6]= gdk_cursor_new (GDK_BOTTOM_SIDE);
- md->priv->cursors[7]= gdk_cursor_new (GDK_BOTTOM_RIGHT_CORNER);
-
- md->priv->default_cursor = TRUE;
- md->priv->resizing = FALSE;
- md->priv->resize_width = 4;
- md->priv->top_height = 54;
- md->priv->check_window = TRUE;
- md->priv->can_resize = TRUE;
- md->priv->full_screen = TRUE;
+ MailDecorationPrivate *priv;
+
+ priv = MAIL_DECORATION_GET_PRIVATE (md);
+ md->priv = priv;
+
+ priv->cursors[0]= gdk_cursor_new (GDK_TOP_LEFT_CORNER);
+ priv->cursors[1]= gdk_cursor_new (GDK_TOP_SIDE);
+ priv->cursors[2]= gdk_cursor_new (GDK_TOP_RIGHT_CORNER);
+ priv->cursors[3]= gdk_cursor_new (GDK_LEFT_SIDE);
+ priv->cursors[4]= gdk_cursor_new (GDK_RIGHT_SIDE);
+ priv->cursors[5]= gdk_cursor_new (GDK_BOTTOM_LEFT_CORNER);
+ priv->cursors[6]= gdk_cursor_new (GDK_BOTTOM_SIDE);
+ priv->cursors[7]= gdk_cursor_new (GDK_BOTTOM_RIGHT_CORNER);
+
+ priv->default_cursor = TRUE;
+ priv->resizing = FALSE;
+ priv->resize_width = 4;
+ priv->top_height = 54;
+ priv->check_window = TRUE;
+ priv->can_resize = TRUE;
+ priv->full_screen = TRUE;
}
diff --git a/composer/e-composer-activity.c b/composer/e-composer-activity.c
index f29834b..e0e1597 100644
--- a/composer/e-composer-activity.c
+++ b/composer/e-composer-activity.c
@@ -18,6 +18,10 @@
#include "e-composer-private.h"
+#define E_COMPOSER_ACTIVITY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_COMPOSER_ACTIVITY, EComposerActivityPrivate))
+
struct _EComposerActivityPrivate {
EMsgComposer *composer;
gboolean saved_editable;
@@ -160,7 +164,7 @@ e_composer_activity_class_init (EComposerActivityClass *class)
static void
e_composer_activity_init (EComposerActivity *activity)
{
- activity->priv = G_TYPE_INSTANCE_GET_PRIVATE (activity, E_TYPE_COMPOSER_ACTIVITY, EComposerActivityPrivate);
+ activity->priv = E_COMPOSER_ACTIVITY_GET_PRIVATE (activity);
}
EActivity *
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index d2d41df..1e78111 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -32,6 +32,10 @@
#include "e-composer-post-header.h"
#include "e-composer-text-header.h"
+#define E_COMPOSER_HEADER_TABLE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_COMPOSER_HEADER_TABLE, EComposerHeaderTablePrivate))
+
#define HEADER_TOOLTIP_TO \
_("Enter the recipients of the message")
#define HEADER_TOOLTIP_CC \
@@ -534,7 +538,7 @@ composer_header_table_constructor (GType type,
e_composer_header_table_parent_class)->constructor (
type, n_construct_properties, construct_properties);
- priv = E_COMPOSER_HEADER_TABLE (object)->priv;
+ priv = E_COMPOSER_HEADER_TABLE_GET_PRIVATE (object);
small_screen_mode = e_shell_get_small_screen_mode (priv->shell);
@@ -806,7 +810,7 @@ composer_header_table_dispose (GObject *object)
EComposerHeaderTablePrivate *priv;
gint ii;
- priv = E_COMPOSER_HEADER_TABLE (object)->priv;
+ priv = E_COMPOSER_HEADER_TABLE_GET_PRIVATE (object);
for (ii = 0; ii < G_N_ELEMENTS (priv->headers); ii++) {
if (priv->headers[ii] != NULL) {
@@ -994,7 +998,7 @@ e_composer_header_table_init (EComposerHeaderTable *table)
GtkWidget *widget;
gint ii;
- table->priv = G_TYPE_INSTANCE_GET_PRIVATE (table, E_TYPE_COMPOSER_HEADER_TABLE, EComposerHeaderTablePrivate);
+ table->priv = E_COMPOSER_HEADER_TABLE_GET_PRIVATE (table);
name_selector = e_name_selector_new ();
table->priv->name_selector = name_selector;
diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c
index baf5ea3..76c5d89 100644
--- a/composer/e-composer-header.c
+++ b/composer/e-composer-header.c
@@ -24,6 +24,10 @@
#include <glib/gi18n.h>
+#define E_COMPOSER_HEADER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_COMPOSER_HEADER, EComposerHeaderPrivate))
+
enum {
PROP_0,
PROP_BUTTON,
@@ -118,7 +122,7 @@ composer_header_set_property (GObject *object,
{
EComposerHeaderPrivate *priv;
- priv = E_COMPOSER_HEADER (object)->priv;
+ priv = E_COMPOSER_HEADER_GET_PRIVATE (object);
switch (property_id) {
case PROP_BUTTON: /* construct only */
@@ -153,7 +157,7 @@ composer_header_get_property (GObject *object,
{
EComposerHeaderPrivate *priv;
- priv = E_COMPOSER_HEADER (object)->priv;
+ priv = E_COMPOSER_HEADER_GET_PRIVATE (object);
switch (property_id) {
case PROP_BUTTON: /* construct only */
@@ -278,7 +282,7 @@ e_composer_header_class_init (EComposerHeaderClass *class)
static void
e_composer_header_init (EComposerHeader *header)
{
- header->priv = G_TYPE_INSTANCE_GET_PRIVATE (header, E_TYPE_COMPOSER_HEADER, EComposerHeaderPrivate);
+ header->priv = E_COMPOSER_HEADER_GET_PRIVATE (header);
}
gchar *
diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
index a8cdc6f..057266c 100644
--- a/composer/e-composer-name-header.c
+++ b/composer/e-composer-name-header.c
@@ -27,6 +27,10 @@
#include "addressbook/gui/contact-editor/e-contact-editor.h"
#include "addressbook/gui/contact-list-editor/e-contact-list-editor.h"
+#define E_COMPOSER_NAME_HEADER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_COMPOSER_NAME_HEADER, EComposerNameHeaderPrivate))
+
/* Convenience macro */
#define E_COMPOSER_NAME_HEADER_GET_ENTRY(header) \
(E_NAME_SELECTOR_ENTRY (E_COMPOSER_HEADER (header)->input_widget))
@@ -119,7 +123,7 @@ composer_name_header_constructor (GType type,
e_composer_name_header_parent_class)->constructor (
type, n_construct_properties, construct_properties);
- priv = E_COMPOSER_NAME_HEADER (object)->priv;
+ priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (object);
g_assert (E_IS_NAME_SELECTOR (priv->name_selector));
model = e_name_selector_peek_model (priv->name_selector);
@@ -167,7 +171,7 @@ composer_name_header_set_property (GObject *object,
{
EComposerNameHeaderPrivate *priv;
- priv = E_COMPOSER_NAME_HEADER (object)->priv;
+ priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (object);
switch (property_id) {
case PROP_NAME_SELECTOR: /* construct only */
@@ -202,7 +206,7 @@ composer_name_header_dispose (GObject *object)
{
EComposerNameHeaderPrivate *priv;
- priv = E_COMPOSER_NAME_HEADER (object)->priv;
+ priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (object);
if (priv->name_selector != NULL) {
g_object_unref (priv->name_selector);
@@ -219,7 +223,7 @@ composer_name_header_clicked (EComposerHeader *header)
EComposerNameHeaderPrivate *priv;
ENameSelectorDialog *dialog;
- priv = E_COMPOSER_NAME_HEADER (header)->priv;
+ priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (header);
dialog = e_name_selector_peek_dialog (priv->name_selector);
e_name_selector_dialog_set_destination_index (
@@ -261,7 +265,7 @@ e_composer_name_header_class_init (EComposerNameHeaderClass *class)
static void
e_composer_name_header_init (EComposerNameHeader *header)
{
- header->priv = G_TYPE_INSTANCE_GET_PRIVATE (header, E_TYPE_COMPOSER_NAME_HEADER, EComposerNameHeaderPrivate);
+ header->priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (header);
}
EComposerHeader *
diff --git a/composer/e-composer-post-header.c b/composer/e-composer-post-header.c
index 49611d2..be7e577 100644
--- a/composer/e-composer-post-header.c
+++ b/composer/e-composer-post-header.c
@@ -24,6 +24,10 @@
#include <glib/gi18n.h>
#include <camel/camel.h>
+#define E_COMPOSER_POST_HEADER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_COMPOSER_POST_HEADER, EComposerPostHeaderPrivate))
+
enum {
PROP_0,
PROP_ACCOUNT
@@ -168,7 +172,7 @@ composer_post_header_dispose (GObject *object)
{
EComposerPostHeaderPrivate *priv;
- priv = E_COMPOSER_POST_HEADER (object)->priv;
+ priv = E_COMPOSER_POST_HEADER_GET_PRIVATE (object);
if (priv->account != NULL) {
g_object_unref (priv->account);
@@ -184,7 +188,7 @@ composer_post_header_finalize (GObject *object)
{
EComposerPostHeaderPrivate *priv;
- priv = E_COMPOSER_POST_HEADER (object)->priv;
+ priv = E_COMPOSER_POST_HEADER_GET_PRIVATE (object);
g_free (priv->base_url);
@@ -197,7 +201,7 @@ composer_post_header_changed (EComposerHeader *header)
{
EComposerPostHeaderPrivate *priv;
- priv = E_COMPOSER_POST_HEADER (header)->priv;
+ priv = E_COMPOSER_POST_HEADER_GET_PRIVATE (header);
priv->custom = TRUE;
}
@@ -207,7 +211,7 @@ composer_post_header_clicked (EComposerHeader *header)
{
EComposerPostHeaderPrivate *priv;
- priv = E_COMPOSER_POST_HEADER (header)->priv;
+ priv = E_COMPOSER_POST_HEADER_GET_PRIVATE (header);
priv->custom = FALSE;
}
@@ -245,7 +249,7 @@ e_composer_post_header_class_init (EComposerPostHeaderClass *class)
static void
e_composer_post_header_init (EComposerPostHeader *header)
{
- header->priv = G_TYPE_INSTANCE_GET_PRIVATE (header, E_TYPE_COMPOSER_POST_HEADER, EComposerPostHeaderPrivate);
+ header->priv = E_COMPOSER_POST_HEADER_GET_PRIVATE (header);
}
EComposerHeader *
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 2298977..9ed3b11 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -61,6 +61,10 @@
#include <X11/XF86keysym.h>
#endif
+#define E_MSG_COMPOSER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MSG_COMPOSER, EMsgComposerPrivate))
+
/* Mail configuration keys */
#define MAIL_GCONF_PREFIX \
"/apps/evolution/mail"
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 4170356..d7e35bc 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1471,7 +1471,7 @@ is_top_signature (EMsgComposer *composer)
{
EShell *shell;
EShellSettings *shell_settings;
- EMsgComposerPrivate *priv = composer->priv;
+ EMsgComposerPrivate *priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
g_return_val_if_fail (priv != NULL, FALSE);
@@ -2456,7 +2456,7 @@ msg_composer_submit_alert (EAlertSink *alert_sink,
GtkWidget *dialog;
GtkWindow *parent;
- priv = E_MSG_COMPOSER (alert_sink)->priv;
+ priv = E_MSG_COMPOSER_GET_PRIVATE (alert_sink);
switch (e_alert_get_message_type (alert)) {
case GTK_MESSAGE_INFO:
@@ -2608,7 +2608,7 @@ e_msg_composer_alert_sink_init (EAlertSinkInterface *interface)
static void
e_msg_composer_init (EMsgComposer *composer)
{
- composer->priv = G_TYPE_INSTANCE_GET_PRIVATE (composer, E_TYPE_MSG_COMPOSER, EMsgComposerPrivate);
+ composer->priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
}
/* Callbacks. */
@@ -3140,7 +3140,7 @@ e_msg_composer_new_with_message (EShell *shell,
}
composer = e_msg_composer_new (shell);
- priv = composer->priv;
+ priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
table = e_msg_composer_get_header_table (composer);
if (postto) {
diff --git a/e-util/e-activity.c b/e-util/e-activity.c
index 0b4089c..98ee4d1 100644
--- a/e-util/e-activity.c
+++ b/e-util/e-activity.c
@@ -28,6 +28,10 @@
#include "e-util/e-util.h"
#include "e-util/e-util-enumtypes.h"
+#define E_ACTIVITY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ACTIVITY, EActivityPrivate))
+
struct _EActivityPrivate {
GCancellable *cancellable;
EAlertSink *alert_sink;
@@ -165,7 +169,7 @@ activity_dispose (GObject *object)
{
EActivityPrivate *priv;
- priv = E_ACTIVITY (object)->priv;
+ priv = E_ACTIVITY_GET_PRIVATE (object);
if (priv->alert_sink != NULL) {
g_object_unref (priv->alert_sink);
@@ -190,7 +194,7 @@ activity_finalize (GObject *object)
{
EActivityPrivate *priv;
- priv = E_ACTIVITY (object)->priv;
+ priv = E_ACTIVITY_GET_PRIVATE (object);
g_free (priv->icon_name);
g_free (priv->text);
@@ -332,7 +336,7 @@ e_activity_class_init (EActivityClass *class)
static void
e_activity_init (EActivity *activity)
{
- activity->priv = G_TYPE_INSTANCE_GET_PRIVATE (activity, E_TYPE_ACTIVITY, EActivityPrivate);
+ activity->priv = E_ACTIVITY_GET_PRIVATE (activity);
}
EActivity *
diff --git a/e-util/e-alert-dialog.c b/e-util/e-alert-dialog.c
index 4f399d3..e9fea52 100644
--- a/e-util/e-alert-dialog.c
+++ b/e-util/e-alert-dialog.c
@@ -25,6 +25,10 @@
#include "e-util.h"
+#define E_ALERT_DIALOG_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ALERT_DIALOG, EAlertDialogPrivate))
+
struct _EAlertDialogPrivate {
GtkWindow *parent;
EAlert *alert;
@@ -89,7 +93,7 @@ alert_dialog_dispose (GObject *object)
{
EAlertDialogPrivate *priv;
- priv = E_ALERT_DIALOG (object)->priv;
+ priv = E_ALERT_DIALOG_GET_PRIVATE (object);
if (priv->alert) {
g_signal_handlers_disconnect_matched (
@@ -257,7 +261,7 @@ e_alert_dialog_class_init (EAlertDialogClass *class)
static void
e_alert_dialog_init (EAlertDialog *dialog)
{
- dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog, E_TYPE_ALERT_DIALOG, EAlertDialogPrivate);
+ dialog->priv = E_ALERT_DIALOG_GET_PRIVATE (dialog);
}
GtkWidget *
diff --git a/e-util/e-alert.c b/e-util/e-alert.c
index 7df5ca9..cccc322 100644
--- a/e-util/e-alert.c
+++ b/e-util/e-alert.c
@@ -42,6 +42,10 @@
#define d(x)
+#define E_ALERT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ALERT, EAlertPrivate))
+
typedef struct _EAlertButton EAlertButton;
struct _e_alert {
@@ -487,7 +491,7 @@ alert_dispose (GObject *object)
{
EAlertPrivate *priv;
- priv = E_ALERT (object)->priv;
+ priv = E_ALERT_GET_PRIVATE (object);
while (!g_queue_is_empty (&priv->actions)) {
GtkAction *action = g_queue_pop_head (&priv->actions);
@@ -506,7 +510,7 @@ alert_finalize (GObject *object)
{
EAlertPrivate *priv;
- priv = E_ALERT (object)->priv;
+ priv = E_ALERT_GET_PRIVATE (object);
g_free (priv->tag);
g_free (priv->primary_text);
@@ -651,7 +655,7 @@ e_alert_class_init (EAlertClass *class)
static void
e_alert_init (EAlert *alert)
{
- alert->priv = G_TYPE_INSTANCE_GET_PRIVATE (alert, E_TYPE_ALERT, EAlertPrivate);
+ alert->priv = E_ALERT_GET_PRIVATE (alert);
g_queue_init (&alert->priv->actions);
}
diff --git a/e-util/e-config.c b/e-util/e-config.c
index 17646e0..3c1aeb4 100644
--- a/e-util/e-config.c
+++ b/e-util/e-config.c
@@ -34,6 +34,10 @@
#include <glib/gi18n.h>
+#define E_CONFIG_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CONFIG, EConfigPrivate))
+
#define d(x)
typedef GtkWidget * (*EConfigItemSectionFactoryFunc)(EConfig *ec, EConfigItem *, GtkWidget *parent, GtkWidget *old, gpointer data, GtkWidget **real_frame);
@@ -187,7 +191,7 @@ e_config_class_init (EConfigClass *class)
static void
e_config_init (EConfig *config)
{
- config->priv = G_TYPE_INSTANCE_GET_PRIVATE (config, E_TYPE_CONFIG, EConfigPrivate);
+ config->priv = E_CONFIG_GET_PRIVATE (config);
}
/**
diff --git a/e-util/e-event.c b/e-util/e-event.c
index 4127a9c..5e4a2b6 100644
--- a/e-util/e-event.c
+++ b/e-util/e-event.c
@@ -33,6 +33,10 @@
#include <glib/gi18n.h>
+#define E_EVENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_EVENT, EEventPrivate))
+
#define d(x)
struct _event_node {
@@ -109,7 +113,7 @@ e_event_class_init (EEventClass *class)
static void
e_event_init (EEvent *event)
{
- event->priv = G_TYPE_INSTANCE_GET_PRIVATE (event, E_TYPE_EVENT, EEventPrivate);
+ event->priv = E_EVENT_GET_PRIVATE (event);
g_queue_init (&event->priv->events);
}
diff --git a/e-util/e-extension.c b/e-util/e-extension.c
index 9c61110..d7d95c9 100644
--- a/e-util/e-extension.c
+++ b/e-util/e-extension.c
@@ -41,6 +41,10 @@
#include "e-extension.h"
+#define E_EXTENSION_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_EXTENSION, EExtensionPrivate))
+
struct _EExtensionPrivate {
gpointer extensible; /* weak pointer */
};
@@ -122,7 +126,7 @@ extension_dispose (GObject *object)
{
EExtensionPrivate *priv;
- priv = E_EXTENSION (object)->priv;
+ priv = E_EXTENSION_GET_PRIVATE (object);
if (priv->extensible != NULL) {
g_object_remove_weak_pointer (
@@ -161,7 +165,7 @@ e_extension_class_init (EExtensionClass *class)
static void
e_extension_init (EExtension *extension)
{
- extension->priv = G_TYPE_INSTANCE_GET_PRIVATE (extension, E_TYPE_EXTENSION, EExtensionPrivate);
+ extension->priv = E_EXTENSION_GET_PRIVATE (extension);
}
/**
diff --git a/e-util/e-module.c b/e-util/e-module.c
index 56add2b..7b4801d 100644
--- a/e-util/e-module.c
+++ b/e-util/e-module.c
@@ -35,6 +35,10 @@
/* This is the symbol we call when unloading a module. */
#define UNLOAD_SYMBOL "e_module_unload"
+#define E_MODULE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MODULE, EModulePrivate))
+
struct _EModulePrivate {
GModule *module;
gchar *filename;
@@ -101,7 +105,7 @@ module_finalize (GObject *object)
{
EModulePrivate *priv;
- priv = E_MODULE (object)->priv;
+ priv = E_MODULE_GET_PRIVATE (object);
g_free (priv->filename);
@@ -115,7 +119,7 @@ module_load (GTypeModule *type_module)
EModulePrivate *priv;
gpointer symbol;
- priv = E_MODULE (type_module)->priv;
+ priv = E_MODULE_GET_PRIVATE (type_module);
g_return_val_if_fail (priv->filename != NULL, FALSE);
priv->module = g_module_open (priv->filename, 0);
@@ -151,7 +155,7 @@ module_unload (GTypeModule *type_module)
{
EModulePrivate *priv;
- priv = E_MODULE (type_module)->priv;
+ priv = E_MODULE_GET_PRIVATE (type_module);
priv->unload (type_module);
@@ -199,7 +203,7 @@ e_module_class_init (EModuleClass *class)
static void
e_module_init (EModule *module)
{
- module->priv = G_TYPE_INSTANCE_GET_PRIVATE (module, E_TYPE_MODULE, EModulePrivate);
+ module->priv = E_MODULE_GET_PRIVATE (module);
}
/**
diff --git a/e-util/e-plugin-ui.c b/e-util/e-plugin-ui.c
index e606e71..60ad884 100644
--- a/e-util/e-plugin-ui.c
+++ b/e-util/e-plugin-ui.c
@@ -22,6 +22,10 @@
#include <string.h>
+#define E_PLUGIN_UI_HOOK_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_PLUGIN_UI_HOOK, EPluginUIHookPrivate))
+
#define E_PLUGIN_UI_DEFAULT_FUNC "e_plugin_ui_init"
#define E_PLUGIN_UI_HOOK_CLASS_ID "org.gnome.evolution.ui:1.0"
@@ -395,7 +399,7 @@ plugin_ui_hook_finalize (GObject *object)
GHashTableIter iter;
gpointer ui_manager;
- priv = E_PLUGIN_UI_HOOK (object)->priv;
+ priv = E_PLUGIN_UI_HOOK_GET_PRIVATE (object);
/* Remove weak reference callbacks to GtkUIManagers. */
g_hash_table_iter_init (&iter, priv->registry);
@@ -419,7 +423,7 @@ plugin_ui_hook_construct (EPluginHook *hook,
{
EPluginUIHookPrivate *priv;
- priv = E_PLUGIN_UI_HOOK (hook)->priv;
+ priv = E_PLUGIN_UI_HOOK_GET_PRIVATE (hook);
/* XXX The EPlugin should be a property of EPluginHookClass.
* Then it could be passed directly to g_object_new() and
@@ -520,7 +524,7 @@ e_plugin_ui_hook_init (EPluginUIHook *hook)
registry = g_hash_table_new (g_direct_hash, g_direct_equal);
- hook->priv = G_TYPE_INSTANCE_GET_PRIVATE (hook, E_TYPE_PLUGIN_UI_HOOK, EPluginUIHookPrivate);
+ hook->priv = E_PLUGIN_UI_HOOK_GET_PRIVATE (hook);
hook->priv->ui_definitions = ui_definitions;
hook->priv->callbacks = callbacks;
hook->priv->registry = registry;
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index 7b8a320..7a58e8f 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -28,6 +28,10 @@
#include <libedataserver/e-uid.h>
+#define E_SIGNATURE_LIST_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SIGNATURE_LIST, ESignatureListPrivate))
+
struct _ESignatureListPrivate {
GConfClient *gconf;
guint notify_id;
@@ -109,7 +113,7 @@ e_signature_list_class_init (ESignatureListClass *class)
static void
e_signature_list_init (ESignatureList *signature_list)
{
- signature_list->priv = G_TYPE_INSTANCE_GET_PRIVATE (signature_list, E_TYPE_SIGNATURE_LIST, ESignatureListPrivate);
+ signature_list->priv = E_SIGNATURE_LIST_GET_PRIVATE (signature_list);
}
static GSList *
diff --git a/e-util/e-signature.c b/e-util/e-signature.c
index 7bd2b74..07e4b2e 100644
--- a/e-util/e-signature.c
+++ b/e-util/e-signature.c
@@ -36,6 +36,10 @@
#include "e-signature.h"
+#define E_SIGNATURE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SIGNATURE, ESignaturePrivate))
+
struct _ESignaturePrivate {
gchar *filename;
gchar *name;
@@ -227,7 +231,7 @@ signature_finalize (GObject *object)
{
ESignaturePrivate *priv;
- priv = E_SIGNATURE (object)->priv;
+ priv = E_SIGNATURE_GET_PRIVATE (object);
g_free (priv->filename);
g_free (priv->name);
@@ -319,7 +323,7 @@ e_signature_class_init (ESignatureClass *class)
static void
e_signature_init (ESignature *signature)
{
- signature->priv = G_TYPE_INSTANCE_GET_PRIVATE (signature, E_TYPE_SIGNATURE, ESignaturePrivate);
+ signature->priv = E_SIGNATURE_GET_PRIVATE (signature);
}
/**
diff --git a/e-util/e-ui-manager.c b/e-util/e-ui-manager.c
index 238df39..8b2d0ff 100644
--- a/e-util/e-ui-manager.c
+++ b/e-util/e-ui-manager.c
@@ -30,6 +30,10 @@
#include <string.h>
+#define E_UI_MANAGER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_UI_MANAGER, EUIManagerPrivate))
+
/*
* --- NOTE TO SELF ---
*
@@ -159,7 +163,7 @@ e_ui_manager_class_init (EUIManagerClass *class)
static void
e_ui_manager_init (EUIManager *ui_manager)
{
- ui_manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (ui_manager, E_TYPE_UI_MANAGER, EUIManagerPrivate);
+ ui_manager->priv = E_UI_MANAGER_GET_PRIVATE (ui_manager);
}
/**
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 2357333..27f3d1b 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -36,6 +36,10 @@
#include "shell/e-shell.h"
#include "shell/e-shell-settings.h"
+#define EM_FORMAT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_FORMAT, EMFormatPrivate))
+
#define d(x)
typedef struct _EMFormatCache EMFormatCache;
@@ -354,7 +358,7 @@ emf_init (EMFormat *emf)
EShell *shell;
EShellSettings *shell_settings;
- emf->priv = G_TYPE_INSTANCE_GET_PRIVATE (emf, EM_TYPE_FORMAT, EMFormatPrivate);
+ emf->priv = EM_FORMAT_GET_PRIVATE (emf);
emf->inline_table = g_hash_table_new_full (
g_str_hash, g_str_equal,
diff --git a/filter/e-filter-datespec.c b/filter/e-filter-datespec.c
index 95e9dfd..2c79899 100644
--- a/filter/e-filter-datespec.c
+++ b/filter/e-filter-datespec.c
@@ -47,6 +47,10 @@
#define localtime_r(tp,tmp) memcpy(tmp,localtime(tp),sizeof(struct tm))
#endif
+#define E_FILTER_DATESPEC_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_FILTER_DATESPEC, EFilterDatespecPrivate))
+
#define d(x)
typedef struct {
@@ -168,7 +172,7 @@ set_button (EFilterDatespec *fds)
static void
get_values (EFilterDatespec *fds)
{
- EFilterDatespecPrivate *p = fds->priv;
+ EFilterDatespecPrivate *p = E_FILTER_DATESPEC_GET_PRIVATE (fds);
switch (fds->priv->type) {
case FDST_SPECIFIED: {
@@ -203,7 +207,7 @@ set_values (EFilterDatespec *fds)
{
gint note_type;
- EFilterDatespecPrivate *p = fds->priv;
+ EFilterDatespecPrivate *p = E_FILTER_DATESPEC_GET_PRIVATE (fds);
p->type = fds->type==FDST_UNKNOWN ? FDST_NOW : fds->type;
@@ -266,7 +270,7 @@ set_combobox_past_future (GtkComboBox *combobox, EFilterDatespec *fds)
static void
button_clicked (GtkButton *button, EFilterDatespec *fds)
{
- EFilterDatespecPrivate *p = fds->priv;
+ EFilterDatespecPrivate *p = E_FILTER_DATESPEC_GET_PRIVATE (fds);
GtkWidget *content_area;
GtkWidget *toplevel;
GtkDialog *dialog;
@@ -461,7 +465,7 @@ e_filter_datespec_class_init (EFilterDatespecClass *class)
static void
e_filter_datespec_init (EFilterDatespec *datespec)
{
- datespec->priv = G_TYPE_INSTANCE_GET_PRIVATE (datespec, E_TYPE_FILTER_DATESPEC, EFilterDatespecPrivate);
+ datespec->priv = E_FILTER_DATESPEC_GET_PRIVATE (datespec);
datespec->type = FDST_UNKNOWN;
}
diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c
index ab39940..f80146a 100644
--- a/filter/e-filter-rule.c
+++ b/filter/e-filter-rule.c
@@ -35,6 +35,10 @@
#include "e-filter-rule.h"
#include "e-rule-context.h"
+#define E_FILTER_RULE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_FILTER_RULE, EFilterRulePrivate))
+
typedef struct _FilterPartData FilterPartData;
typedef struct _FilterRuleData FilterRuleData;
@@ -860,7 +864,7 @@ e_filter_rule_class_init (EFilterRuleClass *class)
static void
e_filter_rule_init (EFilterRule *rule)
{
- rule->priv = G_TYPE_INSTANCE_GET_PRIVATE (rule, E_TYPE_FILTER_RULE, EFilterRulePrivate);
+ rule->priv = E_FILTER_RULE_GET_PRIVATE (rule);
rule->enabled = TRUE;
}
diff --git a/filter/e-rule-context.c b/filter/e-rule-context.c
index 95ca9bb..a167d01 100644
--- a/filter/e-rule-context.c
+++ b/filter/e-rule-context.c
@@ -53,6 +53,10 @@
#include "e-filter-rule.h"
#include "e-rule-context.h"
+#define E_RULE_CONTEXT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_RULE_CONTEXT, ERuleContextPrivate))
+
struct _ERuleContextPrivate {
gint frozen;
};
@@ -514,7 +518,7 @@ e_rule_context_class_init (ERuleContextClass *class)
static void
e_rule_context_init (ERuleContext *context)
{
- context->priv = G_TYPE_INSTANCE_GET_PRIVATE (context, E_TYPE_RULE_CONTEXT, ERuleContextPrivate);
+ context->priv = E_RULE_CONTEXT_GET_PRIVATE (context);
context->part_set_map = g_hash_table_new (g_str_hash, g_str_equal);
context->rule_set_map = g_hash_table_new (g_str_hash, g_str_equal);
diff --git a/filter/e-rule-editor.c b/filter/e-rule-editor.c
index e1e7026..a69f40b 100644
--- a/filter/e-rule-editor.c
+++ b/filter/e-rule-editor.c
@@ -37,6 +37,10 @@
#include "e-rule-editor.h"
+#define E_RULE_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_RULE_EDITOR, ERuleEditorPrivate))
+
static gint enable_undo = 0;
enum {
@@ -650,7 +654,7 @@ e_rule_editor_class_init (ERuleEditorClass *class)
static void
e_rule_editor_init (ERuleEditor *editor)
{
- editor->priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, E_TYPE_RULE_EDITOR, ERuleEditorPrivate);
+ editor->priv = E_RULE_EDITOR_GET_PRIVATE (editor);
}
/**
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c
index fa6d403..fbe673d 100644
--- a/libgnomecanvas/gnome-canvas-pixbuf.c
+++ b/libgnomecanvas/gnome-canvas-pixbuf.c
@@ -99,7 +99,8 @@ gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class)
static void
gnome_canvas_pixbuf_init (GnomeCanvasPixbuf *gcp)
{
- gcp->priv = G_TYPE_INSTANCE_GET_PRIVATE (gcp, GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbufPrivate);
+ gcp->priv = G_TYPE_INSTANCE_GET_PRIVATE (
+ gcp, GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbufPrivate);
}
/* Dispose handler for the pixbuf canvas item */
diff --git a/libgnomecanvas/gnome-canvas-rect.c b/libgnomecanvas/gnome-canvas-rect.c
index b75a177..3cf71bd 100644
--- a/libgnomecanvas/gnome-canvas-rect.c
+++ b/libgnomecanvas/gnome-canvas-rect.c
@@ -28,6 +28,10 @@
#include "gnome-canvas-rect.h"
+#define GNOME_CANVAS_RECT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), GNOME_TYPE_CANVAS_RECT, GnomeCanvasRectPrivate))
+
struct _GnomeCanvasRectPrivate {
cairo_path_t *path; /* Our bezier path representation */
@@ -700,7 +704,7 @@ gnome_canvas_rect_class_init (GnomeCanvasRectClass *class)
static void
gnome_canvas_rect_init (GnomeCanvasRect *rect)
{
- rect->priv = G_TYPE_INSTANCE_GET_PRIVATE (rect, GNOME_TYPE_CANVAS_RECT, GnomeCanvasRectPrivate);
+ rect->priv = GNOME_CANVAS_RECT_GET_PRIVATE (rect);
rect->priv->scale = 1.0;
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c
index 22f27fa..88cf81a 100644
--- a/mail/e-mail-attachment-bar.c
+++ b/mail/e-mail-attachment-bar.c
@@ -29,6 +29,10 @@
#include "e-attachment-icon-view.h"
#include "e-attachment-tree-view.h"
+#define E_MAIL_ATTACHMENT_BAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_ATTACHMENT_BAR, EMailAttachmentBarPrivate))
+
#define NUM_VIEWS 2
struct _EMailAttachmentBarPrivate {
@@ -182,7 +186,7 @@ mail_attachment_bar_dispose (GObject *object)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR (object)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (object);
if (priv->model != NULL) {
g_object_unref (priv->model);
@@ -255,7 +259,7 @@ mail_attachment_bar_constructed (GObject *object)
GConfBridge *bridge;
const gchar *key;
- priv = E_MAIL_ATTACHMENT_BAR (object)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (object);
bridge = gconf_bridge_get ();
@@ -323,7 +327,7 @@ mail_attachment_bar_get_private (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_private (view);
@@ -334,7 +338,7 @@ mail_attachment_bar_get_store (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_store (view);
@@ -347,7 +351,7 @@ mail_attachment_bar_get_path_at_pos (EAttachmentView *view,
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_path_at_pos (view, x, y);
@@ -358,7 +362,7 @@ mail_attachment_bar_get_selected_paths (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_selected_paths (view);
@@ -370,7 +374,7 @@ mail_attachment_bar_path_is_selected (EAttachmentView *view,
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_path_is_selected (view, path);
@@ -382,7 +386,7 @@ mail_attachment_bar_select_path (EAttachmentView *view,
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_select_path (view, path);
@@ -394,7 +398,7 @@ mail_attachment_bar_unselect_path (EAttachmentView *view,
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_unselect_path (view, path);
@@ -405,7 +409,7 @@ mail_attachment_bar_select_all (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_select_all (view);
@@ -416,7 +420,7 @@ mail_attachment_bar_unselect_all (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_unselect_all (view);
@@ -427,7 +431,7 @@ mail_attachment_bar_update_actions (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
+ priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_update_actions (view);
@@ -502,7 +506,7 @@ mail_attachment_bar_init (EMailAttachmentBar *bar)
GtkWidget *widget;
GtkAction *action;
- bar->priv = G_TYPE_INSTANCE_GET_PRIVATE (bar, E_TYPE_MAIL_ATTACHMENT_BAR, EMailAttachmentBarPrivate);
+ bar->priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (bar);
bar->priv->model = e_attachment_store_new ();
gtk_box_set_spacing (GTK_BOX (bar), 6);
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index d0631b1..8040003 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -49,6 +49,10 @@
#include "mail/mail-ops.h"
#include "mail/mail-vfolder.h"
+#define E_MAIL_BACKEND_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_BACKEND, EMailBackendPrivate))
+
#define QUIT_POLL_INTERVAL 1 /* seconds */
struct _EMailBackendPrivate {
@@ -414,7 +418,7 @@ mail_backend_dispose (GObject *object)
{
EMailBackendPrivate *priv;
- priv = E_MAIL_BACKEND (object)->priv;
+ priv = E_MAIL_BACKEND_GET_PRIVATE (object);
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -443,7 +447,7 @@ mail_backend_constructed (GObject *object)
EMFolderTreeModel *folder_tree_model;
MailFolderCache *folder_cache;
- priv = E_MAIL_BACKEND (object)->priv;
+ priv = E_MAIL_BACKEND_GET_PRIVATE (object);
shell_backend = E_SHELL_BACKEND (object);
shell = e_shell_backend_get_shell (shell_backend);
@@ -543,7 +547,7 @@ e_mail_backend_class_init (EMailBackendClass *class)
static void
e_mail_backend_init (EMailBackend *backend)
{
- backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (backend, E_TYPE_MAIL_BACKEND, EMailBackendPrivate);
+ backend->priv = E_MAIL_BACKEND_GET_PRIVATE (backend);
}
EMailSession *
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index b1186aa..750e84a 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -40,6 +40,10 @@
#include "mail/em-format-html-display.h"
#include "mail/message-list.h"
+#define E_MAIL_BROWSER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_BROWSER, EMailBrowserPrivate))
+
#define MAIL_BROWSER_GCONF_PREFIX "/apps/evolution/mail/mail_browser"
struct _EMailBrowserPrivate {
@@ -461,7 +465,7 @@ mail_browser_dispose (GObject *object)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER (object)->priv;
+ priv = E_MAIL_BROWSER_GET_PRIVATE (object);
if (priv->backend != NULL) {
g_object_unref (priv->backend);
@@ -550,7 +554,7 @@ mail_browser_constructed (GObject *object)
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
- priv = E_MAIL_BROWSER (object)->priv;
+ priv = E_MAIL_BROWSER_GET_PRIVATE (object);
reader = E_MAIL_READER (object);
backend = e_mail_reader_get_backend (reader);
@@ -711,7 +715,7 @@ mail_browser_submit_alert (EAlertSink *alert_sink,
GtkWidget *dialog;
GtkWindow *parent;
- priv = E_MAIL_BROWSER (alert_sink)->priv;
+ priv = E_MAIL_BROWSER_GET_PRIVATE (alert_sink);
switch (e_alert_get_message_type (alert)) {
case GTK_MESSAGE_INFO:
@@ -735,7 +739,7 @@ mail_browser_get_action_group (EMailReader *reader)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER (reader)->priv;
+ priv = E_MAIL_BROWSER_GET_PRIVATE (reader);
return priv->action_group;
}
@@ -751,7 +755,7 @@ mail_browser_get_backend (EMailReader *reader)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER (reader)->priv;
+ priv = E_MAIL_BROWSER_GET_PRIVATE (reader);
return priv->backend;
}
@@ -771,7 +775,7 @@ mail_browser_get_formatter (EMailReader *reader)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER (reader)->priv;
+ priv = E_MAIL_BROWSER_GET_PRIVATE (reader);
return EM_FORMAT_HTML (priv->formatter);
}
@@ -781,7 +785,7 @@ mail_browser_get_message_list (EMailReader *reader)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER (reader)->priv;
+ priv = E_MAIL_BROWSER_GET_PRIVATE (reader);
return priv->message_list;
}
@@ -839,7 +843,7 @@ mail_browser_show_search_bar (EMailReader *reader)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER (reader)->priv;
+ priv = E_MAIL_BROWSER_GET_PRIVATE (reader);
gtk_widget_show (priv->search_bar);
}
@@ -939,7 +943,7 @@ e_mail_browser_init (EMailBrowser *browser)
GConfBridge *bridge;
const gchar *prefix;
- browser->priv = G_TYPE_INSTANCE_GET_PRIVATE (browser, E_TYPE_MAIL_BROWSER, EMailBrowserPrivate);
+ browser->priv = E_MAIL_BROWSER_GET_PRIVATE (browser);
browser->priv->action_group = gtk_action_group_new ("mail-browser");
browser->priv->formatter = em_format_html_display_new ();
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 7fc1694..6719a69 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -29,6 +29,10 @@
#include "mail/em-composer-utils.h"
#include "mail/em-utils.h"
+#define E_MAIL_DISPLAY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_DISPLAY, EMailDisplayPrivate))
+
struct _EMailDisplayPrivate {
EMFormatHTML *formatter;
};
@@ -168,7 +172,7 @@ mail_display_dispose (GObject *object)
{
EMailDisplayPrivate *priv;
- priv = E_MAIL_DISPLAY (object)->priv;
+ priv = E_MAIL_DISPLAY_GET_PRIVATE (object);
if (priv->formatter) {
g_object_unref (priv->formatter);
@@ -194,7 +198,7 @@ mail_display_style_set (GtkWidget *widget,
{
EMailDisplayPrivate *priv;
- priv = E_MAIL_DISPLAY (widget)->priv;
+ priv = E_MAIL_DISPLAY_GET_PRIVATE (widget);
/* Chain up to parent's style_set() method. */
GTK_WIDGET_CLASS (parent_class)->style_set (widget, previous_style);
@@ -209,7 +213,7 @@ mail_display_load_string (EWebView *web_view,
{
EMailDisplayPrivate *priv;
- priv = E_MAIL_DISPLAY (web_view)->priv;
+ priv = E_MAIL_DISPLAY_GET_PRIVATE (web_view);
g_return_if_fail (priv->formatter != NULL);
if (em_format_busy (EM_FORMAT (priv->formatter)))
@@ -269,7 +273,7 @@ mail_display_link_clicked (GtkHTML *html,
{
EMailDisplayPrivate *priv;
- priv = E_MAIL_DISPLAY (html)->priv;
+ priv = E_MAIL_DISPLAY_GET_PRIVATE (html);
g_return_if_fail (priv->formatter != NULL);
if (g_str_has_prefix (uri, "##")) {
@@ -363,7 +367,7 @@ mail_display_init (EMailDisplay *display)
web_view = E_WEB_VIEW (display);
- display->priv = G_TYPE_INSTANCE_GET_PRIVATE (display, E_TYPE_MAIL_DISPLAY, EMailDisplayPrivate);
+ display->priv = E_MAIL_DISPLAY_GET_PRIVATE (display);
/* EWebView's action groups are added during its instance
* initialization function (like what we're in now), so it
diff --git a/mail/e-mail-folder-pane.c b/mail/e-mail-folder-pane.c
index beac9cc..54d5cc4 100644
--- a/mail/e-mail-folder-pane.c
+++ b/mail/e-mail-folder-pane.c
@@ -41,6 +41,10 @@
#include "mail/mail-tools.h"
#include "mail/message-list.h"
+#define E_MAIL_FOLDER_PANE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_FOLDER_PANE, EMailFolderPanePrivate))
+
struct _EMailFolderPanePrivate {
gint placeholder;
};
@@ -167,7 +171,7 @@ e_mail_folder_pane_class_init (EMailFolderPaneClass *class)
static void
e_mail_folder_pane_init (EMailFolderPane *browser)
{
- browser->priv = G_TYPE_INSTANCE_GET_PRIVATE (browser, E_TYPE_MAIL_FOLDER_PANE, EMailFolderPanePrivate);
+ browser->priv = E_MAIL_FOLDER_PANE_GET_PRIVATE (browser);
}
EMailView *
diff --git a/mail/e-mail-label-action.c b/mail/e-mail-label-action.c
index c7cf71a..b7487fc 100644
--- a/mail/e-mail-label-action.c
+++ b/mail/e-mail-label-action.c
@@ -21,6 +21,10 @@
#include "e-mail-label-action.h"
+#define E_MAIL_LABEL_ACTION_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_LABEL_ACTION, EMailLabelActionPrivate))
+
struct _EMailLabelActionPrivate {
gint placeholder;
};
@@ -102,7 +106,7 @@ mail_label_action_class_init (EMailLabelActionClass *class)
static void
mail_label_action_init (EMailLabelAction *action)
{
- action->priv = G_TYPE_INSTANCE_GET_PRIVATE (action, E_TYPE_MAIL_LABEL_ACTION, EMailLabelActionPrivate);
+ action->priv = E_MAIL_LABEL_ACTION_GET_PRIVATE (action);
}
GType
diff --git a/mail/e-mail-label-dialog.c b/mail/e-mail-label-dialog.c
index 4a4728a..1170854 100644
--- a/mail/e-mail-label-dialog.c
+++ b/mail/e-mail-label-dialog.c
@@ -23,6 +23,10 @@
#include <glib/gi18n.h>
+#define E_MAIL_LABEL_DIALOG_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_LABEL_DIALOG, EMailLabelDialogPrivate))
+
struct _EMailLabelDialogPrivate {
GtkWidget *entry;
GtkWidget *colorsel;
@@ -102,7 +106,7 @@ mail_label_dialog_dispose (GObject *object)
{
EMailLabelDialogPrivate *priv;
- priv = E_MAIL_LABEL_DIALOG (object)->priv;
+ priv = E_MAIL_LABEL_DIALOG_GET_PRIVATE (object);
if (priv->entry != NULL) {
g_object_unref (priv->entry);
@@ -181,7 +185,7 @@ mail_label_dialog_init (EMailLabelDialog *dialog)
GtkWidget *container;
GtkWidget *widget;
- dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog, E_TYPE_MAIL_LABEL_DIALOG, EMailLabelDialogPrivate);
+ dialog->priv = E_MAIL_LABEL_DIALOG_GET_PRIVATE (dialog);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
diff --git a/mail/e-mail-label-list-store.c b/mail/e-mail-label-list-store.c
index 104e392..e6f4a6a 100644
--- a/mail/e-mail-label-list-store.c
+++ b/mail/e-mail-label-list-store.c
@@ -25,6 +25,10 @@
#include <camel/camel.h>
#include "e-util/gconf-bridge.h"
+#define E_MAIL_LABEL_LIST_STORE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_LABEL_LIST_STORE, EMailLabelListStorePrivate))
+
struct _EMailLabelListStorePrivate {
GHashTable *tag_index;
};
@@ -153,7 +157,7 @@ mail_label_list_store_finalize (GObject *object)
{
EMailLabelListStorePrivate *priv;
- priv = E_MAIL_LABEL_LIST_STORE (object)->priv;
+ priv = E_MAIL_LABEL_LIST_STORE_GET_PRIVATE (object);
g_hash_table_destroy (priv->tag_index);
@@ -234,7 +238,7 @@ mail_label_list_store_init (EMailLabelListStore *store)
(GDestroyNotify) g_free,
(GDestroyNotify) gtk_tree_row_reference_free);
- store->priv = G_TYPE_INSTANCE_GET_PRIVATE (store, E_TYPE_MAIL_LABEL_LIST_STORE, EMailLabelListStorePrivate);
+ store->priv = E_MAIL_LABEL_LIST_STORE_GET_PRIVATE (store);
store->priv->tag_index = tag_index;
/* XXX While it may seem awkward to cram the label name and color
diff --git a/mail/e-mail-label-manager.c b/mail/e-mail-label-manager.c
index 54b2b7f..c5448ea 100644
--- a/mail/e-mail-label-manager.c
+++ b/mail/e-mail-label-manager.c
@@ -25,6 +25,10 @@
#include "e-mail-label-dialog.h"
#include "e-mail-label-tree-view.h"
+#define E_MAIL_LABEL_MANAGER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_LABEL_MANAGER, EMailLabelManagerPrivate))
+
struct _EMailLabelManagerPrivate {
GtkWidget *tree_view;
GtkWidget *add_button;
@@ -117,7 +121,7 @@ mail_label_manager_dispose (GObject *object)
{
EMailLabelManagerPrivate *priv;
- priv = E_MAIL_LABEL_MANAGER (object)->priv;
+ priv = E_MAIL_LABEL_MANAGER_GET_PRIVATE (object);
if (priv->tree_view != NULL) {
g_object_unref (priv->tree_view);
@@ -305,7 +309,7 @@ mail_label_manager_init (EMailLabelManager *manager)
GtkWidget *container;
GtkWidget *widget;
- manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, E_TYPE_MAIL_LABEL_MANAGER, EMailLabelManagerPrivate);
+ manager->priv = E_MAIL_LABEL_MANAGER_GET_PRIVATE (manager);
gtk_table_resize (GTK_TABLE (manager), 2, 2);
gtk_table_set_col_spacings (GTK_TABLE (manager), 6);
diff --git a/mail/e-mail-label-tree-view.c b/mail/e-mail-label-tree-view.c
index 3d53108..808d8d0 100644
--- a/mail/e-mail-label-tree-view.c
+++ b/mail/e-mail-label-tree-view.c
@@ -24,6 +24,10 @@
#include <glib/gi18n.h>
#include "e-mail-label-list-store.h"
+#define E_MAIL_LABEL_TREE_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_LABEL_TREE_VIEW, EMailLabelTreeViewPrivate))
+
struct _EMailLabelTreeViewPrivate {
gint placeholder;
};
@@ -75,7 +79,7 @@ mail_label_tree_view_init (EMailLabelTreeView *tree_view)
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
- tree_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (tree_view, E_TYPE_MAIL_LABEL_TREE_VIEW, EMailLabelTreeViewPrivate);
+ tree_view->priv = E_MAIL_LABEL_TREE_VIEW_GET_PRIVATE (tree_view);
column = gtk_tree_view_column_new ();
renderer = gtk_cell_renderer_pixbuf_new ();
diff --git a/mail/e-mail-message-pane.c b/mail/e-mail-message-pane.c
index 75fd459..0b5b99a 100644
--- a/mail/e-mail-message-pane.c
+++ b/mail/e-mail-message-pane.c
@@ -28,6 +28,10 @@
#include "mail/e-mail-reader.h"
+#define E_MAIL_MESSAGE_PANE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_MESSAGE_PANE, EMailMessagePanePrivate))
+
struct _EMailMessagePanePrivate {
gint placeholder;
};
@@ -76,7 +80,7 @@ e_mail_message_pane_class_init (EMailMessagePaneClass *class)
static void
e_mail_message_pane_init (EMailMessagePane *browser)
{
- browser->priv = G_TYPE_INSTANCE_GET_PRIVATE (browser, E_TYPE_MAIL_MESSAGE_PANE, EMailMessagePanePrivate);
+ browser->priv = E_MAIL_MESSAGE_PANE_GET_PRIVATE (browser);
}
EMailView *
diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c
index 1ff0a01..8dc5730 100644
--- a/mail/e-mail-notebook-view.c
+++ b/mail/e-mail-notebook-view.c
@@ -45,6 +45,10 @@
#include "e-mail-tab-picker.h"
#endif
+#define E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_NOTEBOOK_VIEW, EMailNotebookViewPrivate))
+
struct _EMailNotebookViewPrivate {
GtkNotebook *book;
EMailView *current_view;
@@ -124,7 +128,7 @@ mnv_page_changed (GtkNotebook *book,
EMailView *mview;
const gchar *uri;
- priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
shell_view = e_mail_view_get_shell_view (view);
shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
@@ -185,7 +189,7 @@ chooser_clicked_cb (EMailTabPicker *picker,
gboolean preview_mode;
- priv = view->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
preview_mode = !e_mail_tab_picker_get_preview_mode (priv->tab_picker);
e_mail_tab_picker_set_preview_mode (priv->tab_picker , preview_mode);
@@ -577,7 +581,7 @@ mail_notebook_view_set_property (GObject *object,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (object)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (object);
switch (property_id) {
case PROP_FORWARD_STYLE:
@@ -610,7 +614,7 @@ mail_notebook_view_get_property (GObject *object,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (object)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (object);
switch (property_id) {
case PROP_FORWARD_STYLE:
@@ -644,7 +648,7 @@ mail_notebook_view_set_search_strings (EMailView *view,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
e_mail_view_set_search_strings (priv->current_view, search_strings);
}
@@ -654,7 +658,7 @@ mail_notebook_view_get_view_instance (EMailView *view)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
if (priv->current_view == NULL)
return NULL;
@@ -667,7 +671,7 @@ mail_notebook_view_update_view_instance (EMailView *view)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
if (priv->current_view == NULL)
return;
@@ -681,7 +685,7 @@ mail_notebook_view_set_orientation (EMailView *view,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
if (priv->current_view == NULL)
return;
@@ -694,7 +698,7 @@ mail_notebook_view_get_orientation (EMailView *view)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
if (priv->current_view == NULL)
return GTK_ORIENTATION_VERTICAL;
@@ -707,7 +711,7 @@ mail_notebook_view_get_show_deleted (EMailView *view)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
if (priv->current_view == NULL)
return FALSE;
@@ -721,7 +725,7 @@ mail_notebook_view_set_show_deleted (EMailView *view,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
if (priv->current_view == NULL)
return;
@@ -734,7 +738,7 @@ mail_notebook_view_get_preview_visible (EMailView *view)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
if (priv->current_view == NULL)
return FALSE;
@@ -748,7 +752,7 @@ mail_notebook_view_set_preview_visible (EMailView *view,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
if (priv->current_view == NULL)
return;
@@ -803,7 +807,7 @@ mail_notebook_view_get_formatter (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
if (priv->current_view == NULL)
return NULL;
@@ -816,7 +820,7 @@ mail_notebook_view_get_hide_deleted (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
if (priv->current_view == NULL)
return FALSE;
@@ -831,7 +835,7 @@ mail_notebook_view_get_message_list (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
if (priv->current_view == NULL)
return NULL;
@@ -846,7 +850,7 @@ mail_notebook_view_get_popup_menu (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
if (priv->current_view == NULL)
return NULL;
@@ -904,7 +908,7 @@ mail_netbook_view_open_mail (EMailView *view,
GtkWidget *mlist;
#endif
- priv = nview->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (nview);
#if HAVE_CLUTTER
e_mail_tab_set_active (
@@ -1092,7 +1096,7 @@ mail_notebook_view_set_folder (EMailReader *reader,
if (!folder_uri)
return;
- priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
new_view = g_hash_table_lookup (priv->views, folder_uri);
if (new_view) {
@@ -1240,7 +1244,7 @@ mail_notebook_view_show_search_bar (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
if (priv->current_view == NULL)
return;
@@ -1266,7 +1270,7 @@ mail_notebook_view_open_selected_mail (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
if (priv->current_view == NULL)
return 0;
@@ -1339,7 +1343,7 @@ e_mail_notebook_view_reader_init (EMailReaderInterface *interface)
static void
e_mail_notebook_view_init (EMailNotebookView *view)
{
- view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view, E_TYPE_MAIL_NOTEBOOK_VIEW, EMailNotebookViewPrivate);
+ view->priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
view->priv->inited = FALSE;
view->priv->views = g_hash_table_new (g_str_hash, g_str_equal);
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index 05777d2..b8fd003 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -46,6 +46,10 @@
#include "message-list.h"
#include "e-mail-reader-utils.h"
+#define E_MAIL_PANED_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_PANED_VIEW, EMailPanedViewPrivate))
+
#define E_SHELL_WINDOW_ACTION_GROUP_MAIL(window) \
E_SHELL_WINDOW_ACTION_GROUP ((window), "mail")
@@ -124,7 +128,7 @@ mail_paned_view_message_list_built_cb (EMailView *view,
EShellWindow *shell_window;
GKeyFile *key_file;
- priv = E_MAIL_PANED_VIEW (view)->priv;
+ priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
g_signal_handler_disconnect (
message_list, priv->message_list_built_id);
@@ -208,7 +212,7 @@ mail_paned_view_restore_state_cb (EShellWindow *shell_window,
GObject *object;
const gchar *key;
- priv = E_MAIL_PANED_VIEW (view)->priv;
+ priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
/* Bind GObject properties to GConf keys. */
@@ -317,7 +321,7 @@ mail_paned_view_dispose (GObject *object)
{
EMailPanedViewPrivate *priv;
- priv = E_MAIL_PANED_VIEW (object)->priv;
+ priv = E_MAIL_PANED_VIEW_GET_PRIVATE (object);
if (priv->paned != NULL) {
g_object_unref (priv->paned);
@@ -400,7 +404,7 @@ mail_paned_view_get_formatter (EMailReader *reader)
{
EMailPanedViewPrivate *priv;
- priv = E_MAIL_PANED_VIEW (reader)->priv;
+ priv = E_MAIL_PANED_VIEW_GET_PRIVATE (reader);
return EM_FORMAT_HTML (priv->formatter);
}
@@ -416,7 +420,7 @@ mail_paned_view_get_message_list (EMailReader *reader)
{
EMailPanedViewPrivate *priv;
- priv = E_MAIL_PANED_VIEW (reader)->priv;
+ priv = E_MAIL_PANED_VIEW_GET_PRIVATE (reader);
return priv->message_list;
}
@@ -473,7 +477,7 @@ mail_paned_view_set_folder (EMailReader *reader,
gboolean value;
GError *error = NULL;
- priv = E_MAIL_PANED_VIEW (reader)->priv;
+ priv = E_MAIL_PANED_VIEW_GET_PRIVATE (reader);
view = E_MAIL_VIEW (reader);
shell_view = e_mail_view_get_shell_view (view);
@@ -548,7 +552,7 @@ mail_paned_view_show_search_bar (EMailReader *reader)
{
EMailPanedViewPrivate *priv;
- priv = E_MAIL_PANED_VIEW (reader)->priv;
+ priv = E_MAIL_PANED_VIEW_GET_PRIVATE (reader);
gtk_widget_show (priv->search_bar);
}
@@ -585,7 +589,7 @@ mail_paned_view_constructed (GObject *object)
GtkWidget *widget;
EWebView *web_view;
- priv = E_MAIL_PANED_VIEW (object)->priv;
+ priv = E_MAIL_PANED_VIEW_GET_PRIVATE (object);
priv->formatter = em_format_html_display_new ();
view = E_MAIL_VIEW (object);
@@ -691,7 +695,7 @@ mail_paned_view_set_search_strings (EMailView *view,
ESearchBar *search_bar;
ESearchingTokenizer *tokenizer;
- priv = E_MAIL_PANED_VIEW (view)->priv;
+ priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
search_bar = E_SEARCH_BAR (priv->search_bar);
tokenizer = e_search_bar_get_tokenizer (search_bar);
@@ -713,7 +717,7 @@ mail_paned_view_get_view_instance (EMailView *view)
{
EMailPanedViewPrivate *priv;
- priv = E_MAIL_PANED_VIEW (view)->priv;
+ priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
return priv->view_instance;
}
@@ -738,7 +742,7 @@ mail_paned_view_update_view_instance (EMailView *view)
const gchar *folder_uri;
gchar *view_id;
- priv = E_MAIL_PANED_VIEW (view)->priv;
+ priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
shell_view = e_mail_view_get_shell_view (view);
shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
@@ -975,7 +979,7 @@ e_mail_paned_view_reader_init (EMailReaderInterface *interface)
static void
e_mail_paned_view_init (EMailPanedView *view)
{
- view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view, E_TYPE_MAIL_PANED_VIEW, EMailPanedViewPrivate);
+ view->priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
view->priv->enable_show_folder = FALSE;
g_signal_connect (
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 4f78be0..a9b12b0 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -64,6 +64,10 @@
#include "mail-send-recv.h"
#include "mail-tools.h"
+#define E_MAIL_SESSION_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_SESSION, EMailSessionPrivate))
+
static guint session_check_junk_notify_id;
static guint session_gconf_proxy_id;
@@ -552,7 +556,7 @@ mail_session_dispose (GObject *object)
{
EMailSessionPrivate *priv;
- priv = E_MAIL_SESSION (object)->priv;
+ priv = E_MAIL_SESSION_GET_PRIVATE (object);
if (priv->folder_cache != NULL) {
g_object_unref (priv->folder_cache);
@@ -997,7 +1001,7 @@ e_mail_session_init (EMailSession *session)
{
GConfClient *client;
- session->priv = G_TYPE_INSTANCE_GET_PRIVATE (session, E_TYPE_MAIL_SESSION, EMailSessionPrivate);
+ session->priv = E_MAIL_SESSION_GET_PRIVATE (session);
session->priv->folder_cache = mail_folder_cache_new ();
/* Initialize the EAccount setup. */
diff --git a/mail/e-mail-sidebar.c b/mail/e-mail-sidebar.c
index 19f38f7..a418dc1 100644
--- a/mail/e-mail-sidebar.c
+++ b/mail/e-mail-sidebar.c
@@ -27,6 +27,10 @@
#include "mail/e-mail-local.h"
#include "mail/em-utils.h"
+#define E_MAIL_SIDEBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_SIDEBAR, EMailSidebarPrivate))
+
struct _EMailSidebarPrivate {
GKeyFile *key_file; /* not owned */
};
@@ -421,7 +425,7 @@ mail_sidebar_init (EMailSidebar *sidebar)
GtkTreeSelection *selection;
EMFolderTree *folder_tree;
- sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (sidebar, E_TYPE_MAIL_SIDEBAR, EMailSidebarPrivate);
+ sidebar->priv = E_MAIL_SIDEBAR_GET_PRIVATE (sidebar);
folder_tree = EM_FOLDER_TREE (sidebar);
em_folder_tree_set_excluded (folder_tree, 0);
diff --git a/mail/e-mail-tab-picker.c b/mail/e-mail-tab-picker.c
index 89b672e..e97bc74 100644
--- a/mail/e-mail-tab-picker.c
+++ b/mail/e-mail-tab-picker.c
@@ -31,6 +31,9 @@ G_DEFINE_TYPE_WITH_CODE (EMailTabPicker,
G_IMPLEMENT_INTERFACE (MX_TYPE_DROPPABLE,
mx_droppable_iface_init))
+#define TAB_PICKER_PRIVATE(o) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), E_MAIL_TYPE_TAB_PICKER, EMailTabPickerPrivate))
+
enum
{
PROP_0,
@@ -896,7 +899,7 @@ e_mail_tab_picker_scroll_value_cb (MxAdjustment *adjustment,
static void
e_mail_tab_picker_init (EMailTabPicker *self)
{
- EMailTabPickerPrivate *priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, E_MAIL_TYPE_TAB_PICKER, EMailTabPickerPrivate);
+ EMailTabPickerPrivate *priv = self->priv = TAB_PICKER_PRIVATE (self);
clutter_actor_set_reactive (CLUTTER_ACTOR (self), TRUE);
diff --git a/mail/e-mail-tab.c b/mail/e-mail-tab.c
index aefe49f..cbbe8a8 100644
--- a/mail/e-mail-tab.c
+++ b/mail/e-mail-tab.c
@@ -35,6 +35,9 @@ G_DEFINE_TYPE_WITH_CODE (EMailTab,
G_IMPLEMENT_INTERFACE (MX_TYPE_DRAGGABLE,
mx_draggable_iface_init))
+#define TAB_PRIVATE(o) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), E_MAIL_TYPE_TAB, EMailTabPrivate))
+
enum
{
PROP_0,
@@ -1307,7 +1310,7 @@ e_mail_tab_init (EMailTab *self)
ClutterActor *text;
GtkSettings *settings;
- EMailTabPrivate *priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, E_MAIL_TYPE_TAB, EMailTabPrivate);
+ EMailTabPrivate *priv = self->priv = TAB_PRIVATE (self);
priv->width = -1;
priv->anim_length = 200;
diff --git a/mail/e-mail-tag-editor.c b/mail/e-mail-tag-editor.c
index 5cc29b5..0b1e20c 100644
--- a/mail/e-mail-tag-editor.c
+++ b/mail/e-mail-tag-editor.c
@@ -33,6 +33,10 @@
#include "e-util/e-util.h"
#include "widgets/misc/e-dateedit.h"
+#define E_MAIL_TAG_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_TAG_EDITOR, EMailTagEditorPrivate))
+
#define DEFAULT_FLAG 2 /* "Follow-Up" */
struct _EMailTagEditorPrivate {
@@ -281,7 +285,7 @@ mail_tag_editor_init (EMailTagEditor *editor)
GtkCellRenderer *renderer;
GtkListStore *store;
- editor->priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, E_TYPE_MAIL_TAG_EDITOR, EMailTagEditorPrivate);
+ editor->priv = E_MAIL_TAG_EDITOR_GET_PRIVATE (editor);
dialog = GTK_DIALOG (editor);
window = GTK_WINDOW (editor);
diff --git a/mail/e-mail-view.c b/mail/e-mail-view.c
index 0db537b..62e0b0c 100644
--- a/mail/e-mail-view.c
+++ b/mail/e-mail-view.c
@@ -28,6 +28,10 @@
#include <glib/gi18n-lib.h>
+#define E_MAIL_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_VIEW, EMailViewPrivate))
+
struct _EMailViewPrivate {
EShellView *shell_view;
GtkOrientation orientation;
@@ -154,7 +158,7 @@ mail_view_dispose (GObject *object)
{
EMailViewPrivate *priv;
- priv = E_MAIL_VIEW (object)->priv;
+ priv = E_MAIL_VIEW_GET_PRIVATE (object);
if (priv->shell_view != NULL) {
g_object_unref (priv->shell_view);
@@ -319,7 +323,7 @@ e_mail_view_class_init (EMailViewClass *class)
static void
e_mail_view_init (EMailView *view)
{
- view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view, E_TYPE_MAIL_VIEW, EMailViewPrivate);
+ view->priv = E_MAIL_VIEW_GET_PRIVATE (view);
}
EShellView *
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index e7973cd..0228d2e 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -72,6 +72,10 @@
#include "smime/gui/e-cert-selector.h"
#endif
+#define EM_ACCOUNT_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_ACCOUNT_EDITOR, EMAccountEditorPrivate))
+
#define d(x)
static ServerData mail_servers[] = {
@@ -334,7 +338,7 @@ emae_dispose (GObject *object)
{
EMAccountEditorPrivate *priv;
- priv = EM_ACCOUNT_EDITOR (object)->priv;
+ priv = EM_ACCOUNT_EDITOR_GET_PRIVATE (object);
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -429,7 +433,7 @@ emae_class_init (GObjectClass *class)
static void
emae_init (EMAccountEditor *emae)
{
- emae->priv = G_TYPE_INSTANCE_GET_PRIVATE (emae, EM_TYPE_ACCOUNT_EDITOR, EMAccountEditorPrivate);
+ emae->priv = EM_ACCOUNT_EDITOR_GET_PRIVATE (emae);
emae->priv->selected_server = NULL;
emae->emae_check_servers = emae_check_servers;
diff --git a/mail/em-filter-context.c b/mail/em-filter-context.c
index f775696..52039d9 100644
--- a/mail/em-filter-context.c
+++ b/mail/em-filter-context.c
@@ -36,6 +36,10 @@
/* For poking into filter-folder guts */
#include "em-filter-folder-element.h"
+#define EM_FILTER_CONTEXT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_FILTER_CONTEXT, EMFilterContextPrivate))
+
struct _EMFilterContextPrivate {
EMailSession *session;
GList *actions;
@@ -101,7 +105,7 @@ filter_context_dispose (GObject *object)
{
EMFilterContextPrivate *priv;
- priv = EM_FILTER_CONTEXT (object)->priv;
+ priv = EM_FILTER_CONTEXT_GET_PRIVATE (object);
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -229,7 +233,7 @@ filter_context_new_element (ERuleContext *context,
{
EMFilterContextPrivate *priv;
- priv = EM_FILTER_CONTEXT (context)->priv;
+ priv = EM_FILTER_CONTEXT_GET_PRIVATE (context);
if (strcmp (type, "folder") == 0)
return em_filter_folder_element_new (priv->session);
@@ -280,7 +284,7 @@ em_filter_context_class_init (EMFilterContextClass *class)
static void
em_filter_context_init (EMFilterContext *context)
{
- context->priv = G_TYPE_INSTANCE_GET_PRIVATE (context, EM_TYPE_FILTER_CONTEXT, EMFilterContextPrivate);
+ context->priv = EM_FILTER_CONTEXT_GET_PRIVATE (context);
e_rule_context_add_part_set (
E_RULE_CONTEXT (context),
diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c
index 70c9da6..4daf441 100644
--- a/mail/em-filter-folder-element.c
+++ b/mail/em-filter-folder-element.c
@@ -39,6 +39,10 @@
#include "libedataserver/e-sexp.h"
#include "e-util/e-alert.h"
+#define EM_FILTER_FOLDER_ELEMENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_FILTER_FOLDER_ELEMENT, EMFilterFolderElementPrivate))
+
struct _EMFilterFolderElementPrivate {
EMailSession *session;
gchar *uri;
@@ -118,7 +122,7 @@ filter_folder_element_dispose (GObject *object)
{
EMFilterFolderElementPrivate *priv;
- priv = EM_FILTER_FOLDER_ELEMENT (object)->priv;
+ priv = EM_FILTER_FOLDER_ELEMENT_GET_PRIVATE (object);
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -134,7 +138,7 @@ filter_folder_element_finalize (GObject *object)
{
EMFilterFolderElementPrivate *priv;
- priv = EM_FILTER_FOLDER_ELEMENT (object)->priv;
+ priv = EM_FILTER_FOLDER_ELEMENT_GET_PRIVATE (object);
g_free (priv->uri);
@@ -181,7 +185,7 @@ em_filter_folder_element_class_init (EMFilterFolderElementClass *class)
static void
em_filter_folder_element_init (EMFilterFolderElement *element)
{
- element->priv = G_TYPE_INSTANCE_GET_PRIVATE (element, EM_TYPE_FILTER_FOLDER_ELEMENT, EMFilterFolderElementPrivate);
+ element->priv = EM_FILTER_FOLDER_ELEMENT_GET_PRIVATE (element);
}
EFilterElement *
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index e6b11c2..7feed62 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -35,6 +35,10 @@
#include "em-folder-selection-button.h"
+#define EM_FOLDER_SELECTION_BUTTON_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_FOLDER_SELECTION_BUTTON, EMFolderSelectionButtonPrivate))
+
struct _EMFolderSelectionButtonPrivate {
EMailSession *session;
GtkWidget *icon;
@@ -191,7 +195,7 @@ folder_selection_button_dispose (GObject *object)
{
EMFolderSelectionButtonPrivate *priv;
- priv = EM_FOLDER_SELECTION_BUTTON (object)->priv;
+ priv = EM_FOLDER_SELECTION_BUTTON_GET_PRIVATE (object);
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -207,7 +211,7 @@ folder_selection_button_finalize (GObject *object)
{
EMFolderSelectionButtonPrivate *priv;
- priv = EM_FOLDER_SELECTION_BUTTON (object)->priv;
+ priv = EM_FOLDER_SELECTION_BUTTON_GET_PRIVATE (object);
g_list_foreach (priv->uris, (GFunc) g_free, NULL);
g_list_free (priv->uris);
@@ -230,7 +234,7 @@ folder_selection_button_clicked (GtkButton *button)
GtkSelectionMode mode;
gpointer parent;
- priv = EM_FOLDER_SELECTION_BUTTON (button)->priv;
+ priv = EM_FOLDER_SELECTION_BUTTON_GET_PRIVATE (button);
parent = gtk_widget_get_toplevel (GTK_WIDGET (button));
parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
@@ -361,7 +365,7 @@ em_folder_selection_button_init (EMFolderSelectionButton *emfsb)
{
GtkWidget *box;
- emfsb->priv = G_TYPE_INSTANCE_GET_PRIVATE (emfsb, EM_TYPE_FOLDER_SELECTION_BUTTON, EMFolderSelectionButtonPrivate);
+ emfsb->priv = EM_FOLDER_SELECTION_BUTTON_GET_PRIVATE (emfsb);
emfsb->priv->multiple_select = FALSE;
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 6668eae..c217d63 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -52,6 +52,10 @@
#define d(x)
+#define EM_FOLDER_TREE_MODEL_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_FOLDER_TREE_MODEL, EMFolderTreeModelPrivate))
+
struct _EMFolderTreeModelPrivate {
/* This is set by EMailShellSidebar. It allows new EMFolderTree
* instances to initialize their selection and expanded states to
@@ -335,7 +339,7 @@ folder_tree_model_dispose (GObject *object)
{
EMFolderTreeModelPrivate *priv;
- priv = EM_FOLDER_TREE_MODEL (object)->priv;
+ priv = EM_FOLDER_TREE_MODEL_GET_PRIVATE (object);
if (priv->selection != NULL) {
g_object_weak_unref (
@@ -358,7 +362,7 @@ folder_tree_model_finalize (GObject *object)
{
EMFolderTreeModelPrivate *priv;
- priv = EM_FOLDER_TREE_MODEL (object)->priv;
+ priv = EM_FOLDER_TREE_MODEL_GET_PRIVATE (object);
g_hash_table_destroy (priv->account_index);
g_hash_table_destroy (priv->store_index);
@@ -529,7 +533,7 @@ em_folder_tree_model_init (EMFolderTreeModel *model)
(GDestroyNotify) g_free,
(GDestroyNotify) gtk_tree_row_reference_free);
- model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, EM_TYPE_FOLDER_TREE_MODEL, EMFolderTreeModelPrivate);
+ model->priv = EM_FOLDER_TREE_MODEL_GET_PRIVATE (model);
model->priv->store_index = store_index;
model->priv->uri_index = uri_index;
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index ee85333..94d5061 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -68,6 +68,10 @@
#define d(x)
+#define EM_FOLDER_TREE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_FOLDER_TREE, EMFolderTreePrivate))
+
struct _selected_uri {
gchar *key; /* store:path or account/path */
gchar *uri;
@@ -391,7 +395,7 @@ folder_tree_select_func (GtkTreeSelection *selection,
tree_view = gtk_tree_selection_get_tree_view (selection);
- priv = EM_FOLDER_TREE (tree_view)->priv;
+ priv = EM_FOLDER_TREE_GET_PRIVATE (tree_view);
if (selected)
return TRUE;
@@ -818,7 +822,7 @@ folder_tree_dispose (GObject *object)
EMFolderTreePrivate *priv;
GtkTreeModel *model;
- priv = EM_FOLDER_TREE (object)->priv;
+ priv = EM_FOLDER_TREE_GET_PRIVATE (object);
model = gtk_tree_view_get_model (GTK_TREE_VIEW (object));
if (priv->loaded_row_id != 0) {
@@ -858,7 +862,7 @@ folder_tree_finalize (GObject *object)
{
EMFolderTreePrivate *priv;
- priv = EM_FOLDER_TREE (object)->priv;
+ priv = EM_FOLDER_TREE_GET_PRIVATE (object);
if (priv->select_uris != NULL) {
g_slist_foreach (
@@ -884,7 +888,7 @@ folder_tree_button_press_event (GtkWidget *widget,
GtkTreePath *path;
gulong handler_id;
- priv = EM_FOLDER_TREE (widget)->priv;
+ priv = EM_FOLDER_TREE_GET_PRIVATE (widget);
tree_view = GTK_TREE_VIEW (widget);
selection = gtk_tree_view_get_selection (tree_view);
@@ -943,7 +947,7 @@ folder_tree_key_press_event (GtkWidget *widget,
return TRUE;
}
- priv = EM_FOLDER_TREE (widget)->priv;
+ priv = EM_FOLDER_TREE_GET_PRIVATE (widget);
tree_view = GTK_TREE_VIEW (widget);
selection = gtk_tree_view_get_selection (tree_view);
@@ -977,7 +981,7 @@ folder_tree_row_activated (GtkTreeView *tree_view,
GtkTreeIter iter;
guint32 flags;
- priv = EM_FOLDER_TREE (tree_view)->priv;
+ priv = EM_FOLDER_TREE_GET_PRIVATE (tree_view);
model = gtk_tree_view_get_model (tree_view);
@@ -1453,7 +1457,7 @@ folder_tree_init (EMFolderTree *folder_tree)
select_uris_table = g_hash_table_new (g_str_hash, g_str_equal);
- folder_tree->priv = G_TYPE_INSTANCE_GET_PRIVATE (folder_tree, EM_TYPE_FOLDER_TREE, EMFolderTreePrivate);
+ folder_tree->priv = EM_FOLDER_TREE_GET_PRIVATE (folder_tree);
folder_tree->priv->select_uris_table = select_uris_table;
tree_view = GTK_TREE_VIEW (folder_tree);
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index fc1281c..24f8aa5 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -64,6 +64,10 @@
#define d(x)
+#define EM_FORMAT_HTML_DISPLAY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplayPrivate))
+
struct _EMFormatHTMLDisplayPrivate {
GtkWidget *attachment_view; /* weak reference */
};
@@ -622,7 +626,7 @@ efhd_init (EMFormatHTMLDisplay *efhd)
web_view = em_format_html_get_web_view (EM_FORMAT_HTML (efhd));
- efhd->priv = G_TYPE_INSTANCE_GET_PRIVATE (efhd, EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplayPrivate);
+ efhd->priv = EM_FORMAT_HTML_DISPLAY_GET_PRIVATE (efhd);
e_mail_display_set_formatter (
E_MAIL_DISPLAY (web_view), EM_FORMAT_HTML (efhd));
@@ -903,7 +907,7 @@ efhd_bar_resize (EMFormatHTML *efh,
GtkWidget *widget;
gint width;
- priv = EM_FORMAT_HTML_DISPLAY (efh)->priv;
+ priv = EM_FORMAT_HTML_DISPLAY_GET_PRIVATE (efh);
web_view = em_format_html_get_web_view (efh);
@@ -929,7 +933,7 @@ efhd_add_bar (EMFormatHTML *efh,
if (!EM_IS_FORMAT_HTML_DISPLAY (efh))
return FALSE;
- priv = EM_FORMAT_HTML_DISPLAY (efh)->priv;
+ priv = EM_FORMAT_HTML_DISPLAY_GET_PRIVATE (efh);
widget = e_mail_attachment_bar_new ();
gtk_container_add (GTK_CONTAINER (eb), widget);
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 780a02a..12bf722 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -66,6 +66,10 @@
#define d(x)
+#define EM_FORMAT_HTML_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_FORMAT_HTML, EMFormatHTMLPrivate))
+
#define EFM_MESSAGE_START_ANAME "evolution#message#start"
#define EFH_MESSAGE_START "<A name=\"" EFM_MESSAGE_START_ANAME "\"></A>"
@@ -762,7 +766,7 @@ efh_busy (EMFormat *emf)
{
EMFormatHTMLPrivate *priv;
- priv = EM_FORMAT_HTML (emf)->priv;
+ priv = EM_FORMAT_HTML_GET_PRIVATE (emf);
return (priv->format_id != -1);
}
@@ -933,12 +937,12 @@ efh_class_init (EMFormatHTMLClass *class)
static void
efh_init (EMFormatHTML *efh,
- EMFormatHTMLClass *class)
+ EMFormatHTMLClass *class)
{
EWebView *web_view;
GdkColor *color;
- efh->priv = G_TYPE_INSTANCE_GET_PRIVATE (efh, EM_TYPE_FORMAT_HTML, EMFormatHTMLPrivate);
+ efh->priv = EM_FORMAT_HTML_GET_PRIVATE (efh);
g_queue_init (&efh->pending_object_list);
g_queue_init (&efh->priv->pending_jobs);
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c
index 8b0400f..3a94e66 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -33,6 +33,10 @@
#include "em-folder-utils.h"
+#define EM_SUBSCRIPTION_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_SUBSCRIPTION_EDITOR, EMSubscriptionEditorPrivate))
+
#define FOLDER_CAN_SELECT(folder_info) \
((folder_info) != NULL && \
((folder_info)->flags & CAMEL_FOLDER_NOSELECT) == 0)
@@ -976,7 +980,7 @@ subscription_editor_dispose (GObject *object)
{
EMSubscriptionEditorPrivate *priv;
- priv = EM_SUBSCRIPTION_EDITOR (object)->priv;
+ priv = EM_SUBSCRIPTION_EDITOR_GET_PRIVATE (object);
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -1004,7 +1008,7 @@ subscription_editor_finalize (GObject *object)
{
EMSubscriptionEditorPrivate *priv;
- priv = EM_SUBSCRIPTION_EDITOR (object)->priv;
+ priv = EM_SUBSCRIPTION_EDITOR_GET_PRIVATE (object);
g_ptr_array_free (priv->stores, TRUE);
@@ -1095,7 +1099,7 @@ em_subscription_editor_init (EMSubscriptionEditor *editor)
GtkWidget *box;
const gchar *tooltip;
- editor->priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, EM_TYPE_SUBSCRIPTION_EDITOR, EMSubscriptionEditorPrivate);
+ editor->priv = EM_SUBSCRIPTION_EDITOR_GET_PRIVATE (editor);
editor->priv->stores = g_ptr_array_new_with_free_func (
(GDestroyNotify) store_data_free);
diff --git a/mail/em-vfolder-context.c b/mail/em-vfolder-context.c
index d59715b..4e7d401 100644
--- a/mail/em-vfolder-context.c
+++ b/mail/em-vfolder-context.c
@@ -35,6 +35,10 @@
#include "em-filter-folder-element.h"
+#define EM_VFOLDER_CONTEXT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_VFOLDER_CONTEXT, EMVFolderContextPrivate))
+
struct _EMVFolderContextPrivate {
EMailSession *session;
};
@@ -99,7 +103,7 @@ vfolder_context_dispose (GObject *object)
{
EMVFolderContextPrivate *priv;
- priv = EM_VFOLDER_CONTEXT (object)->priv;
+ priv = EM_VFOLDER_CONTEXT_GET_PRIVATE (object);
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -116,7 +120,7 @@ vfolder_context_new_element (ERuleContext *context,
{
EMVFolderContextPrivate *priv;
- priv = EM_VFOLDER_CONTEXT (context)->priv;
+ priv = EM_VFOLDER_CONTEXT_GET_PRIVATE (context);
if (strcmp (type, "system-flag") == 0)
return e_filter_option_new ();
@@ -171,7 +175,7 @@ em_vfolder_context_class_init (EMVFolderContextClass *class)
static void
em_vfolder_context_init (EMVFolderContext *context)
{
- context->priv = G_TYPE_INSTANCE_GET_PRIVATE (context, EM_TYPE_VFOLDER_CONTEXT, EMVFolderContextPrivate);
+ context->priv = EM_VFOLDER_CONTEXT_GET_PRIVATE (context);
e_rule_context_add_part_set (
E_RULE_CONTEXT (context), "partset", E_TYPE_FILTER_PART,
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index a1b7f53..1d11a72 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -42,6 +42,10 @@
#include "e-util/e-alert.h"
#include "e-util/e-util-private.h"
+#define EM_VFOLDER_RULE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_VFOLDER_RULE, EMVFolderRulePrivate))
+
struct _EMVFolderRulePrivate {
EMailSession *session;
};
@@ -133,7 +137,7 @@ vfolder_rule_dispose (GObject *object)
{
EMVFolderRulePrivate *priv;
- priv = EM_VFOLDER_RULE (object)->priv;
+ priv = EM_VFOLDER_RULE_GET_PRIVATE (object);
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -193,7 +197,7 @@ em_vfolder_rule_class_init (EMVFolderRuleClass *class)
static void
em_vfolder_rule_init (EMVFolderRule *rule)
{
- rule->priv = G_TYPE_INSTANCE_GET_PRIVATE (rule, EM_TYPE_VFOLDER_RULE, EMVFolderRulePrivate);
+ rule->priv = EM_VFOLDER_RULE_GET_PRIVATE (rule);
rule->with = EM_VFOLDER_RULE_WITH_SPECIFIC;
rule->rule.source = g_strdup ("incoming");
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index e7563ce..876cbb3 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -59,6 +59,10 @@
/* This code is a mess, there is no reason it should be so complicated. */
+#define MAIL_FOLDER_CACHE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), MAIL_TYPE_FOLDER_CACHE, MailFolderCachePrivate))
+
struct _MailFolderCachePrivate {
/* source id for the ping timeout callback */
guint ping_id;
@@ -1050,7 +1054,7 @@ mail_folder_cache_init (MailFolderCache *self)
const gchar *buf;
guint timeout;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, MAIL_TYPE_FOLDER_CACHE, MailFolderCachePrivate);
+ self->priv = MAIL_FOLDER_CACHE_GET_PRIVATE (self);
/* initialize values */
self->priv->stores = g_hash_table_new (NULL, NULL);
diff --git a/mail/message-list.c b/mail/message-list.c
index 148bd61..8f38fac 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -97,6 +97,10 @@
#define d(x)
#define t(x)
+#define MESSAGE_LIST_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), MESSAGE_LIST_TYPE, MessageListPrivate))
+
struct _MLSelection {
GPtrArray *uids;
CamelFolder *folder;
@@ -2464,7 +2468,7 @@ message_list_init (MessageList *message_list)
GtkTargetList *target_list;
GdkAtom matom;
- message_list->priv = G_TYPE_INSTANCE_GET_PRIVATE (message_list, MESSAGE_LIST_TYPE, MessageListPrivate);
+ message_list->priv = MESSAGE_LIST_GET_PRIVATE (message_list);
#if HAVE_CLUTTER
message_list->priv->timeline = NULL;
@@ -2562,7 +2566,7 @@ message_list_dispose (GObject *object)
MessageList *message_list = MESSAGE_LIST (object);
MessageListPrivate *priv;
- priv = message_list->priv;
+ priv = MESSAGE_LIST_GET_PRIVATE (message_list);
if (priv->backend != NULL) {
g_object_unref (priv->backend);
diff --git a/modules/addressbook/e-book-shell-backend.c b/modules/addressbook/e-book-shell-backend.c
index b76764c..02d16d6 100644
--- a/modules/addressbook/e-book-shell-backend.c
+++ b/modules/addressbook/e-book-shell-backend.c
@@ -54,6 +54,10 @@
#include "smime/gui/certificate-manager.h"
#endif
+#define E_BOOK_SHELL_BACKEND_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_BOOK_SHELL_BACKEND, EBookShellBackendPrivate))
+
struct _EBookShellBackendPrivate {
ESourceList *source_list;
};
@@ -81,7 +85,7 @@ book_shell_backend_ensure_sources (EShellBackend *shell_backend)
on_this_computer = NULL;
personal = NULL;
- priv = E_BOOK_SHELL_BACKEND (shell_backend)->priv;
+ priv = E_BOOK_SHELL_BACKEND_GET_PRIVATE (shell_backend);
if (!e_book_get_addressbooks (&priv->source_list, NULL)) {
g_warning ("Could not get addressbook sources from GConf!");
@@ -454,7 +458,7 @@ book_shell_backend_dispose (GObject *object)
{
EBookShellBackendPrivate *priv;
- priv = E_BOOK_SHELL_BACKEND (object)->priv;
+ priv = E_BOOK_SHELL_BACKEND_GET_PRIVATE (object);
if (priv->source_list != NULL) {
g_object_unref (priv->source_list);
@@ -549,7 +553,8 @@ book_shell_backend_class_init (EBookShellBackendClass *class)
static void
book_shell_backend_init (EBookShellBackend *book_shell_backend)
{
- book_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (book_shell_backend, E_TYPE_BOOK_SHELL_BACKEND, EBookShellBackendPrivate);
+ book_shell_backend->priv =
+ E_BOOK_SHELL_BACKEND_GET_PRIVATE (book_shell_backend);
}
GType
diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c
index 2077510..b4bd8d2 100644
--- a/modules/addressbook/e-book-shell-content.c
+++ b/modules/addressbook/e-book-shell-content.c
@@ -30,6 +30,10 @@
#include "widgets/misc/e-preview-pane.h"
#include "e-book-shell-view.h"
+#define E_BOOK_SHELL_CONTENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_BOOK_SHELL_CONTENT, EBookShellContentPrivate))
+
struct _EBookShellContentPrivate {
GtkWidget *paned;
GtkWidget *notebook;
@@ -80,7 +84,7 @@ book_shell_content_restore_state_cb (EShellWindow *shell_window,
GObject *object;
const gchar *key;
- priv = E_BOOK_SHELL_CONTENT (shell_content)->priv;
+ priv = E_BOOK_SHELL_CONTENT_GET_PRIVATE (shell_content);
/* Bind GObject properties to GConf keys. */
@@ -189,7 +193,7 @@ book_shell_content_dispose (GObject *object)
{
EBookShellContentPrivate *priv;
- priv = E_BOOK_SHELL_CONTENT (object)->priv;
+ priv = E_BOOK_SHELL_CONTENT_GET_PRIVATE (object);
if (priv->paned != NULL) {
g_object_unref (priv->paned);
@@ -222,7 +226,7 @@ book_shell_content_constructed (GObject *object)
GtkWidget *container;
GtkWidget *widget;
- priv = E_BOOK_SHELL_CONTENT (object)->priv;
+ priv = E_BOOK_SHELL_CONTENT_GET_PRIVATE (object);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -452,7 +456,8 @@ book_shell_content_class_init (EBookShellContentClass *class)
static void
book_shell_content_init (EBookShellContent *book_shell_content)
{
- book_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (book_shell_content, E_TYPE_BOOK_SHELL_CONTENT, EBookShellContentPrivate);
+ book_shell_content->priv =
+ E_BOOK_SHELL_CONTENT_GET_PRIVATE (book_shell_content);
/* Postpone widget construction until we have a shell view. */
}
diff --git a/modules/addressbook/e-book-shell-sidebar.c b/modules/addressbook/e-book-shell-sidebar.c
index 57f3b28..3c61f5e 100644
--- a/modules/addressbook/e-book-shell-sidebar.c
+++ b/modules/addressbook/e-book-shell-sidebar.c
@@ -30,6 +30,10 @@
#include "e-book-shell-backend.h"
#include "e-addressbook-selector.h"
+#define E_BOOK_SHELL_SIDEBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_BOOK_SHELL_SIDEBAR, EBookShellSidebarPrivate))
+
struct _EBookShellSidebarPrivate {
GtkWidget *selector;
};
@@ -64,7 +68,7 @@ book_shell_sidebar_dispose (GObject *object)
{
EBookShellSidebarPrivate *priv;
- priv = E_BOOK_SHELL_SIDEBAR (object)->priv;
+ priv = E_BOOK_SHELL_SIDEBAR_GET_PRIVATE (object);
if (priv->selector != NULL) {
g_object_unref (priv->selector);
@@ -88,7 +92,7 @@ book_shell_sidebar_constructed (GObject *object)
GtkContainer *container;
GtkWidget *widget;
- priv = E_BOOK_SHELL_SIDEBAR (object)->priv;
+ priv = E_BOOK_SHELL_SIDEBAR_GET_PRIVATE (object);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -200,7 +204,8 @@ book_shell_sidebar_class_init (EBookShellSidebarClass *class)
static void
book_shell_sidebar_init (EBookShellSidebar *book_shell_sidebar)
{
- book_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (book_shell_sidebar, E_TYPE_BOOK_SHELL_SIDEBAR, EBookShellSidebarPrivate);
+ book_shell_sidebar->priv =
+ E_BOOK_SHELL_SIDEBAR_GET_PRIVATE (book_shell_sidebar);
/* Postpone widget construction until we have a shell view. */
}
diff --git a/modules/addressbook/e-book-shell-view-private.h b/modules/addressbook/e-book-shell-view-private.h
index 528a34d..7c2a272 100644
--- a/modules/addressbook/e-book-shell-view-private.h
+++ b/modules/addressbook/e-book-shell-view-private.h
@@ -55,6 +55,10 @@
#include "e-book-shell-sidebar.h"
#include "e-book-shell-view-actions.h"
+#define E_BOOK_SHELL_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_BOOK_SHELL_VIEW, EBookShellViewPrivate))
+
/* Shorthand, requires a variable named "shell_window". */
#define ACTION(name) \
(E_SHELL_WINDOW_ACTION_##name (shell_window))
diff --git a/modules/addressbook/e-book-shell-view.c b/modules/addressbook/e-book-shell-view.c
index 777793a..8b5d816 100644
--- a/modules/addressbook/e-book-shell-view.c
+++ b/modules/addressbook/e-book-shell-view.c
@@ -141,7 +141,7 @@ book_shell_view_execute_search (EShellView *shell_view)
gchar *search_text = NULL;
EFilterRule *advanced_search = NULL;
- priv = E_BOOK_SHELL_VIEW (shell_view)->priv;
+ priv = E_BOOK_SHELL_VIEW_GET_PRIVATE (shell_view);
if (priv->search_locked)
return;
@@ -414,7 +414,8 @@ static void
book_shell_view_init (EBookShellView *book_shell_view,
EShellViewClass *shell_view_class)
{
- book_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (book_shell_view, E_TYPE_BOOK_SHELL_VIEW, EBookShellViewPrivate);
+ book_shell_view->priv =
+ E_BOOK_SHELL_VIEW_GET_PRIVATE (book_shell_view);
e_book_shell_view_private_init (book_shell_view, shell_view_class);
}
@@ -454,7 +455,7 @@ e_book_shell_view_disable_searching (EBookShellView *book_shell_view)
g_return_if_fail (book_shell_view != NULL);
g_return_if_fail (E_IS_BOOK_SHELL_VIEW (book_shell_view));
- priv = book_shell_view->priv;
+ priv = E_BOOK_SHELL_VIEW_GET_PRIVATE (book_shell_view);
priv->search_locked++;
}
@@ -466,7 +467,7 @@ e_book_shell_view_enable_searching (EBookShellView *book_shell_view)
g_return_if_fail (book_shell_view != NULL);
g_return_if_fail (E_IS_BOOK_SHELL_VIEW (book_shell_view));
- priv = book_shell_view->priv;
+ priv = E_BOOK_SHELL_VIEW_GET_PRIVATE (book_shell_view);
g_return_if_fail (priv->search_locked > 0);
priv->search_locked--;
diff --git a/modules/calendar/e-cal-attachment-handler.c b/modules/calendar/e-cal-attachment-handler.c
index 2567787..dfc8f58 100644
--- a/modules/calendar/e-cal-attachment-handler.c
+++ b/modules/calendar/e-cal-attachment-handler.c
@@ -29,6 +29,10 @@
#include "calendar/common/authentication.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 {
@@ -488,7 +492,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 b9cb894..6c80f71 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -51,6 +51,10 @@
#include "e-calendar-preferences.h"
+#define E_CAL_SHELL_BACKEND_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_SHELL_BACKEND, ECalShellBackendPrivate))
+
struct _ECalShellBackendPrivate {
ESourceList *source_list;
};
@@ -703,7 +707,7 @@ cal_shell_backend_dispose (GObject *object)
{
ECalShellBackendPrivate *priv;
- priv = E_CAL_SHELL_BACKEND (object)->priv;
+ priv = E_CAL_SHELL_BACKEND_GET_PRIVATE (object);
if (priv->source_list != NULL) {
g_object_unref (priv->source_list);
@@ -796,7 +800,8 @@ cal_shell_backend_init (ECalShellBackend *cal_shell_backend)
icalarray *builtin_timezones;
gint ii;
- cal_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_backend, E_TYPE_CAL_SHELL_BACKEND, ECalShellBackendPrivate);
+ cal_shell_backend->priv =
+ E_CAL_SHELL_BACKEND_GET_PRIVATE (cal_shell_backend);
/* XXX Pre-load all built-in timezones in libical.
*
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index 1fbedd2..e7a082b 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -39,6 +39,10 @@
#include "e-cal-shell-view-private.h"
+#define E_CAL_SHELL_CONTENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_SHELL_CONTENT, ECalShellContentPrivate))
+
struct _ECalShellContentPrivate {
GtkWidget *hpaned;
GtkWidget *notebook;
@@ -198,7 +202,7 @@ e_cal_shell_content_save_state (ECalShellContent *cal_shell_content)
g_return_if_fail (cal_shell_content != NULL);
g_return_if_fail (E_IS_CAL_SHELL_CONTENT (cal_shell_content));
- priv = cal_shell_content->priv;
+ priv = E_CAL_SHELL_CONTENT_GET_PRIVATE (cal_shell_content);
if (priv->task_table != NULL)
cal_shell_content_save_table_state (
@@ -257,7 +261,7 @@ cal_shell_content_dispose (GObject *object)
{
ECalShellContentPrivate *priv;
- priv = E_CAL_SHELL_CONTENT (object)->priv;
+ priv = E_CAL_SHELL_CONTENT_GET_PRIVATE (object);
if (priv->hpaned != NULL) {
g_object_unref (priv->hpaned);
@@ -335,7 +339,7 @@ cal_shell_content_constructed (GObject *object)
gchar *markup;
gint ii;
- priv = E_CAL_SHELL_CONTENT (object)->priv;
+ priv = E_CAL_SHELL_CONTENT_GET_PRIVATE (object);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -541,7 +545,7 @@ cal_shell_content_map (GtkWidget *widget)
* callback in GnomeCalendar that requires the date navigator.
* Ordinarily we would do this at the end of constructed(), but
* that's too soon in this case. (This feels kind of kludgy.) */
- priv = E_CAL_SHELL_CONTENT (widget)->priv;
+ priv = E_CAL_SHELL_CONTENT_GET_PRIVATE (widget);
gal_view_instance_load (priv->view_instance);
/* Chain up to parent's map() method. */
@@ -620,7 +624,8 @@ cal_shell_content_class_init (ECalShellContentClass *class)
static void
cal_shell_content_init (ECalShellContent *cal_shell_content)
{
- cal_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_content, E_TYPE_CAL_SHELL_CONTENT, ECalShellContentPrivate);
+ cal_shell_content->priv =
+ E_CAL_SHELL_CONTENT_GET_PRIVATE (cal_shell_content);
/* Postpone widget construction until we have a shell view. */
}
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index be0a344..5227df6 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -37,6 +37,10 @@
#include "e-cal-shell-backend.h"
#include "e-cal-shell-content.h"
+#define E_CAL_SHELL_SIDEBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_SHELL_SIDEBAR, ECalShellSidebarPrivate))
+
struct _ECalShellSidebarPrivate {
GtkWidget *paned;
GtkWidget *selector;
@@ -235,7 +239,7 @@ cal_shell_sidebar_default_loaded_cb (ESource *source,
ECal *client;
GError *error = NULL;
- priv = E_CAL_SHELL_SIDEBAR (shell_sidebar)->priv;
+ priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
shell_content = e_shell_view_get_shell_content (shell_view);
@@ -416,7 +420,7 @@ cal_shell_sidebar_restore_state_cb (EShellWindow *shell_window,
GObject *object;
const gchar *key;
- priv = E_CAL_SHELL_SIDEBAR (shell_sidebar)->priv;
+ priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
shell = e_shell_window_get_shell (shell_window);
shell_settings = e_shell_get_shell_settings (shell);
@@ -518,7 +522,7 @@ cal_shell_sidebar_dispose (GObject *object)
{
ECalShellSidebarPrivate *priv;
- priv = E_CAL_SHELL_SIDEBAR (object)->priv;
+ priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (object);
if (priv->paned != NULL) {
g_object_unref (priv->paned);
@@ -557,7 +561,7 @@ cal_shell_sidebar_finalize (GObject *object)
{
ECalShellSidebarPrivate *priv;
- priv = E_CAL_SHELL_SIDEBAR (object)->priv;
+ priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (object);
g_hash_table_destroy (priv->client_table);
@@ -594,7 +598,7 @@ cal_shell_sidebar_constructed (GObject *object)
GtkWidget *widget;
AtkObject *a11y;
- priv = E_CAL_SHELL_SIDEBAR (object)->priv;
+ priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (object);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -844,7 +848,8 @@ cal_shell_sidebar_init (ECalShellSidebar *cal_shell_sidebar)
(GDestroyNotify) g_free,
(GDestroyNotify) g_object_unref);
- cal_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_sidebar, E_TYPE_CAL_SHELL_SIDEBAR, ECalShellSidebarPrivate);
+ cal_shell_sidebar->priv =
+ E_CAL_SHELL_SIDEBAR_GET_PRIVATE (cal_shell_sidebar);
cal_shell_sidebar->priv->client_table = client_table;
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index 61aff5a..0a20ea2 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -239,7 +239,7 @@ cal_shell_view_popup_event_cb (EShellView *shell_view,
const gchar *widget_path;
gint n_selected;
- priv = E_CAL_SHELL_VIEW (shell_view)->priv;
+ priv = E_CAL_SHELL_VIEW_GET_PRIVATE (shell_view);
calendar = e_cal_shell_content_get_calendar (priv->cal_shell_content);
diff --git a/modules/calendar/e-cal-shell-view-private.h b/modules/calendar/e-cal-shell-view-private.h
index 0f92350..d6f37ba 100644
--- a/modules/calendar/e-cal-shell-view-private.h
+++ b/modules/calendar/e-cal-shell-view-private.h
@@ -63,6 +63,10 @@
#include "e-cal-shell-sidebar.h"
#include "e-cal-shell-view-actions.h"
+#define E_CAL_SHELL_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_SHELL_VIEW, ECalShellViewPrivate))
+
/* Shorthand, requires a variable named "shell_window". */
#define ACTION(name) \
(E_SHELL_WINDOW_ACTION_##name (shell_window))
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c
index 72ce261..1210d2d 100644
--- a/modules/calendar/e-cal-shell-view.c
+++ b/modules/calendar/e-cal-shell-view.c
@@ -310,7 +310,7 @@ cal_shell_view_update_actions (EShellView *shell_view)
/* Chain up to parent's update_actions() method. */
E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view);
- priv = E_CAL_SHELL_VIEW (shell_view)->priv;
+ priv = E_CAL_SHELL_VIEW_GET_PRIVATE (shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
shell = e_shell_window_get_shell (shell_window);
@@ -517,7 +517,8 @@ static void
cal_shell_view_init (ECalShellView *cal_shell_view,
EShellViewClass *shell_view_class)
{
- cal_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_view, E_TYPE_CAL_SHELL_VIEW, ECalShellViewPrivate);
+ cal_shell_view->priv =
+ E_CAL_SHELL_VIEW_GET_PRIVATE (cal_shell_view);
e_cal_shell_view_private_init (cal_shell_view, shell_view_class);
}
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c
index 5c02cdd..d60421c 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -41,6 +41,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"
@@ -485,7 +489,7 @@ memo_shell_backend_dispose (GObject *object)
{
EMemoShellBackendPrivate *priv;
- priv = E_MEMO_SHELL_BACKEND (object)->priv;
+ priv = E_MEMO_SHELL_BACKEND_GET_PRIVATE (object);
if (priv->source_list != NULL) {
g_object_unref (priv->source_list);
@@ -559,7 +563,8 @@ memo_shell_backend_class_init (EMemoShellBackendClass *class)
static void
memo_shell_backend_init (EMemoShellBackend *memo_shell_backend)
{
- memo_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_backend, E_TYPE_MEMO_SHELL_BACKEND, EMemoShellBackendPrivate);
+ memo_shell_backend->priv =
+ E_MEMO_SHELL_BACKEND_GET_PRIVATE (memo_shell_backend);
}
GType
diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c
index 37e96fe..a9d299e 100644
--- a/modules/calendar/e-memo-shell-content.c
+++ b/modules/calendar/e-memo-shell-content.c
@@ -35,6 +35,10 @@
#include "calendar/gui/e-cal-model-memos.h"
#include "calendar/gui/e-memo-table.h"
+#define E_MEMO_SHELL_CONTENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MEMO_SHELL_CONTENT, EMemoShellContentPrivate))
+
#define E_MEMO_TABLE_DEFAULT_STATE \
"<?xml version=\"1.0\"?>" \
"<ETableState>" \
@@ -273,7 +277,7 @@ memo_shell_content_restore_state_cb (EShellWindow *shell_window,
GObject *object;
const gchar *key;
- priv = E_MEMO_SHELL_CONTENT (shell_content)->priv;
+ priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (shell_content);
/* Bind GObject properties to GConf keys. */
@@ -363,7 +367,7 @@ memo_shell_content_dispose (GObject *object)
{
EMemoShellContentPrivate *priv;
- priv = E_MEMO_SHELL_CONTENT (object)->priv;
+ priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object);
if (priv->paned != NULL) {
g_object_unref (priv->paned);
@@ -399,7 +403,7 @@ memo_shell_content_finalize (GObject *object)
{
EMemoShellContentPrivate *priv;
- priv = E_MEMO_SHELL_CONTENT (object)->priv;
+ priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object);
g_free (priv->current_uid);
@@ -424,7 +428,7 @@ memo_shell_content_constructed (GObject *object)
GtkWidget *widget;
gint n_targets;
- priv = E_MEMO_SHELL_CONTENT (object)->priv;
+ priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -602,7 +606,7 @@ memo_shell_content_focus_search_results (EShellContent *shell_content)
{
EMemoShellContentPrivate *priv;
- priv = E_MEMO_SHELL_CONTENT (shell_content)->priv;
+ priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (shell_content);
gtk_widget_grab_focus (priv->memo_table);
}
@@ -655,7 +659,8 @@ memo_shell_content_class_init (EMemoShellContentClass *class)
static void
memo_shell_content_init (EMemoShellContent *memo_shell_content)
{
- memo_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_content, E_TYPE_MEMO_SHELL_CONTENT, EMemoShellContentPrivate);
+ memo_shell_content->priv =
+ E_MEMO_SHELL_CONTENT_GET_PRIVATE (memo_shell_content);
/* Postpone widget construction until we have a shell view. */
}
diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c
index 612b831..b7e52a9 100644
--- a/modules/calendar/e-memo-shell-sidebar.c
+++ b/modules/calendar/e-memo-shell-sidebar.c
@@ -35,6 +35,10 @@
#include "e-memo-shell-backend.h"
#include "e-memo-shell-content.h"
+#define E_MEMO_SHELL_SIDEBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MEMO_SHELL_SIDEBAR, EMemoShellSidebarPrivate))
+
struct _EMemoShellSidebarPrivate {
GtkWidget *selector;
@@ -230,7 +234,7 @@ memo_shell_sidebar_default_loaded_cb (ESource *source,
ECal *client;
GError *error = NULL;
- priv = E_MEMO_SHELL_SIDEBAR (shell_sidebar)->priv;
+ priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
shell_content = e_shell_view_get_shell_content (shell_view);
@@ -408,7 +412,7 @@ memo_shell_sidebar_restore_state_cb (EShellWindow *shell_window,
GtkTreeModel *model;
GSList *list, *iter;
- priv = E_MEMO_SHELL_SIDEBAR (shell_sidebar)->priv;
+ priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
shell = e_shell_window_get_shell (shell_window);
shell_settings = e_shell_get_shell_settings (shell);
@@ -495,7 +499,7 @@ memo_shell_sidebar_dispose (GObject *object)
{
EMemoShellSidebarPrivate *priv;
- priv = E_MEMO_SHELL_SIDEBAR (object)->priv;
+ priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (object);
if (priv->selector != NULL) {
g_object_unref (priv->selector);
@@ -524,7 +528,7 @@ memo_shell_sidebar_finalize (GObject *object)
{
EMemoShellSidebarPrivate *priv;
- priv = E_MEMO_SHELL_SIDEBAR (object)->priv;
+ priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (object);
g_hash_table_destroy (priv->client_table);
@@ -545,7 +549,7 @@ memo_shell_sidebar_constructed (GObject *object)
GtkWidget *widget;
AtkObject *a11y;
- priv = E_MEMO_SHELL_SIDEBAR (object)->priv;
+ priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (object);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -740,7 +744,8 @@ memo_shell_sidebar_init (EMemoShellSidebar *memo_shell_sidebar)
(GDestroyNotify) g_free,
(GDestroyNotify) g_object_unref);
- memo_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_sidebar, E_TYPE_MEMO_SHELL_SIDEBAR, EMemoShellSidebarPrivate);
+ memo_shell_sidebar->priv =
+ E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (memo_shell_sidebar);
memo_shell_sidebar->priv->client_table = client_table;
diff --git a/modules/calendar/e-memo-shell-view-private.h b/modules/calendar/e-memo-shell-view-private.h
index 0a6a390..0b8867a 100644
--- a/modules/calendar/e-memo-shell-view-private.h
+++ b/modules/calendar/e-memo-shell-view-private.h
@@ -50,6 +50,10 @@
#include "e-memo-shell-sidebar.h"
#include "e-memo-shell-view-actions.h"
+#define E_MEMO_SHELL_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MEMO_SHELL_VIEW, EMemoShellViewPrivate))
+
/* Shorthand, requires a variable named "shell_window". */
#define ACTION(name) \
(E_SHELL_WINDOW_ACTION_##name (shell_window))
diff --git a/modules/calendar/e-memo-shell-view.c b/modules/calendar/e-memo-shell-view.c
index 4cef169..2194975 100644
--- a/modules/calendar/e-memo-shell-view.c
+++ b/modules/calendar/e-memo-shell-view.c
@@ -302,7 +302,8 @@ static void
memo_shell_view_init (EMemoShellView *memo_shell_view,
EShellViewClass *shell_view_class)
{
- memo_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_view, E_TYPE_MEMO_SHELL_VIEW, EMemoShellViewPrivate);
+ memo_shell_view->priv =
+ E_MEMO_SHELL_VIEW_GET_PRIVATE (memo_shell_view);
e_memo_shell_view_private_init (memo_shell_view, shell_view_class);
}
diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c
index 9d85dc8..a55bd75 100644
--- a/modules/calendar/e-task-shell-backend.c
+++ b/modules/calendar/e-task-shell-backend.c
@@ -43,6 +43,10 @@
#include "e-task-shell-sidebar.h"
#include "e-task-shell-view.h"
+#define E_TASK_SHELL_BACKEND_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TASK_SHELL_BACKEND, ETaskShellBackendPrivate))
+
struct _ETaskShellBackendPrivate {
ESourceList *source_list;
};
@@ -490,7 +494,7 @@ task_shell_backend_dispose (GObject *object)
{
ETaskShellBackendPrivate *priv;
- priv = E_TASK_SHELL_BACKEND (object)->priv;
+ priv = E_TASK_SHELL_BACKEND_GET_PRIVATE (object);
if (priv->source_list != NULL) {
g_object_unref (priv->source_list);
@@ -564,7 +568,8 @@ task_shell_backend_class_init (ETaskShellBackendClass *class)
static void
task_shell_backend_init (ETaskShellBackend *task_shell_backend)
{
- task_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_backend, E_TYPE_TASK_SHELL_BACKEND, ETaskShellBackendPrivate);
+ task_shell_backend->priv =
+ E_TASK_SHELL_BACKEND_GET_PRIVATE (task_shell_backend);
}
GType
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index 78680bc..9cc9246 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -34,6 +34,10 @@
#include "calendar/gui/e-cal-component-preview.h"
#include "calendar/gui/e-cal-model-tasks.h"
+#define E_TASK_SHELL_CONTENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TASK_SHELL_CONTENT, ETaskShellContentPrivate))
+
#define E_TASK_TABLE_DEFAULT_STATE \
"<?xml version=\"1.0\"?>" \
"<ETableState>" \
@@ -271,7 +275,7 @@ task_shell_content_restore_state_cb (EShellWindow *shell_window,
GObject *object;
const gchar *key;
- priv = E_TASK_SHELL_CONTENT (shell_content)->priv;
+ priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (shell_content);
/* Bind GObject properties to GConf keys. */
@@ -361,7 +365,7 @@ task_shell_content_dispose (GObject *object)
{
ETaskShellContentPrivate *priv;
- priv = E_TASK_SHELL_CONTENT (object)->priv;
+ priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object);
if (priv->paned != NULL) {
g_object_unref (priv->paned);
@@ -397,7 +401,7 @@ task_shell_content_finalize (GObject *object)
{
ETaskShellContentPrivate *priv;
- priv = E_TASK_SHELL_CONTENT (object)->priv;
+ priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object);
g_free (priv->current_uid);
@@ -421,7 +425,7 @@ task_shell_content_constructed (GObject *object)
GtkWidget *widget;
gint n_targets;
- priv = E_TASK_SHELL_CONTENT (object)->priv;
+ priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -623,7 +627,7 @@ task_shell_content_focus_search_results (EShellContent *shell_content)
{
ETaskShellContentPrivate *priv;
- priv = E_TASK_SHELL_CONTENT (shell_content)->priv;
+ priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (shell_content);
gtk_widget_grab_focus (priv->task_table);
}
@@ -676,7 +680,8 @@ task_shell_content_class_init (ETaskShellContentClass *class)
static void
task_shell_content_init (ETaskShellContent *task_shell_content)
{
- task_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_content, E_TYPE_TASK_SHELL_CONTENT, ETaskShellContentPrivate);
+ task_shell_content->priv =
+ E_TASK_SHELL_CONTENT_GET_PRIVATE (task_shell_content);
/* Postpone widget construction until we have a shell view. */
}
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c
index c6f6e15..62973d2 100644
--- a/modules/calendar/e-task-shell-sidebar.c
+++ b/modules/calendar/e-task-shell-sidebar.c
@@ -35,6 +35,10 @@
#include "e-task-shell-backend.h"
#include "e-task-shell-content.h"
+#define E_TASK_SHELL_SIDEBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TASK_SHELL_SIDEBAR, ETaskShellSidebarPrivate))
+
struct _ETaskShellSidebarPrivate {
GtkWidget *selector;
@@ -230,7 +234,7 @@ task_shell_sidebar_default_loaded_cb (ESource *source,
ECal *client;
GError *error = NULL;
- priv = E_TASK_SHELL_SIDEBAR (shell_sidebar)->priv;
+ priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
shell_content = e_shell_view_get_shell_content (shell_view);
@@ -408,7 +412,7 @@ task_shell_sidebar_restore_state_cb (EShellWindow *shell_window,
GtkTreeModel *model;
GSList *list, *iter;
- priv = E_TASK_SHELL_SIDEBAR (shell_sidebar)->priv;
+ priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
shell = e_shell_window_get_shell (shell_window);
shell_settings = e_shell_get_shell_settings (shell);
@@ -495,7 +499,7 @@ task_shell_sidebar_dispose (GObject *object)
{
ETaskShellSidebarPrivate *priv;
- priv = E_TASK_SHELL_SIDEBAR (object)->priv;
+ priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (object);
if (priv->selector != NULL) {
g_object_unref (priv->selector);
@@ -524,7 +528,7 @@ task_shell_sidebar_finalize (GObject *object)
{
ETaskShellSidebarPrivate *priv;
- priv = E_TASK_SHELL_SIDEBAR (object)->priv;
+ priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (object);
g_hash_table_destroy (priv->client_table);
@@ -545,7 +549,7 @@ task_shell_sidebar_constructed (GObject *object)
GtkWidget *widget;
AtkObject *a11y;
- priv = E_TASK_SHELL_SIDEBAR (object)->priv;
+ priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (object);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -740,7 +744,8 @@ task_shell_sidebar_init (ETaskShellSidebar *task_shell_sidebar)
(GDestroyNotify) g_free,
(GDestroyNotify) g_object_unref);
- task_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_sidebar, E_TYPE_TASK_SHELL_SIDEBAR, ETaskShellSidebarPrivate);
+ task_shell_sidebar->priv =
+ E_TASK_SHELL_SIDEBAR_GET_PRIVATE (task_shell_sidebar);
task_shell_sidebar->priv->client_table = client_table;
diff --git a/modules/calendar/e-task-shell-view-private.h b/modules/calendar/e-task-shell-view-private.h
index b7dace8..b95c0d5 100644
--- a/modules/calendar/e-task-shell-view-private.h
+++ b/modules/calendar/e-task-shell-view-private.h
@@ -54,6 +54,10 @@
#include "e-task-shell-sidebar.h"
#include "e-task-shell-view-actions.h"
+#define E_TASK_SHELL_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TASK_SHELL_VIEW, ETaskShellViewPrivate))
+
/* Shorthand, requires a variable named "shell_window". */
#define ACTION(name) \
(E_SHELL_WINDOW_ACTION_##name (shell_window))
diff --git a/modules/calendar/e-task-shell-view.c b/modules/calendar/e-task-shell-view.c
index e4b5e03..7b575f8 100644
--- a/modules/calendar/e-task-shell-view.c
+++ b/modules/calendar/e-task-shell-view.c
@@ -467,7 +467,8 @@ static void
task_shell_view_init (ETaskShellView *task_shell_view,
EShellViewClass *shell_view_class)
{
- task_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_view, E_TYPE_TASK_SHELL_VIEW, ETaskShellViewPrivate);
+ task_shell_view->priv =
+ E_TASK_SHELL_VIEW_GET_PRIVATE (task_shell_view);
e_task_shell_view_private_init (task_shell_view, shell_view_class);
}
diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c
index 7f51274..270e0ff 100644
--- a/modules/mail/e-mail-attachment-handler.c
+++ b/modules/mail/e-mail-attachment-handler.c
@@ -27,6 +27,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;
@@ -67,7 +71,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);
@@ -102,7 +106,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);
@@ -141,7 +145,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);
@@ -288,7 +292,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;
@@ -455,7 +459,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);
@@ -485,7 +489,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);
@@ -565,7 +569,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-junk-hook.c b/modules/mail/e-mail-junk-hook.c
index 5ee982f..24c1ac7 100644
--- a/modules/mail/e-mail-junk-hook.c
+++ b/modules/mail/e-mail-junk-hook.c
@@ -31,6 +31,10 @@
#include "mail/e-mail-backend.h"
#include "mail/e-mail-session.h"
+#define E_MAIL_JUNK_HOOK_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_JUNK_HOOK, EMailJunkHookPrivate))
+
struct _EMailJunkHookPrivate {
EMJunkInterface interface;
};
@@ -191,7 +195,7 @@ mail_junk_hook_finalize (GObject *object)
{
EMailJunkHookPrivate *priv;
- priv = E_MAIL_JUNK_HOOK (object)->priv;
+ priv = E_MAIL_JUNK_HOOK_GET_PRIVATE (object);
g_free (priv->interface.check_junk);
g_free (priv->interface.report_junk);
@@ -216,7 +220,7 @@ mail_junk_hook_construct (EPluginHook *hook,
EMailSession *session;
gchar *property;
- priv = E_MAIL_JUNK_HOOK (hook)->priv;
+ priv = E_MAIL_JUNK_HOOK_GET_PRIVATE (hook);
/* Chain up to parent's construct() method. */
if (E_PLUGIN_HOOK_CLASS (parent_class)->construct (hook, plugin, node) == -1)
@@ -298,7 +302,7 @@ mail_junk_hook_init (EMailJunkHook *mail_junk_hook)
{
EMJunkInterface *interface;
- mail_junk_hook->priv = G_TYPE_INSTANCE_GET_PRIVATE (mail_junk_hook, E_TYPE_MAIL_JUNK_HOOK, EMailJunkHookPrivate);
+ mail_junk_hook->priv = E_MAIL_JUNK_HOOK_GET_PRIVATE (mail_junk_hook);
interface = &mail_junk_hook->priv->interface;
interface->camel.get_name = mail_junk_hook_get_name;
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index d30dd2e..d5096c6 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -55,6 +55,10 @@
#include "mail-vfolder.h"
#include "importers/mail-importer.h"
+#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 {
@@ -370,7 +374,7 @@ mail_shell_backend_prepare_for_quit_cb (EShell *shell,
{
EMailShellBackendPrivate *priv;
- priv = E_MAIL_SHELL_BACKEND (shell_backend)->priv;
+ priv = E_MAIL_SHELL_BACKEND_GET_PRIVATE (shell_backend);
/* Prevent a sync from starting while trying to shutdown. */
if (priv->mail_sync_source_id > 0) {
@@ -531,7 +535,7 @@ mail_shell_backend_start (EShellBackend *shell_backend)
gboolean enable_search_folders;
const gchar *data_dir;
- priv = E_MAIL_SHELL_BACKEND (shell_backend)->priv;
+ priv = E_MAIL_SHELL_BACKEND_GET_PRIVATE (shell_backend);
shell = e_shell_backend_get_shell (shell_backend);
shell_settings = e_shell_get_shell_settings (shell);
@@ -702,7 +706,8 @@ mail_shell_backend_class_init (EMailShellBackendClass *class)
static void
mail_shell_backend_init (EMailShellBackend *mail_shell_backend)
{
- mail_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (mail_shell_backend, E_TYPE_MAIL_SHELL_BACKEND, EMailShellBackendPrivate);
+ mail_shell_backend->priv =
+ E_MAIL_SHELL_BACKEND_GET_PRIVATE (mail_shell_backend);
}
GType
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c
index d367994..2f7bea3 100644
--- a/modules/mail/e-mail-shell-content.c
+++ b/modules/mail/e-mail-shell-content.c
@@ -43,6 +43,10 @@
#include "e-mail-shell-backend.h"
#include "e-mail-shell-view-actions.h"
+#define E_MAIL_SHELL_CONTENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_SHELL_CONTENT, EMailShellContentPrivate))
+
struct _EMailShellContentPrivate {
EMailView *mail_view;
};
@@ -150,7 +154,7 @@ mail_shell_content_dispose (GObject *object)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT (object)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (object);
if (priv->mail_view != NULL) {
g_object_unref (priv->mail_view);
@@ -170,7 +174,7 @@ mail_shell_content_constructed (GObject *object)
GtkWidget *container;
GtkWidget *widget;
- priv = E_MAIL_SHELL_CONTENT (object)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (object);
/* Chain up to parent's constructed () method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -209,7 +213,7 @@ mail_shell_content_check_state (EShellContent *shell_content)
EMailShellContentPrivate *priv;
EMailReader *reader;
- priv = E_MAIL_SHELL_CONTENT (shell_content)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (shell_content);
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -225,7 +229,7 @@ mail_shell_content_focus_search_results (EShellContent *shell_content)
GtkWidget *message_list;
EMailReader *reader;
- priv = E_MAIL_SHELL_CONTENT (shell_content)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (shell_content);
reader = E_MAIL_READER (priv->mail_view);
message_list = e_mail_reader_get_message_list (reader);
@@ -238,7 +242,7 @@ mail_shell_content_open_selected_mail (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT (reader)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -266,7 +270,7 @@ mail_shell_content_get_alert_sink (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT (reader)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -280,7 +284,7 @@ mail_shell_content_get_backend (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT (reader)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -294,7 +298,7 @@ mail_shell_content_get_formatter (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT (reader)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -308,7 +312,7 @@ mail_shell_content_get_hide_deleted (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT (reader)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -322,7 +326,7 @@ mail_shell_content_get_message_list (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT (reader)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -336,7 +340,7 @@ mail_shell_content_get_popup_menu (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT (reader)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -350,7 +354,7 @@ mail_shell_content_get_window (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT (reader)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -366,7 +370,7 @@ mail_shell_content_set_folder (EMailReader *reader,
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT (reader)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -380,7 +384,7 @@ mail_shell_content_show_search_bar (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT (reader)->priv;
+ priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -440,7 +444,8 @@ mail_shell_content_class_init (EMailShellContentClass *class)
static void
mail_shell_content_init (EMailShellContent *mail_shell_content)
{
- mail_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (mail_shell_content, E_TYPE_MAIL_SHELL_CONTENT, EMailShellContentPrivate);
+ mail_shell_content->priv =
+ E_MAIL_SHELL_CONTENT_GET_PRIVATE (mail_shell_content);
/* Postpone widget construction until we have a shell view. */
}
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c
index 5e5e515..8a3587b 100644
--- a/modules/mail/e-mail-shell-sidebar.c
+++ b/modules/mail/e-mail-shell-sidebar.c
@@ -25,6 +25,10 @@
#include "mail/e-mail-sidebar.h"
#include "mail/em-folder-utils.h"
+#define E_MAIL_SHELL_SIDEBAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_SHELL_SIDEBAR, EMailShellSidebarPrivate))
+
struct _EMailShellSidebarPrivate {
GtkWidget *folder_tree;
};
@@ -95,7 +99,7 @@ mail_shell_sidebar_dispose (GObject *object)
{
EMailShellSidebarPrivate *priv;
- priv = E_MAIL_SHELL_SIDEBAR (object)->priv;
+ priv = E_MAIL_SHELL_SIDEBAR_GET_PRIVATE (object);
if (priv->folder_tree != NULL) {
g_object_unref (priv->folder_tree);
@@ -290,7 +294,7 @@ mail_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
EMailShellSidebarPrivate *priv;
EMailSidebar *sidebar;
- priv = E_MAIL_SHELL_SIDEBAR (shell_sidebar)->priv;
+ priv = E_MAIL_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
sidebar = E_MAIL_SIDEBAR (priv->folder_tree);
return e_mail_sidebar_check_state (sidebar);
@@ -332,7 +336,8 @@ mail_shell_sidebar_class_init (EMailShellSidebarClass *class)
static void
mail_shell_sidebar_init (EMailShellSidebar *mail_shell_sidebar)
{
- mail_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (mail_shell_sidebar, E_TYPE_MAIL_SHELL_SIDEBAR, EMailShellSidebarPrivate);
+ mail_shell_sidebar->priv =
+ E_MAIL_SHELL_SIDEBAR_GET_PRIVATE (mail_shell_sidebar);
/* Postpone widget construction until we have a shell view. */
}
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index 08ed7a9..d69ba8d 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -1537,7 +1537,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/e-mail-shell-view-private.h b/modules/mail/e-mail-shell-view-private.h
index ac460a7..a3aa345 100644
--- a/modules/mail/e-mail-shell-view-private.h
+++ b/modules/mail/e-mail-shell-view-private.h
@@ -66,6 +66,10 @@
#include "e-mail-shell-sidebar.h"
#include "e-mail-shell-view-actions.h"
+#define E_MAIL_SHELL_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MAIL_SHELL_VIEW, EMailShellViewPrivate))
+
/* Shorthand, requires a variable named "shell_window". */
#define ACTION(name) \
(E_SHELL_WINDOW_ACTION_##name (shell_window))
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index c808ea3..f43b1f3 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -174,7 +174,7 @@ mail_shell_view_toggled (EShellView *shell_view)
const gchar *basename;
gboolean view_is_active;
- priv = E_MAIL_SHELL_VIEW (shell_view)->priv;
+ priv = E_MAIL_SHELL_VIEW_GET_PRIVATE (shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
ui_manager = e_shell_window_get_ui_manager (shell_window);
@@ -243,7 +243,7 @@ mail_shell_view_execute_search (EShellView *shell_view)
const gchar *use_tag;
gint value;
- priv = E_MAIL_SHELL_VIEW (shell_view)->priv;
+ priv = E_MAIL_SHELL_VIEW_GET_PRIVATE (shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
shell_backend = e_shell_view_get_shell_backend (shell_view);
@@ -1059,7 +1059,8 @@ static void
mail_shell_view_init (EMailShellView *mail_shell_view,
EShellViewClass *shell_view_class)
{
- mail_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (mail_shell_view, E_TYPE_MAIL_SHELL_VIEW, EMailShellViewPrivate);
+ mail_shell_view->priv =
+ E_MAIL_SHELL_VIEW_GET_PRIVATE (mail_shell_view);
e_mail_shell_view_private_init (mail_shell_view, shell_view_class);
}
diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c
index 378207c..e309d2c 100644
--- a/modules/mail/em-account-prefs.c
+++ b/modules/mail/em-account-prefs.c
@@ -42,6 +42,10 @@
#include "shell/e-shell.h"
#include "capplet/settings/mail-capplet-shell.h"
+#define EM_ACCOUNT_PREFS_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_ACCOUNT_PREFS, EMAccountPrefsPrivate))
+
struct _EMAccountPrefsPrivate {
EMailSession *session;
gpointer assistant; /* weak pointer */
@@ -158,7 +162,7 @@ account_prefs_dispose (GObject *object)
{
EMAccountPrefsPrivate *priv;
- priv = EM_ACCOUNT_PREFS (object)->priv;
+ priv = EM_ACCOUNT_PREFS_GET_PRIVATE (object);
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -188,7 +192,7 @@ account_prefs_add_account (EAccountManager *manager)
EMAccountEditor *emae;
gpointer parent;
- priv = EM_ACCOUNT_PREFS (manager)->priv;
+ priv = EM_ACCOUNT_PREFS_GET_PRIVATE (manager);
if (priv->assistant != NULL) {
gtk_window_present (GTK_WINDOW (priv->assistant));
@@ -235,7 +239,7 @@ account_prefs_edit_account (EAccountManager *manager)
EAccount *account;
gpointer parent;
- priv = EM_ACCOUNT_PREFS (manager)->priv;
+ priv = EM_ACCOUNT_PREFS_GET_PRIVATE (manager);
if (priv->editor != NULL) {
gtk_window_present (GTK_WINDOW (priv->editor));
@@ -282,7 +286,7 @@ account_prefs_delete_account (EAccountManager *manager)
gpointer parent;
gint response;
- priv = EM_ACCOUNT_PREFS (manager)->priv;
+ priv = EM_ACCOUNT_PREFS_GET_PRIVATE (manager);
account_list = e_account_manager_get_account_list (manager);
tree_view = e_account_manager_get_tree_view (manager);
@@ -360,7 +364,7 @@ em_account_prefs_init (EMAccountPrefs *prefs)
EAccountManager *manager;
EAccountTreeView *tree_view;
- prefs->priv = G_TYPE_INSTANCE_GET_PRIVATE (prefs, EM_TYPE_ACCOUNT_PREFS, EMAccountPrefsPrivate);
+ prefs->priv = EM_ACCOUNT_PREFS_GET_PRIVATE (prefs);
manager = E_ACCOUNT_MANAGER (prefs);
tree_view = e_account_manager_get_tree_view (manager);
diff --git a/modules/plugin-mono/e-plugin-mono.c b/modules/plugin-mono/e-plugin-mono.c
index 8fc3fc0..e47c9ac 100644
--- a/modules/plugin-mono/e-plugin-mono.c
+++ b/modules/plugin-mono/e-plugin-mono.c
@@ -34,6 +34,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;
@@ -230,7 +234,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 2cbee65..1b8057c 100644
--- a/modules/plugin-python/e-plugin-python.c
+++ b/modules/plugin-python/e-plugin-python.c
@@ -28,6 +28,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;
@@ -193,7 +197,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/shell/e-shell-backend.c b/shell/e-shell-backend.c
index cd67284..c2abb47 100644
--- a/shell/e-shell-backend.c
+++ b/shell/e-shell-backend.c
@@ -37,6 +37,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
@@ -167,7 +171,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);
@@ -183,7 +187,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);
@@ -290,7 +294,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-content.c b/shell/e-shell-content.c
index 96e56f7..5b53fb5 100644
--- a/shell/e-shell-content.c
+++ b/shell/e-shell-content.c
@@ -44,6 +44,10 @@
#include "e-shell-view.h"
#include "e-shell-window-actions.h"
+#define E_SHELL_CONTENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_CONTENT, EShellContentPrivate))
+
struct _EShellContentPrivate {
gpointer shell_view; /* weak pointer */
@@ -146,7 +150,7 @@ shell_content_dispose (GObject *object)
{
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT (object)->priv;
+ priv = E_SHELL_CONTENT_GET_PRIVATE (object);
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -168,7 +172,7 @@ shell_content_finalize (GObject *object)
{
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT (object)->priv;
+ priv = E_SHELL_CONTENT_GET_PRIVATE (object);
g_free (priv->user_filename);
@@ -218,7 +222,7 @@ shell_content_get_preferred_width (GtkWidget *widget,
gint child_min, child_nat;
GtkWidget *child;
- priv = E_SHELL_CONTENT (widget)->priv;
+ priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
*minimum = *natural = 0;
@@ -246,7 +250,7 @@ shell_content_get_preferred_height (GtkWidget *widget,
gint min, nat;
GtkWidget *child;
- priv = E_SHELL_CONTENT (widget)->priv;
+ priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
child = gtk_bin_get_child (GTK_BIN (widget));
gtk_widget_get_preferred_height (child, minimum, natural);
@@ -269,7 +273,7 @@ shell_content_size_allocate (GtkWidget *widget,
GtkWidget *child;
gint remaining_height;
- priv = E_SHELL_CONTENT (widget)->priv;
+ priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
remaining_height = allocation->height;
gtk_widget_set_allocation (widget, allocation);
@@ -328,7 +332,7 @@ shell_content_remove (GtkContainer *container,
GtkContainerClass *container_class;
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT (container)->priv;
+ priv = E_SHELL_CONTENT_GET_PRIVATE (container);
if (widget == priv->alert_bar) {
gtk_widget_unparent (priv->alert_bar);
@@ -355,7 +359,7 @@ shell_content_forall (GtkContainer *container,
{
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT (container)->priv;
+ priv = E_SHELL_CONTENT_GET_PRIVATE (container);
if (priv->alert_bar != NULL)
callback (priv->alert_bar, callback_data);
@@ -466,7 +470,7 @@ e_shell_content_alert_sink_init (EAlertSinkInterface *interface)
static void
e_shell_content_init (EShellContent *shell_content)
{
- shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_content, E_TYPE_SHELL_CONTENT, EShellContentPrivate);
+ shell_content->priv = E_SHELL_CONTENT_GET_PRIVATE (shell_content);
gtk_widget_set_has_window (GTK_WIDGET (shell_content), FALSE);
}
diff --git a/shell/e-shell-searchbar.c b/shell/e-shell-searchbar.c
index 97349f9..4b7dc88 100644
--- a/shell/e-shell-searchbar.c
+++ b/shell/e-shell-searchbar.c
@@ -37,6 +37,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] */
@@ -627,7 +631,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 (
@@ -909,7 +913,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 c8a507e..9503f96 100644
--- a/shell/e-shell-settings.c
+++ b/shell/e-shell-settings.c
@@ -29,6 +29,10 @@
#include "e-util/gconf-bridge.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;
@@ -176,7 +180,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);
@@ -204,7 +208,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);
@@ -218,7 +222,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));
@@ -256,7 +260,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));
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c
index 1a9f7d7..ed5567e 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -31,6 +31,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 */
@@ -145,7 +149,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 (
@@ -172,7 +176,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);
@@ -237,7 +241,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);
@@ -258,7 +262,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);
@@ -289,7 +293,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);
@@ -397,7 +401,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 b1d896d..f785054 100644
--- a/shell/e-shell-switcher.c
+++ b/shell/e-shell-switcher.c
@@ -30,6 +30,10 @@
#include <glib/gi18n.h>
#include <e-util/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
@@ -231,7 +235,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;
@@ -251,7 +255,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;
@@ -286,7 +290,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;
@@ -347,7 +351,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);
@@ -382,7 +386,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. */
@@ -409,7 +413,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 (
@@ -547,7 +551,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 f4621fc..8b8cc1d 100644
--- a/shell/e-shell-taskbar.c
+++ b/shell/e-shell-taskbar.c
@@ -32,6 +32,10 @@
#include <e-util/e-extensible.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 */
@@ -198,7 +202,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)
@@ -237,7 +241,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);
@@ -326,7 +330,7 @@ e_shell_taskbar_init (EShellTaskbar *shell_taskbar)
GtkWidget *widget;
gint height;
- 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 379b5ab..6911b54 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -41,6 +41,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
@@ -494,7 +498,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) {
@@ -551,7 +555,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);
@@ -1078,7 +1082,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 6a9744d..3faf3be 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 c62bd64..25986f0 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -947,7 +947,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);
}
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 79ca26c..6e37e7e 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -42,6 +42,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;
GList *watched_windows;
@@ -635,7 +639,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 (
@@ -678,7 +682,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);
@@ -1169,7 +1173,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);
diff --git a/shell/test/e-test-shell-backend.c b/shell/test/e-test-shell-backend.c
index 9e5f757..983b40e 100644
--- a/shell/test/e-test-shell-backend.c
+++ b/shell/test/e-test-shell-backend.c
@@ -28,6 +28,10 @@
#include "e-test-shell-view.h"
+#define E_TEST_SHELL_BACKEND_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TEST_SHELL_BACKEND, ETestShellBackendPrivate))
+
struct _ETestShellBackendPrivate {
gint placeholder;
};
@@ -178,7 +182,8 @@ test_shell_backend_class_init (ETestShellBackendClass *class)
static void
test_shell_backend_init (ETestShellBackend *test_shell_backend)
{
- test_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (test_shell_backend, E_TYPE_TEST_SHELL_BACKEND, ETestShellBackendPrivate);
+ test_shell_backend->priv =
+ E_TEST_SHELL_BACKEND_GET_PRIVATE (test_shell_backend);
}
GType
diff --git a/shell/test/e-test-shell-view.c b/shell/test/e-test-shell-view.c
index 7080009..68d4ff9 100644
--- a/shell/test/e-test-shell-view.c
+++ b/shell/test/e-test-shell-view.c
@@ -24,6 +24,10 @@
#include "shell/e-shell-content.h"
#include "shell/e-shell-sidebar.h"
+#define E_TEST_SHELL_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TEST_SHELL_VIEW, ETestShellViewPrivate))
+
struct _ETestShellViewPrivate {
EActivity *activity;
};
@@ -49,7 +53,7 @@ test_shell_view_dispose (GObject *object)
{
ETestShellViewPrivate *priv;
- priv = E_TEST_SHELL_VIEW (object)->priv;
+ priv = E_TEST_SHELL_VIEW_GET_PRIVATE (object);
if (priv->activity != NULL) {
e_activity_set_state (priv->activity, E_ACTIVITY_COMPLETED);
@@ -76,7 +80,7 @@ test_shell_view_constructed (GObject *object)
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
- priv = E_TEST_SHELL_VIEW (object)->priv;
+ priv = E_TEST_SHELL_VIEW_GET_PRIVATE (object);
shell_view = E_SHELL_VIEW (object);
shell_backend = e_shell_view_get_shell_backend (shell_view);
@@ -123,7 +127,8 @@ test_shell_view_class_init (ETestShellViewClass *class,
static void
test_shell_view_init (ETestShellView *test_shell_view)
{
- test_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (test_shell_view, E_TYPE_TEST_SHELL_VIEW, ETestShellViewPrivate);
+ test_shell_view->priv =
+ E_TEST_SHELL_VIEW_GET_PRIVATE (test_shell_view);
}
GType
diff --git a/smclient/eggsmclient.c b/smclient/eggsmclient.c
index 738be4e..e7dda12 100644
--- a/smclient/eggsmclient.c
+++ b/smclient/eggsmclient.c
@@ -44,6 +44,10 @@ struct _EggSMClientPrivate {
GKeyFile *state_file;
};
+#define EGG_SM_CLIENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EGG_TYPE_SM_CLIENT, EggSMClientPrivate))
+
G_DEFINE_TYPE (EggSMClient, egg_sm_client, G_TYPE_OBJECT)
static EggSMClient *global_client;
@@ -52,7 +56,7 @@ static EggSMClientMode global_client_mode = EGG_SM_CLIENT_MODE_NORMAL;
static void
egg_sm_client_init (EggSMClient *client)
{
- client->priv = G_TYPE_INSTANCE_GET_PRIVATE (client, EGG_TYPE_SM_CLIENT, EggSMClientPrivate);
+ ;
}
static void
@@ -388,7 +392,7 @@ egg_sm_client_is_resumed (EggSMClient *client)
GKeyFile *
egg_sm_client_get_state_file (EggSMClient *client)
{
- EggSMClientPrivate *priv = client->priv;
+ EggSMClientPrivate *priv = EGG_SM_CLIENT_GET_PRIVATE (client);
gchar *state_file_path;
GError *err = NULL;
diff --git a/smclient/eggsmclient.h b/smclient/eggsmclient.h
index a24ac23..5efc486 100644
--- a/smclient/eggsmclient.h
+++ b/smclient/eggsmclient.h
@@ -50,9 +50,8 @@ typedef enum {
struct _EggSMClient
{
- GObject parent;
+ GObject parent;
- EggSMClientPrivate *priv;
};
struct _EggSMClientClass
diff --git a/widgets/menus/gal-view-factory-etable.c b/widgets/menus/gal-view-factory-etable.c
index 8c744e1..1969d33 100644
--- a/widgets/menus/gal-view-factory-etable.c
+++ b/widgets/menus/gal-view-factory-etable.c
@@ -29,6 +29,10 @@
#include "gal-view-etable.h"
#include "gal-view-factory-etable.h"
+#define GAL_VIEW_FACTORY_ETABLE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), GAL_TYPE_VIEW_FACTORY_ETABLE, GalViewFactoryEtablePrivate))
+
struct _GalViewFactoryEtablePrivate {
ETableSpecification *specification;
};
@@ -92,7 +96,7 @@ view_factory_etable_dispose (GObject *object)
{
GalViewFactoryEtablePrivate *priv;
- priv = GAL_VIEW_FACTORY_ETABLE (object)->priv;
+ priv = GAL_VIEW_FACTORY_ETABLE_GET_PRIVATE (object);
if (priv->specification != NULL) {
g_object_unref (priv->specification);
@@ -121,7 +125,7 @@ view_factory_etable_new_view (GalViewFactory *factory,
{
GalViewFactoryEtablePrivate *priv;
- priv = GAL_VIEW_FACTORY_ETABLE (factory)->priv;
+ priv = GAL_VIEW_FACTORY_ETABLE_GET_PRIVATE (factory);
return gal_view_etable_new (priv->specification, name);
}
@@ -159,7 +163,7 @@ gal_view_factory_etable_class_init (GalViewFactoryEtableClass *class)
static void
gal_view_factory_etable_init (GalViewFactoryEtable *factory)
{
- factory->priv = G_TYPE_INSTANCE_GET_PRIVATE (factory, GAL_TYPE_VIEW_FACTORY_ETABLE, GalViewFactoryEtablePrivate);
+ factory->priv = GAL_VIEW_FACTORY_ETABLE_GET_PRIVATE (factory);
}
/**
diff --git a/widgets/misc/e-account-combo-box.c b/widgets/misc/e-account-combo-box.c
index ed3615a..91a843c 100644
--- a/widgets/misc/e-account-combo-box.c
+++ b/widgets/misc/e-account-combo-box.c
@@ -23,6 +23,10 @@
#include <string.h>
+#define E_ACCOUNT_COMBO_BOX_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ACCOUNT_COMBO_BOX, EAccountComboBoxPrivate))
+
enum {
COLUMN_STRING,
COLUMN_ACCOUNT
@@ -254,7 +258,7 @@ account_combo_box_dispose (GObject *object)
{
EAccountComboBoxPrivate *priv;
- priv = E_ACCOUNT_COMBO_BOX (object)->priv;
+ priv = E_ACCOUNT_COMBO_BOX_GET_PRIVATE (object);
if (priv->account_list != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -275,7 +279,7 @@ account_combo_box_finalize (GObject *object)
{
EAccountComboBoxPrivate *priv;
- priv = E_ACCOUNT_COMBO_BOX (object)->priv;
+ priv = E_ACCOUNT_COMBO_BOX_GET_PRIVATE (object);
g_hash_table_destroy (priv->index);
@@ -315,7 +319,7 @@ e_account_combo_box_init (EAccountComboBox *combo_box)
(GDestroyNotify) g_object_unref,
(GDestroyNotify) gtk_tree_row_reference_free);
- combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box, E_TYPE_ACCOUNT_COMBO_BOX, EAccountComboBoxPrivate);
+ combo_box->priv = E_ACCOUNT_COMBO_BOX_GET_PRIVATE (combo_box);
combo_box->priv->index = index;
}
@@ -362,7 +366,7 @@ e_account_combo_box_set_account_list (EAccountComboBox *combo_box,
if (account_list != NULL)
g_return_if_fail (E_IS_ACCOUNT_LIST (account_list));
- priv = combo_box->priv;
+ priv = E_ACCOUNT_COMBO_BOX_GET_PRIVATE (combo_box);
if (priv->account_list != NULL) {
g_signal_handlers_disconnect_by_func (
diff --git a/widgets/misc/e-account-manager.c b/widgets/misc/e-account-manager.c
index e4ab1e7..d8415f8 100644
--- a/widgets/misc/e-account-manager.c
+++ b/widgets/misc/e-account-manager.c
@@ -25,6 +25,10 @@
#include <gdk/gdkkeysyms.h>
#include "e-account-tree-view.h"
+#define E_ACCOUNT_MANAGER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ACCOUNT_MANAGER, EAccountManagerPrivate))
+
struct _EAccountManagerPrivate {
EAccountList *account_list;
@@ -164,7 +168,7 @@ account_manager_dispose (GObject *object)
{
EAccountManagerPrivate *priv;
- priv = E_ACCOUNT_MANAGER (object)->priv;
+ priv = E_ACCOUNT_MANAGER_GET_PRIVATE (object);
if (priv->account_list != NULL) {
g_object_unref (priv->account_list);
@@ -256,7 +260,7 @@ e_account_manager_init (EAccountManager *manager)
GtkWidget *container;
GtkWidget *widget;
- manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, E_TYPE_ACCOUNT_MANAGER, EAccountManagerPrivate);
+ manager->priv = E_ACCOUNT_MANAGER_GET_PRIVATE (manager);
gtk_table_resize (GTK_TABLE (manager), 1, 2);
gtk_table_set_col_spacings (GTK_TABLE (manager), 6);
diff --git a/widgets/misc/e-account-tree-view.c b/widgets/misc/e-account-tree-view.c
index 5a0ace2..923f395 100644
--- a/widgets/misc/e-account-tree-view.c
+++ b/widgets/misc/e-account-tree-view.c
@@ -24,6 +24,10 @@
#include <glib/gi18n.h>
#include <camel/camel.h>
+#define E_ACCOUNT_TREE_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ACCOUNT_TREE_VIEW, EAccountTreeViewPrivate))
+
enum {
COLUMN_ACCOUNT,
COLUMN_DEFAULT,
@@ -333,7 +337,7 @@ account_tree_view_dispose (GObject *object)
{
EAccountTreeViewPrivate *priv;
- priv = E_ACCOUNT_TREE_VIEW (object)->priv;
+ priv = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (object);
if (priv->account_list != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -354,7 +358,7 @@ account_tree_view_finalize (GObject *object)
{
EAccountTreeViewPrivate *priv;
- priv = E_ACCOUNT_TREE_VIEW (object)->priv;
+ priv = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (object);
g_hash_table_destroy (priv->index);
@@ -478,7 +482,7 @@ e_account_tree_view_init (EAccountTreeView *tree_view)
(GDestroyNotify) g_object_unref,
(GDestroyNotify) gtk_tree_row_reference_free);
- tree_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (tree_view, E_TYPE_ACCOUNT_TREE_VIEW, EAccountTreeViewPrivate);
+ tree_view->priv = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (tree_view);
tree_view->priv->index = index;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
@@ -530,7 +534,7 @@ e_account_tree_view_set_account_list (EAccountTreeView *tree_view,
if (account_list != NULL)
g_return_if_fail (E_IS_ACCOUNT_LIST (account_list));
- priv = tree_view->priv;
+ priv = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (tree_view);
if (priv->account_list != NULL) {
g_signal_handlers_disconnect_by_func (
diff --git a/widgets/misc/e-action-combo-box.c b/widgets/misc/e-action-combo-box.c
index 5c9c442..ee88b7d 100644
--- a/widgets/misc/e-action-combo-box.c
+++ b/widgets/misc/e-action-combo-box.c
@@ -22,6 +22,10 @@
#include <glib/gi18n.h>
+#define E_ACTION_COMBO_BOX_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ACTION_COMBO_BOX, EActionComboBoxPrivate))
+
enum {
COLUMN_ACTION,
COLUMN_SORT
@@ -315,7 +319,7 @@ action_combo_box_get_property (GObject *object,
static void
action_combo_box_dispose (GObject *object)
{
- EActionComboBoxPrivate *priv = E_ACTION_COMBO_BOX (object)->priv;
+ EActionComboBoxPrivate *priv = E_ACTION_COMBO_BOX_GET_PRIVATE (object);
if (priv->action != NULL) {
g_object_unref (priv->action);
@@ -336,7 +340,7 @@ action_combo_box_dispose (GObject *object)
static void
action_combo_box_finalize (GObject *object)
{
- EActionComboBoxPrivate *priv = E_ACTION_COMBO_BOX (object)->priv;
+ EActionComboBoxPrivate *priv = E_ACTION_COMBO_BOX_GET_PRIVATE (object);
g_hash_table_destroy (priv->index);
@@ -427,7 +431,7 @@ e_action_combo_box_class_init (EActionComboBoxClass *class)
static void
e_action_combo_box_init (EActionComboBox *combo_box)
{
- combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box, E_TYPE_ACTION_COMBO_BOX, EActionComboBoxPrivate);
+ combo_box->priv = E_ACTION_COMBO_BOX_GET_PRIVATE (combo_box);
combo_box->priv->index = g_hash_table_new_full (
g_direct_hash, g_direct_equal,
diff --git a/widgets/misc/e-activity-bar.c b/widgets/misc/e-activity-bar.c
index e23e043..a86e37c 100644
--- a/widgets/misc/e-activity-bar.c
+++ b/widgets/misc/e-activity-bar.c
@@ -18,6 +18,10 @@
#include "e-activity-bar.h"
+#define E_ACTIVITY_BAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ACTIVITY_BAR, EActivityBarPrivate))
+
#define FEEDBACK_PERIOD 1 /* seconds */
#define COMPLETED_ICON_NAME "emblem-default"
@@ -202,7 +206,7 @@ activity_bar_dispose (GObject *object)
{
EActivityBarPrivate *priv;
- priv = E_ACTIVITY_BAR (object)->priv;
+ priv = E_ACTIVITY_BAR_GET_PRIVATE (object);
if (priv->timeout_id > 0) {
g_source_remove (priv->timeout_id);
@@ -253,7 +257,7 @@ e_activity_bar_init (EActivityBar *bar)
GtkWidget *container;
GtkWidget *widget;
- bar->priv = G_TYPE_INSTANCE_GET_PRIVATE (bar, E_TYPE_ACTIVITY_BAR, EActivityBarPrivate);
+ bar->priv = E_ACTIVITY_BAR_GET_PRIVATE (bar);
container = gtk_info_bar_get_content_area (GTK_INFO_BAR (bar));
diff --git a/widgets/misc/e-activity-proxy.c b/widgets/misc/e-activity-proxy.c
index b949c1c..aea025d 100644
--- a/widgets/misc/e-activity-proxy.c
+++ b/widgets/misc/e-activity-proxy.c
@@ -23,6 +23,10 @@
#include <glib/gi18n.h>
+#define E_ACTIVITY_PROXY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ACTIVITY_PROXY, EActivityProxyPrivate))
+
#define FEEDBACK_PERIOD 1 /* seconds */
#define COMPLETED_ICON_NAME "emblem-default"
@@ -208,7 +212,7 @@ activity_proxy_dispose (GObject *object)
{
EActivityProxyPrivate *priv;
- priv = E_ACTIVITY_PROXY (object)->priv;
+ priv = E_ACTIVITY_PROXY_GET_PRIVATE (object);
if (priv->timeout_id > 0) {
g_source_remove (priv->timeout_id);
@@ -259,7 +263,7 @@ e_activity_proxy_init (EActivityProxy *proxy)
GtkWidget *container;
GtkWidget *widget;
- proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, E_TYPE_ACTIVITY_PROXY, EActivityProxyPrivate);
+ proxy->priv = E_ACTIVITY_PROXY_GET_PRIVATE (proxy);
container = GTK_WIDGET (proxy);
diff --git a/widgets/misc/e-alert-bar.c b/widgets/misc/e-alert-bar.c
index 8fa7eff..d5c1f95 100644
--- a/widgets/misc/e-alert-bar.c
+++ b/widgets/misc/e-alert-bar.c
@@ -21,6 +21,10 @@
#include <config.h>
#include <glib/gi18n-lib.h>
+#define E_ALERT_BAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ALERT_BAR, EAlertBarPrivate))
+
/* GTK_ICON_SIZE_DIALOG is a tad too big. */
#define ICON_SIZE GTK_ICON_SIZE_DND
@@ -148,7 +152,7 @@ alert_bar_dispose (GObject *object)
{
EAlertBarPrivate *priv;
- priv = E_ALERT_BAR (object)->priv;
+ priv = E_ALERT_BAR_GET_PRIVATE (object);
while (!g_queue_is_empty (&priv->alerts)) {
EAlert *alert = g_queue_pop_head (&priv->alerts);
@@ -180,7 +184,7 @@ e_alert_bar_init (EAlertBar *alert_bar)
PangoAttribute *attr;
PangoAttrList *attr_list;
- alert_bar->priv = G_TYPE_INSTANCE_GET_PRIVATE (alert_bar, E_TYPE_ALERT_BAR, EAlertBarPrivate);
+ alert_bar->priv = E_ALERT_BAR_GET_PRIVATE (alert_bar);
g_queue_init (&alert_bar->priv->alerts);
diff --git a/widgets/misc/e-attachment-button.c b/widgets/misc/e-attachment-button.c
index 8a9b135..16ddaab 100644
--- a/widgets/misc/e-attachment-button.c
+++ b/widgets/misc/e-attachment-button.c
@@ -23,6 +23,10 @@
#include "e-attachment-button.h"
+#define E_ATTACHMENT_BUTTON_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ATTACHMENT_BUTTON, EAttachmentButtonPrivate))
+
struct _EAttachmentButtonPrivate {
EAttachmentView *view;
@@ -437,7 +441,7 @@ attachment_button_dispose (GObject *object)
{
EAttachmentButtonPrivate *priv;
- priv = E_ATTACHMENT_BUTTON (object)->priv;
+ priv = E_ATTACHMENT_BUTTON_GET_PRIVATE (object);
if (priv->view != NULL) {
g_object_unref (priv->view);
@@ -564,7 +568,7 @@ e_attachment_button_init (EAttachmentButton *button)
GtkWidget *widget;
gint n_targets;
- button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button, E_TYPE_ATTACHMENT_BUTTON, EAttachmentButtonPrivate);
+ button->priv = E_ATTACHMENT_BUTTON_GET_PRIVATE (button);
/* Configure Widgets */
diff --git a/widgets/misc/e-attachment-dialog.c b/widgets/misc/e-attachment-dialog.c
index a85e0be..cb50421 100644
--- a/widgets/misc/e-attachment-dialog.c
+++ b/widgets/misc/e-attachment-dialog.c
@@ -23,6 +23,10 @@
#include <glib/gi18n.h>
+#define E_ATTACHMENT_DIALOG_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ATTACHMENT_DIALOG, EAttachmentDialogPrivate))
+
struct _EAttachmentDialogPrivate {
EAttachment *attachment;
GtkWidget *display_name_entry;
@@ -154,7 +158,7 @@ attachment_dialog_dispose (GObject *object)
{
EAttachmentDialogPrivate *priv;
- priv = E_ATTACHMENT_DIALOG (object)->priv;
+ priv = E_ATTACHMENT_DIALOG_GET_PRIVATE (object);
if (priv->attachment != NULL) {
g_object_unref (priv->attachment);
@@ -219,7 +223,7 @@ attachment_dialog_response (GtkDialog *dialog,
if (response_id != GTK_RESPONSE_OK)
return;
- priv = E_ATTACHMENT_DIALOG (dialog)->priv;
+ priv = E_ATTACHMENT_DIALOG_GET_PRIVATE (dialog);
g_return_if_fail (E_IS_ATTACHMENT (priv->attachment));
attachment = priv->attachment;
@@ -291,7 +295,7 @@ e_attachment_dialog_init (EAttachmentDialog *dialog)
GtkWidget *container;
GtkWidget *widget;
- dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog, E_TYPE_ATTACHMENT_DIALOG, EAttachmentDialogPrivate);
+ dialog->priv = E_ATTACHMENT_DIALOG_GET_PRIVATE (dialog);
gtk_dialog_add_button (
GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
diff --git a/widgets/misc/e-attachment-handler-image.c b/widgets/misc/e-attachment-handler-image.c
index 1c85068..8b57cc8 100644
--- a/widgets/misc/e-attachment-handler-image.c
+++ b/widgets/misc/e-attachment-handler-image.c
@@ -26,6 +26,10 @@
#include <e-util/e-util.h>
+#define E_ATTACHMENT_HANDLER_IMAGE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ATTACHMENT_HANDLER_IMAGE, EAttachmentHandlerImagePrivate))
+
struct _EAttachmentHandlerImagePrivate {
gint placeholder;
};
@@ -243,5 +247,5 @@ e_attachment_handler_image_class_init (EAttachmentHandlerImageClass *class)
static void
e_attachment_handler_image_init (EAttachmentHandlerImage *handler)
{
- handler->priv = G_TYPE_INSTANCE_GET_PRIVATE (handler, E_TYPE_ATTACHMENT_HANDLER_IMAGE, EAttachmentHandlerImagePrivate);
+ handler->priv = E_ATTACHMENT_HANDLER_IMAGE_GET_PRIVATE (handler);
}
diff --git a/widgets/misc/e-attachment-handler.c b/widgets/misc/e-attachment-handler.c
index c125d29..d388fac 100644
--- a/widgets/misc/e-attachment-handler.c
+++ b/widgets/misc/e-attachment-handler.c
@@ -21,6 +21,10 @@
#include "e-attachment-handler.h"
+#define E_ATTACHMENT_HANDLER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ATTACHMENT_HANDLER, EAttachmentHandlerPrivate))
+
struct _EAttachmentHandlerPrivate {
gpointer placeholder;
};
@@ -73,7 +77,7 @@ e_attachment_handler_class_init (EAttachmentHandlerClass *class)
static void
e_attachment_handler_init (EAttachmentHandler *handler)
{
- handler->priv = G_TYPE_INSTANCE_GET_PRIVATE (handler, E_TYPE_ATTACHMENT_HANDLER, EAttachmentHandlerPrivate);
+ handler->priv = E_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
}
EAttachmentView *
diff --git a/widgets/misc/e-attachment-icon-view.c b/widgets/misc/e-attachment-icon-view.c
index 5677370..54bf9be 100644
--- a/widgets/misc/e-attachment-icon-view.c
+++ b/widgets/misc/e-attachment-icon-view.c
@@ -28,6 +28,10 @@
#include "e-attachment-store.h"
#include "e-attachment-view.h"
+#define E_ATTACHMENT_ICON_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ATTACHMENT_ICON_VIEW, EAttachmentIconViewPrivate))
+
struct _EAttachmentIconViewPrivate {
EAttachmentViewPrivate view_priv;
};
@@ -344,7 +348,7 @@ attachment_icon_view_get_private (EAttachmentView *view)
{
EAttachmentIconViewPrivate *priv;
- priv = E_ATTACHMENT_ICON_VIEW (view)->priv;
+ priv = E_ATTACHMENT_ICON_VIEW_GET_PRIVATE (view);
return &priv->view_priv;
}
@@ -527,7 +531,7 @@ e_attachment_icon_view_class_init (EAttachmentIconViewClass *class)
static void
e_attachment_icon_view_init (EAttachmentIconView *icon_view)
{
- icon_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (icon_view, E_TYPE_ATTACHMENT_ICON_VIEW, EAttachmentIconViewPrivate);
+ icon_view->priv = E_ATTACHMENT_ICON_VIEW_GET_PRIVATE (icon_view);
e_attachment_view_init (E_ATTACHMENT_VIEW (icon_view));
diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c
index 21d736b..0eaada1 100644
--- a/widgets/misc/e-attachment-paned.c
+++ b/widgets/misc/e-attachment-paned.c
@@ -30,6 +30,10 @@
#include "e-attachment-icon-view.h"
#include "e-attachment-tree-view.h"
+#define E_ATTACHMENT_PANED_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ATTACHMENT_PANED, EAttachmentPanedPrivate))
+
#define NUM_VIEWS 2
/* Initial height of the lower pane. */
@@ -218,7 +222,7 @@ attachment_paned_dispose (GObject *object)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED (object)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (object);
if (priv->model != NULL) {
g_object_unref (priv->model);
@@ -281,7 +285,7 @@ attachment_paned_constructed (GObject *object)
GConfBridge *bridge;
const gchar *key;
- priv = E_ATTACHMENT_PANED (object)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (object);
bridge = gconf_bridge_get ();
@@ -355,7 +359,7 @@ attachment_paned_get_private (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED (view)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_private (view);
@@ -366,7 +370,7 @@ attachment_paned_get_store (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED (view)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_store (view);
@@ -379,7 +383,7 @@ attachment_paned_get_path_at_pos (EAttachmentView *view,
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED (view)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_path_at_pos (view, x, y);
@@ -390,7 +394,7 @@ attachment_paned_get_selected_paths (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED (view)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_selected_paths (view);
@@ -402,7 +406,7 @@ attachment_paned_path_is_selected (EAttachmentView *view,
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED (view)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_path_is_selected (view, path);
@@ -414,7 +418,7 @@ attachment_paned_select_path (EAttachmentView *view,
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED (view)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_select_path (view, path);
@@ -426,7 +430,7 @@ attachment_paned_unselect_path (EAttachmentView *view,
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED (view)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_unselect_path (view, path);
@@ -437,7 +441,7 @@ attachment_paned_select_all (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED (view)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_select_all (view);
@@ -448,7 +452,7 @@ attachment_paned_unselect_all (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED (view)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_unselect_all (view);
@@ -459,7 +463,7 @@ attachment_paned_update_actions (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED (view)->priv;
+ priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_update_actions (view);
@@ -518,7 +522,7 @@ e_attachment_paned_init (EAttachmentPaned *paned)
GtkWidget *widget;
GtkAction *action;
- paned->priv = G_TYPE_INSTANCE_GET_PRIVATE (paned, E_TYPE_ATTACHMENT_PANED, EAttachmentPanedPrivate);
+ paned->priv = E_ATTACHMENT_PANED_GET_PRIVATE (paned);
paned->priv->model = e_attachment_store_new ();
/* Keep the expander label and combo box the same height. */
diff --git a/widgets/misc/e-attachment-store.c b/widgets/misc/e-attachment-store.c
index 392dfe6..4068e5e 100644
--- a/widgets/misc/e-attachment-store.c
+++ b/widgets/misc/e-attachment-store.c
@@ -29,6 +29,10 @@
#include "e-util/e-mktemp.h"
#include "e-util/gconf-bridge.h"
+#define E_ATTACHMENT_STORE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ATTACHMENT_STORE, EAttachmentStorePrivate))
+
struct _EAttachmentStorePrivate {
GHashTable *attachment_index;
gchar *current_folder_uri;
@@ -110,7 +114,7 @@ attachment_store_dispose (GObject *object)
{
EAttachmentStorePrivate *priv;
- priv = E_ATTACHMENT_STORE (object)->priv;
+ priv = E_ATTACHMENT_STORE_GET_PRIVATE (object);
g_hash_table_remove_all (priv->attachment_index);
@@ -123,7 +127,7 @@ attachment_store_finalize (GObject *object)
{
EAttachmentStorePrivate *priv;
- priv = E_ATTACHMENT_STORE (object)->priv;
+ priv = E_ATTACHMENT_STORE_GET_PRIVATE (object);
g_hash_table_destroy (priv->attachment_index);
@@ -222,7 +226,7 @@ e_attachment_store_init (EAttachmentStore *store)
(GDestroyNotify) g_object_unref,
(GDestroyNotify) gtk_tree_row_reference_free);
- store->priv = G_TYPE_INSTANCE_GET_PRIVATE (store, E_TYPE_ATTACHMENT_STORE, EAttachmentStorePrivate);
+ store->priv = E_ATTACHMENT_STORE_GET_PRIVATE (store);
store->priv->attachment_index = attachment_index;
types[column++] = E_TYPE_ATTACHMENT; /* COLUMN_ATTACHMENT */
diff --git a/widgets/misc/e-attachment-tree-view.c b/widgets/misc/e-attachment-tree-view.c
index d3c3e68..5cc4275 100644
--- a/widgets/misc/e-attachment-tree-view.c
+++ b/widgets/misc/e-attachment-tree-view.c
@@ -28,6 +28,10 @@
#include "e-attachment-store.h"
#include "e-attachment-view.h"
+#define E_ATTACHMENT_TREE_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ATTACHMENT_TREE_VIEW, EAttachmentTreeViewPrivate))
+
struct _EAttachmentTreeViewPrivate {
EAttachmentViewPrivate view_priv;
};
@@ -301,7 +305,7 @@ attachment_tree_view_get_private (EAttachmentView *view)
{
EAttachmentTreeViewPrivate *priv;
- priv = E_ATTACHMENT_TREE_VIEW (view)->priv;
+ priv = E_ATTACHMENT_TREE_VIEW_GET_PRIVATE (view);
return &priv->view_priv;
}
@@ -504,7 +508,7 @@ e_attachment_tree_view_init (EAttachmentTreeView *tree_view)
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
- tree_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (tree_view, E_TYPE_ATTACHMENT_TREE_VIEW, EAttachmentTreeViewPrivate);
+ tree_view->priv = E_ATTACHMENT_TREE_VIEW_GET_PRIVATE (tree_view);
e_attachment_view_init (E_ATTACHMENT_VIEW (tree_view));
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index 2c219a7..a96f7ed 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -33,6 +33,10 @@
#include "e-util/e-mktemp.h"
#include "e-attachment-store.h"
+#define E_ATTACHMENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ATTACHMENT, EAttachmentPrivate))
+
/* Fallback Icon */
#define DEFAULT_ICON_NAME "mail-attachment"
@@ -663,7 +667,7 @@ attachment_dispose (GObject *object)
{
EAttachmentPrivate *priv;
- priv = E_ATTACHMENT (object)->priv;
+ priv = E_ATTACHMENT_GET_PRIVATE (object);
if (priv->file != NULL) {
g_object_unref (priv->file);
@@ -708,7 +712,7 @@ attachment_finalize (GObject *object)
{
EAttachmentPrivate *priv;
- priv = E_ATTACHMENT (object)->priv;
+ priv = E_ATTACHMENT_GET_PRIVATE (object);
g_free (priv->disposition);
@@ -877,7 +881,7 @@ e_attachment_class_init (EAttachmentClass *class)
static void
e_attachment_init (EAttachment *attachment)
{
- attachment->priv = G_TYPE_INSTANCE_GET_PRIVATE (attachment, E_TYPE_ATTACHMENT, EAttachmentPrivate);
+ attachment->priv = E_ATTACHMENT_GET_PRIVATE (attachment);
attachment->priv->cancellable = g_cancellable_new ();
attachment->priv->encrypted = CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE;
attachment->priv->signed_ = CAMEL_CIPHER_VALIDITY_SIGN_NONE;
diff --git a/widgets/misc/e-charset-combo-box.c b/widgets/misc/e-charset-combo-box.c
index 57d958b..e2cf06e 100644
--- a/widgets/misc/e-charset-combo-box.c
+++ b/widgets/misc/e-charset-combo-box.c
@@ -26,6 +26,10 @@
#include "e-util/e-charset.h"
#include "e-util/e-util.h"
+#define E_CHARSET_COMBO_BOX_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CHARSET_COMBO_BOX, ECharsetComboBoxPrivate))
+
#define DEFAULT_CHARSET "UTF-8"
#define OTHER_VALUE G_MAXINT
@@ -217,7 +221,7 @@ charset_combo_box_dispose (GObject *object)
{
ECharsetComboBoxPrivate *priv;
- priv = E_CHARSET_COMBO_BOX (object)->priv;
+ priv = E_CHARSET_COMBO_BOX_GET_PRIVATE (object);
if (priv->action_group != NULL) {
g_object_unref (priv->action_group);
@@ -240,7 +244,7 @@ charset_combo_box_finalize (GObject *object)
{
ECharsetComboBoxPrivate *priv;
- priv = E_CHARSET_COMBO_BOX (object)->priv;
+ priv = E_CHARSET_COMBO_BOX_GET_PRIVATE (object);
g_hash_table_destroy (priv->charset_index);
@@ -253,7 +257,7 @@ charset_combo_box_changed (GtkComboBox *combo_box)
{
ECharsetComboBoxPrivate *priv;
- priv = E_CHARSET_COMBO_BOX (combo_box)->priv;
+ priv = E_CHARSET_COMBO_BOX_GET_PRIVATE (combo_box);
/* Chain up to parent's changed() method. */
GTK_COMBO_BOX_CLASS (e_charset_combo_box_parent_class)->
@@ -308,7 +312,7 @@ e_charset_combo_box_init (ECharsetComboBox *combo_box)
(GDestroyNotify) g_free,
(GDestroyNotify) g_object_unref);
- combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box, E_TYPE_CHARSET_COMBO_BOX, ECharsetComboBoxPrivate);
+ combo_box->priv = E_CHARSET_COMBO_BOX_GET_PRIVATE (combo_box);
combo_box->priv->action_group = action_group;
combo_box->priv->charset_index = charset_index;
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index b57849c..1716399 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -43,6 +43,10 @@
#include <e-util/e-extensible.h>
#include "e-calendar.h"
+#define E_DATE_EDIT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_DATE_EDIT, EDateEditPrivate))
+
struct _EDateEditPrivate {
GtkWidget *date_entry;
GtkWidget *date_button;
@@ -451,7 +455,7 @@ e_date_edit_class_init (EDateEditClass *class)
static void
e_date_edit_init (EDateEdit *dedit)
{
- dedit->priv = G_TYPE_INSTANCE_GET_PRIVATE (dedit, E_TYPE_DATE_EDIT, EDateEditPrivate);
+ dedit->priv = E_DATE_EDIT_GET_PRIVATE (dedit);
dedit->priv->show_date = TRUE;
dedit->priv->show_time = TRUE;
diff --git a/widgets/misc/e-focus-tracker.c b/widgets/misc/e-focus-tracker.c
index 91dc7be..eb835b9 100644
--- a/widgets/misc/e-focus-tracker.c
+++ b/widgets/misc/e-focus-tracker.c
@@ -26,6 +26,10 @@
#include <misc/e-selectable.h>
+#define E_FOCUS_TRACKER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_FOCUS_TRACKER, EFocusTrackerPrivate))
+
struct _EFocusTrackerPrivate {
GtkWidget *focus; /* not referenced */
GtkWindow *window;
@@ -353,7 +357,7 @@ focus_tracker_dispose (GObject *object)
{
EFocusTrackerPrivate *priv;
- priv = E_FOCUS_TRACKER (object)->priv;
+ priv = E_FOCUS_TRACKER_GET_PRIVATE (object);
g_signal_handlers_disconnect_matched (
gtk_clipboard_get (GDK_SELECTION_PRIMARY),
@@ -535,7 +539,7 @@ e_focus_tracker_init (EFocusTracker *focus_tracker)
{
GtkAction *action;
- focus_tracker->priv = G_TYPE_INSTANCE_GET_PRIVATE (focus_tracker, E_TYPE_FOCUS_TRACKER, EFocusTrackerPrivate);
+ focus_tracker->priv = E_FOCUS_TRACKER_GET_PRIVATE (focus_tracker);
/* Define dummy actions. These will most likely be overridden,
* but for cases where they're not it ensures ESelectable objects
diff --git a/widgets/misc/e-hinted-entry.c b/widgets/misc/e-hinted-entry.c
index a167980..7d74fb3 100644
--- a/widgets/misc/e-hinted-entry.c
+++ b/widgets/misc/e-hinted-entry.c
@@ -21,6 +21,10 @@
#include "e-hinted-entry.h"
+#define E_HINTED_ENTRY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_HINTED_ENTRY, EHintedEntryPrivate))
+
struct _EHintedEntryPrivate {
gchar *hint;
guint hint_shown : 1;
@@ -114,7 +118,7 @@ hinted_entry_finalize (GObject *object)
{
EHintedEntryPrivate *priv;
- priv = E_HINTED_ENTRY (object)->priv;
+ priv = E_HINTED_ENTRY_GET_PRIVATE (object);
g_free (priv->hint);
@@ -210,7 +214,7 @@ e_hinted_entry_class_init (EHintedEntryClass *class)
static void
e_hinted_entry_init (EHintedEntry *entry)
{
- entry->priv = G_TYPE_INSTANCE_GET_PRIVATE (entry, E_TYPE_HINTED_ENTRY, EHintedEntryPrivate);
+ entry->priv = E_HINTED_ENTRY_GET_PRIVATE (entry);
entry->priv->hint = g_strdup (""); /* hint must never be NULL */
hinted_entry_show_hint (entry);
}
diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c
index 4da38be..e9a497f 100644
--- a/widgets/misc/e-image-chooser.c
+++ b/widgets/misc/e-image-chooser.c
@@ -30,6 +30,10 @@
#include "e-util/e-util.h"
#include "e-util/e-icon-factory.h"
+#define E_IMAGE_CHOOSER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_IMAGE_CHOOSER, EImageChooserPrivate))
+
struct _EImageChooserPrivate {
GtkWidget *frame;
GtkWidget *image;
@@ -370,7 +374,7 @@ image_chooser_dispose (GObject *object)
{
EImageChooserPrivate *priv;
- priv = E_IMAGE_CHOOSER (object)->priv;
+ priv = E_IMAGE_CHOOSER_GET_PRIVATE (object);
if (priv->frame != NULL) {
g_object_unref (priv->frame);
@@ -391,7 +395,7 @@ image_chooser_finalize (GObject *object)
{
EImageChooserPrivate *priv;
- priv = E_IMAGE_CHOOSER (object)->priv;
+ priv = E_IMAGE_CHOOSER_GET_PRIVATE (object);
g_free (priv->image_buf);
g_free (priv->icon_name);
@@ -440,7 +444,7 @@ e_image_chooser_init (EImageChooser *chooser)
GtkWidget *container;
GtkWidget *widget;
- chooser->priv = G_TYPE_INSTANCE_GET_PRIVATE (chooser, E_TYPE_IMAGE_CHOOSER, EImageChooserPrivate);
+ chooser->priv = E_IMAGE_CHOOSER_GET_PRIVATE (chooser);
container = GTK_WIDGET (chooser);
diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c
index 11059ebf..55ea1bb 100644
--- a/widgets/misc/e-import-assistant.c
+++ b/widgets/misc/e-import-assistant.c
@@ -33,6 +33,10 @@
#include <e-util/e-extensible.h>
#include <e-util/e-util-private.h>
+#define E_IMPORT_ASSISTANT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_IMPORT_ASSISTANT, EImportAssistantPrivate))
+
typedef struct _ImportFilePage ImportFilePage;
typedef struct _ImportDestinationPage ImportDestinationPage;
typedef struct _ImportTypePage ImportTypePage;
@@ -143,7 +147,7 @@ filename_changed (GtkWidget *widget,
const gchar *filename;
gint fileok;
- priv = E_IMPORT_ASSISTANT (assistant)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
page = &priv->file_page;
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
@@ -215,7 +219,7 @@ filetype_changed_cb (GtkComboBox *combo_box,
GtkTreeModel *model;
GtkTreeIter iter;
- priv = E_IMPORT_ASSISTANT (assistant)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
g_return_if_fail (gtk_combo_box_get_active_iter (combo_box, &iter));
@@ -499,7 +503,7 @@ prepare_intelligent_page (GtkAssistant *assistant,
gint row;
ImportSelectionPage *page;
- priv = E_IMPORT_ASSISTANT (assistant)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
page = &priv->selection_page;
if (page->target != NULL) {
@@ -600,7 +604,7 @@ import_simple_done (EImport *ei, gpointer user_data)
g_return_if_fail (import_assistant != NULL);
- priv = import_assistant->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (import_assistant);
g_return_if_fail (priv != NULL);
g_return_if_fail (priv->fileuris != NULL);
g_return_if_fail (priv->simple_page.target != NULL);
@@ -660,7 +664,7 @@ prepare_file_page (GtkAssistant *assistant,
GtkListStore *store;
ImportFilePage *page;
- priv = E_IMPORT_ASSISTANT (assistant)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
page = &priv->file_page;
if (page->target != NULL) {
@@ -723,7 +727,7 @@ prepare_destination_page (GtkAssistant *assistant,
EImportAssistantPrivate *priv;
ImportDestinationPage *page;
- priv = E_IMPORT_ASSISTANT (assistant)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
page = &priv->destination_page;
if (page->control)
@@ -750,7 +754,7 @@ prepare_progress_page (GtkAssistant *assistant,
gboolean intelligent_import;
gboolean is_simple = FALSE;
- priv = E_IMPORT_ASSISTANT (assistant)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
page = &priv->selection_page;
/* Because we're a GTK_ASSISTANT_PAGE_PROGRESS, this will
@@ -813,7 +817,7 @@ simple_filetype_changed_cb (GtkComboBox *combo_box, GtkAssistant *assistant)
GtkWidget *vbox;
GtkWidget *control;
- priv = E_IMPORT_ASSISTANT (assistant)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
page = &priv->simple_page;
g_return_if_fail (gtk_combo_box_get_active_iter (combo_box, &iter));
@@ -856,7 +860,7 @@ prepare_simple_page (GtkAssistant *assistant, GtkWidget *vbox)
ImportSimplePage *page;
gchar *uri;
- priv = E_IMPORT_ASSISTANT (assistant)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
page = &priv->simple_page;
g_return_if_fail (priv->fileuris != NULL);
@@ -934,7 +938,7 @@ prepare_simple_destination_page (GtkAssistant *assistant,
ImportDestinationPage *page;
ImportSimplePage *simple_page;
- priv = E_IMPORT_ASSISTANT (assistant)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
page = &priv->destination_page;
simple_page = &priv->simple_page;
@@ -995,7 +999,7 @@ set_import_uris (EImportAssistant *assistant, gchar **uris)
g_return_val_if_fail (assistant->priv->import != NULL, FALSE);
g_return_val_if_fail (uris != NULL, FALSE);
- priv = E_IMPORT_ASSISTANT (assistant)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
for (i = 0; uris[i]; i++) {
gchar *uri = uris[i];
@@ -1067,7 +1071,7 @@ import_assistant_dispose (GObject *object)
{
EImportAssistantPrivate *priv;
- priv = E_IMPORT_ASSISTANT (object)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (object);
if (priv->file_page.target != NULL) {
e_import_target_free (
@@ -1110,7 +1114,7 @@ import_assistant_finalize (GObject *object)
{
EImportAssistantPrivate *priv;
- priv = E_IMPORT_ASSISTANT (object)->priv;
+ priv = E_IMPORT_ASSISTANT_GET_PRIVATE (object);
g_slist_free (priv->selection_page.importers);
@@ -1126,7 +1130,7 @@ import_assistant_set_property (GObject *object,
{
switch (property_id) {
case PROP_IS_SIMPLE:
- E_IMPORT_ASSISTANT (object)->priv->is_simple = g_value_get_boolean (value);
+ E_IMPORT_ASSISTANT_GET_PRIVATE (object)->is_simple = g_value_get_boolean (value);
return;
}
@@ -1142,7 +1146,7 @@ import_assistant_get_property (GObject *object,
switch (property_id) {
case PROP_IS_SIMPLE:
g_value_set_boolean (value,
- E_IMPORT_ASSISTANT (object)->priv->is_simple);
+ E_IMPORT_ASSISTANT_GET_PRIVATE (object)->is_simple);
return;
}
@@ -1253,6 +1257,9 @@ import_assistant_construct (EImportAssistant *import_assistant)
assistant = GTK_ASSISTANT (import_assistant);
+ import_assistant->priv =
+ E_IMPORT_ASSISTANT_GET_PRIVATE (import_assistant);
+
import_assistant->priv->import =
e_import_new ("org.gnome.evolution.shell.importer");
@@ -1356,7 +1363,7 @@ import_assistant_construct (EImportAssistant *import_assistant)
static void
e_import_assistant_init (EImportAssistant *import_assistant)
{
- import_assistant->priv = G_TYPE_INSTANCE_GET_PRIVATE (import_assistant, E_TYPE_IMPORT_ASSISTANT, EImportAssistantPrivate);
+ /* do nothing here */
}
GtkWidget *
diff --git a/widgets/misc/e-online-button.c b/widgets/misc/e-online-button.c
index 643ebc4..10a8388 100644
--- a/widgets/misc/e-online-button.c
+++ b/widgets/misc/e-online-button.c
@@ -19,6 +19,10 @@
#include <glib/gi18n.h>
+#define E_ONLINE_BUTTON_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_ONLINE_BUTTON, EOnlineButtonPrivate))
+
#define ONLINE_TOOLTIP \
_("Evolution is currently online. Click this button to work offline.")
@@ -97,7 +101,7 @@ online_button_dispose (GObject *object)
{
EOnlineButtonPrivate *priv;
- priv = E_ONLINE_BUTTON (object)->priv;
+ priv = E_ONLINE_BUTTON_GET_PRIVATE (object);
if (priv->image != NULL) {
g_object_unref (priv->image);
@@ -137,7 +141,7 @@ e_online_button_init (EOnlineButton *button)
{
GtkWidget *widget;
- button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button, E_TYPE_ONLINE_BUTTON, EOnlineButtonPrivate);
+ button->priv = E_ONLINE_BUTTON_GET_PRIVATE (button);
gtk_widget_set_can_focus (GTK_WIDGET (button), FALSE);
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
diff --git a/widgets/misc/e-paned.c b/widgets/misc/e-paned.c
index f184244..6af4b46 100644
--- a/widgets/misc/e-paned.c
+++ b/widgets/misc/e-paned.c
@@ -24,6 +24,10 @@
#include <config.h>
#include <glib/gi18n-lib.h>
+#define E_PANED_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_PANED, EPanedPrivate))
+
#define SYNC_REQUEST_NONE 0
#define SYNC_REQUEST_POSITION 1
#define SYNC_REQUEST_PROPORTION 2
@@ -213,7 +217,7 @@ paned_realize (GtkWidget *widget)
GdkWindowState state;
GdkWindow *window;
- priv = E_PANED (widget)->priv;
+ priv = E_PANED_GET_PRIVATE (widget);
/* Chain up to parent's realize() method. */
GTK_WIDGET_CLASS (e_paned_parent_class)->realize (widget);
@@ -347,7 +351,7 @@ e_paned_class_init (EPanedClass *class)
static void
e_paned_init (EPaned *paned)
{
- paned->priv = G_TYPE_INSTANCE_GET_PRIVATE (paned, E_TYPE_PANED, EPanedPrivate);
+ paned->priv = E_PANED_GET_PRIVATE (paned);
paned->priv->proportion = 0.5;
paned->priv->fixed_resize = TRUE;
diff --git a/widgets/misc/e-picture-gallery.c b/widgets/misc/e-picture-gallery.c
index dcbbe61..084a6f4 100644
--- a/widgets/misc/e-picture-gallery.c
+++ b/widgets/misc/e-picture-gallery.c
@@ -23,6 +23,10 @@
#include "e-picture-gallery.h"
+#define E_PICTURE_GALLERY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_PICTURE_GALLERY, EPictureGalleryPrivate))
+
struct _EPictureGalleryPrivate {
gboolean initialized;
gchar *path;
@@ -402,7 +406,7 @@ e_picture_gallery_class_init (EPictureGalleryClass *class)
static void
e_picture_gallery_init (EPictureGallery *gallery)
{
- gallery->priv = G_TYPE_INSTANCE_GET_PRIVATE (gallery, E_TYPE_PICTURE_GALLERY, EPictureGalleryPrivate);
+ gallery->priv = E_PICTURE_GALLERY_GET_PRIVATE (gallery);
gallery->priv->initialized = FALSE;
gallery->priv->monitor = NULL;
picture_gallery_set_path (gallery, NULL);
diff --git a/widgets/misc/e-popup-action.c b/widgets/misc/e-popup-action.c
index a27137c..99e1994 100644
--- a/widgets/misc/e-popup-action.c
+++ b/widgets/misc/e-popup-action.c
@@ -23,6 +23,10 @@
#include <glib/gi18n.h>
+#define E_POPUP_ACTION_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_POPUP_ACTION, EPopupActionPrivate))
+
enum {
PROP_0,
PROP_RELATED_ACTION,
@@ -193,7 +197,7 @@ popup_action_dispose (GObject *object)
{
EPopupActionPrivate *priv;
- priv = E_POPUP_ACTION (object)->priv;
+ priv = E_POPUP_ACTION_GET_PRIVATE (object);
if (priv->related_action != NULL) {
g_signal_handler_disconnect (
@@ -330,7 +334,7 @@ e_popup_action_class_init (EPopupActionClass *class)
static void
e_popup_action_init (EPopupAction *popup_action)
{
- popup_action->priv = G_TYPE_INSTANCE_GET_PRIVATE (popup_action, E_TYPE_POPUP_ACTION, EPopupActionPrivate);
+ popup_action->priv = E_POPUP_ACTION_GET_PRIVATE (popup_action);
popup_action->priv->use_action_appearance = TRUE;
/* Remain invisible until we have a related action. */
diff --git a/widgets/misc/e-preferences-window.c b/widgets/misc/e-preferences-window.c
index 7c58061..9b6d726 100644
--- a/widgets/misc/e-preferences-window.c
+++ b/widgets/misc/e-preferences-window.c
@@ -27,6 +27,10 @@
#define SWITCH_PAGE_INTERVAL 250
+#define E_PREFERENCES_WINDOW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_PREFERENCES_WINDOW, EPreferencesWindowPrivate))
+
struct _EPreferencesWindowPrivate {
gboolean setup;
gpointer shell;
@@ -161,7 +165,7 @@ preferences_window_dispose (GObject *object)
{
EPreferencesWindowPrivate *priv;
- priv = E_PREFERENCES_WINDOW (object)->priv;
+ priv = E_PREFERENCES_WINDOW_GET_PRIVATE (object);
if (priv->icon_view != NULL) {
g_object_unref (priv->icon_view);
@@ -189,7 +193,7 @@ preferences_window_finalize (GObject *object)
{
EPreferencesWindowPrivate *priv;
- priv = E_PREFERENCES_WINDOW (object)->priv;
+ priv = E_PREFERENCES_WINDOW_GET_PRIVATE (object);
g_hash_table_destroy (priv->index);
@@ -204,7 +208,7 @@ preferences_window_show (GtkWidget *widget)
GtkIconView *icon_view;
GtkTreePath *path;
- priv = E_PREFERENCES_WINDOW (widget)->priv;
+ priv = E_PREFERENCES_WINDOW_GET_PRIVATE (widget);
if (!priv->setup)
g_warning ("Preferences window has not been setup correctly");
@@ -254,7 +258,7 @@ e_preferences_window_init (EPreferencesWindow *window)
(GDestroyNotify) g_free,
(GDestroyNotify) gtk_tree_row_reference_free);
- window->priv = G_TYPE_INSTANCE_GET_PRIVATE (window, E_TYPE_PREFERENCES_WINDOW, EPreferencesWindowPrivate);
+ window->priv = E_PREFERENCES_WINDOW_GET_PRIVATE (window);
window->priv->index = index;
window->priv->filter_view = NULL;
@@ -507,7 +511,7 @@ e_preferences_window_setup (EPreferencesWindow *window)
g_return_if_fail (E_IS_PREFERENCES_WINDOW (window));
- priv = window->priv;
+ priv = E_PREFERENCES_WINDOW_GET_PRIVATE (window);
notebook = GTK_NOTEBOOK (priv->notebook);
num = gtk_notebook_get_n_pages (notebook);
diff --git a/widgets/misc/e-preview-pane.c b/widgets/misc/e-preview-pane.c
index b65d1a7..8cc1612 100644
--- a/widgets/misc/e-preview-pane.c
+++ b/widgets/misc/e-preview-pane.c
@@ -23,6 +23,10 @@
#include <gdk/gdkkeysyms.h>
+#define E_PREVIEW_PANE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_PREVIEW_PANE, EPreviewPanePrivate))
+
struct _EPreviewPanePrivate {
GtkWidget *web_view;
GtkWidget *search_bar;
@@ -101,7 +105,7 @@ preview_pane_dispose (GObject *object)
{
EPreviewPanePrivate *priv;
- priv = E_PREVIEW_PANE (object)->priv;
+ priv = E_PREVIEW_PANE_GET_PRIVATE (object);
if (priv->search_bar != NULL) {
g_object_unref (priv->search_bar);
@@ -123,7 +127,7 @@ preview_pane_constructed (GObject *object)
EPreviewPanePrivate *priv;
GtkWidget *widget;
- priv = E_PREVIEW_PANE (object)->priv;
+ priv = E_PREVIEW_PANE_GET_PRIVATE (object);
widget = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (
@@ -211,7 +215,7 @@ e_preview_pane_class_init (EPreviewPaneClass *class)
static void
e_preview_pane_init (EPreviewPane *preview_pane)
{
- preview_pane->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview_pane, E_TYPE_PREVIEW_PANE, EPreviewPanePrivate);
+ preview_pane->priv = E_PREVIEW_PANE_GET_PRIVATE (preview_pane);
gtk_box_set_spacing (GTK_BOX (preview_pane), 1);
}
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index 0f83fd9..59476a6 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -25,6 +25,10 @@
#include <gdk/gdkkeysyms.h>
#include <gtkhtml/gtkhtml-search.h>
+#define E_SEARCH_BAR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SEARCH_BAR, ESearchBarPrivate))
+
struct _ESearchBarPrivate {
EWebView *web_view;
GtkWidget *entry;
@@ -310,7 +314,7 @@ search_bar_dispose (GObject *object)
{
ESearchBarPrivate *priv;
- priv = E_SEARCH_BAR (object)->priv;
+ priv = E_SEARCH_BAR_GET_PRIVATE (object);
if (priv->web_view != NULL) {
g_object_unref (priv->web_view);
@@ -356,7 +360,7 @@ search_bar_finalize (GObject *object)
{
ESearchBarPrivate *priv;
- priv = E_SEARCH_BAR (object)->priv;
+ priv = E_SEARCH_BAR_GET_PRIVATE (object);
g_free (priv->active_search);
@@ -369,7 +373,7 @@ search_bar_constructed (GObject *object)
{
ESearchBarPrivate *priv;
- priv = E_SEARCH_BAR (object)->priv;
+ priv = E_SEARCH_BAR_GET_PRIVATE (object);
g_object_bind_property (
object, "case-sensitive",
@@ -531,7 +535,7 @@ e_search_bar_init (ESearchBar *search_bar)
GtkWidget *widget;
GtkWidget *container;
- search_bar->priv = G_TYPE_INSTANCE_GET_PRIVATE (search_bar, E_TYPE_SEARCH_BAR, ESearchBarPrivate);
+ search_bar->priv = E_SEARCH_BAR_GET_PRIVATE (search_bar);
search_bar->priv->tokenizer = e_searching_tokenizer_new ();
g_signal_connect_swapped (
diff --git a/widgets/misc/e-searching-tokenizer.c b/widgets/misc/e-searching-tokenizer.c
index 087551f..b258179 100644
--- a/widgets/misc/e-searching-tokenizer.c
+++ b/widgets/misc/e-searching-tokenizer.c
@@ -37,6 +37,10 @@
#define d(x)
+#define E_SEARCHING_TOKENIZER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizerPrivate))
+
enum {
MATCH_SIGNAL,
LAST_SIGNAL
@@ -939,7 +943,7 @@ searching_tokenizer_finalize (GObject *object)
{
ESearchingTokenizerPrivate *priv;
- priv = E_SEARCHING_TOKENIZER (object)->priv;
+ priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (object);
search_info_free (priv->primary);
search_info_free (priv->secondary);
@@ -957,7 +961,7 @@ searching_tokenizer_begin (HTMLTokenizer *tokenizer,
{
ESearchingTokenizerPrivate *priv;
- priv = E_SEARCHING_TOKENIZER (tokenizer)->priv;
+ priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer);
/* reset search */
if (priv->engine != NULL) {
@@ -981,7 +985,7 @@ searching_tokenizer_peek_token (HTMLTokenizer *tokenizer)
{
ESearchingTokenizerPrivate *priv;
- priv = E_SEARCHING_TOKENIZER (tokenizer)->priv;
+ priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer);
if (priv->engine != NULL)
return searcher_peek_token (priv->engine);
@@ -998,7 +1002,7 @@ searching_tokenizer_next_token (HTMLTokenizer *tokenizer)
gint oldmatched;
gchar *token;
- priv = E_SEARCHING_TOKENIZER (tokenizer)->priv;
+ priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer);
/* If no search is active, just use the default method. */
if (priv->engine == NULL)
@@ -1022,7 +1026,7 @@ searching_tokenizer_has_more (HTMLTokenizer *tokenizer)
{
ESearchingTokenizerPrivate *priv;
- priv = E_SEARCHING_TOKENIZER (tokenizer)->priv;
+ priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer);
return (priv->engine != NULL && searcher_pending (priv->engine)) ||
HTML_TOKENIZER_CLASS (e_searching_tokenizer_parent_class)->
@@ -1080,7 +1084,7 @@ e_searching_tokenizer_class_init (ESearchingTokenizerClass *class)
static void
e_searching_tokenizer_init (ESearchingTokenizer *tokenizer)
{
- tokenizer->priv = G_TYPE_INSTANCE_GET_PRIVATE (tokenizer, E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizerPrivate);
+ tokenizer->priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer);
tokenizer->priv->primary = search_info_new ();
search_info_set_flags (
diff --git a/widgets/misc/e-signature-combo-box.c b/widgets/misc/e-signature-combo-box.c
index 63d0b53..e24cb14 100644
--- a/widgets/misc/e-signature-combo-box.c
+++ b/widgets/misc/e-signature-combo-box.c
@@ -27,6 +27,10 @@
#include <glib/gi18n-lib.h>
+#define E_SIGNATURE_COMBO_BOX_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SIGNATURE_COMBO_BOX, ESignatureComboBoxPrivate))
+
enum {
COLUMN_STRING,
COLUMN_SIGNATURE
@@ -158,7 +162,7 @@ signature_combo_box_dispose (GObject *object)
{
ESignatureComboBoxPrivate *priv;
- priv = E_SIGNATURE_COMBO_BOX (object)->priv;
+ priv = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (object);
if (priv->signature_list != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -179,7 +183,7 @@ signature_combo_box_finalize (GObject *object)
{
ESignatureComboBoxPrivate *priv;
- priv = E_SIGNATURE_COMBO_BOX (object)->priv;
+ priv = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (object);
g_hash_table_destroy (priv->index);
@@ -219,7 +223,7 @@ e_signature_combo_box_init (ESignatureComboBox *combo_box)
(GDestroyNotify) g_object_unref,
(GDestroyNotify) gtk_tree_row_reference_free);
- combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box, E_TYPE_SIGNATURE_COMBO_BOX, ESignatureComboBoxPrivate);
+ combo_box->priv = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (combo_box);
combo_box->priv->index = index;
}
@@ -248,7 +252,7 @@ e_signature_combo_box_set_signature_list (ESignatureComboBox *combo_box,
if (signature_list != NULL)
g_return_if_fail (E_IS_SIGNATURE_LIST (signature_list));
- priv = combo_box->priv;
+ priv = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (combo_box);
if (priv->signature_list != NULL) {
g_signal_handlers_disconnect_by_func (
diff --git a/widgets/misc/e-signature-editor.c b/widgets/misc/e-signature-editor.c
index 30f432d..fcc76c8 100644
--- a/widgets/misc/e-signature-editor.c
+++ b/widgets/misc/e-signature-editor.c
@@ -29,6 +29,10 @@
#include <e-util/e-signature-utils.h>
#include <misc/e-web-view.h>
+#define E_SIGNATURE_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SIGNATURE_EDITOR, ESignatureEditorPrivate))
+
enum {
PROP_0,
PROP_FOCUS_TRACKER,
@@ -279,7 +283,7 @@ signature_editor_dispose (GObject *object)
{
ESignatureEditorPrivate *priv;
- priv = E_SIGNATURE_EDITOR (object)->priv;
+ priv = E_SIGNATURE_EDITOR_GET_PRIVATE (object);
if (priv->action_group != NULL) {
g_object_unref (priv->action_group);
@@ -310,7 +314,7 @@ signature_editor_finalize (GObject *object)
{
ESignatureEditorPrivate *priv;
- priv = E_SIGNATURE_EDITOR (object)->priv;
+ priv = E_SIGNATURE_EDITOR_GET_PRIVATE (object);
g_free (priv->original_name);
@@ -396,7 +400,7 @@ e_signature_editor_init (ESignatureEditor *editor)
GtkWidget *vbox;
GError *error = NULL;
- editor->priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, E_TYPE_SIGNATURE_EDITOR, ESignatureEditorPrivate);
+ editor->priv = E_SIGNATURE_EDITOR_GET_PRIVATE (editor);
vbox = GTKHTML_EDITOR (editor)->vbox;
gtkhtml_editor = GTKHTML_EDITOR (editor);
diff --git a/widgets/misc/e-signature-manager.c b/widgets/misc/e-signature-manager.c
index f5c7dd2..f7529d3 100644
--- a/widgets/misc/e-signature-manager.c
+++ b/widgets/misc/e-signature-manager.c
@@ -27,6 +27,10 @@
#include "e-signature-tree-view.h"
#include "e-signature-script-dialog.h"
+#define E_SIGNATURE_MANAGER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SIGNATURE_MANAGER, ESignatureManagerPrivate))
+
struct _ESignatureManagerPrivate {
ESignatureList *signature_list;
@@ -230,7 +234,7 @@ signature_manager_dispose (GObject *object)
{
ESignatureManagerPrivate *priv;
- priv = E_SIGNATURE_MANAGER (object)->priv;
+ priv = E_SIGNATURE_MANAGER_GET_PRIVATE (object);
if (priv->signature_list != NULL) {
g_object_unref (priv->signature_list);
@@ -501,7 +505,7 @@ e_signature_manager_init (ESignatureManager *manager)
GtkWidget *container;
GtkWidget *widget;
- manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, E_TYPE_SIGNATURE_MANAGER, ESignatureManagerPrivate);
+ manager->priv = E_SIGNATURE_MANAGER_GET_PRIVATE (manager);
gtk_table_resize (GTK_TABLE (manager), 1, 2);
gtk_table_set_col_spacings (GTK_TABLE (manager), 6);
diff --git a/widgets/misc/e-signature-preview.c b/widgets/misc/e-signature-preview.c
index ec4370b..af266dd 100644
--- a/widgets/misc/e-signature-preview.c
+++ b/widgets/misc/e-signature-preview.c
@@ -27,6 +27,10 @@
#include <glib/gstdio.h>
#include "e-util/e-signature-utils.h"
+#define E_SIGNATURE_PREVIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SIGNATURE_PREVIEW, ESignaturePreviewPrivate))
+
enum {
PROP_0,
PROP_ALLOW_SCRIPTS,
@@ -101,7 +105,7 @@ signature_preview_dispose (GObject *object)
{
ESignaturePreviewPrivate *priv;
- priv = E_SIGNATURE_PREVIEW (object)->priv;
+ priv = E_SIGNATURE_PREVIEW_GET_PRIVATE (object);
if (priv->signature != NULL) {
g_object_unref (priv->signature);
@@ -211,7 +215,7 @@ e_signature_preview_class_init (ESignaturePreviewClass *class)
static void
e_signature_preview_init (ESignaturePreview *preview)
{
- preview->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview, E_TYPE_SIGNATURE_PREVIEW, ESignaturePreviewPrivate);
+ preview->priv = E_SIGNATURE_PREVIEW_GET_PRIVATE (preview);
}
GtkWidget *
diff --git a/widgets/misc/e-signature-script-dialog.c b/widgets/misc/e-signature-script-dialog.c
index 1977526..1364737 100644
--- a/widgets/misc/e-signature-script-dialog.c
+++ b/widgets/misc/e-signature-script-dialog.c
@@ -23,6 +23,10 @@
#include <glib/gi18n.h>
+#define E_SIGNATURE_SCRIPT_DIALOG_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SIGNATURE_SCRIPT_DIALOG, ESignatureScriptDialogPrivate))
+
struct _ESignatureScriptDialogPrivate {
GtkWidget *entry;
GtkWidget *file_chooser;
@@ -140,7 +144,7 @@ signature_script_dialog_dispose (GObject *object)
{
ESignatureScriptDialogPrivate *priv;
- priv = E_SIGNATURE_SCRIPT_DIALOG (object)->priv;
+ priv = E_SIGNATURE_SCRIPT_DIALOG_GET_PRIVATE (object);
if (priv->entry != NULL) {
g_object_unref (priv->entry);
@@ -226,7 +230,7 @@ e_signature_script_dialog_init (ESignatureScriptDialog *dialog)
GtkWidget *widget;
gchar *markup;
- dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog, E_TYPE_SIGNATURE_SCRIPT_DIALOG, ESignatureScriptDialogPrivate);
+ dialog->priv = E_SIGNATURE_SCRIPT_DIALOG_GET_PRIVATE (dialog);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
diff --git a/widgets/misc/e-signature-tree-view.c b/widgets/misc/e-signature-tree-view.c
index 0c8cd62..9d27ec1 100644
--- a/widgets/misc/e-signature-tree-view.c
+++ b/widgets/misc/e-signature-tree-view.c
@@ -21,6 +21,10 @@
#include "e-signature-tree-view.h"
+#define E_SIGNATURE_TREE_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SIGNATURE_TREE_VIEW, ESignatureTreeViewPrivate))
+
enum {
COLUMN_STRING,
COLUMN_SIGNATURE
@@ -211,7 +215,7 @@ signature_tree_view_dispose (GObject *object)
{
ESignatureTreeViewPrivate *priv;
- priv = E_SIGNATURE_TREE_VIEW (object)->priv;
+ priv = E_SIGNATURE_TREE_VIEW_GET_PRIVATE (object);
if (priv->signature_list != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -232,7 +236,7 @@ signature_tree_view_finalize (GObject *object)
{
ESignatureTreeViewPrivate *priv;
- priv = E_SIGNATURE_TREE_VIEW (object)->priv;
+ priv = E_SIGNATURE_TREE_VIEW_GET_PRIVATE (object);
g_hash_table_destroy (priv->index);
@@ -296,7 +300,7 @@ e_signature_tree_view_init (ESignatureTreeView *tree_view)
(GDestroyNotify) g_object_unref,
(GDestroyNotify) gtk_tree_row_reference_free);
- tree_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (tree_view, E_TYPE_SIGNATURE_TREE_VIEW, ESignatureTreeViewPrivate);
+ tree_view->priv = E_SIGNATURE_TREE_VIEW_GET_PRIVATE (tree_view);
tree_view->priv->index = index;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
@@ -332,7 +336,7 @@ e_signature_tree_view_set_signature_list (ESignatureTreeView *tree_view,
if (signature_list != NULL)
g_return_if_fail (E_IS_SIGNATURE_LIST (signature_list));
- priv = tree_view->priv;
+ priv = E_SIGNATURE_TREE_VIEW_GET_PRIVATE (tree_view);
if (priv->signature_list != NULL) {
g_signal_handlers_disconnect_by_func (
diff --git a/widgets/misc/e-web-view-preview.c b/widgets/misc/e-web-view-preview.c
index 8e44db7..c21fee9 100644
--- a/widgets/misc/e-web-view-preview.c
+++ b/widgets/misc/e-web-view-preview.c
@@ -25,6 +25,10 @@
#include <string.h>
#include <glib/gi18n-lib.h>
+#define E_WEB_VIEW_PREVIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_WEB_VIEW_PREVIEW, EWebViewPreviewPrivate))
+
struct _EWebViewPreviewPrivate {
gboolean escape_values;
GString *updating_content; /* is NULL when not between begin_update/end_update */
@@ -93,7 +97,7 @@ web_view_preview_dispose (GObject *object)
{
EWebViewPreviewPrivate *priv;
- priv = E_WEB_VIEW_PREVIEW (object)->priv;
+ priv = E_WEB_VIEW_PREVIEW_GET_PRIVATE (object);
if (priv->updating_content != NULL) {
g_string_free (priv->updating_content, TRUE);
@@ -168,9 +172,11 @@ static void
e_web_view_preview_init (EWebViewPreview *preview)
{
GtkWidget *tree_view_sw, *web_view_sw;
+ EWebViewPreviewPrivate *priv;
- preview->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview, E_TYPE_WEB_VIEW_PREVIEW, EWebViewPreviewPrivate);
- preview->priv->escape_values = TRUE;
+ priv = E_WEB_VIEW_PREVIEW_GET_PRIVATE (preview);
+ preview->priv = priv;
+ priv->escape_values = TRUE;
tree_view_sw = in_scrolled_window (gtk_tree_view_new ());
web_view_sw = in_scrolled_window (e_web_view_new ());
diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c
index 0e90d7d..c1c27b5 100644
--- a/widgets/misc/e-web-view.c
+++ b/widgets/misc/e-web-view.c
@@ -34,6 +34,10 @@
#include "e-popup-action.h"
#include "e-selectable.h"
+#define E_WEB_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_WEB_VIEW, EWebViewPrivate))
+
typedef struct _EWebViewRequest EWebViewRequest;
struct _EWebViewPrivate {
@@ -676,7 +680,7 @@ web_view_dispose (GObject *object)
{
EWebViewPrivate *priv;
- priv = E_WEB_VIEW (object)->priv;
+ priv = E_WEB_VIEW_GET_PRIVATE (object);
if (priv->ui_manager != NULL) {
g_object_unref (priv->ui_manager);
@@ -717,7 +721,7 @@ web_view_finalize (GObject *object)
{
EWebViewPrivate *priv;
- priv = E_WEB_VIEW (object)->priv;
+ priv = E_WEB_VIEW_GET_PRIVATE (object);
/* All URI requests should be complete or cancelled by now. */
if (priv->requests != NULL)
@@ -1374,7 +1378,7 @@ e_web_view_init (EWebView *web_view)
const gchar *id;
GError *error = NULL;
- web_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (web_view, E_TYPE_WEB_VIEW, EWebViewPrivate);
+ web_view->priv = E_WEB_VIEW_GET_PRIVATE (web_view);
ui_manager = gtk_ui_manager_new ();
web_view->priv->ui_manager = ui_manager;
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index 3d514c4..ae7fcc7 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -38,6 +38,10 @@
#include "e-cell-toggle.h"
#include "e-table-item.h"
+#define E_CELL_TOGGLE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CELL_TOGGLE, ECellTogglePrivate))
+
struct _ECellTogglePrivate {
gchar **icon_names;
guint n_icon_names;
@@ -96,7 +100,7 @@ cell_toggle_dispose (GObject *object)
{
ECellTogglePrivate *priv;
- priv = E_CELL_TOGGLE (object)->priv;
+ priv = E_CELL_TOGGLE_GET_PRIVATE (object);
if (priv->empty != NULL) {
g_object_unref (priv->empty);
@@ -116,7 +120,7 @@ cell_toggle_finalize (GObject *object)
ECellTogglePrivate *priv;
guint ii;
- priv = E_CELL_TOGGLE (object)->priv;
+ priv = E_CELL_TOGGLE_GET_PRIVATE (object);
/* The array is not NULL-terminated,
* so g_strfreev() will not work. */
@@ -183,7 +187,7 @@ cell_toggle_draw (ECellView *ecell_view,
const gint value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
- priv = E_CELL_TOGGLE (ecell_view->ecell)->priv;
+ priv = E_CELL_TOGGLE_GET_PRIVATE (ecell_view->ecell);
if (value < 0 || value >= priv->pixbufs->len) {
g_warning ("Value from the table model is %d, the states we support are [0..%d)\n",
@@ -218,7 +222,7 @@ etog_set_value (ECellToggleView *toggle_view,
{
ECellTogglePrivate *priv;
- priv = E_CELL_TOGGLE (toggle_view->cell_view.ecell)->priv;
+ priv = E_CELL_TOGGLE_GET_PRIVATE (toggle_view->cell_view.ecell);
if (value >= priv->pixbufs->len)
value = 0;
@@ -266,7 +270,7 @@ cell_toggle_height (ECellView *ecell_view,
{
ECellTogglePrivate *priv;
- priv = E_CELL_TOGGLE (ecell_view->ecell)->priv;
+ priv = E_CELL_TOGGLE_GET_PRIVATE (ecell_view->ecell);
return priv->height;
}
@@ -288,7 +292,7 @@ cell_toggle_print (ECellView *ecell_view,
cairo_t *cr;
- priv = E_CELL_TOGGLE (ecell_view->ecell)->priv;
+ priv = E_CELL_TOGGLE_GET_PRIVATE (ecell_view->ecell);
if (value >= priv->pixbufs->len) {
g_warning ("Value from the table model is %d, the states we support are [0..%d)\n",
@@ -324,7 +328,7 @@ cell_toggle_print_height (ECellView *ecell_view,
{
ECellTogglePrivate *priv;
- priv = E_CELL_TOGGLE (ecell_view->ecell)->priv;
+ priv = E_CELL_TOGGLE_GET_PRIVATE (ecell_view->ecell);
return priv->height;
}
@@ -339,7 +343,7 @@ cell_toggle_max_width (ECellView *ecell_view,
gint number_of_rows;
gint row;
- priv = E_CELL_TOGGLE (ecell_view->ecell)->priv;
+ priv = E_CELL_TOGGLE_GET_PRIVATE (ecell_view->ecell);
number_of_rows = e_table_model_row_count (ecell_view->e_table_model);
for (row = 0; row < number_of_rows; row++) {
@@ -386,7 +390,7 @@ e_cell_toggle_class_init (ECellToggleClass *class)
static void
e_cell_toggle_init (ECellToggle *cell_toggle)
{
- cell_toggle->priv = G_TYPE_INSTANCE_GET_PRIVATE (cell_toggle, E_TYPE_CELL_TOGGLE, ECellTogglePrivate);
+ cell_toggle->priv = E_CELL_TOGGLE_GET_PRIVATE (cell_toggle);
cell_toggle->priv->empty =
gdk_pixbuf_new_from_xpm_data (empty_xpm);
diff --git a/widgets/table/e-table-extras.c b/widgets/table/e-table-extras.c
index c2fc291..f6dc111 100644
--- a/widgets/table/e-table-extras.c
+++ b/widgets/table/e-table-extras.c
@@ -41,6 +41,10 @@
#include "e-table-extras.h"
#include "e-table-sorting-utils.h"
+#define E_TABLE_EXTRAS_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TABLE_EXTRAS, ETableExtrasPrivate))
+
struct _ETableExtrasPrivate {
GHashTable *cells;
GHashTable *compares;
@@ -57,7 +61,7 @@ ete_finalize (GObject *object)
{
ETableExtrasPrivate *priv;
- priv = E_TABLE_EXTRAS (object)->priv;
+ priv = E_TABLE_EXTRAS_GET_PRIVATE (object);
if (priv->cells) {
g_hash_table_destroy (priv->cells);
@@ -230,7 +234,7 @@ ete_init (ETableExtras *extras)
{
ECell *cell, *sub_cell;
- extras->priv = G_TYPE_INSTANCE_GET_PRIVATE (extras, E_TYPE_TABLE_EXTRAS, ETableExtrasPrivate);
+ extras->priv = E_TABLE_EXTRAS_GET_PRIVATE (extras);
extras->priv->cells = g_hash_table_new_full (
g_str_hash, g_str_equal,
diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c
index 37816c8..5a0263b 100644
--- a/widgets/table/e-table-memory-store.c
+++ b/widgets/table/e-table-memory-store.c
@@ -28,6 +28,10 @@
#include "e-table-memory-store.h"
+#define E_TABLE_MEMORY_STORE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TABLE_MEMORY_STORE, ETableMemoryStorePrivate))
+
#define STORE_LOCATOR(etms, col, row) (*((etms)->priv->store + (row) * (etms)->priv->col_count + (col)))
struct _ETableMemoryStorePrivate {
@@ -226,7 +230,7 @@ etms_finalize (GObject *object)
{
ETableMemoryStorePrivate *priv;
- priv = E_TABLE_MEMORY_STORE (object)->priv;
+ priv = E_TABLE_MEMORY_STORE_GET_PRIVATE (object);
e_table_memory_store_clear (E_TABLE_MEMORY_STORE (object));
@@ -240,7 +244,7 @@ etms_finalize (GObject *object)
static void
e_table_memory_store_init (ETableMemoryStore *etms)
{
- etms->priv = G_TYPE_INSTANCE_GET_PRIVATE (etms, E_TYPE_TABLE_MEMORY_STORE, ETableMemoryStorePrivate);
+ etms->priv = E_TABLE_MEMORY_STORE_GET_PRIVATE (etms);
}
static void
diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c
index d55aa04..0c02375 100644
--- a/widgets/table/e-table-memory.c
+++ b/widgets/table/e-table-memory.c
@@ -37,6 +37,10 @@
#include "e-table-memory.h"
+#define E_TABLE_MEMORY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TABLE_MEMORY, ETableMemoryPrivate))
+
G_DEFINE_TYPE (ETableMemory, e_table_memory, E_TYPE_TABLE_MODEL)
struct _ETableMemoryPrivate {
@@ -50,7 +54,7 @@ etmm_finalize (GObject *object)
{
ETableMemoryPrivate *priv;
- priv = E_TABLE_MEMORY (object)->priv;
+ priv = E_TABLE_MEMORY_GET_PRIVATE (object);
g_free (priv->data);
@@ -84,7 +88,7 @@ e_table_memory_class_init (ETableMemoryClass *class)
static void
e_table_memory_init (ETableMemory *etmm)
{
- etmm->priv = G_TYPE_INSTANCE_GET_PRIVATE (etmm, E_TYPE_TABLE_MEMORY, ETableMemoryPrivate);
+ etmm->priv = E_TABLE_MEMORY_GET_PRIVATE (etmm);
}
/**
diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c
index 23e8cdf..10ed919 100644
--- a/widgets/table/e-table-search.c
+++ b/widgets/table/e-table-search.c
@@ -30,6 +30,10 @@
#define d(x)
+#define E_TABLE_SEARCH_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TABLE_SEARCH, ETableSearchPrivate))
+
d (static gint depth = 0)
struct _ETableSearchPrivate {
@@ -108,7 +112,7 @@ e_table_search_finalize (GObject *object)
{
ETableSearchPrivate *priv;
- priv = E_TABLE_SEARCH (object)->priv;
+ priv = E_TABLE_SEARCH_GET_PRIVATE (object);
drop_timeout (E_TABLE_SEARCH (object));
@@ -153,7 +157,7 @@ e_table_search_class_init (ETableSearchClass *class)
static void
e_table_search_init (ETableSearch *ets)
{
- ets->priv = G_TYPE_INSTANCE_GET_PRIVATE (ets, E_TYPE_TABLE_SEARCH, ETableSearchPrivate);
+ ets->priv = E_TABLE_SEARCH_GET_PRIVATE (ets);
ets->priv->search_string = g_strdup ("");
}
diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c
index 54e733f..881c21b 100644
--- a/widgets/table/e-table-without.c
+++ b/widgets/table/e-table-without.c
@@ -30,6 +30,10 @@
#include "e-table-without.h"
+#define E_TABLE_WITHOUT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TABLE_WITHOUT, ETableWithoutPrivate))
+
/* workaround for avoiding API breakage */
#define etw_get_type e_table_without_get_type
G_DEFINE_TYPE (ETableWithout, etw, E_TYPE_TABLE_SUBSET)
@@ -137,7 +141,7 @@ etw_dispose (GObject *object)
{
ETableWithoutPrivate *priv;
- priv = E_TABLE_WITHOUT (object)->priv;
+ priv = E_TABLE_WITHOUT_GET_PRIVATE (object);
if (priv->hash != NULL) {
g_hash_table_foreach (priv->hash, delete_hash_element, object);
@@ -248,7 +252,7 @@ etw_class_init (ETableWithoutClass *class)
static void
etw_init (ETableWithout *etw)
{
- etw->priv = G_TYPE_INSTANCE_GET_PRIVATE (etw, E_TYPE_TABLE_WITHOUT, ETableWithoutPrivate);
+ etw->priv = E_TABLE_WITHOUT_GET_PRIVATE (etw);
}
ETableModel *
diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c
index 5c7b8f4..bb26fa7 100644
--- a/widgets/table/e-tree-memory.c
+++ b/widgets/table/e-tree-memory.c
@@ -37,6 +37,10 @@
#include "e-tree-memory.h"
+#define E_TREE_MEMORY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TREE_MEMORY, ETreeMemoryPrivate))
+
G_DEFINE_TYPE (ETreeMemory, e_tree_memory, E_TYPE_TREE_MODEL)
enum {
@@ -217,7 +221,7 @@ etmm_dispose (GObject *object)
{
ETreeMemoryPrivate *priv;
- priv = E_TREE_MEMORY (object)->priv;
+ priv = E_TREE_MEMORY_GET_PRIVATE (object);
if (priv->root)
e_tree_memory_node_remove (
@@ -389,7 +393,7 @@ e_tree_memory_class_init (ETreeMemoryClass *class)
static void
e_tree_memory_init (ETreeMemory *etmm)
{
- etmm->priv = G_TYPE_INSTANCE_GET_PRIVATE (etmm, E_TYPE_TREE_MEMORY, ETreeMemoryPrivate);
+ etmm->priv = E_TREE_MEMORY_GET_PRIVATE (etmm);
}
/**
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index 18ec388..cd438a7 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -29,6 +29,10 @@
#include "e-tree-selection-model.h"
+#define E_TREE_SELECTION_MODEL_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TREE_SELECTION_MODEL, ETreeSelectionModelPrivate))
+
G_DEFINE_TYPE (
ETreeSelectionModel, e_tree_selection_model, E_TYPE_SELECTION_MODEL)
@@ -286,7 +290,7 @@ etsm_finalize (GObject *object)
{
ETreeSelectionModelPrivate *priv;
- priv = E_TREE_SELECTION_MODEL (object)->priv;
+ priv = E_TREE_SELECTION_MODEL_GET_PRIVATE (object);
clear_selection (E_TREE_SELECTION_MODEL (object));
g_hash_table_destroy (priv->paths);
@@ -741,7 +745,7 @@ e_tree_selection_model_get_cursor (ETreeSelectionModel *etsm)
static void
e_tree_selection_model_init (ETreeSelectionModel *etsm)
{
- etsm->priv = G_TYPE_INSTANCE_GET_PRIVATE (etsm, E_TYPE_TREE_SELECTION_MODEL, ETreeSelectionModelPrivate);
+ etsm->priv = E_TREE_SELECTION_MODEL_GET_PRIVATE (etsm);
etsm->priv->paths = g_hash_table_new (NULL, NULL);
etsm->priv->cursor_col = -1;
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index 5b5bc80..40b10c0 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -48,6 +48,10 @@
#define d(x)
+#define E_TREE_SORTED_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TREE_SORTED, ETreeSortedPrivate))
+
G_DEFINE_TYPE (ETreeSorted, e_tree_sorted, E_TYPE_TREE_MODEL)
enum {
@@ -584,7 +588,7 @@ ets_dispose (GObject *object)
{
ETreeSortedPrivate *priv;
- priv = E_TREE_SORTED (object)->priv;
+ priv = E_TREE_SORTED_GET_PRIVATE (object);
if (priv->source) {
g_signal_handler_disconnect (
@@ -650,7 +654,7 @@ ets_finalize (GObject *object)
{
ETreeSortedPrivate *priv;
- priv = E_TREE_SORTED (object)->priv;
+ priv = E_TREE_SORTED_GET_PRIVATE (object);
if (priv->root)
free_path (priv->root);
@@ -1203,7 +1207,7 @@ e_tree_sorted_class_init (ETreeSortedClass *class)
static void
e_tree_sorted_init (ETreeSorted *ets)
{
- ets->priv = G_TYPE_INSTANCE_GET_PRIVATE (ets, E_TYPE_TREE_SORTED, ETreeSortedPrivate);
+ ets->priv = E_TREE_SORTED_GET_PRIVATE (ets);
}
/**
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index bbeed6e..4ca80d9 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -38,6 +38,10 @@
#include "e-table-sorting-utils.h"
#include "e-tree-table-adapter.h"
+#define E_TREE_TABLE_ADAPTER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TREE_TABLE_ADAPTER, ETreeTableAdapterPrivate))
+
/* workaround for avoiding API breakage */
#define etta_get_type e_tree_table_adapter_get_type
G_DEFINE_TYPE (ETreeTableAdapter, etta, E_TYPE_TABLE_MODEL)
@@ -510,7 +514,7 @@ etta_finalize (GObject *object)
{
ETreeTableAdapterPrivate *priv;
- priv = E_TREE_TABLE_ADAPTER (object)->priv;
+ priv = E_TREE_TABLE_ADAPTER_GET_PRIVATE (object);
if (priv->resort_idle_id) {
g_source_remove (priv->resort_idle_id);
@@ -535,7 +539,7 @@ etta_dispose (GObject *object)
{
ETreeTableAdapterPrivate *priv;
- priv = E_TREE_TABLE_ADAPTER (object)->priv;
+ priv = E_TREE_TABLE_ADAPTER_GET_PRIVATE (object);
if (priv->sort_info) {
g_signal_handler_disconnect (
@@ -743,7 +747,7 @@ etta_class_init (ETreeTableAdapterClass *class)
static void
etta_init (ETreeTableAdapter *etta)
{
- etta->priv = G_TYPE_INSTANCE_GET_PRIVATE (etta, E_TYPE_TREE_TABLE_ADAPTER, ETreeTableAdapterPrivate);
+ etta->priv = E_TREE_TABLE_ADAPTER_GET_PRIVATE (etta);
etta->priv->root_visible = TRUE;
etta->priv->remap_needed = TRUE;
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index dfbc3cc..fd5340d 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -56,6 +56,10 @@
#define d(x)
+#define E_TREE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TREE, ETreePrivate))
+
enum {
CURSOR_CHANGE,
CURSOR_ACTIVATED,
@@ -383,7 +387,7 @@ et_dispose (GObject *object)
{
ETreePrivate *priv;
- priv = E_TREE (object)->priv;
+ priv = E_TREE_GET_PRIVATE (object);
if (priv->search != NULL) {
g_signal_handler_disconnect (
@@ -581,7 +585,7 @@ e_tree_init (ETree *e_tree)
gtk_table_set_homogeneous (GTK_TABLE (e_tree), FALSE);
- e_tree->priv = G_TYPE_INSTANCE_GET_PRIVATE (e_tree, E_TYPE_TREE, ETreePrivate);
+ e_tree->priv = E_TREE_GET_PRIVATE (e_tree);
e_tree->priv->alternating_row_colors = 1;
e_tree->priv->horizontal_draw_grid = 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]