aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/gui/contact-editor/eab-editor.c8
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c16
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c8
-rw-r--r--addressbook/gui/widgets/e-addressbook-selector.c10
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c8
-rw-r--r--addressbook/gui/widgets/eab-config.c9
-rw-r--r--addressbook/gui/widgets/eab-config.h7
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c8
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c8
-rw-r--r--calendar/gui/dialogs/comp-editor-page.c8
-rw-r--r--calendar/gui/dialogs/comp-editor.c14
-rw-r--r--calendar/gui/dialogs/event-editor.c30
-rw-r--r--calendar/gui/dialogs/event-page.c14
-rw-r--r--calendar/gui/dialogs/memo-editor.c12
-rw-r--r--calendar/gui/dialogs/memo-page.c14
-rw-r--r--calendar/gui/dialogs/recurrence-page.c14
-rw-r--r--calendar/gui/dialogs/schedule-page.c8
-rw-r--r--calendar/gui/dialogs/task-details-page.c8
-rw-r--r--calendar/gui/dialogs/task-editor.c28
-rw-r--r--calendar/gui/dialogs/task-page.c10
-rw-r--r--calendar/gui/e-cal-component-preview.c6
-rw-r--r--calendar/gui/e-cal-config.c9
-rw-r--r--calendar/gui/e-cal-config.h6
-rw-r--r--calendar/gui/e-cal-model-tasks.c8
-rw-r--r--calendar/gui/e-cal-model.c14
-rw-r--r--calendar/gui/e-calendar-selector.c6
-rw-r--r--calendar/gui/e-calendar-view.c10
-rw-r--r--calendar/gui/e-cell-date-edit-text.c6
-rw-r--r--calendar/gui/e-day-view-main-item.c8
-rw-r--r--calendar/gui/e-day-view-time-item.c8
-rw-r--r--calendar/gui/e-day-view-top-item.c8
-rw-r--r--calendar/gui/e-meeting-store.c8
-rw-r--r--calendar/gui/e-meeting-time-sel.c6
-rw-r--r--calendar/gui/e-memo-list-selector.c6
-rw-r--r--calendar/gui/e-memo-table.c8
-rw-r--r--calendar/gui/e-month-view.c6
-rw-r--r--calendar/gui/e-task-list-selector.c6
-rw-r--r--calendar/gui/e-task-table.c8
-rw-r--r--calendar/gui/e-timezone-entry.c10
-rw-r--r--calendar/gui/e-week-view-event-item.c6
-rw-r--r--calendar/gui/e-week-view-main-item.c8
-rw-r--r--calendar/gui/e-week-view-titles-item.c8
-rw-r--r--capplet/settings/mail-decoration.c41
-rw-r--r--composer/e-composer-activity.c6
-rw-r--r--composer/e-composer-header-table.c10
-rw-r--r--composer/e-composer-header.c10
-rw-r--r--composer/e-composer-name-header.c14
-rw-r--r--composer/e-composer-post-header.c14
-rw-r--r--composer/e-composer-private.h4
-rw-r--r--composer/e-msg-composer.c8
-rw-r--r--e-util/e-activity.c10
-rw-r--r--e-util/e-alert-dialog.c8
-rw-r--r--e-util/e-alert.c10
-rw-r--r--e-util/e-config.c6
-rw-r--r--e-util/e-event.c6
-rw-r--r--e-util/e-extension.c8
-rw-r--r--e-util/e-module.c12
-rw-r--r--e-util/e-plugin-ui.c10
-rw-r--r--e-util/e-signature-list.c6
-rw-r--r--e-util/e-signature.c8
-rw-r--r--e-util/e-ui-manager.c6
-rw-r--r--em-format/em-format.c6
-rw-r--r--filter/e-filter-datespec.c12
-rw-r--r--filter/e-filter-rule.c6
-rw-r--r--filter/e-rule-context.c6
-rw-r--r--filter/e-rule-editor.c6
-rw-r--r--libgnomecanvas/gnome-canvas-pixbuf.c3
-rw-r--r--libgnomecanvas/gnome-canvas-rect.c6
-rw-r--r--mail/e-mail-attachment-bar.c30
-rw-r--r--mail/e-mail-backend.c10
-rw-r--r--mail/e-mail-browser.c22
-rw-r--r--mail/e-mail-display.c14
-rw-r--r--mail/e-mail-folder-pane.c6
-rw-r--r--mail/e-mail-label-action.c6
-rw-r--r--mail/e-mail-label-dialog.c8
-rw-r--r--mail/e-mail-label-list-store.c8
-rw-r--r--mail/e-mail-label-manager.c8
-rw-r--r--mail/e-mail-label-tree-view.c6
-rw-r--r--mail/e-mail-message-pane.c6
-rw-r--r--mail/e-mail-notebook-view.c48
-rw-r--r--mail/e-mail-paned-view.c28
-rw-r--r--mail/e-mail-session.c8
-rw-r--r--mail/e-mail-sidebar.c6
-rw-r--r--mail/e-mail-tab-picker.c5
-rw-r--r--mail/e-mail-tab.c5
-rw-r--r--mail/e-mail-tag-editor.c6
-rw-r--r--mail/e-mail-view.c8
-rw-r--r--mail/em-account-editor.c8
-rw-r--r--mail/em-filter-context.c10
-rw-r--r--mail/em-filter-folder-element.c10
-rw-r--r--mail/em-folder-selection-button.c12
-rw-r--r--mail/em-folder-tree-model.c10
-rw-r--r--mail/em-folder-tree.c18
-rw-r--r--mail/em-format-html-display.c10
-rw-r--r--mail/em-format-html.c10
-rw-r--r--mail/em-subscription-editor.c10
-rw-r--r--mail/em-vfolder-context.c10
-rw-r--r--mail/em-vfolder-rule.c8
-rw-r--r--mail/mail-folder-cache.c6
-rw-r--r--mail/message-list.c8
-rw-r--r--modules/addressbook/e-book-shell-backend.c11
-rw-r--r--modules/addressbook/e-book-shell-content.c13
-rw-r--r--modules/addressbook/e-book-shell-sidebar.c11
-rw-r--r--modules/addressbook/e-book-shell-view-private.h4
-rw-r--r--modules/addressbook/e-book-shell-view.c9
-rw-r--r--modules/calendar/e-cal-attachment-handler.c6
-rw-r--r--modules/calendar/e-cal-shell-backend.c9
-rw-r--r--modules/calendar/e-cal-shell-content.c15
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c17
-rw-r--r--modules/calendar/e-cal-shell-view-private.c2
-rw-r--r--modules/calendar/e-cal-shell-view-private.h4
-rw-r--r--modules/calendar/e-cal-shell-view.c5
-rw-r--r--modules/calendar/e-memo-shell-backend.c9
-rw-r--r--modules/calendar/e-memo-shell-content.c17
-rw-r--r--modules/calendar/e-memo-shell-sidebar.c17
-rw-r--r--modules/calendar/e-memo-shell-view-private.h4
-rw-r--r--modules/calendar/e-memo-shell-view.c3
-rw-r--r--modules/calendar/e-task-shell-backend.c9
-rw-r--r--modules/calendar/e-task-shell-content.c17
-rw-r--r--modules/calendar/e-task-shell-sidebar.c17
-rw-r--r--modules/calendar/e-task-shell-view-private.h4
-rw-r--r--modules/calendar/e-task-shell-view.c3
-rw-r--r--modules/mail/e-mail-attachment-handler.c18
-rw-r--r--modules/mail/e-mail-junk-hook.c10
-rw-r--r--modules/mail/e-mail-shell-backend.c11
-rw-r--r--modules/mail/e-mail-shell-content.c35
-rw-r--r--modules/mail/e-mail-shell-sidebar.c11
-rw-r--r--modules/mail/e-mail-shell-view-private.c2
-rw-r--r--modules/mail/e-mail-shell-view-private.h4
-rw-r--r--modules/mail/e-mail-shell-view.c7
-rw-r--r--modules/mail/em-account-prefs.c14
-rw-r--r--modules/plugin-mono/e-plugin-mono.c6
-rw-r--r--modules/plugin-python/e-plugin-python.c6
-rw-r--r--shell/e-shell-backend.c10
-rw-r--r--shell/e-shell-content.c20
-rw-r--r--shell/e-shell-searchbar.c8
-rw-r--r--shell/e-shell-settings.c12
-rw-r--r--shell/e-shell-sidebar.c16
-rw-r--r--shell/e-shell-switcher.c18
-rw-r--r--shell/e-shell-taskbar.c10
-rw-r--r--shell/e-shell-view.c10
-rw-r--r--shell/e-shell-window-private.h4
-rw-r--r--shell/e-shell-window.c2
-rw-r--r--shell/e-shell.c10
-rw-r--r--shell/test/e-test-shell-backend.c7
-rw-r--r--shell/test/e-test-shell-view.c11
-rw-r--r--smclient/eggsmclient.c8
-rw-r--r--smclient/eggsmclient.h3
-rw-r--r--widgets/menus/gal-view-factory-etable.c10
-rw-r--r--widgets/misc/e-account-combo-box.c12
-rw-r--r--widgets/misc/e-account-manager.c8
-rw-r--r--widgets/misc/e-account-tree-view.c12
-rw-r--r--widgets/misc/e-action-combo-box.c10
-rw-r--r--widgets/misc/e-activity-bar.c8
-rw-r--r--widgets/misc/e-activity-proxy.c8
-rw-r--r--widgets/misc/e-alert-bar.c8
-rw-r--r--widgets/misc/e-attachment-button.c8
-rw-r--r--widgets/misc/e-attachment-dialog.c10
-rw-r--r--widgets/misc/e-attachment-handler-image.c6
-rw-r--r--widgets/misc/e-attachment-handler.c6
-rw-r--r--widgets/misc/e-attachment-icon-view.c8
-rw-r--r--widgets/misc/e-attachment-paned.c30
-rw-r--r--widgets/misc/e-attachment-store.c10
-rw-r--r--widgets/misc/e-attachment-tree-view.c8
-rw-r--r--widgets/misc/e-attachment.c10
-rw-r--r--widgets/misc/e-charset-combo-box.c12
-rw-r--r--widgets/misc/e-dateedit.c6
-rw-r--r--widgets/misc/e-focus-tracker.c8
-rw-r--r--widgets/misc/e-hinted-entry.c8
-rw-r--r--widgets/misc/e-image-chooser.c10
-rw-r--r--widgets/misc/e-import-assistant.c39
-rw-r--r--widgets/misc/e-online-button.c8
-rw-r--r--widgets/misc/e-paned.c8
-rw-r--r--widgets/misc/e-picture-gallery.c6
-rw-r--r--widgets/misc/e-popup-action.c8
-rw-r--r--widgets/misc/e-preferences-window.c14
-rw-r--r--widgets/misc/e-preview-pane.c10
-rw-r--r--widgets/misc/e-search-bar.c12
-rw-r--r--widgets/misc/e-searching-tokenizer.c16
-rw-r--r--widgets/misc/e-signature-combo-box.c12
-rw-r--r--widgets/misc/e-signature-editor.c10
-rw-r--r--widgets/misc/e-signature-manager.c8
-rw-r--r--widgets/misc/e-signature-preview.c8
-rw-r--r--widgets/misc/e-signature-script-dialog.c8
-rw-r--r--widgets/misc/e-signature-tree-view.c12
-rw-r--r--widgets/misc/e-web-view-preview.c12
-rw-r--r--widgets/misc/e-web-view.c10
-rw-r--r--widgets/table/e-cell-toggle.c22
-rw-r--r--widgets/table/e-table-extras.c8
-rw-r--r--widgets/table/e-table-memory-store.c8
-rw-r--r--widgets/table/e-table-memory.c8
-rw-r--r--widgets/table/e-table-search.c8
-rw-r--r--widgets/table/e-table-without.c8
-rw-r--r--widgets/table/e-tree-memory.c8
-rw-r--r--widgets/table/e-tree-selection-model.c8
-rw-r--r--widgets/table/e-tree-sorted.c10
-rw-r--r--widgets/table/e-tree-table-adapter.c10
-rw-r--r--widgets/table/e-tree.c8
198 files changed, 635 insertions, 1388 deletions
diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c
index b5e5232e00..dcce405470 100644
--- a/addressbook/gui/contact-editor/eab-editor.c
+++ b/addressbook/gui/contact-editor/eab-editor.c
@@ -31,10 +31,6 @@
#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;
};
@@ -127,7 +123,7 @@ eab_editor_dispose (GObject *object)
{
EABEditorPrivate *priv;
- priv = EAB_EDITOR_GET_PRIVATE (object);
+ priv = EAB_EDITOR (object)->priv;
if (priv->shell != NULL) {
g_signal_handlers_disconnect_matched (
@@ -218,7 +214,7 @@ eab_editor_class_init (EABEditorClass *class)
static void
eab_editor_init (EABEditor *editor)
{
- editor->priv = EAB_EDITOR_GET_PRIVATE (editor);
+ editor->priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, EAB_TYPE_EDITOR, EABEditorPrivate);
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 67c9c88c6f..547e172bca 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -47,13 +47,9 @@
#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_GET_PRIVATE (editor)->builder, name))
+ (E_CONTACT_LIST_EDITOR (editor)->priv->builder, name))
/* More macros, less typos. */
#define CONTACT_LIST_EDITOR_WIDGET_ADD_BUTTON(editor) \
@@ -63,7 +59,7 @@
#define CONTACT_LIST_EDITOR_WIDGET_DIALOG(editor) \
CONTACT_LIST_EDITOR_WIDGET ((editor), "dialog")
#define CONTACT_LIST_EDITOR_WIDGET_EMAIL_ENTRY(editor) \
- E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor)->email_entry
+ editor->priv->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) \
@@ -881,7 +877,7 @@ setup_custom_widgets (EContactListEditor *editor)
g_return_if_fail (editor != NULL);
- priv = E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor);
+ priv = editor->priv;
combo_box = WIDGET (SOURCE_MENU);
client = gconf_client_get_default ();
@@ -1134,7 +1130,7 @@ contact_list_editor_is_valid (EABEditor *editor)
static gboolean
contact_list_editor_is_changed (EABEditor *editor)
{
- return E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor)->changed;
+ return E_CONTACT_LIST_EDITOR (editor)->priv->changed;
}
static GtkWindow *
@@ -1270,7 +1266,7 @@ contact_list_editor_init (EContactListEditor *editor)
GtkCellRenderer *renderer;
GtkTreeView *view;
- priv = E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor);
+ editor->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, E_TYPE_CONTACT_LIST_EDITOR, EContactListEditorPrivate);
priv->editable = TRUE;
priv->allows_contact_lists = TRUE;
@@ -1328,8 +1324,6 @@ 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 e64848f527..b4afd76e74 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -28,10 +28,6 @@
#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;
@@ -516,7 +512,7 @@ addressbook_model_finalize (GObject *object)
{
EAddressbookModelPrivate *priv;
- priv = E_ADDRESSBOOK_MODEL_GET_PRIVATE (object);
+ priv = E_ADDRESSBOOK_MODEL (object)->priv;
g_ptr_array_free (priv->contacts, TRUE);
@@ -674,7 +670,7 @@ addressbook_model_class_init (EAddressbookModelClass *class)
static void
addressbook_model_init (EAddressbookModel *model)
{
- model->priv = E_ADDRESSBOOK_MODEL_GET_PRIVATE (model);
+ model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, E_TYPE_ADDRESSBOOK_MODEL, EAddressbookModelPrivate);
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 018205e09f..727bf3c402 100644
--- a/addressbook/gui/widgets/e-addressbook-selector.c
+++ b/addressbook/gui/widgets/e-addressbook-selector.c
@@ -25,10 +25,6 @@
#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 {
@@ -219,7 +215,7 @@ addressbook_selector_dispose (GObject *object)
{
EAddressbookSelectorPrivate *priv;
- priv = E_ADDRESSBOOK_SELECTOR_GET_PRIVATE (object);
+ priv = E_ADDRESSBOOK_SELECTOR (object)->priv;
if (priv->current_view != NULL) {
g_object_unref (priv->current_view);
@@ -258,7 +254,7 @@ addressbook_selector_data_dropped (ESourceSelector *selector,
const gchar *string;
gboolean remove_from_source;
- priv = E_ADDRESSBOOK_SELECTOR_GET_PRIVATE (selector);
+ priv = E_ADDRESSBOOK_SELECTOR (selector)->priv;
g_return_val_if_fail (priv->current_view != NULL, FALSE);
string = (const gchar *) gtk_selection_data_get_data (selection_data);
@@ -324,7 +320,7 @@ addressbook_selector_class_init (EAddressbookSelectorClass *class)
static void
addressbook_selector_init (EAddressbookSelector *selector)
{
- selector->priv = E_ADDRESSBOOK_SELECTOR_GET_PRIVATE (selector);
+ selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector, E_TYPE_ADDRESSBOOK_SELECTOR, EAddressbookSelectorPrivate);
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 5d2636a413..4e759f9dcc 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -59,10 +59,6 @@
#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,
@@ -498,7 +494,7 @@ addressbook_view_dispose (GObject *object)
{
EAddressbookViewPrivate *priv;
- priv = E_ADDRESSBOOK_VIEW_GET_PRIVATE (object);
+ priv = E_ADDRESSBOOK_VIEW (object)->priv;
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -848,7 +844,7 @@ addressbook_view_init (EAddressbookView *view)
{
GtkTargetList *target_list;
- view->priv = E_ADDRESSBOOK_VIEW_GET_PRIVATE (view);
+ view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view, E_TYPE_ADDRESSBOOK_VIEW, EAddressbookViewPrivate);
view->priv->model = e_addressbook_model_new ();
diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c
index 79ba6c8445..e1f841af3f 100644
--- a/addressbook/gui/widgets/eab-config.c
+++ b/addressbook/gui/widgets/eab-config.c
@@ -32,17 +32,16 @@ struct _EABConfigPrivate {
guint source_changed_id;
};
-#define _PRIVATE(o) (g_type_instance_get_private((GTypeInstance *)o, eab_config_get_type()))
-
static void
-ecp_init (GObject *o)
+ecp_init (EABConfig *cfg)
{
+ cfg->priv = G_TYPE_INSTANCE_GET_PRIVATE (cfg, EAB_TYPE_CONFIG, EABConfigPrivate);
}
static void
ecp_target_free (EConfig *ec, EConfigTarget *t)
{
- struct _EABConfigPrivate *p = _PRIVATE (ec);
+ struct _EABConfigPrivate *p = EAB_CONFIG (ec)->priv;
if (ec->target == t) {
switch (t->type) {
@@ -78,7 +77,7 @@ ecp_source_changed (struct _ESource *source, EConfig *ec)
static void
ecp_set_target (EConfig *ec, EConfigTarget *t)
{
- struct _EABConfigPrivate *p = _PRIVATE (ec);
+ struct _EABConfigPrivate *p = EAB_CONFIG (ec)->priv;
((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 fcf6b76f00..ef9bc0752c 100644
--- a/addressbook/gui/widgets/eab-config.h
+++ b/addressbook/gui/widgets/eab-config.h
@@ -28,13 +28,20 @@
#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 47052f443a..449d112da4 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -37,10 +37,6 @@
#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)
@@ -952,7 +948,7 @@ contact_display_dispose (GObject *object)
{
EABContactDisplayPrivate *priv;
- priv = EAB_CONTACT_DISPLAY_GET_PRIVATE (object);
+ priv = EAB_CONTACT_DISPLAY (object)->priv;
if (priv->contact != NULL) {
g_object_unref (priv->contact);
@@ -1198,7 +1194,7 @@ eab_contact_display_init (EABContactDisplay *display)
const gchar *domain = GETTEXT_PACKAGE;
GError *error = NULL;
- display->priv = EAB_CONTACT_DISPLAY_GET_PRIVATE (display);
+ display->priv = G_TYPE_INSTANCE_GET_PRIVATE (display, EAB_TYPE_CONTACT_DISPLAY, EABContactDisplayPrivate);
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 7f39f484fe..1a990a18b8 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -34,10 +34,6 @@
#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
@@ -208,7 +204,7 @@ alarm_notify_finalize (GObject *object)
AlarmNotifyPrivate *priv;
gint ii;
- priv = ALARM_NOTIFY_GET_PRIVATE (object);
+ priv = ALARM_NOTIFY (object)->priv;
for (ii = 0; ii < E_CAL_SOURCE_TYPE_LAST; ii++) {
g_hash_table_foreach (
@@ -242,7 +238,7 @@ alarm_notify_init (AlarmNotify *an)
{
gint ii;
- an->priv = ALARM_NOTIFY_GET_PRIVATE (an);
+ an->priv = G_TYPE_INSTANCE_GET_PRIVATE (an, TYPE_ALARM_NOTIFY, AlarmNotifyPrivate);
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 2281e5d0fc..657243d31b 100644
--- a/calendar/gui/dialogs/comp-editor-page.c
+++ b/calendar/gui/dialogs/comp-editor-page.c
@@ -31,10 +31,6 @@
#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;
@@ -62,7 +58,7 @@ comp_editor_page_set_property (GObject *object,
{
CompEditorPagePrivate *priv;
- priv = COMP_EDITOR_PAGE_GET_PRIVATE (object);
+ priv = COMP_EDITOR_PAGE (object)->priv;
switch (property_id) {
case PROP_EDITOR:
@@ -176,7 +172,7 @@ comp_editor_page_class_init (CompEditorPageClass *class)
static void
comp_editor_page_init (CompEditorPage *page)
{
- page->priv = COMP_EDITOR_PAGE_GET_PRIVATE (page);
+ page->priv = G_TYPE_INSTANCE_GET_PRIVATE (page, TYPE_COMP_EDITOR_PAGE, CompEditorPagePrivate);
page->accel_group = NULL;
}
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 2bb258b0e7..2d0f524c10 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -60,10 +60,6 @@
#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 */
@@ -1443,7 +1439,7 @@ comp_editor_dispose (GObject *object)
{
CompEditorPrivate *priv;
- priv = COMP_EDITOR_GET_PRIVATE (object);
+ priv = COMP_EDITOR (object)->priv;
if (priv->shell != NULL) {
g_object_remove_weak_pointer (
@@ -1507,7 +1503,7 @@ comp_editor_finalize (GObject *object)
{
CompEditorPrivate *priv;
- priv = COMP_EDITOR_GET_PRIVATE (object);
+ priv = COMP_EDITOR (object)->priv;
g_free (priv->summary);
@@ -1608,7 +1604,7 @@ comp_editor_drag_motion (GtkWidget *widget,
CompEditorPrivate *priv;
EAttachmentView *view;
- priv = COMP_EDITOR_GET_PRIVATE (widget);
+ priv = COMP_EDITOR (widget)->priv;
view = E_ATTACHMENT_VIEW (priv->attachment_view);
return e_attachment_view_drag_motion (view, context, x, y, time);
@@ -1626,7 +1622,7 @@ comp_editor_drag_data_received (GtkWidget *widget,
CompEditorPrivate *priv;
EAttachmentView *view;
- priv = COMP_EDITOR_GET_PRIVATE (widget);
+ priv = COMP_EDITOR (widget)->priv;
view = E_ATTACHMENT_VIEW (priv->attachment_view);
/* Forward the data to the attachment view. Note that calling
@@ -1835,7 +1831,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 = COMP_EDITOR_GET_PRIVATE (editor);
+ editor->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, TYPE_COMP_EDITOR, CompEditorPrivate);
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 7ee860f457..055fc229c0 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -43,10 +43,6 @@
#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;
@@ -121,7 +117,7 @@ create_schedule_page (CompEditor *editor)
CompEditorPage *page;
GtkWidget *content_area;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
priv->sched_window = gtk_dialog_new_with_buttons (
_("Free/Busy"), GTK_WINDOW (editor), GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -300,7 +296,7 @@ event_editor_constructor (GType type,
type, n_construct_properties, construct_properties);
editor = COMP_EDITOR (object);
- priv = EVENT_EDITOR_GET_PRIVATE (object);
+ priv = EVENT_EDITOR (object)->priv;
shell = comp_editor_get_shell (editor);
@@ -398,7 +394,7 @@ event_editor_dispose (GObject *object)
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (object);
+ priv = EVENT_EDITOR (object)->priv;
if (priv->event_page) {
g_object_unref (priv->event_page);
@@ -431,7 +427,7 @@ event_editor_constructed (GObject *object)
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (object);
+ priv = EVENT_EDITOR (object)->priv;
g_object_bind_property (
object, "client",
@@ -448,7 +444,7 @@ event_editor_show_categories (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_show_categories (priv->event_page, visible);
}
@@ -459,7 +455,7 @@ event_editor_show_role (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_view_role (priv->event_page, visible);
}
@@ -470,7 +466,7 @@ event_editor_show_rsvp (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_view_rsvp (priv->event_page, visible);
}
@@ -481,7 +477,7 @@ event_editor_show_status (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_view_status (priv->event_page, visible);
}
@@ -492,7 +488,7 @@ event_editor_show_time_zone (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_show_timezone (priv->event_page, visible);
}
@@ -503,7 +499,7 @@ event_editor_show_type (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_view_type (priv->event_page, visible);
}
@@ -543,7 +539,7 @@ event_editor_init (EventEditor *ee)
const gchar *id;
GError *error = NULL;
- ee->priv = EVENT_EDITOR_GET_PRIVATE (ee);
+ ee->priv = G_TYPE_INSTANCE_GET_PRIVATE (ee, TYPE_EVENT_EDITOR, EventEditorPrivate);
ee->priv->model = E_MEETING_STORE (e_meeting_store_new ());
ee->priv->meeting_shown = TRUE;
ee->priv->updating = FALSE;
@@ -609,7 +605,7 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
ECal *client;
GSList *attendees = NULL;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
priv->updating = TRUE;
delegate = (comp_editor_get_flags (COMP_EDITOR (editor)) & COMP_EDITOR_DELEGATE);
@@ -722,7 +718,7 @@ event_editor_send_comp (CompEditor *editor,
EventEditorPrivate *priv;
ECalComponent *comp = NULL;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
/* 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 7d7e1d4859..e4459a4779 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -58,10 +58,6 @@
#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,
@@ -215,7 +211,7 @@ event_page_dispose (GObject *object)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE_GET_PRIVATE (object);
+ priv = EVENT_PAGE (object)->priv;
if (priv->comp != NULL) {
g_object_unref (priv->comp);
@@ -251,7 +247,7 @@ event_page_finalize (GObject *object)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE_GET_PRIVATE (object);
+ priv = EVENT_PAGE (object)->priv;
g_list_foreach (priv->address_strings, (GFunc) g_free, NULL);
g_list_free (priv->address_strings);
@@ -293,7 +289,7 @@ event_page_class_init (EventPageClass *class)
static void
event_page_init (EventPage *epage)
{
- epage->priv = EVENT_PAGE_GET_PRIVATE (epage);
+ epage->priv = G_TYPE_INSTANCE_GET_PRIVATE (epage, TYPE_EVENT_PAGE, EventPagePrivate);
epage->priv->deleted_attendees = g_ptr_array_new ();
epage->priv->alarm_interval = -1;
epage->priv->alarm_map = alarm_map_with_user_time;
@@ -338,7 +334,7 @@ event_page_get_widget (CompEditorPage *page)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE_GET_PRIVATE (page);
+ priv = EVENT_PAGE (page)->priv;
return priv->main;
}
@@ -349,7 +345,7 @@ event_page_focus_main_widget (CompEditorPage *page)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE_GET_PRIVATE (page);
+ priv = EVENT_PAGE (page)->priv;
gtk_widget_grab_focus (priv->summary);
}
diff --git a/calendar/gui/dialogs/memo-editor.c b/calendar/gui/dialogs/memo-editor.c
index 0e3cfc5dcf..50f862aa7a 100644
--- a/calendar/gui/dialogs/memo-editor.c
+++ b/calendar/gui/dialogs/memo-editor.c
@@ -38,10 +38,6 @@
#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;
@@ -73,7 +69,7 @@ memo_editor_show_categories (CompEditor *editor,
{
MemoEditorPrivate *priv;
- priv = MEMO_EDITOR_GET_PRIVATE (editor);
+ priv = MEMO_EDITOR (editor)->priv;
memo_page_set_show_categories (priv->memo_page, visible);
}
@@ -83,7 +79,7 @@ memo_editor_dispose (GObject *object)
{
MemoEditorPrivate *priv;
- priv = MEMO_EDITOR_GET_PRIVATE (object);
+ priv = MEMO_EDITOR (object)->priv;
if (priv->memo_page) {
g_object_unref (priv->memo_page);
@@ -100,7 +96,7 @@ memo_editor_constructed (GObject *object)
MemoEditorPrivate *priv;
CompEditor *editor;
- priv = MEMO_EDITOR_GET_PRIVATE (object);
+ priv = MEMO_EDITOR (object)->priv;
editor = COMP_EDITOR (object);
priv->memo_page = memo_page_new (editor);
@@ -140,7 +136,7 @@ memo_editor_init (MemoEditor *me)
const gchar *id;
GError *error = NULL;
- me->priv = MEMO_EDITOR_GET_PRIVATE (me);
+ me->priv = G_TYPE_INSTANCE_GET_PRIVATE (me, TYPE_MEMO_EDITOR, MemoEditorPrivate);
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 03cf7e7b95..45b18a5982 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -54,10 +54,6 @@
#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;
@@ -140,7 +136,7 @@ memo_page_dispose (GObject *object)
{
MemoPagePrivate *priv;
- priv = MEMO_PAGE_GET_PRIVATE (object);
+ priv = MEMO_PAGE (object)->priv;
g_list_foreach (priv->address_strings, (GFunc) g_free, NULL);
g_list_free (priv->address_strings);
@@ -154,7 +150,7 @@ memo_page_finalize (GObject *object)
{
MemoPagePrivate *priv;
- priv = MEMO_PAGE_GET_PRIVATE (object);
+ priv = MEMO_PAGE (object)->priv;
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -175,7 +171,7 @@ memo_page_finalize (GObject *object)
static GtkWidget *
memo_page_get_widget (CompEditorPage *page)
{
- MemoPagePrivate *priv = MEMO_PAGE_GET_PRIVATE (page);
+ MemoPagePrivate *priv = MEMO_PAGE (page)->priv;
return priv->main;
}
@@ -183,7 +179,7 @@ memo_page_get_widget (CompEditorPage *page)
static void
memo_page_focus_main_widget (CompEditorPage *page)
{
- MemoPagePrivate *priv = MEMO_PAGE_GET_PRIVATE (page);
+ MemoPagePrivate *priv = MEMO_PAGE (page)->priv;
gtk_widget_grab_focus (priv->summary_entry);
}
@@ -319,7 +315,7 @@ memo_page_class_init (MemoPageClass *class)
static void
memo_page_init (MemoPage *mpage)
{
- mpage->priv = MEMO_PAGE_GET_PRIVATE (mpage);
+ mpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (mpage, TYPE_MEMO_PAGE, MemoPagePrivate);
}
/* returns whether changed info text */
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index e8deefae36..3fd4811b16 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -46,10 +46,6 @@
#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,
@@ -301,7 +297,7 @@ recurrence_page_dispose (GObject *object)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE_GET_PRIVATE (object);
+ priv = RECURRENCE_PAGE (object)->priv;
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -337,7 +333,7 @@ recurrence_page_finalize (GObject *object)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE_GET_PRIVATE (object);
+ priv = RECURRENCE_PAGE (object)->priv;
g_signal_handlers_disconnect_matched (
E_CALENDAR (priv->preview_calendar)->calitem,
@@ -381,7 +377,7 @@ recurrence_page_class_init (RecurrencePageClass *class)
static void
recurrence_page_init (RecurrencePage *rpage)
{
- rpage->priv = RECURRENCE_PAGE_GET_PRIVATE (rpage);
+ rpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (rpage, TYPE_RECURRENCE_PAGE, RecurrencePagePrivate);
}
/* get_widget handler for the recurrence page */
@@ -390,7 +386,7 @@ recurrence_page_get_widget (CompEditorPage *page)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE_GET_PRIVATE (page);
+ priv = RECURRENCE_PAGE (page)->priv;
return priv->main;
}
@@ -401,7 +397,7 @@ recurrence_page_focus_main_widget (CompEditorPage *page)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE_GET_PRIVATE (page);
+ priv = RECURRENCE_PAGE (page)->priv;
gtk_widget_grab_focus (priv->recurs);
}
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index 4d234880b4..50fc7d1865 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -40,10 +40,6 @@
#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;
@@ -163,7 +159,7 @@ schedule_page_dispose (GObject *object)
{
SchedulePagePrivate *priv;
- priv = SCHEDULE_PAGE_GET_PRIVATE (object);
+ priv = SCHEDULE_PAGE (object)->priv;
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -275,7 +271,7 @@ schedule_page_class_init (SchedulePageClass *class)
static void
schedule_page_init (SchedulePage *spage)
{
- spage->priv = SCHEDULE_PAGE_GET_PRIVATE (spage);
+ spage->priv = G_TYPE_INSTANCE_GET_PRIVATE (spage, TYPE_SCHEDULE_PAGE, SchedulePagePrivate);
}
/* 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 43f38a20a5..16f986c5aa 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -41,10 +41,6 @@
#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;
@@ -177,7 +173,7 @@ task_details_page_dispose (GObject *object)
{
TaskDetailsPagePrivate *priv;
- priv = TASK_DETAILS_PAGE_GET_PRIVATE (object);
+ priv = TASK_DETAILS_PAGE (object)->priv;
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -440,7 +436,7 @@ task_details_page_class_init (TaskDetailsPageClass *class)
static void
task_details_page_init (TaskDetailsPage *tdpage)
{
- tdpage->priv = TASK_DETAILS_PAGE_GET_PRIVATE (tdpage);
+ tdpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (tdpage, TYPE_TASK_DETAILS_PAGE, TaskDetailsPagePrivate);
}
/* 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 933299feb0..1d8bec3ea7 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -40,10 +40,6 @@
#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;
@@ -156,7 +152,7 @@ task_editor_constructor (GType type,
type, n_construct_properties, construct_properties);
editor = COMP_EDITOR (object);
- priv = TASK_EDITOR_GET_PRIVATE (object);
+ priv = TASK_EDITOR (object)->priv;
client = comp_editor_get_client (editor);
flags = comp_editor_get_flags (editor);
@@ -181,7 +177,7 @@ task_editor_dispose (GObject *object)
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (object);
+ priv = TASK_EDITOR (object)->priv;
if (priv->task_page) {
g_object_unref (priv->task_page);
@@ -207,7 +203,7 @@ task_editor_constructed (GObject *object)
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (object);
+ priv = TASK_EDITOR (object)->priv;
g_object_bind_property (
object, "client",
@@ -224,7 +220,7 @@ task_editor_show_categories (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_show_categories (priv->task_page, visible);
}
@@ -235,7 +231,7 @@ task_editor_show_role (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_view_role (priv->task_page, visible);
}
@@ -246,7 +242,7 @@ task_editor_show_rsvp (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_view_rsvp (priv->task_page, visible);
}
@@ -257,7 +253,7 @@ task_editor_show_status (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_view_status (priv->task_page, visible);
}
@@ -268,7 +264,7 @@ task_editor_show_time_zone (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_show_timezone (priv->task_page, visible);
}
@@ -279,7 +275,7 @@ task_editor_show_type (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_view_type (priv->task_page, visible);
}
@@ -320,7 +316,7 @@ task_editor_init (TaskEditor *te)
const gchar *id;
GError *error = NULL;
- te->priv = TASK_EDITOR_GET_PRIVATE (te);
+ te->priv = G_TYPE_INSTANCE_GET_PRIVATE (te, TYPE_TASK_EDITOR, TaskEditorPrivate);
te->priv->model = E_MEETING_STORE (e_meeting_store_new ());
te->priv->assignment_shown = TRUE;
te->priv->updating = FALSE;
@@ -394,7 +390,7 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
ECal *client;
GSList *attendees = NULL;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
priv->updating = TRUE;
@@ -477,7 +473,7 @@ task_editor_send_comp (CompEditor *editor,
TaskEditorPrivate *priv;
ECalComponent *comp = NULL;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
/* 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 6df7afc9aa..8555afdcc9 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -54,10 +54,6 @@
#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;
@@ -152,7 +148,7 @@ task_page_dispose (GObject *object)
{
TaskPagePrivate *priv;
- priv = TASK_PAGE_GET_PRIVATE (object);
+ priv = TASK_PAGE (object)->priv;
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -183,7 +179,7 @@ task_page_finalize (GObject *object)
{
TaskPagePrivate *priv;
- priv = TASK_PAGE_GET_PRIVATE (object);
+ priv = TASK_PAGE (object)->priv;
g_list_foreach (priv->address_strings, (GFunc) g_free, NULL);
g_list_free (priv->address_strings);
@@ -221,7 +217,7 @@ task_page_class_init (TaskPageClass *class)
static void
task_page_init (TaskPage *tpage)
{
- tpage->priv = TASK_PAGE_GET_PRIVATE (tpage);
+ tpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (tpage, TYPE_TASK_PAGE, TaskPagePrivate);
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 636e734d82..b9cb7f3eea 100644
--- a/calendar/gui/e-cal-component-preview.c
+++ b/calendar/gui/e-cal-component-preview.c
@@ -34,10 +34,6 @@
#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 */
@@ -404,7 +400,7 @@ cal_component_preview_class_init (ECalComponentPreviewClass *class)
static void
cal_component_preview_init (ECalComponentPreview *preview)
{
- preview->priv = E_CAL_COMPONENT_PREVIEW_GET_PRIVATE (preview);
+ preview->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview, E_TYPE_CAL_COMPONENT_PREVIEW, ECalComponentPreviewPrivate);
}
GType
diff --git a/calendar/gui/e-cal-config.c b/calendar/gui/e-cal-config.c
index 10dc316ffa..213041bf30 100644
--- a/calendar/gui/e-cal-config.c
+++ b/calendar/gui/e-cal-config.c
@@ -33,17 +33,16 @@ 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 (GObject *o)
+ecp_init (ECalConfig *cfg)
{
+ 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 = _PRIVATE (ec);
+ struct _ECalConfigPrivate *p = E_CAL_CONFIG (ec)->priv;
if (ec->target == t) {
switch (t->type) {
@@ -85,7 +84,7 @@ ecp_source_changed (struct _ESource *source, EConfig *ec)
static void
ecp_set_target (EConfig *ec, EConfigTarget *t)
{
- struct _ECalConfigPrivate *p = _PRIVATE (ec);
+ struct _ECalConfigPrivate *p = E_CAL_CONFIG (ec)->priv;
((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 73514ec220..828bcf4cb4 100644
--- a/calendar/gui/e-cal-config.h
+++ b/calendar/gui/e-cal-config.h
@@ -29,13 +29,19 @@
#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 30e57f9a81..c4690e3fca 100644
--- a/calendar/gui/e-cal-model-tasks.c
+++ b/calendar/gui/e-cal-model-tasks.c
@@ -37,10 +37,6 @@
#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;
@@ -122,7 +118,7 @@ cal_model_tasks_finalize (GObject *object)
{
ECalModelTasksPrivate *priv;
- priv = E_CAL_MODEL_TASKS_GET_PRIVATE (object);
+ priv = E_CAL_MODEL_TASKS (object)->priv;
g_free (priv->color_due_today);
g_free (priv->color_overdue);
@@ -184,7 +180,7 @@ e_cal_model_tasks_class_init (ECalModelTasksClass *class)
static void
e_cal_model_tasks_init (ECalModelTasks *model)
{
- model->priv = E_CAL_MODEL_TASKS_GET_PRIVATE (model);
+ model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, E_TYPE_CAL_MODEL_TASKS, ECalModelTasksPrivate);
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 d0b0c988d3..c9f92b626d 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -40,14 +40,6 @@
#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;
@@ -385,7 +377,7 @@ cal_model_dispose (GObject *object)
{
ECalModelPrivate *priv;
- priv = E_CAL_MODEL_GET_PRIVATE (object);
+ priv = E_CAL_MODEL (object)->priv;
if (priv->clients) {
while (priv->clients != NULL) {
@@ -419,7 +411,7 @@ cal_model_finalize (GObject *object)
ECalModelPrivate *priv;
gint ii;
- priv = E_CAL_MODEL_GET_PRIVATE (object);
+ priv = E_CAL_MODEL (object)->priv;
g_free (priv->search_sexp);
g_free (priv->full_sexp);
@@ -698,7 +690,7 @@ e_cal_model_class_init (ECalModelClass *class)
static void
e_cal_model_init (ECalModel *model)
{
- model->priv = E_CAL_MODEL_GET_PRIVATE (model);
+ model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, E_TYPE_CAL_MODEL, ECalModelPrivate);
/* 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 915c970871..a920554352 100644
--- a/calendar/gui/e-calendar-selector.c
+++ b/calendar/gui/e-calendar-selector.c
@@ -24,10 +24,6 @@
#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;
};
@@ -162,7 +158,7 @@ calendar_selector_class_init (ECalendarSelectorClass *class)
static void
calendar_selector_init (ECalendarSelector *selector)
{
- selector->priv = E_CALENDAR_SELECTOR_GET_PRIVATE (selector);
+ selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector, E_TYPE_CALENDAR_SELECTOR, ECalendarSelectorPrivate);
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 d7aa3d8716..60371ae036 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -61,10 +61,6 @@
#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;
@@ -322,7 +318,7 @@ calendar_view_dispose (GObject *object)
{
ECalendarViewPrivate *priv;
- priv = E_CALENDAR_VIEW_GET_PRIVATE (object);
+ priv = E_CALENDAR_VIEW (object)->priv;
if (priv->model != NULL) {
g_signal_handlers_disconnect_matched (
@@ -351,7 +347,7 @@ calendar_view_finalize (GObject *object)
{
ECalendarViewPrivate *priv;
- priv = E_CALENDAR_VIEW_GET_PRIVATE (object);
+ priv = E_CALENDAR_VIEW (object)->priv;
g_free (priv->default_category);
@@ -917,7 +913,7 @@ e_calendar_view_init (ECalendarView *calendar_view)
{
GtkTargetList *target_list;
- calendar_view->priv = E_CALENDAR_VIEW_GET_PRIVATE (calendar_view);
+ calendar_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (calendar_view, E_TYPE_CALENDAR_VIEW, ECalendarViewPrivate);
/* 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 724e154648..fc56271bc4 100644
--- a/calendar/gui/e-cell-date-edit-text.c
+++ b/calendar/gui/e-cell-date-edit-text.c
@@ -38,10 +38,6 @@
#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. */
@@ -270,7 +266,7 @@ cell_date_edit_text_class_init (ECellDateEditTextClass *class)
static void
cell_date_edit_text_init (ECellDateEditText *ecd)
{
- ecd->priv = E_CELL_DATE_EDIT_TEXT_GET_PRIVATE (ecd);
+ ecd->priv = G_TYPE_INSTANCE_GET_PRIVATE (ecd, E_TYPE_CELL_DATE_EDIT_TEXT, ECellDateEditTextPrivate);
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 838295c6d6..da5296c0f5 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -40,10 +40,6 @@
#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;
};
@@ -935,7 +931,7 @@ day_view_main_item_dispose (GObject *object)
{
EDayViewMainItemPrivate *priv;
- priv = E_DAY_VIEW_MAIN_ITEM_GET_PRIVATE (object);
+ priv = E_DAY_VIEW_MAIN_ITEM (object)->priv;
if (priv->day_view != NULL) {
g_object_unref (priv->day_view);
@@ -1261,7 +1257,7 @@ day_view_main_item_class_init (EDayViewMainItemClass *class)
static void
day_view_main_item_init (EDayViewMainItem *main_item)
{
- main_item->priv = E_DAY_VIEW_MAIN_ITEM_GET_PRIVATE (main_item);
+ main_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (main_item, E_TYPE_DAY_VIEW_MAIN_ITEM, EDayViewMainItemPrivate);
}
GType
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index cfe808f806..6cf379f6a9 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -54,10 +54,6 @@
#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;
@@ -149,7 +145,7 @@ day_view_time_item_dispose (GObject *object)
{
EDayViewTimeItemPrivate *priv;
- priv = E_DAY_VIEW_TIME_ITEM_GET_PRIVATE (object);
+ priv = E_DAY_VIEW_TIME_ITEM (object)->priv;
if (priv->day_view != NULL) {
g_object_unref (priv->day_view);
@@ -212,7 +208,7 @@ day_view_time_item_init (EDayViewTimeItem *time_item)
{
gchar *last;
- time_item->priv = E_DAY_VIEW_TIME_ITEM_GET_PRIVATE (time_item);
+ time_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (time_item, E_TYPE_DAY_VIEW_TIME_ITEM, EDayViewTimeItemPrivate);
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 d6faa6151c..12b1bc41fa 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -37,10 +37,6 @@
#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;
@@ -523,7 +519,7 @@ day_view_top_item_dispose (GObject *object)
{
EDayViewTopItemPrivate *priv;
- priv = E_DAY_VIEW_TOP_ITEM_GET_PRIVATE (object);
+ priv = E_DAY_VIEW_TOP_ITEM (object)->priv;
if (priv->day_view != NULL) {
g_object_unref (priv->day_view);
@@ -788,7 +784,7 @@ day_view_top_item_class_init (EDayViewTopItemClass *class)
static void
day_view_top_item_init (EDayViewTopItem *top_item)
{
- top_item->priv = E_DAY_VIEW_TOP_ITEM_GET_PRIVATE (top_item);
+ top_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (top_item, E_TYPE_DAY_VIEW_TOP_ITEM, EDayViewTopItemPrivate);
}
GType
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index ccf8fe255b..71806dd1d8 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -44,10 +44,6 @@
#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;
@@ -715,7 +711,7 @@ meeting_store_finalize (GObject *object)
EMeetingStorePrivate *priv;
gint i;
- priv = E_MEETING_STORE_GET_PRIVATE (object);
+ priv = E_MEETING_STORE (object)->priv;
for (i = 0; i < priv->attendees->len; i++)
g_object_unref (g_ptr_array_index (priv->attendees, i));
@@ -822,7 +818,7 @@ e_meeting_store_class_init (EMeetingStoreClass *class)
static void
e_meeting_store_init (EMeetingStore *store)
{
- store->priv = E_MEETING_STORE_GET_PRIVATE (store);
+ store->priv = G_TYPE_INSTANCE_GET_PRIVATE (store, E_TYPE_MEETING_STORE, EMeetingStorePrivate);
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 1e9ddf97b6..ce7587049d 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -46,10 +46,6 @@
#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;
@@ -365,7 +361,7 @@ e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * class)
static void
e_meeting_time_selector_init (EMeetingTimeSelector * mts)
{
- mts->priv = E_MEETING_TIME_SELECTOR_GET_PRIVATE (mts);
+ mts->priv = G_TYPE_INSTANCE_GET_PRIVATE (mts, E_TYPE_MEETING_TIME_SELECTOR, EMeetingTimeSelectorPrivate);
/* 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 8e0ae7c203..e518ec3148 100644
--- a/calendar/gui/e-memo-list-selector.c
+++ b/calendar/gui/e-memo-list-selector.c
@@ -26,10 +26,6 @@
#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;
};
@@ -233,7 +229,7 @@ memo_list_selector_class_init (EMemoListSelectorClass *class)
static void
memo_list_selector_init (EMemoListSelector *selector)
{
- selector->priv = E_MEMO_LIST_SELECTOR_GET_PRIVATE (selector);
+ selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector, E_TYPE_MEMO_LIST_SELECTOR, EMemoListSelectorPrivate);
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 9260c65411..1482d25d26 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -60,10 +60,6 @@
#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;
@@ -297,7 +293,7 @@ memo_table_dispose (GObject *object)
{
EMemoTablePrivate *priv;
- priv = E_MEMO_TABLE_GET_PRIVATE (object);
+ priv = E_MEMO_TABLE (object)->priv;
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -1129,7 +1125,7 @@ memo_table_init (EMemoTable *memo_table)
{
GtkTargetList *target_list;
- memo_table->priv = E_MEMO_TABLE_GET_PRIVATE (memo_table);
+ memo_table->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_table, E_TYPE_MEMO_TABLE, EMemoTablePrivate);
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 238492c92c..bc82048b11 100644
--- a/calendar/gui/e-month-view.c
+++ b/calendar/gui/e-month-view.c
@@ -23,10 +23,6 @@
#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;
};
@@ -175,7 +171,7 @@ month_view_class_init (EMonthViewClass *class)
static void
month_view_init (EMonthView *month_view)
{
- month_view->priv = E_MONTH_VIEW_GET_PRIVATE (month_view);
+ month_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (month_view, E_TYPE_MONTH_VIEW, EMonthViewPrivate);
}
GType
diff --git a/calendar/gui/e-task-list-selector.c b/calendar/gui/e-task-list-selector.c
index 317d7cae37..58096e295f 100644
--- a/calendar/gui/e-task-list-selector.c
+++ b/calendar/gui/e-task-list-selector.c
@@ -26,10 +26,6 @@
#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;
};
@@ -234,7 +230,7 @@ task_list_selector_class_init (ETaskListSelectorClass *class)
static void
task_list_selector_init (ETaskListSelector *selector)
{
- selector->priv = E_TASK_LIST_SELECTOR_GET_PRIVATE (selector);
+ selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector, E_TYPE_TASK_LIST_SELECTOR, ETaskListSelectorPrivate);
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 1af19e0ce6..8fbd4d986c 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -63,10 +63,6 @@
#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;
@@ -375,7 +371,7 @@ task_table_dispose (GObject *object)
{
ETaskTablePrivate *priv;
- priv = E_TASK_TABLE_GET_PRIVATE (object);
+ priv = E_TASK_TABLE (object)->priv;
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -1431,7 +1427,7 @@ task_table_init (ETaskTable *task_table)
{
GtkTargetList *target_list;
- task_table->priv = E_TASK_TABLE_GET_PRIVATE (task_table);
+ task_table->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_table, E_TYPE_TASK_TABLE, ETaskTablePrivate);
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 c281a4aedf..56872ea870 100644
--- a/calendar/gui/e-timezone-entry.c
+++ b/calendar/gui/e-timezone-entry.c
@@ -33,10 +33,6 @@
#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
@@ -217,7 +213,7 @@ timezone_entry_mnemonic_activate (GtkWidget *widget,
{
ETimezoneEntryPrivate *priv;
- priv = E_TIMEZONE_ENTRY_GET_PRIVATE (widget);
+ priv = E_TIMEZONE_ENTRY (widget)->priv;
if (gtk_widget_get_can_focus (widget)) {
if (priv->button != NULL)
@@ -233,7 +229,7 @@ timezone_entry_focus (GtkWidget *widget,
{
ETimezoneEntryPrivate *priv;
- priv = E_TIMEZONE_ENTRY_GET_PRIVATE (widget);
+ priv = E_TIMEZONE_ENTRY (widget)->priv;
if (direction == GTK_DIR_TAB_FORWARD) {
if (gtk_widget_has_focus (priv->entry))
@@ -302,7 +298,7 @@ e_timezone_entry_init (ETimezoneEntry *timezone_entry)
AtkObject *a11y;
GtkWidget *widget;
- timezone_entry->priv = E_TIMEZONE_ENTRY_GET_PRIVATE (timezone_entry);
+ timezone_entry->priv = G_TYPE_INSTANCE_GET_PRIVATE (timezone_entry, E_TYPE_TIMEZONE_ENTRY, ETimezoneEntryPrivate);
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 84615760c3..7f1807ecbd 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -39,10 +39,6 @@
#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;
@@ -1157,7 +1153,7 @@ week_view_event_item_class_init (EWeekViewEventItemClass *class)
static void
week_view_event_item_init (EWeekViewEventItem *event_item)
{
- event_item->priv = E_WEEK_VIEW_EVENT_ITEM_GET_PRIVATE (event_item);
+ event_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (event_item, E_TYPE_WEEK_VIEW_EVENT_ITEM, EWeekViewEventItemPrivate);
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 ae4316ca50..13ce34bbde 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -33,10 +33,6 @@
#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;
};
@@ -334,7 +330,7 @@ week_view_main_item_dispose (GObject *object)
{
EWeekViewMainItemPrivate *priv;
- priv = E_WEEK_VIEW_MAIN_ITEM_GET_PRIVATE (object);
+ priv = E_WEEK_VIEW_MAIN_ITEM (object)->priv;
if (priv->week_view != NULL) {
g_object_unref (priv->week_view);
@@ -449,7 +445,7 @@ week_view_main_item_class_init (EWeekViewMainItemClass *class)
static void
week_view_main_item_init (EWeekViewMainItem *main_item)
{
- main_item->priv = E_WEEK_VIEW_MAIN_ITEM_GET_PRIVATE (main_item);
+ main_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (main_item, E_TYPE_WEEK_VIEW_MAIN_ITEM, EWeekViewMainItemPrivate);
}
GType
diff --git a/calendar/gui/e-week-view-titles-item.c b/calendar/gui/e-week-view-titles-item.c
index fab2007954..2b9a040bb4 100644
--- a/calendar/gui/e-week-view-titles-item.c
+++ b/calendar/gui/e-week-view-titles-item.c
@@ -29,10 +29,6 @@
#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;
};
@@ -84,7 +80,7 @@ week_view_titles_item_dispose (GObject *object)
{
EWeekViewTitlesItemPrivate *priv;
- priv = E_WEEK_VIEW_TITLES_ITEM_GET_PRIVATE (object);
+ priv = E_WEEK_VIEW_TITLES_ITEM (object)->priv;
if (priv->week_view != NULL) {
g_object_unref (priv->week_view);
@@ -279,7 +275,7 @@ week_view_titles_item_class_init (EWeekViewTitlesItemClass *class)
static void
week_view_titles_item_init (EWeekViewTitlesItem *titles_item)
{
- titles_item->priv = E_WEEK_VIEW_TITLES_ITEM_GET_PRIVATE (titles_item);
+ titles_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (titles_item, E_TYPE_WEEK_VIEW_TITLES_ITEM, EWeekViewTitlesItemPrivate);
}
GType
diff --git a/capplet/settings/mail-decoration.c b/capplet/settings/mail-decoration.c
index 51a71d11ef..ab63ce293b 100644
--- a/capplet/settings/mail-decoration.c
+++ b/capplet/settings/mail-decoration.c
@@ -29,8 +29,6 @@
#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];
@@ -339,25 +337,22 @@ mail_decoration_class_init (MailDecorationClass *klass)
static void
mail_decoration_init (MailDecoration *md)
{
- 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;
+ 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;
}
diff --git a/composer/e-composer-activity.c b/composer/e-composer-activity.c
index e0e159704c..f29834b24d 100644
--- a/composer/e-composer-activity.c
+++ b/composer/e-composer-activity.c
@@ -18,10 +18,6 @@
#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;
@@ -164,7 +160,7 @@ e_composer_activity_class_init (EComposerActivityClass *class)
static void
e_composer_activity_init (EComposerActivity *activity)
{
- activity->priv = E_COMPOSER_ACTIVITY_GET_PRIVATE (activity);
+ activity->priv = G_TYPE_INSTANCE_GET_PRIVATE (activity, E_TYPE_COMPOSER_ACTIVITY, EComposerActivityPrivate);
}
EActivity *
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index 1e78111da4..d2d41dfdcc 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -32,10 +32,6 @@
#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 \
@@ -538,7 +534,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_GET_PRIVATE (object);
+ priv = E_COMPOSER_HEADER_TABLE (object)->priv;
small_screen_mode = e_shell_get_small_screen_mode (priv->shell);
@@ -810,7 +806,7 @@ composer_header_table_dispose (GObject *object)
EComposerHeaderTablePrivate *priv;
gint ii;
- priv = E_COMPOSER_HEADER_TABLE_GET_PRIVATE (object);
+ priv = E_COMPOSER_HEADER_TABLE (object)->priv;
for (ii = 0; ii < G_N_ELEMENTS (priv->headers); ii++) {
if (priv->headers[ii] != NULL) {
@@ -998,7 +994,7 @@ e_composer_header_table_init (EComposerHeaderTable *table)
GtkWidget *widget;
gint ii;
- table->priv = E_COMPOSER_HEADER_TABLE_GET_PRIVATE (table);
+ table->priv = G_TYPE_INSTANCE_GET_PRIVATE (table, E_TYPE_COMPOSER_HEADER_TABLE, EComposerHeaderTablePrivate);
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 76c5d89b14..baf5ea3845 100644
--- a/composer/e-composer-header.c
+++ b/composer/e-composer-header.c
@@ -24,10 +24,6 @@
#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,
@@ -122,7 +118,7 @@ composer_header_set_property (GObject *object,
{
EComposerHeaderPrivate *priv;
- priv = E_COMPOSER_HEADER_GET_PRIVATE (object);
+ priv = E_COMPOSER_HEADER (object)->priv;
switch (property_id) {
case PROP_BUTTON: /* construct only */
@@ -157,7 +153,7 @@ composer_header_get_property (GObject *object,
{
EComposerHeaderPrivate *priv;
- priv = E_COMPOSER_HEADER_GET_PRIVATE (object);
+ priv = E_COMPOSER_HEADER (object)->priv;
switch (property_id) {
case PROP_BUTTON: /* construct only */
@@ -282,7 +278,7 @@ e_composer_header_class_init (EComposerHeaderClass *class)
static void
e_composer_header_init (EComposerHeader *header)
{
- header->priv = E_COMPOSER_HEADER_GET_PRIVATE (header);
+ header->priv = G_TYPE_INSTANCE_GET_PRIVATE (header, E_TYPE_COMPOSER_HEADER, EComposerHeaderPrivate);
}
gchar *
diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
index 057266c707..a8cdc6fca4 100644
--- a/composer/e-composer-name-header.c
+++ b/composer/e-composer-name-header.c
@@ -27,10 +27,6 @@
#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))
@@ -123,7 +119,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_GET_PRIVATE (object);
+ priv = E_COMPOSER_NAME_HEADER (object)->priv;
g_assert (E_IS_NAME_SELECTOR (priv->name_selector));
model = e_name_selector_peek_model (priv->name_selector);
@@ -171,7 +167,7 @@ composer_name_header_set_property (GObject *object,
{
EComposerNameHeaderPrivate *priv;
- priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (object);
+ priv = E_COMPOSER_NAME_HEADER (object)->priv;
switch (property_id) {
case PROP_NAME_SELECTOR: /* construct only */
@@ -206,7 +202,7 @@ composer_name_header_dispose (GObject *object)
{
EComposerNameHeaderPrivate *priv;
- priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (object);
+ priv = E_COMPOSER_NAME_HEADER (object)->priv;
if (priv->name_selector != NULL) {
g_object_unref (priv->name_selector);
@@ -223,7 +219,7 @@ composer_name_header_clicked (EComposerHeader *header)
EComposerNameHeaderPrivate *priv;
ENameSelectorDialog *dialog;
- priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (header);
+ priv = E_COMPOSER_NAME_HEADER (header)->priv;
dialog = e_name_selector_peek_dialog (priv->name_selector);
e_name_selector_dialog_set_destination_index (
@@ -265,7 +261,7 @@ e_composer_name_header_class_init (EComposerNameHeaderClass *class)
static void
e_composer_name_header_init (EComposerNameHeader *header)
{
- header->priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (header);
+ header->priv = G_TYPE_INSTANCE_GET_PRIVATE (header, E_TYPE_COMPOSER_NAME_HEADER, EComposerNameHeaderPrivate);
}
EComposerHeader *
diff --git a/composer/e-composer-post-header.c b/composer/e-composer-post-header.c
index be7e57727e..49611d29f8 100644
--- a/composer/e-composer-post-header.c
+++ b/composer/e-composer-post-header.c
@@ -24,10 +24,6 @@
#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
@@ -172,7 +168,7 @@ composer_post_header_dispose (GObject *object)
{
EComposerPostHeaderPrivate *priv;
- priv = E_COMPOSER_POST_HEADER_GET_PRIVATE (object);
+ priv = E_COMPOSER_POST_HEADER (object)->priv;
if (priv->account != NULL) {
g_object_unref (priv->account);
@@ -188,7 +184,7 @@ composer_post_header_finalize (GObject *object)
{
EComposerPostHeaderPrivate *priv;
- priv = E_COMPOSER_POST_HEADER_GET_PRIVATE (object);
+ priv = E_COMPOSER_POST_HEADER (object)->priv;
g_free (priv->base_url);
@@ -201,7 +197,7 @@ composer_post_header_changed (EComposerHeader *header)
{
EComposerPostHeaderPrivate *priv;
- priv = E_COMPOSER_POST_HEADER_GET_PRIVATE (header);
+ priv = E_COMPOSER_POST_HEADER (header)->priv;
priv->custom = TRUE;
}
@@ -211,7 +207,7 @@ composer_post_header_clicked (EComposerHeader *header)
{
EComposerPostHeaderPrivate *priv;
- priv = E_COMPOSER_POST_HEADER_GET_PRIVATE (header);
+ priv = E_COMPOSER_POST_HEADER (header)->priv;
priv->custom = FALSE;
}
@@ -249,7 +245,7 @@ e_composer_post_header_class_init (EComposerPostHeaderClass *class)
static void
e_composer_post_header_init (EComposerPostHeader *header)
{
- header->priv = E_COMPOSER_POST_HEADER_GET_PRIVATE (header);
+ header->priv = G_TYPE_INSTANCE_GET_PRIVATE (header, E_TYPE_COMPOSER_POST_HEADER, EComposerPostHeaderPrivate);
}
EComposerHeader *
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 9ed3b11c59..229897756f 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -61,10 +61,6 @@
#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 ae6c5258f6..d2d9837a45 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 = E_MSG_COMPOSER_GET_PRIVATE (composer);
+ EMsgComposerPrivate *priv = composer->priv;
g_return_val_if_fail (priv != NULL, FALSE);
@@ -2475,7 +2475,7 @@ msg_composer_submit_alert (EAlertSink *alert_sink,
GtkWidget *dialog;
GtkWindow *parent;
- priv = E_MSG_COMPOSER_GET_PRIVATE (alert_sink);
+ priv = E_MSG_COMPOSER (alert_sink)->priv;
switch (e_alert_get_message_type (alert)) {
case GTK_MESSAGE_INFO:
@@ -2627,7 +2627,7 @@ e_msg_composer_alert_sink_init (EAlertSinkInterface *interface)
static void
e_msg_composer_init (EMsgComposer *composer)
{
- composer->priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
+ composer->priv = G_TYPE_INSTANCE_GET_PRIVATE (composer, E_TYPE_MSG_COMPOSER, EMsgComposerPrivate);
}
/* Callbacks. */
@@ -3159,7 +3159,7 @@ e_msg_composer_new_with_message (EShell *shell,
}
composer = e_msg_composer_new (shell);
- priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
+ priv = composer->priv;
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 98ee4d1c0b..0b4089cca2 100644
--- a/e-util/e-activity.c
+++ b/e-util/e-activity.c
@@ -28,10 +28,6 @@
#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;
@@ -169,7 +165,7 @@ activity_dispose (GObject *object)
{
EActivityPrivate *priv;
- priv = E_ACTIVITY_GET_PRIVATE (object);
+ priv = E_ACTIVITY (object)->priv;
if (priv->alert_sink != NULL) {
g_object_unref (priv->alert_sink);
@@ -194,7 +190,7 @@ activity_finalize (GObject *object)
{
EActivityPrivate *priv;
- priv = E_ACTIVITY_GET_PRIVATE (object);
+ priv = E_ACTIVITY (object)->priv;
g_free (priv->icon_name);
g_free (priv->text);
@@ -336,7 +332,7 @@ e_activity_class_init (EActivityClass *class)
static void
e_activity_init (EActivity *activity)
{
- activity->priv = E_ACTIVITY_GET_PRIVATE (activity);
+ activity->priv = G_TYPE_INSTANCE_GET_PRIVATE (activity, E_TYPE_ACTIVITY, EActivityPrivate);
}
EActivity *
diff --git a/e-util/e-alert-dialog.c b/e-util/e-alert-dialog.c
index e9fea52052..4f399d351e 100644
--- a/e-util/e-alert-dialog.c
+++ b/e-util/e-alert-dialog.c
@@ -25,10 +25,6 @@
#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;
@@ -93,7 +89,7 @@ alert_dialog_dispose (GObject *object)
{
EAlertDialogPrivate *priv;
- priv = E_ALERT_DIALOG_GET_PRIVATE (object);
+ priv = E_ALERT_DIALOG (object)->priv;
if (priv->alert) {
g_signal_handlers_disconnect_matched (
@@ -261,7 +257,7 @@ e_alert_dialog_class_init (EAlertDialogClass *class)
static void
e_alert_dialog_init (EAlertDialog *dialog)
{
- dialog->priv = E_ALERT_DIALOG_GET_PRIVATE (dialog);
+ dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog, E_TYPE_ALERT_DIALOG, EAlertDialogPrivate);
}
GtkWidget *
diff --git a/e-util/e-alert.c b/e-util/e-alert.c
index cccc3225e5..7df5ca9fe1 100644
--- a/e-util/e-alert.c
+++ b/e-util/e-alert.c
@@ -42,10 +42,6 @@
#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 {
@@ -491,7 +487,7 @@ alert_dispose (GObject *object)
{
EAlertPrivate *priv;
- priv = E_ALERT_GET_PRIVATE (object);
+ priv = E_ALERT (object)->priv;
while (!g_queue_is_empty (&priv->actions)) {
GtkAction *action = g_queue_pop_head (&priv->actions);
@@ -510,7 +506,7 @@ alert_finalize (GObject *object)
{
EAlertPrivate *priv;
- priv = E_ALERT_GET_PRIVATE (object);
+ priv = E_ALERT (object)->priv;
g_free (priv->tag);
g_free (priv->primary_text);
@@ -655,7 +651,7 @@ e_alert_class_init (EAlertClass *class)
static void
e_alert_init (EAlert *alert)
{
- alert->priv = E_ALERT_GET_PRIVATE (alert);
+ alert->priv = G_TYPE_INSTANCE_GET_PRIVATE (alert, E_TYPE_ALERT, EAlertPrivate);
g_queue_init (&alert->priv->actions);
}
diff --git a/e-util/e-config.c b/e-util/e-config.c
index 3c1aeb4c21..17646e00f8 100644
--- a/e-util/e-config.c
+++ b/e-util/e-config.c
@@ -34,10 +34,6 @@
#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);
@@ -191,7 +187,7 @@ e_config_class_init (EConfigClass *class)
static void
e_config_init (EConfig *config)
{
- config->priv = E_CONFIG_GET_PRIVATE (config);
+ config->priv = G_TYPE_INSTANCE_GET_PRIVATE (config, E_TYPE_CONFIG, EConfigPrivate);
}
/**
diff --git a/e-util/e-event.c b/e-util/e-event.c
index 5e4a2b6c09..4127a9c930 100644
--- a/e-util/e-event.c
+++ b/e-util/e-event.c
@@ -33,10 +33,6 @@
#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 {
@@ -113,7 +109,7 @@ e_event_class_init (EEventClass *class)
static void
e_event_init (EEvent *event)
{
- event->priv = E_EVENT_GET_PRIVATE (event);
+ event->priv = G_TYPE_INSTANCE_GET_PRIVATE (event, E_TYPE_EVENT, EEventPrivate);
g_queue_init (&event->priv->events);
}
diff --git a/e-util/e-extension.c b/e-util/e-extension.c
index d7d95c9496..9c61110911 100644
--- a/e-util/e-extension.c
+++ b/e-util/e-extension.c
@@ -41,10 +41,6 @@
#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 */
};
@@ -126,7 +122,7 @@ extension_dispose (GObject *object)
{
EExtensionPrivate *priv;
- priv = E_EXTENSION_GET_PRIVATE (object);
+ priv = E_EXTENSION (object)->priv;
if (priv->extensible != NULL) {
g_object_remove_weak_pointer (
@@ -165,7 +161,7 @@ e_extension_class_init (EExtensionClass *class)
static void
e_extension_init (EExtension *extension)
{
- extension->priv = E_EXTENSION_GET_PRIVATE (extension);
+ extension->priv = G_TYPE_INSTANCE_GET_PRIVATE (extension, E_TYPE_EXTENSION, EExtensionPrivate);
}
/**
diff --git a/e-util/e-module.c b/e-util/e-module.c
index 7b4801df47..56add2b27f 100644
--- a/e-util/e-module.c
+++ b/e-util/e-module.c
@@ -35,10 +35,6 @@
/* 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;
@@ -105,7 +101,7 @@ module_finalize (GObject *object)
{
EModulePrivate *priv;
- priv = E_MODULE_GET_PRIVATE (object);
+ priv = E_MODULE (object)->priv;
g_free (priv->filename);
@@ -119,7 +115,7 @@ module_load (GTypeModule *type_module)
EModulePrivate *priv;
gpointer symbol;
- priv = E_MODULE_GET_PRIVATE (type_module);
+ priv = E_MODULE (type_module)->priv;
g_return_val_if_fail (priv->filename != NULL, FALSE);
priv->module = g_module_open (priv->filename, 0);
@@ -155,7 +151,7 @@ module_unload (GTypeModule *type_module)
{
EModulePrivate *priv;
- priv = E_MODULE_GET_PRIVATE (type_module);
+ priv = E_MODULE (type_module)->priv;
priv->unload (type_module);
@@ -203,7 +199,7 @@ e_module_class_init (EModuleClass *class)
static void
e_module_init (EModule *module)
{
- module->priv = E_MODULE_GET_PRIVATE (module);
+ module->priv = G_TYPE_INSTANCE_GET_PRIVATE (module, E_TYPE_MODULE, EModulePrivate);
}
/**
diff --git a/e-util/e-plugin-ui.c b/e-util/e-plugin-ui.c
index 60ad884d25..e606e713f6 100644
--- a/e-util/e-plugin-ui.c
+++ b/e-util/e-plugin-ui.c
@@ -22,10 +22,6 @@
#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"
@@ -399,7 +395,7 @@ plugin_ui_hook_finalize (GObject *object)
GHashTableIter iter;
gpointer ui_manager;
- priv = E_PLUGIN_UI_HOOK_GET_PRIVATE (object);
+ priv = E_PLUGIN_UI_HOOK (object)->priv;
/* Remove weak reference callbacks to GtkUIManagers. */
g_hash_table_iter_init (&iter, priv->registry);
@@ -423,7 +419,7 @@ plugin_ui_hook_construct (EPluginHook *hook,
{
EPluginUIHookPrivate *priv;
- priv = E_PLUGIN_UI_HOOK_GET_PRIVATE (hook);
+ priv = E_PLUGIN_UI_HOOK (hook)->priv;
/* XXX The EPlugin should be a property of EPluginHookClass.
* Then it could be passed directly to g_object_new() and
@@ -524,7 +520,7 @@ e_plugin_ui_hook_init (EPluginUIHook *hook)
registry = g_hash_table_new (g_direct_hash, g_direct_equal);
- hook->priv = E_PLUGIN_UI_HOOK_GET_PRIVATE (hook);
+ hook->priv = G_TYPE_INSTANCE_GET_PRIVATE (hook, E_TYPE_PLUGIN_UI_HOOK, EPluginUIHookPrivate);
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 7a58e8fea4..7b8a320782 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -28,10 +28,6 @@
#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;
@@ -113,7 +109,7 @@ e_signature_list_class_init (ESignatureListClass *class)
static void
e_signature_list_init (ESignatureList *signature_list)
{
- signature_list->priv = E_SIGNATURE_LIST_GET_PRIVATE (signature_list);
+ signature_list->priv = G_TYPE_INSTANCE_GET_PRIVATE (signature_list, E_TYPE_SIGNATURE_LIST, ESignatureListPrivate);
}
static GSList *
diff --git a/e-util/e-signature.c b/e-util/e-signature.c
index 07e4b2ea33..7bd2b74bf0 100644
--- a/e-util/e-signature.c
+++ b/e-util/e-signature.c
@@ -36,10 +36,6 @@
#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;
@@ -231,7 +227,7 @@ signature_finalize (GObject *object)
{
ESignaturePrivate *priv;
- priv = E_SIGNATURE_GET_PRIVATE (object);
+ priv = E_SIGNATURE (object)->priv;
g_free (priv->filename);
g_free (priv->name);
@@ -323,7 +319,7 @@ e_signature_class_init (ESignatureClass *class)
static void
e_signature_init (ESignature *signature)
{
- signature->priv = E_SIGNATURE_GET_PRIVATE (signature);
+ signature->priv = G_TYPE_INSTANCE_GET_PRIVATE (signature, E_TYPE_SIGNATURE, ESignaturePrivate);
}
/**
diff --git a/e-util/e-ui-manager.c b/e-util/e-ui-manager.c
index 8b2d0ff9f6..238df39e9f 100644
--- a/e-util/e-ui-manager.c
+++ b/e-util/e-ui-manager.c
@@ -30,10 +30,6 @@
#include <string.h>
-#define E_UI_MANAGER_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_UI_MANAGER, EUIManagerPrivate))
-
/*
* --- NOTE TO SELF ---
*
@@ -163,7 +159,7 @@ e_ui_manager_class_init (EUIManagerClass *class)
static void
e_ui_manager_init (EUIManager *ui_manager)
{
- ui_manager->priv = E_UI_MANAGER_GET_PRIVATE (ui_manager);
+ ui_manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (ui_manager, E_TYPE_UI_MANAGER, EUIManagerPrivate);
}
/**
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 27f3d1bfb6..23573331c0 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -36,10 +36,6 @@
#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;
@@ -358,7 +354,7 @@ emf_init (EMFormat *emf)
EShell *shell;
EShellSettings *shell_settings;
- emf->priv = EM_FORMAT_GET_PRIVATE (emf);
+ emf->priv = G_TYPE_INSTANCE_GET_PRIVATE (emf, EM_TYPE_FORMAT, EMFormatPrivate);
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 2c79899bf6..95e9dfd68a 100644
--- a/filter/e-filter-datespec.c
+++ b/filter/e-filter-datespec.c
@@ -47,10 +47,6 @@
#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 {
@@ -172,7 +168,7 @@ set_button (EFilterDatespec *fds)
static void
get_values (EFilterDatespec *fds)
{
- EFilterDatespecPrivate *p = E_FILTER_DATESPEC_GET_PRIVATE (fds);
+ EFilterDatespecPrivate *p = fds->priv;
switch (fds->priv->type) {
case FDST_SPECIFIED: {
@@ -207,7 +203,7 @@ set_values (EFilterDatespec *fds)
{
gint note_type;
- EFilterDatespecPrivate *p = E_FILTER_DATESPEC_GET_PRIVATE (fds);
+ EFilterDatespecPrivate *p = fds->priv;
p->type = fds->type==FDST_UNKNOWN ? FDST_NOW : fds->type;
@@ -270,7 +266,7 @@ set_combobox_past_future (GtkComboBox *combobox, EFilterDatespec *fds)
static void
button_clicked (GtkButton *button, EFilterDatespec *fds)
{
- EFilterDatespecPrivate *p = E_FILTER_DATESPEC_GET_PRIVATE (fds);
+ EFilterDatespecPrivate *p = fds->priv;
GtkWidget *content_area;
GtkWidget *toplevel;
GtkDialog *dialog;
@@ -465,7 +461,7 @@ e_filter_datespec_class_init (EFilterDatespecClass *class)
static void
e_filter_datespec_init (EFilterDatespec *datespec)
{
- datespec->priv = E_FILTER_DATESPEC_GET_PRIVATE (datespec);
+ datespec->priv = G_TYPE_INSTANCE_GET_PRIVATE (datespec, E_TYPE_FILTER_DATESPEC, EFilterDatespecPrivate);
datespec->type = FDST_UNKNOWN;
}
diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c
index f80146a600..ab39940843 100644
--- a/filter/e-filter-rule.c
+++ b/filter/e-filter-rule.c
@@ -35,10 +35,6 @@
#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;
@@ -864,7 +860,7 @@ e_filter_rule_class_init (EFilterRuleClass *class)
static void
e_filter_rule_init (EFilterRule *rule)
{
- rule->priv = E_FILTER_RULE_GET_PRIVATE (rule);
+ rule->priv = G_TYPE_INSTANCE_GET_PRIVATE (rule, E_TYPE_FILTER_RULE, EFilterRulePrivate);
rule->enabled = TRUE;
}
diff --git a/filter/e-rule-context.c b/filter/e-rule-context.c
index a167d01c5d..95ca9bbc7a 100644
--- a/filter/e-rule-context.c
+++ b/filter/e-rule-context.c
@@ -53,10 +53,6 @@
#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;
};
@@ -518,7 +514,7 @@ e_rule_context_class_init (ERuleContextClass *class)
static void
e_rule_context_init (ERuleContext *context)
{
- context->priv = E_RULE_CONTEXT_GET_PRIVATE (context);
+ context->priv = G_TYPE_INSTANCE_GET_PRIVATE (context, E_TYPE_RULE_CONTEXT, ERuleContextPrivate);
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 a69f40b7fa..e1e702638c 100644
--- a/filter/e-rule-editor.c
+++ b/filter/e-rule-editor.c
@@ -37,10 +37,6 @@
#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 {
@@ -654,7 +650,7 @@ e_rule_editor_class_init (ERuleEditorClass *class)
static void
e_rule_editor_init (ERuleEditor *editor)
{
- editor->priv = E_RULE_EDITOR_GET_PRIVATE (editor);
+ editor->priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, E_TYPE_RULE_EDITOR, ERuleEditorPrivate);
}
/**
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c
index fbe673d4c0..fa6d403959 100644
--- a/libgnomecanvas/gnome-canvas-pixbuf.c
+++ b/libgnomecanvas/gnome-canvas-pixbuf.c
@@ -99,8 +99,7 @@ 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 3cf71bd1b0..b75a177c81 100644
--- a/libgnomecanvas/gnome-canvas-rect.c
+++ b/libgnomecanvas/gnome-canvas-rect.c
@@ -28,10 +28,6 @@
#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 */
@@ -704,7 +700,7 @@ gnome_canvas_rect_class_init (GnomeCanvasRectClass *class)
static void
gnome_canvas_rect_init (GnomeCanvasRect *rect)
{
- rect->priv = GNOME_CANVAS_RECT_GET_PRIVATE (rect);
+ rect->priv = G_TYPE_INSTANCE_GET_PRIVATE (rect, GNOME_TYPE_CANVAS_RECT, GnomeCanvasRectPrivate);
rect->priv->scale = 1.0;
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c
index 88cf81a51a..22f27fac20 100644
--- a/mail/e-mail-attachment-bar.c
+++ b/mail/e-mail-attachment-bar.c
@@ -29,10 +29,6 @@
#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 {
@@ -186,7 +182,7 @@ mail_attachment_bar_dispose (GObject *object)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (object);
+ priv = E_MAIL_ATTACHMENT_BAR (object)->priv;
if (priv->model != NULL) {
g_object_unref (priv->model);
@@ -259,7 +255,7 @@ mail_attachment_bar_constructed (GObject *object)
GConfBridge *bridge;
const gchar *key;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (object);
+ priv = E_MAIL_ATTACHMENT_BAR (object)->priv;
bridge = gconf_bridge_get ();
@@ -327,7 +323,7 @@ mail_attachment_bar_get_private (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
+ priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_private (view);
@@ -338,7 +334,7 @@ mail_attachment_bar_get_store (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
+ priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_store (view);
@@ -351,7 +347,7 @@ mail_attachment_bar_get_path_at_pos (EAttachmentView *view,
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
+ priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_path_at_pos (view, x, y);
@@ -362,7 +358,7 @@ mail_attachment_bar_get_selected_paths (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
+ priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_selected_paths (view);
@@ -374,7 +370,7 @@ mail_attachment_bar_path_is_selected (EAttachmentView *view,
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
+ priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_path_is_selected (view, path);
@@ -386,7 +382,7 @@ mail_attachment_bar_select_path (EAttachmentView *view,
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
+ priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_select_path (view, path);
@@ -398,7 +394,7 @@ mail_attachment_bar_unselect_path (EAttachmentView *view,
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
+ priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_unselect_path (view, path);
@@ -409,7 +405,7 @@ mail_attachment_bar_select_all (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
+ priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_select_all (view);
@@ -420,7 +416,7 @@ mail_attachment_bar_unselect_all (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
+ priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_unselect_all (view);
@@ -431,7 +427,7 @@ mail_attachment_bar_update_actions (EAttachmentView *view)
{
EMailAttachmentBarPrivate *priv;
- priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (view);
+ priv = E_MAIL_ATTACHMENT_BAR (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_update_actions (view);
@@ -506,7 +502,7 @@ mail_attachment_bar_init (EMailAttachmentBar *bar)
GtkWidget *widget;
GtkAction *action;
- bar->priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (bar);
+ bar->priv = G_TYPE_INSTANCE_GET_PRIVATE (bar, E_TYPE_MAIL_ATTACHMENT_BAR, EMailAttachmentBarPrivate);
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 804000367c..d0631b13dd 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -49,10 +49,6 @@
#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 {
@@ -418,7 +414,7 @@ mail_backend_dispose (GObject *object)
{
EMailBackendPrivate *priv;
- priv = E_MAIL_BACKEND_GET_PRIVATE (object);
+ priv = E_MAIL_BACKEND (object)->priv;
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -447,7 +443,7 @@ mail_backend_constructed (GObject *object)
EMFolderTreeModel *folder_tree_model;
MailFolderCache *folder_cache;
- priv = E_MAIL_BACKEND_GET_PRIVATE (object);
+ priv = E_MAIL_BACKEND (object)->priv;
shell_backend = E_SHELL_BACKEND (object);
shell = e_shell_backend_get_shell (shell_backend);
@@ -547,7 +543,7 @@ e_mail_backend_class_init (EMailBackendClass *class)
static void
e_mail_backend_init (EMailBackend *backend)
{
- backend->priv = E_MAIL_BACKEND_GET_PRIVATE (backend);
+ backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (backend, E_TYPE_MAIL_BACKEND, EMailBackendPrivate);
}
EMailSession *
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index 750e84afd8..b1186aa945 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -40,10 +40,6 @@
#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 {
@@ -465,7 +461,7 @@ mail_browser_dispose (GObject *object)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER_GET_PRIVATE (object);
+ priv = E_MAIL_BROWSER (object)->priv;
if (priv->backend != NULL) {
g_object_unref (priv->backend);
@@ -554,7 +550,7 @@ mail_browser_constructed (GObject *object)
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
- priv = E_MAIL_BROWSER_GET_PRIVATE (object);
+ priv = E_MAIL_BROWSER (object)->priv;
reader = E_MAIL_READER (object);
backend = e_mail_reader_get_backend (reader);
@@ -715,7 +711,7 @@ mail_browser_submit_alert (EAlertSink *alert_sink,
GtkWidget *dialog;
GtkWindow *parent;
- priv = E_MAIL_BROWSER_GET_PRIVATE (alert_sink);
+ priv = E_MAIL_BROWSER (alert_sink)->priv;
switch (e_alert_get_message_type (alert)) {
case GTK_MESSAGE_INFO:
@@ -739,7 +735,7 @@ mail_browser_get_action_group (EMailReader *reader)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER_GET_PRIVATE (reader);
+ priv = E_MAIL_BROWSER (reader)->priv;
return priv->action_group;
}
@@ -755,7 +751,7 @@ mail_browser_get_backend (EMailReader *reader)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER_GET_PRIVATE (reader);
+ priv = E_MAIL_BROWSER (reader)->priv;
return priv->backend;
}
@@ -775,7 +771,7 @@ mail_browser_get_formatter (EMailReader *reader)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER_GET_PRIVATE (reader);
+ priv = E_MAIL_BROWSER (reader)->priv;
return EM_FORMAT_HTML (priv->formatter);
}
@@ -785,7 +781,7 @@ mail_browser_get_message_list (EMailReader *reader)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER_GET_PRIVATE (reader);
+ priv = E_MAIL_BROWSER (reader)->priv;
return priv->message_list;
}
@@ -843,7 +839,7 @@ mail_browser_show_search_bar (EMailReader *reader)
{
EMailBrowserPrivate *priv;
- priv = E_MAIL_BROWSER_GET_PRIVATE (reader);
+ priv = E_MAIL_BROWSER (reader)->priv;
gtk_widget_show (priv->search_bar);
}
@@ -943,7 +939,7 @@ e_mail_browser_init (EMailBrowser *browser)
GConfBridge *bridge;
const gchar *prefix;
- browser->priv = E_MAIL_BROWSER_GET_PRIVATE (browser);
+ browser->priv = G_TYPE_INSTANCE_GET_PRIVATE (browser, E_TYPE_MAIL_BROWSER, EMailBrowserPrivate);
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 ae340d9571..d13eca3bcf 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -29,10 +29,6 @@
#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;
};
@@ -172,7 +168,7 @@ mail_display_dispose (GObject *object)
{
EMailDisplayPrivate *priv;
- priv = E_MAIL_DISPLAY_GET_PRIVATE (object);
+ priv = E_MAIL_DISPLAY (object)->priv;
if (priv->formatter) {
g_object_unref (priv->formatter);
@@ -198,7 +194,7 @@ mail_display_style_set (GtkWidget *widget,
{
EMailDisplayPrivate *priv;
- priv = E_MAIL_DISPLAY_GET_PRIVATE (widget);
+ priv = E_MAIL_DISPLAY (widget)->priv;
/* Chain up to parent's style_set() method. */
GTK_WIDGET_CLASS (parent_class)->style_set (widget, previous_style);
@@ -213,7 +209,7 @@ mail_display_load_string (EWebView *web_view,
{
EMailDisplayPrivate *priv;
- priv = E_MAIL_DISPLAY_GET_PRIVATE (web_view);
+ priv = E_MAIL_DISPLAY (web_view)->priv;
g_return_if_fail (priv->formatter != NULL);
if (em_format_busy (EM_FORMAT (priv->formatter)))
@@ -238,7 +234,7 @@ mail_display_link_clicked (GtkHTML *html,
{
EMailDisplayPrivate *priv;
- priv = E_MAIL_DISPLAY_GET_PRIVATE (html);
+ priv = E_MAIL_DISPLAY (html)->priv;
g_return_if_fail (priv->formatter != NULL);
if (g_str_has_prefix (uri, "##")) {
@@ -345,7 +341,7 @@ mail_display_init (EMailDisplay *display)
web_view = E_WEB_VIEW (display);
- display->priv = E_MAIL_DISPLAY_GET_PRIVATE (display);
+ display->priv = G_TYPE_INSTANCE_GET_PRIVATE (display, E_TYPE_MAIL_DISPLAY, EMailDisplayPrivate);
/* 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 54d5cc4c65..beac9cc1ef 100644
--- a/mail/e-mail-folder-pane.c
+++ b/mail/e-mail-folder-pane.c
@@ -41,10 +41,6 @@
#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;
};
@@ -171,7 +167,7 @@ e_mail_folder_pane_class_init (EMailFolderPaneClass *class)
static void
e_mail_folder_pane_init (EMailFolderPane *browser)
{
- browser->priv = E_MAIL_FOLDER_PANE_GET_PRIVATE (browser);
+ browser->priv = G_TYPE_INSTANCE_GET_PRIVATE (browser, E_TYPE_MAIL_FOLDER_PANE, EMailFolderPanePrivate);
}
EMailView *
diff --git a/mail/e-mail-label-action.c b/mail/e-mail-label-action.c
index b7487fc047..c7cf71a655 100644
--- a/mail/e-mail-label-action.c
+++ b/mail/e-mail-label-action.c
@@ -21,10 +21,6 @@
#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;
};
@@ -106,7 +102,7 @@ mail_label_action_class_init (EMailLabelActionClass *class)
static void
mail_label_action_init (EMailLabelAction *action)
{
- action->priv = E_MAIL_LABEL_ACTION_GET_PRIVATE (action);
+ action->priv = G_TYPE_INSTANCE_GET_PRIVATE (action, E_TYPE_MAIL_LABEL_ACTION, EMailLabelActionPrivate);
}
GType
diff --git a/mail/e-mail-label-dialog.c b/mail/e-mail-label-dialog.c
index 1170854ea8..4a4728a433 100644
--- a/mail/e-mail-label-dialog.c
+++ b/mail/e-mail-label-dialog.c
@@ -23,10 +23,6 @@
#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;
@@ -106,7 +102,7 @@ mail_label_dialog_dispose (GObject *object)
{
EMailLabelDialogPrivate *priv;
- priv = E_MAIL_LABEL_DIALOG_GET_PRIVATE (object);
+ priv = E_MAIL_LABEL_DIALOG (object)->priv;
if (priv->entry != NULL) {
g_object_unref (priv->entry);
@@ -185,7 +181,7 @@ mail_label_dialog_init (EMailLabelDialog *dialog)
GtkWidget *container;
GtkWidget *widget;
- dialog->priv = E_MAIL_LABEL_DIALOG_GET_PRIVATE (dialog);
+ dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog, E_TYPE_MAIL_LABEL_DIALOG, EMailLabelDialogPrivate);
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 e6f4a6a6ea..104e392a28 100644
--- a/mail/e-mail-label-list-store.c
+++ b/mail/e-mail-label-list-store.c
@@ -25,10 +25,6 @@
#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;
};
@@ -157,7 +153,7 @@ mail_label_list_store_finalize (GObject *object)
{
EMailLabelListStorePrivate *priv;
- priv = E_MAIL_LABEL_LIST_STORE_GET_PRIVATE (object);
+ priv = E_MAIL_LABEL_LIST_STORE (object)->priv;
g_hash_table_destroy (priv->tag_index);
@@ -238,7 +234,7 @@ mail_label_list_store_init (EMailLabelListStore *store)
(GDestroyNotify) g_free,
(GDestroyNotify) gtk_tree_row_reference_free);
- store->priv = E_MAIL_LABEL_LIST_STORE_GET_PRIVATE (store);
+ store->priv = G_TYPE_INSTANCE_GET_PRIVATE (store, E_TYPE_MAIL_LABEL_LIST_STORE, EMailLabelListStorePrivate);
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 c5448ea0a8..54b2b7fd90 100644
--- a/mail/e-mail-label-manager.c
+++ b/mail/e-mail-label-manager.c
@@ -25,10 +25,6 @@
#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;
@@ -121,7 +117,7 @@ mail_label_manager_dispose (GObject *object)
{
EMailLabelManagerPrivate *priv;
- priv = E_MAIL_LABEL_MANAGER_GET_PRIVATE (object);
+ priv = E_MAIL_LABEL_MANAGER (object)->priv;
if (priv->tree_view != NULL) {
g_object_unref (priv->tree_view);
@@ -309,7 +305,7 @@ mail_label_manager_init (EMailLabelManager *manager)
GtkWidget *container;
GtkWidget *widget;
- manager->priv = E_MAIL_LABEL_MANAGER_GET_PRIVATE (manager);
+ manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, E_TYPE_MAIL_LABEL_MANAGER, EMailLabelManagerPrivate);
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 808d8d060a..3d53108a6e 100644
--- a/mail/e-mail-label-tree-view.c
+++ b/mail/e-mail-label-tree-view.c
@@ -24,10 +24,6 @@
#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;
};
@@ -79,7 +75,7 @@ mail_label_tree_view_init (EMailLabelTreeView *tree_view)
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
- tree_view->priv = E_MAIL_LABEL_TREE_VIEW_GET_PRIVATE (tree_view);
+ tree_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (tree_view, E_TYPE_MAIL_LABEL_TREE_VIEW, EMailLabelTreeViewPrivate);
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 0b5b99a60e..75fd4597ee 100644
--- a/mail/e-mail-message-pane.c
+++ b/mail/e-mail-message-pane.c
@@ -28,10 +28,6 @@
#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;
};
@@ -80,7 +76,7 @@ e_mail_message_pane_class_init (EMailMessagePaneClass *class)
static void
e_mail_message_pane_init (EMailMessagePane *browser)
{
- browser->priv = E_MAIL_MESSAGE_PANE_GET_PRIVATE (browser);
+ browser->priv = G_TYPE_INSTANCE_GET_PRIVATE (browser, E_TYPE_MAIL_MESSAGE_PANE, EMailMessagePanePrivate);
}
EMailView *
diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c
index 8dc5730941..1ff0a014f0 100644
--- a/mail/e-mail-notebook-view.c
+++ b/mail/e-mail-notebook-view.c
@@ -45,10 +45,6 @@
#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;
@@ -128,7 +124,7 @@ mnv_page_changed (GtkNotebook *book,
EMailView *mview;
const gchar *uri;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
shell_view = e_mail_view_get_shell_view (view);
shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
@@ -189,7 +185,7 @@ chooser_clicked_cb (EMailTabPicker *picker,
gboolean preview_mode;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ priv = view->priv;
preview_mode = !e_mail_tab_picker_get_preview_mode (priv->tab_picker);
e_mail_tab_picker_set_preview_mode (priv->tab_picker , preview_mode);
@@ -581,7 +577,7 @@ mail_notebook_view_set_property (GObject *object,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (object);
+ priv = E_MAIL_NOTEBOOK_VIEW (object)->priv;
switch (property_id) {
case PROP_FORWARD_STYLE:
@@ -614,7 +610,7 @@ mail_notebook_view_get_property (GObject *object,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (object);
+ priv = E_MAIL_NOTEBOOK_VIEW (object)->priv;
switch (property_id) {
case PROP_FORWARD_STYLE:
@@ -648,7 +644,7 @@ mail_notebook_view_set_search_strings (EMailView *view,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
e_mail_view_set_search_strings (priv->current_view, search_strings);
}
@@ -658,7 +654,7 @@ mail_notebook_view_get_view_instance (EMailView *view)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
if (priv->current_view == NULL)
return NULL;
@@ -671,7 +667,7 @@ mail_notebook_view_update_view_instance (EMailView *view)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
if (priv->current_view == NULL)
return;
@@ -685,7 +681,7 @@ mail_notebook_view_set_orientation (EMailView *view,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
if (priv->current_view == NULL)
return;
@@ -698,7 +694,7 @@ mail_notebook_view_get_orientation (EMailView *view)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
if (priv->current_view == NULL)
return GTK_ORIENTATION_VERTICAL;
@@ -711,7 +707,7 @@ mail_notebook_view_get_show_deleted (EMailView *view)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
if (priv->current_view == NULL)
return FALSE;
@@ -725,7 +721,7 @@ mail_notebook_view_set_show_deleted (EMailView *view,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
if (priv->current_view == NULL)
return;
@@ -738,7 +734,7 @@ mail_notebook_view_get_preview_visible (EMailView *view)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
if (priv->current_view == NULL)
return FALSE;
@@ -752,7 +748,7 @@ mail_notebook_view_set_preview_visible (EMailView *view,
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_NOTEBOOK_VIEW (view)->priv;
if (priv->current_view == NULL)
return;
@@ -807,7 +803,7 @@ mail_notebook_view_get_formatter (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+ priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
if (priv->current_view == NULL)
return NULL;
@@ -820,7 +816,7 @@ mail_notebook_view_get_hide_deleted (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+ priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
if (priv->current_view == NULL)
return FALSE;
@@ -835,7 +831,7 @@ mail_notebook_view_get_message_list (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+ priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
if (priv->current_view == NULL)
return NULL;
@@ -850,7 +846,7 @@ mail_notebook_view_get_popup_menu (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+ priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
if (priv->current_view == NULL)
return NULL;
@@ -908,7 +904,7 @@ mail_netbook_view_open_mail (EMailView *view,
GtkWidget *mlist;
#endif
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (nview);
+ priv = nview->priv;
#if HAVE_CLUTTER
e_mail_tab_set_active (
@@ -1096,7 +1092,7 @@ mail_notebook_view_set_folder (EMailReader *reader,
if (!folder_uri)
return;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+ priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
new_view = g_hash_table_lookup (priv->views, folder_uri);
if (new_view) {
@@ -1244,7 +1240,7 @@ mail_notebook_view_show_search_bar (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+ priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
if (priv->current_view == NULL)
return;
@@ -1270,7 +1266,7 @@ mail_notebook_view_open_selected_mail (EMailReader *reader)
{
EMailNotebookViewPrivate *priv;
- priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (reader);
+ priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv;
if (priv->current_view == NULL)
return 0;
@@ -1343,7 +1339,7 @@ e_mail_notebook_view_reader_init (EMailReaderInterface *interface)
static void
e_mail_notebook_view_init (EMailNotebookView *view)
{
- view->priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (view);
+ view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view, E_TYPE_MAIL_NOTEBOOK_VIEW, EMailNotebookViewPrivate);
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 b8fd00312d..05777d254e 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -46,10 +46,6 @@
#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")
@@ -128,7 +124,7 @@ mail_paned_view_message_list_built_cb (EMailView *view,
EShellWindow *shell_window;
GKeyFile *key_file;
- priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_PANED_VIEW (view)->priv;
g_signal_handler_disconnect (
message_list, priv->message_list_built_id);
@@ -212,7 +208,7 @@ mail_paned_view_restore_state_cb (EShellWindow *shell_window,
GObject *object;
const gchar *key;
- priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_PANED_VIEW (view)->priv;
/* Bind GObject properties to GConf keys. */
@@ -321,7 +317,7 @@ mail_paned_view_dispose (GObject *object)
{
EMailPanedViewPrivate *priv;
- priv = E_MAIL_PANED_VIEW_GET_PRIVATE (object);
+ priv = E_MAIL_PANED_VIEW (object)->priv;
if (priv->paned != NULL) {
g_object_unref (priv->paned);
@@ -404,7 +400,7 @@ mail_paned_view_get_formatter (EMailReader *reader)
{
EMailPanedViewPrivate *priv;
- priv = E_MAIL_PANED_VIEW_GET_PRIVATE (reader);
+ priv = E_MAIL_PANED_VIEW (reader)->priv;
return EM_FORMAT_HTML (priv->formatter);
}
@@ -420,7 +416,7 @@ mail_paned_view_get_message_list (EMailReader *reader)
{
EMailPanedViewPrivate *priv;
- priv = E_MAIL_PANED_VIEW_GET_PRIVATE (reader);
+ priv = E_MAIL_PANED_VIEW (reader)->priv;
return priv->message_list;
}
@@ -477,7 +473,7 @@ mail_paned_view_set_folder (EMailReader *reader,
gboolean value;
GError *error = NULL;
- priv = E_MAIL_PANED_VIEW_GET_PRIVATE (reader);
+ priv = E_MAIL_PANED_VIEW (reader)->priv;
view = E_MAIL_VIEW (reader);
shell_view = e_mail_view_get_shell_view (view);
@@ -552,7 +548,7 @@ mail_paned_view_show_search_bar (EMailReader *reader)
{
EMailPanedViewPrivate *priv;
- priv = E_MAIL_PANED_VIEW_GET_PRIVATE (reader);
+ priv = E_MAIL_PANED_VIEW (reader)->priv;
gtk_widget_show (priv->search_bar);
}
@@ -589,7 +585,7 @@ mail_paned_view_constructed (GObject *object)
GtkWidget *widget;
EWebView *web_view;
- priv = E_MAIL_PANED_VIEW_GET_PRIVATE (object);
+ priv = E_MAIL_PANED_VIEW (object)->priv;
priv->formatter = em_format_html_display_new ();
view = E_MAIL_VIEW (object);
@@ -695,7 +691,7 @@ mail_paned_view_set_search_strings (EMailView *view,
ESearchBar *search_bar;
ESearchingTokenizer *tokenizer;
- priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_PANED_VIEW (view)->priv;
search_bar = E_SEARCH_BAR (priv->search_bar);
tokenizer = e_search_bar_get_tokenizer (search_bar);
@@ -717,7 +713,7 @@ mail_paned_view_get_view_instance (EMailView *view)
{
EMailPanedViewPrivate *priv;
- priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_PANED_VIEW (view)->priv;
return priv->view_instance;
}
@@ -742,7 +738,7 @@ mail_paned_view_update_view_instance (EMailView *view)
const gchar *folder_uri;
gchar *view_id;
- priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
+ priv = E_MAIL_PANED_VIEW (view)->priv;
shell_view = e_mail_view_get_shell_view (view);
shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
@@ -979,7 +975,7 @@ e_mail_paned_view_reader_init (EMailReaderInterface *interface)
static void
e_mail_paned_view_init (EMailPanedView *view)
{
- view->priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
+ view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view, E_TYPE_MAIL_PANED_VIEW, EMailPanedViewPrivate);
view->priv->enable_show_folder = FALSE;
g_signal_connect (
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index a9b12b02ce..4f78be0d90 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -64,10 +64,6 @@
#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;
@@ -556,7 +552,7 @@ mail_session_dispose (GObject *object)
{
EMailSessionPrivate *priv;
- priv = E_MAIL_SESSION_GET_PRIVATE (object);
+ priv = E_MAIL_SESSION (object)->priv;
if (priv->folder_cache != NULL) {
g_object_unref (priv->folder_cache);
@@ -1001,7 +997,7 @@ e_mail_session_init (EMailSession *session)
{
GConfClient *client;
- session->priv = E_MAIL_SESSION_GET_PRIVATE (session);
+ session->priv = G_TYPE_INSTANCE_GET_PRIVATE (session, E_TYPE_MAIL_SESSION, EMailSessionPrivate);
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 a418dc133c..19f38f7d30 100644
--- a/mail/e-mail-sidebar.c
+++ b/mail/e-mail-sidebar.c
@@ -27,10 +27,6 @@
#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 */
};
@@ -425,7 +421,7 @@ mail_sidebar_init (EMailSidebar *sidebar)
GtkTreeSelection *selection;
EMFolderTree *folder_tree;
- sidebar->priv = E_MAIL_SIDEBAR_GET_PRIVATE (sidebar);
+ sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (sidebar, E_TYPE_MAIL_SIDEBAR, EMailSidebarPrivate);
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 e97bc742df..89b672e782 100644
--- a/mail/e-mail-tab-picker.c
+++ b/mail/e-mail-tab-picker.c
@@ -31,9 +31,6 @@ 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,
@@ -899,7 +896,7 @@ e_mail_tab_picker_scroll_value_cb (MxAdjustment *adjustment,
static void
e_mail_tab_picker_init (EMailTabPicker *self)
{
- EMailTabPickerPrivate *priv = self->priv = TAB_PICKER_PRIVATE (self);
+ EMailTabPickerPrivate *priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, E_MAIL_TYPE_TAB_PICKER, EMailTabPickerPrivate);
clutter_actor_set_reactive (CLUTTER_ACTOR (self), TRUE);
diff --git a/mail/e-mail-tab.c b/mail/e-mail-tab.c
index cbbe8a83f6..aefe49f1df 100644
--- a/mail/e-mail-tab.c
+++ b/mail/e-mail-tab.c
@@ -35,9 +35,6 @@ 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,
@@ -1310,7 +1307,7 @@ e_mail_tab_init (EMailTab *self)
ClutterActor *text;
GtkSettings *settings;
- EMailTabPrivate *priv = self->priv = TAB_PRIVATE (self);
+ EMailTabPrivate *priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, E_MAIL_TYPE_TAB, EMailTabPrivate);
priv->width = -1;
priv->anim_length = 200;
diff --git a/mail/e-mail-tag-editor.c b/mail/e-mail-tag-editor.c
index 0b1e20cef0..5cc29b5bde 100644
--- a/mail/e-mail-tag-editor.c
+++ b/mail/e-mail-tag-editor.c
@@ -33,10 +33,6 @@
#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 {
@@ -285,7 +281,7 @@ mail_tag_editor_init (EMailTagEditor *editor)
GtkCellRenderer *renderer;
GtkListStore *store;
- editor->priv = E_MAIL_TAG_EDITOR_GET_PRIVATE (editor);
+ editor->priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, E_TYPE_MAIL_TAG_EDITOR, EMailTagEditorPrivate);
dialog = GTK_DIALOG (editor);
window = GTK_WINDOW (editor);
diff --git a/mail/e-mail-view.c b/mail/e-mail-view.c
index 62e0b0c733..0db537bd02 100644
--- a/mail/e-mail-view.c
+++ b/mail/e-mail-view.c
@@ -28,10 +28,6 @@
#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;
@@ -158,7 +154,7 @@ mail_view_dispose (GObject *object)
{
EMailViewPrivate *priv;
- priv = E_MAIL_VIEW_GET_PRIVATE (object);
+ priv = E_MAIL_VIEW (object)->priv;
if (priv->shell_view != NULL) {
g_object_unref (priv->shell_view);
@@ -323,7 +319,7 @@ e_mail_view_class_init (EMailViewClass *class)
static void
e_mail_view_init (EMailView *view)
{
- view->priv = E_MAIL_VIEW_GET_PRIVATE (view);
+ view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view, E_TYPE_MAIL_VIEW, EMailViewPrivate);
}
EShellView *
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 0228d2e50d..e7973cd774 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -72,10 +72,6 @@
#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[] = {
@@ -338,7 +334,7 @@ emae_dispose (GObject *object)
{
EMAccountEditorPrivate *priv;
- priv = EM_ACCOUNT_EDITOR_GET_PRIVATE (object);
+ priv = EM_ACCOUNT_EDITOR (object)->priv;
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -433,7 +429,7 @@ emae_class_init (GObjectClass *class)
static void
emae_init (EMAccountEditor *emae)
{
- emae->priv = EM_ACCOUNT_EDITOR_GET_PRIVATE (emae);
+ emae->priv = G_TYPE_INSTANCE_GET_PRIVATE (emae, EM_TYPE_ACCOUNT_EDITOR, EMAccountEditorPrivate);
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 52039d9aa8..f7756960ec 100644
--- a/mail/em-filter-context.c
+++ b/mail/em-filter-context.c
@@ -36,10 +36,6 @@
/* 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;
@@ -105,7 +101,7 @@ filter_context_dispose (GObject *object)
{
EMFilterContextPrivate *priv;
- priv = EM_FILTER_CONTEXT_GET_PRIVATE (object);
+ priv = EM_FILTER_CONTEXT (object)->priv;
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -233,7 +229,7 @@ filter_context_new_element (ERuleContext *context,
{
EMFilterContextPrivate *priv;
- priv = EM_FILTER_CONTEXT_GET_PRIVATE (context);
+ priv = EM_FILTER_CONTEXT (context)->priv;
if (strcmp (type, "folder") == 0)
return em_filter_folder_element_new (priv->session);
@@ -284,7 +280,7 @@ em_filter_context_class_init (EMFilterContextClass *class)
static void
em_filter_context_init (EMFilterContext *context)
{
- context->priv = EM_FILTER_CONTEXT_GET_PRIVATE (context);
+ context->priv = G_TYPE_INSTANCE_GET_PRIVATE (context, EM_TYPE_FILTER_CONTEXT, EMFilterContextPrivate);
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 4daf441ead..70c9da6aa6 100644
--- a/mail/em-filter-folder-element.c
+++ b/mail/em-filter-folder-element.c
@@ -39,10 +39,6 @@
#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;
@@ -122,7 +118,7 @@ filter_folder_element_dispose (GObject *object)
{
EMFilterFolderElementPrivate *priv;
- priv = EM_FILTER_FOLDER_ELEMENT_GET_PRIVATE (object);
+ priv = EM_FILTER_FOLDER_ELEMENT (object)->priv;
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -138,7 +134,7 @@ filter_folder_element_finalize (GObject *object)
{
EMFilterFolderElementPrivate *priv;
- priv = EM_FILTER_FOLDER_ELEMENT_GET_PRIVATE (object);
+ priv = EM_FILTER_FOLDER_ELEMENT (object)->priv;
g_free (priv->uri);
@@ -185,7 +181,7 @@ em_filter_folder_element_class_init (EMFilterFolderElementClass *class)
static void
em_filter_folder_element_init (EMFilterFolderElement *element)
{
- element->priv = EM_FILTER_FOLDER_ELEMENT_GET_PRIVATE (element);
+ element->priv = G_TYPE_INSTANCE_GET_PRIVATE (element, EM_TYPE_FILTER_FOLDER_ELEMENT, EMFilterFolderElementPrivate);
}
EFilterElement *
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index 7feed625d1..e6b11c278f 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -35,10 +35,6 @@
#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;
@@ -195,7 +191,7 @@ folder_selection_button_dispose (GObject *object)
{
EMFolderSelectionButtonPrivate *priv;
- priv = EM_FOLDER_SELECTION_BUTTON_GET_PRIVATE (object);
+ priv = EM_FOLDER_SELECTION_BUTTON (object)->priv;
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -211,7 +207,7 @@ folder_selection_button_finalize (GObject *object)
{
EMFolderSelectionButtonPrivate *priv;
- priv = EM_FOLDER_SELECTION_BUTTON_GET_PRIVATE (object);
+ priv = EM_FOLDER_SELECTION_BUTTON (object)->priv;
g_list_foreach (priv->uris, (GFunc) g_free, NULL);
g_list_free (priv->uris);
@@ -234,7 +230,7 @@ folder_selection_button_clicked (GtkButton *button)
GtkSelectionMode mode;
gpointer parent;
- priv = EM_FOLDER_SELECTION_BUTTON_GET_PRIVATE (button);
+ priv = EM_FOLDER_SELECTION_BUTTON (button)->priv;
parent = gtk_widget_get_toplevel (GTK_WIDGET (button));
parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
@@ -365,7 +361,7 @@ em_folder_selection_button_init (EMFolderSelectionButton *emfsb)
{
GtkWidget *box;
- emfsb->priv = EM_FOLDER_SELECTION_BUTTON_GET_PRIVATE (emfsb);
+ emfsb->priv = G_TYPE_INSTANCE_GET_PRIVATE (emfsb, EM_TYPE_FOLDER_SELECTION_BUTTON, EMFolderSelectionButtonPrivate);
emfsb->priv->multiple_select = FALSE;
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index c217d63ebb..6668eae77d 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -52,10 +52,6 @@
#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
@@ -339,7 +335,7 @@ folder_tree_model_dispose (GObject *object)
{
EMFolderTreeModelPrivate *priv;
- priv = EM_FOLDER_TREE_MODEL_GET_PRIVATE (object);
+ priv = EM_FOLDER_TREE_MODEL (object)->priv;
if (priv->selection != NULL) {
g_object_weak_unref (
@@ -362,7 +358,7 @@ folder_tree_model_finalize (GObject *object)
{
EMFolderTreeModelPrivate *priv;
- priv = EM_FOLDER_TREE_MODEL_GET_PRIVATE (object);
+ priv = EM_FOLDER_TREE_MODEL (object)->priv;
g_hash_table_destroy (priv->account_index);
g_hash_table_destroy (priv->store_index);
@@ -533,7 +529,7 @@ em_folder_tree_model_init (EMFolderTreeModel *model)
(GDestroyNotify) g_free,
(GDestroyNotify) gtk_tree_row_reference_free);
- model->priv = EM_FOLDER_TREE_MODEL_GET_PRIVATE (model);
+ model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, EM_TYPE_FOLDER_TREE_MODEL, EMFolderTreeModelPrivate);
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 94d5061866..ee853331bf 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -68,10 +68,6 @@
#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;
@@ -395,7 +391,7 @@ folder_tree_select_func (GtkTreeSelection *selection,
tree_view = gtk_tree_selection_get_tree_view (selection);
- priv = EM_FOLDER_TREE_GET_PRIVATE (tree_view);
+ priv = EM_FOLDER_TREE (tree_view)->priv;
if (selected)
return TRUE;
@@ -822,7 +818,7 @@ folder_tree_dispose (GObject *object)
EMFolderTreePrivate *priv;
GtkTreeModel *model;
- priv = EM_FOLDER_TREE_GET_PRIVATE (object);
+ priv = EM_FOLDER_TREE (object)->priv;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (object));
if (priv->loaded_row_id != 0) {
@@ -862,7 +858,7 @@ folder_tree_finalize (GObject *object)
{
EMFolderTreePrivate *priv;
- priv = EM_FOLDER_TREE_GET_PRIVATE (object);
+ priv = EM_FOLDER_TREE (object)->priv;
if (priv->select_uris != NULL) {
g_slist_foreach (
@@ -888,7 +884,7 @@ folder_tree_button_press_event (GtkWidget *widget,
GtkTreePath *path;
gulong handler_id;
- priv = EM_FOLDER_TREE_GET_PRIVATE (widget);
+ priv = EM_FOLDER_TREE (widget)->priv;
tree_view = GTK_TREE_VIEW (widget);
selection = gtk_tree_view_get_selection (tree_view);
@@ -947,7 +943,7 @@ folder_tree_key_press_event (GtkWidget *widget,
return TRUE;
}
- priv = EM_FOLDER_TREE_GET_PRIVATE (widget);
+ priv = EM_FOLDER_TREE (widget)->priv;
tree_view = GTK_TREE_VIEW (widget);
selection = gtk_tree_view_get_selection (tree_view);
@@ -981,7 +977,7 @@ folder_tree_row_activated (GtkTreeView *tree_view,
GtkTreeIter iter;
guint32 flags;
- priv = EM_FOLDER_TREE_GET_PRIVATE (tree_view);
+ priv = EM_FOLDER_TREE (tree_view)->priv;
model = gtk_tree_view_get_model (tree_view);
@@ -1457,7 +1453,7 @@ folder_tree_init (EMFolderTree *folder_tree)
select_uris_table = g_hash_table_new (g_str_hash, g_str_equal);
- folder_tree->priv = EM_FOLDER_TREE_GET_PRIVATE (folder_tree);
+ folder_tree->priv = G_TYPE_INSTANCE_GET_PRIVATE (folder_tree, EM_TYPE_FOLDER_TREE, EMFolderTreePrivate);
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 24f8aa5638..fc1281cfc8 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -64,10 +64,6 @@
#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 */
};
@@ -626,7 +622,7 @@ efhd_init (EMFormatHTMLDisplay *efhd)
web_view = em_format_html_get_web_view (EM_FORMAT_HTML (efhd));
- efhd->priv = EM_FORMAT_HTML_DISPLAY_GET_PRIVATE (efhd);
+ efhd->priv = G_TYPE_INSTANCE_GET_PRIVATE (efhd, EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplayPrivate);
e_mail_display_set_formatter (
E_MAIL_DISPLAY (web_view), EM_FORMAT_HTML (efhd));
@@ -907,7 +903,7 @@ efhd_bar_resize (EMFormatHTML *efh,
GtkWidget *widget;
gint width;
- priv = EM_FORMAT_HTML_DISPLAY_GET_PRIVATE (efh);
+ priv = EM_FORMAT_HTML_DISPLAY (efh)->priv;
web_view = em_format_html_get_web_view (efh);
@@ -933,7 +929,7 @@ efhd_add_bar (EMFormatHTML *efh,
if (!EM_IS_FORMAT_HTML_DISPLAY (efh))
return FALSE;
- priv = EM_FORMAT_HTML_DISPLAY_GET_PRIVATE (efh);
+ priv = EM_FORMAT_HTML_DISPLAY (efh)->priv;
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 fb7ad59568..15c3e5e2df 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -66,10 +66,6 @@
#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>"
@@ -766,7 +762,7 @@ efh_busy (EMFormat *emf)
{
EMFormatHTMLPrivate *priv;
- priv = EM_FORMAT_HTML_GET_PRIVATE (emf);
+ priv = EM_FORMAT_HTML (emf)->priv;
return (priv->format_id != -1);
}
@@ -937,12 +933,12 @@ efh_class_init (EMFormatHTMLClass *class)
static void
efh_init (EMFormatHTML *efh,
- EMFormatHTMLClass *class)
+ EMFormatHTMLClass *class)
{
EWebView *web_view;
GdkColor *color;
- efh->priv = EM_FORMAT_HTML_GET_PRIVATE (efh);
+ efh->priv = G_TYPE_INSTANCE_GET_PRIVATE (efh, EM_TYPE_FORMAT_HTML, EMFormatHTMLPrivate);
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 3a94e66a23..8b0400ffe0 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -33,10 +33,6 @@
#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)
@@ -980,7 +976,7 @@ subscription_editor_dispose (GObject *object)
{
EMSubscriptionEditorPrivate *priv;
- priv = EM_SUBSCRIPTION_EDITOR_GET_PRIVATE (object);
+ priv = EM_SUBSCRIPTION_EDITOR (object)->priv;
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -1008,7 +1004,7 @@ subscription_editor_finalize (GObject *object)
{
EMSubscriptionEditorPrivate *priv;
- priv = EM_SUBSCRIPTION_EDITOR_GET_PRIVATE (object);
+ priv = EM_SUBSCRIPTION_EDITOR (object)->priv;
g_ptr_array_free (priv->stores, TRUE);
@@ -1099,7 +1095,7 @@ em_subscription_editor_init (EMSubscriptionEditor *editor)
GtkWidget *box;
const gchar *tooltip;
- editor->priv = EM_SUBSCRIPTION_EDITOR_GET_PRIVATE (editor);
+ editor->priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, EM_TYPE_SUBSCRIPTION_EDITOR, EMSubscriptionEditorPrivate);
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 4e7d4018d4..d59715b78d 100644
--- a/mail/em-vfolder-context.c
+++ b/mail/em-vfolder-context.c
@@ -35,10 +35,6 @@
#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;
};
@@ -103,7 +99,7 @@ vfolder_context_dispose (GObject *object)
{
EMVFolderContextPrivate *priv;
- priv = EM_VFOLDER_CONTEXT_GET_PRIVATE (object);
+ priv = EM_VFOLDER_CONTEXT (object)->priv;
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -120,7 +116,7 @@ vfolder_context_new_element (ERuleContext *context,
{
EMVFolderContextPrivate *priv;
- priv = EM_VFOLDER_CONTEXT_GET_PRIVATE (context);
+ priv = EM_VFOLDER_CONTEXT (context)->priv;
if (strcmp (type, "system-flag") == 0)
return e_filter_option_new ();
@@ -175,7 +171,7 @@ em_vfolder_context_class_init (EMVFolderContextClass *class)
static void
em_vfolder_context_init (EMVFolderContext *context)
{
- context->priv = EM_VFOLDER_CONTEXT_GET_PRIVATE (context);
+ context->priv = G_TYPE_INSTANCE_GET_PRIVATE (context, EM_TYPE_VFOLDER_CONTEXT, EMVFolderContextPrivate);
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 1d11a72c2d..a1b7f53be7 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -42,10 +42,6 @@
#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;
};
@@ -137,7 +133,7 @@ vfolder_rule_dispose (GObject *object)
{
EMVFolderRulePrivate *priv;
- priv = EM_VFOLDER_RULE_GET_PRIVATE (object);
+ priv = EM_VFOLDER_RULE (object)->priv;
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -197,7 +193,7 @@ em_vfolder_rule_class_init (EMVFolderRuleClass *class)
static void
em_vfolder_rule_init (EMVFolderRule *rule)
{
- rule->priv = EM_VFOLDER_RULE_GET_PRIVATE (rule);
+ rule->priv = G_TYPE_INSTANCE_GET_PRIVATE (rule, EM_TYPE_VFOLDER_RULE, EMVFolderRulePrivate);
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 876cbb3103..e7563ced8b 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -59,10 +59,6 @@
/* 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;
@@ -1054,7 +1050,7 @@ mail_folder_cache_init (MailFolderCache *self)
const gchar *buf;
guint timeout;
- self->priv = MAIL_FOLDER_CACHE_GET_PRIVATE (self);
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, MAIL_TYPE_FOLDER_CACHE, MailFolderCachePrivate);
/* initialize values */
self->priv->stores = g_hash_table_new (NULL, NULL);
diff --git a/mail/message-list.c b/mail/message-list.c
index 8f38fac7bf..148bd616ae 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -97,10 +97,6 @@
#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;
@@ -2468,7 +2464,7 @@ message_list_init (MessageList *message_list)
GtkTargetList *target_list;
GdkAtom matom;
- message_list->priv = MESSAGE_LIST_GET_PRIVATE (message_list);
+ message_list->priv = G_TYPE_INSTANCE_GET_PRIVATE (message_list, MESSAGE_LIST_TYPE, MessageListPrivate);
#if HAVE_CLUTTER
message_list->priv->timeline = NULL;
@@ -2566,7 +2562,7 @@ message_list_dispose (GObject *object)
MessageList *message_list = MESSAGE_LIST (object);
MessageListPrivate *priv;
- priv = MESSAGE_LIST_GET_PRIVATE (message_list);
+ priv = message_list->priv;
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 02d16d640b..b76764c81d 100644
--- a/modules/addressbook/e-book-shell-backend.c
+++ b/modules/addressbook/e-book-shell-backend.c
@@ -54,10 +54,6 @@
#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;
};
@@ -85,7 +81,7 @@ book_shell_backend_ensure_sources (EShellBackend *shell_backend)
on_this_computer = NULL;
personal = NULL;
- priv = E_BOOK_SHELL_BACKEND_GET_PRIVATE (shell_backend);
+ priv = E_BOOK_SHELL_BACKEND (shell_backend)->priv;
if (!e_book_get_addressbooks (&priv->source_list, NULL)) {
g_warning ("Could not get addressbook sources from GConf!");
@@ -458,7 +454,7 @@ book_shell_backend_dispose (GObject *object)
{
EBookShellBackendPrivate *priv;
- priv = E_BOOK_SHELL_BACKEND_GET_PRIVATE (object);
+ priv = E_BOOK_SHELL_BACKEND (object)->priv;
if (priv->source_list != NULL) {
g_object_unref (priv->source_list);
@@ -553,8 +549,7 @@ book_shell_backend_class_init (EBookShellBackendClass *class)
static void
book_shell_backend_init (EBookShellBackend *book_shell_backend)
{
- book_shell_backend->priv =
- E_BOOK_SHELL_BACKEND_GET_PRIVATE (book_shell_backend);
+ book_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (book_shell_backend, E_TYPE_BOOK_SHELL_BACKEND, EBookShellBackendPrivate);
}
GType
diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c
index b4bd8d2ac3..2077510056 100644
--- a/modules/addressbook/e-book-shell-content.c
+++ b/modules/addressbook/e-book-shell-content.c
@@ -30,10 +30,6 @@
#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;
@@ -84,7 +80,7 @@ book_shell_content_restore_state_cb (EShellWindow *shell_window,
GObject *object;
const gchar *key;
- priv = E_BOOK_SHELL_CONTENT_GET_PRIVATE (shell_content);
+ priv = E_BOOK_SHELL_CONTENT (shell_content)->priv;
/* Bind GObject properties to GConf keys. */
@@ -193,7 +189,7 @@ book_shell_content_dispose (GObject *object)
{
EBookShellContentPrivate *priv;
- priv = E_BOOK_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_BOOK_SHELL_CONTENT (object)->priv;
if (priv->paned != NULL) {
g_object_unref (priv->paned);
@@ -226,7 +222,7 @@ book_shell_content_constructed (GObject *object)
GtkWidget *container;
GtkWidget *widget;
- priv = E_BOOK_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_BOOK_SHELL_CONTENT (object)->priv;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -456,8 +452,7 @@ book_shell_content_class_init (EBookShellContentClass *class)
static void
book_shell_content_init (EBookShellContent *book_shell_content)
{
- book_shell_content->priv =
- E_BOOK_SHELL_CONTENT_GET_PRIVATE (book_shell_content);
+ book_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (book_shell_content, E_TYPE_BOOK_SHELL_CONTENT, EBookShellContentPrivate);
/* 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 3c61f5e55d..57f3b288df 100644
--- a/modules/addressbook/e-book-shell-sidebar.c
+++ b/modules/addressbook/e-book-shell-sidebar.c
@@ -30,10 +30,6 @@
#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;
};
@@ -68,7 +64,7 @@ book_shell_sidebar_dispose (GObject *object)
{
EBookShellSidebarPrivate *priv;
- priv = E_BOOK_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_BOOK_SHELL_SIDEBAR (object)->priv;
if (priv->selector != NULL) {
g_object_unref (priv->selector);
@@ -92,7 +88,7 @@ book_shell_sidebar_constructed (GObject *object)
GtkContainer *container;
GtkWidget *widget;
- priv = E_BOOK_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_BOOK_SHELL_SIDEBAR (object)->priv;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -204,8 +200,7 @@ book_shell_sidebar_class_init (EBookShellSidebarClass *class)
static void
book_shell_sidebar_init (EBookShellSidebar *book_shell_sidebar)
{
- book_shell_sidebar->priv =
- E_BOOK_SHELL_SIDEBAR_GET_PRIVATE (book_shell_sidebar);
+ book_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (book_shell_sidebar, E_TYPE_BOOK_SHELL_SIDEBAR, EBookShellSidebarPrivate);
/* 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 7c2a2721f1..528a34d282 100644
--- a/modules/addressbook/e-book-shell-view-private.h
+++ b/modules/addressbook/e-book-shell-view-private.h
@@ -55,10 +55,6 @@
#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 8b5d816eaa..777793ad45 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_GET_PRIVATE (shell_view);
+ priv = E_BOOK_SHELL_VIEW (shell_view)->priv;
if (priv->search_locked)
return;
@@ -414,8 +414,7 @@ static void
book_shell_view_init (EBookShellView *book_shell_view,
EShellViewClass *shell_view_class)
{
- book_shell_view->priv =
- E_BOOK_SHELL_VIEW_GET_PRIVATE (book_shell_view);
+ book_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (book_shell_view, E_TYPE_BOOK_SHELL_VIEW, EBookShellViewPrivate);
e_book_shell_view_private_init (book_shell_view, shell_view_class);
}
@@ -455,7 +454,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 = E_BOOK_SHELL_VIEW_GET_PRIVATE (book_shell_view);
+ priv = book_shell_view->priv;
priv->search_locked++;
}
@@ -467,7 +466,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 = E_BOOK_SHELL_VIEW_GET_PRIVATE (book_shell_view);
+ priv = book_shell_view->priv;
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 dfc8f58c34..25677877fc 100644
--- a/modules/calendar/e-cal-attachment-handler.c
+++ b/modules/calendar/e-cal-attachment-handler.c
@@ -29,10 +29,6 @@
#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 {
@@ -492,7 +488,7 @@ cal_attachment_handler_class_init (ECalAttachmentHandlerClass *class)
static void
cal_attachment_handler_init (ECalAttachmentHandler *handler)
{
- handler->priv = E_CAL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
+ handler->priv = G_TYPE_INSTANCE_GET_PRIVATE (handler, E_TYPE_CAL_ATTACHMENT_HANDLER, ECalAttachmentHandlerPrivate);
}
GType
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c
index 6c80f71965..b9cb894c50 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -51,10 +51,6 @@
#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;
};
@@ -707,7 +703,7 @@ cal_shell_backend_dispose (GObject *object)
{
ECalShellBackendPrivate *priv;
- priv = E_CAL_SHELL_BACKEND_GET_PRIVATE (object);
+ priv = E_CAL_SHELL_BACKEND (object)->priv;
if (priv->source_list != NULL) {
g_object_unref (priv->source_list);
@@ -800,8 +796,7 @@ cal_shell_backend_init (ECalShellBackend *cal_shell_backend)
icalarray *builtin_timezones;
gint ii;
- cal_shell_backend->priv =
- E_CAL_SHELL_BACKEND_GET_PRIVATE (cal_shell_backend);
+ cal_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_backend, E_TYPE_CAL_SHELL_BACKEND, ECalShellBackendPrivate);
/* 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 e7a082bc05..1fbedd22b1 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -39,10 +39,6 @@
#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;
@@ -202,7 +198,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 = E_CAL_SHELL_CONTENT_GET_PRIVATE (cal_shell_content);
+ priv = cal_shell_content->priv;
if (priv->task_table != NULL)
cal_shell_content_save_table_state (
@@ -261,7 +257,7 @@ cal_shell_content_dispose (GObject *object)
{
ECalShellContentPrivate *priv;
- priv = E_CAL_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_CAL_SHELL_CONTENT (object)->priv;
if (priv->hpaned != NULL) {
g_object_unref (priv->hpaned);
@@ -339,7 +335,7 @@ cal_shell_content_constructed (GObject *object)
gchar *markup;
gint ii;
- priv = E_CAL_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_CAL_SHELL_CONTENT (object)->priv;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -545,7 +541,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_GET_PRIVATE (widget);
+ priv = E_CAL_SHELL_CONTENT (widget)->priv;
gal_view_instance_load (priv->view_instance);
/* Chain up to parent's map() method. */
@@ -624,8 +620,7 @@ cal_shell_content_class_init (ECalShellContentClass *class)
static void
cal_shell_content_init (ECalShellContent *cal_shell_content)
{
- cal_shell_content->priv =
- E_CAL_SHELL_CONTENT_GET_PRIVATE (cal_shell_content);
+ cal_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_content, E_TYPE_CAL_SHELL_CONTENT, ECalShellContentPrivate);
/* 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 5227df6bcd..be0a3443e2 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -37,10 +37,6 @@
#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;
@@ -239,7 +235,7 @@ cal_shell_sidebar_default_loaded_cb (ESource *source,
ECal *client;
GError *error = NULL;
- priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
+ priv = E_CAL_SHELL_SIDEBAR (shell_sidebar)->priv;
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
shell_content = e_shell_view_get_shell_content (shell_view);
@@ -420,7 +416,7 @@ cal_shell_sidebar_restore_state_cb (EShellWindow *shell_window,
GObject *object;
const gchar *key;
- priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
+ priv = E_CAL_SHELL_SIDEBAR (shell_sidebar)->priv;
shell = e_shell_window_get_shell (shell_window);
shell_settings = e_shell_get_shell_settings (shell);
@@ -522,7 +518,7 @@ cal_shell_sidebar_dispose (GObject *object)
{
ECalShellSidebarPrivate *priv;
- priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_CAL_SHELL_SIDEBAR (object)->priv;
if (priv->paned != NULL) {
g_object_unref (priv->paned);
@@ -561,7 +557,7 @@ cal_shell_sidebar_finalize (GObject *object)
{
ECalShellSidebarPrivate *priv;
- priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_CAL_SHELL_SIDEBAR (object)->priv;
g_hash_table_destroy (priv->client_table);
@@ -598,7 +594,7 @@ cal_shell_sidebar_constructed (GObject *object)
GtkWidget *widget;
AtkObject *a11y;
- priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_CAL_SHELL_SIDEBAR (object)->priv;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -848,8 +844,7 @@ cal_shell_sidebar_init (ECalShellSidebar *cal_shell_sidebar)
(GDestroyNotify) g_free,
(GDestroyNotify) g_object_unref);
- cal_shell_sidebar->priv =
- E_CAL_SHELL_SIDEBAR_GET_PRIVATE (cal_shell_sidebar);
+ cal_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_sidebar, E_TYPE_CAL_SHELL_SIDEBAR, ECalShellSidebarPrivate);
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 0a20ea2000..61aff5aa5c 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_GET_PRIVATE (shell_view);
+ priv = E_CAL_SHELL_VIEW (shell_view)->priv;
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 d6f37ba7bf..0f9235046c 100644
--- a/modules/calendar/e-cal-shell-view-private.h
+++ b/modules/calendar/e-cal-shell-view-private.h
@@ -63,10 +63,6 @@
#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 1210d2d267..72ce261a6a 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_GET_PRIVATE (shell_view);
+ priv = E_CAL_SHELL_VIEW (shell_view)->priv;
shell_window = e_shell_view_get_shell_window (shell_view);
shell = e_shell_window_get_shell (shell_window);
@@ -517,8 +517,7 @@ static void
cal_shell_view_init (ECalShellView *cal_shell_view,
EShellViewClass *shell_view_class)
{
- cal_shell_view->priv =
- E_CAL_SHELL_VIEW_GET_PRIVATE (cal_shell_view);
+ cal_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_view, E_TYPE_CAL_SHELL_VIEW, ECalShellViewPrivate);
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 d60421c49c..5c02cdd98a 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -41,10 +41,6 @@
#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"
@@ -489,7 +485,7 @@ memo_shell_backend_dispose (GObject *object)
{
EMemoShellBackendPrivate *priv;
- priv = E_MEMO_SHELL_BACKEND_GET_PRIVATE (object);
+ priv = E_MEMO_SHELL_BACKEND (object)->priv;
if (priv->source_list != NULL) {
g_object_unref (priv->source_list);
@@ -563,8 +559,7 @@ memo_shell_backend_class_init (EMemoShellBackendClass *class)
static void
memo_shell_backend_init (EMemoShellBackend *memo_shell_backend)
{
- memo_shell_backend->priv =
- E_MEMO_SHELL_BACKEND_GET_PRIVATE (memo_shell_backend);
+ memo_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_backend, E_TYPE_MEMO_SHELL_BACKEND, EMemoShellBackendPrivate);
}
GType
diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c
index a9d299e221..37e96fe47a 100644
--- a/modules/calendar/e-memo-shell-content.c
+++ b/modules/calendar/e-memo-shell-content.c
@@ -35,10 +35,6 @@
#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>" \
@@ -277,7 +273,7 @@ memo_shell_content_restore_state_cb (EShellWindow *shell_window,
GObject *object;
const gchar *key;
- priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (shell_content);
+ priv = E_MEMO_SHELL_CONTENT (shell_content)->priv;
/* Bind GObject properties to GConf keys. */
@@ -367,7 +363,7 @@ memo_shell_content_dispose (GObject *object)
{
EMemoShellContentPrivate *priv;
- priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_MEMO_SHELL_CONTENT (object)->priv;
if (priv->paned != NULL) {
g_object_unref (priv->paned);
@@ -403,7 +399,7 @@ memo_shell_content_finalize (GObject *object)
{
EMemoShellContentPrivate *priv;
- priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_MEMO_SHELL_CONTENT (object)->priv;
g_free (priv->current_uid);
@@ -428,7 +424,7 @@ memo_shell_content_constructed (GObject *object)
GtkWidget *widget;
gint n_targets;
- priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_MEMO_SHELL_CONTENT (object)->priv;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -606,7 +602,7 @@ memo_shell_content_focus_search_results (EShellContent *shell_content)
{
EMemoShellContentPrivate *priv;
- priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (shell_content);
+ priv = E_MEMO_SHELL_CONTENT (shell_content)->priv;
gtk_widget_grab_focus (priv->memo_table);
}
@@ -659,8 +655,7 @@ memo_shell_content_class_init (EMemoShellContentClass *class)
static void
memo_shell_content_init (EMemoShellContent *memo_shell_content)
{
- memo_shell_content->priv =
- E_MEMO_SHELL_CONTENT_GET_PRIVATE (memo_shell_content);
+ memo_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_content, E_TYPE_MEMO_SHELL_CONTENT, EMemoShellContentPrivate);
/* 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 b7e52a9095..612b83126b 100644
--- a/modules/calendar/e-memo-shell-sidebar.c
+++ b/modules/calendar/e-memo-shell-sidebar.c
@@ -35,10 +35,6 @@
#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;
@@ -234,7 +230,7 @@ memo_shell_sidebar_default_loaded_cb (ESource *source,
ECal *client;
GError *error = NULL;
- priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
+ priv = E_MEMO_SHELL_SIDEBAR (shell_sidebar)->priv;
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
shell_content = e_shell_view_get_shell_content (shell_view);
@@ -412,7 +408,7 @@ memo_shell_sidebar_restore_state_cb (EShellWindow *shell_window,
GtkTreeModel *model;
GSList *list, *iter;
- priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
+ priv = E_MEMO_SHELL_SIDEBAR (shell_sidebar)->priv;
shell = e_shell_window_get_shell (shell_window);
shell_settings = e_shell_get_shell_settings (shell);
@@ -499,7 +495,7 @@ memo_shell_sidebar_dispose (GObject *object)
{
EMemoShellSidebarPrivate *priv;
- priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_MEMO_SHELL_SIDEBAR (object)->priv;
if (priv->selector != NULL) {
g_object_unref (priv->selector);
@@ -528,7 +524,7 @@ memo_shell_sidebar_finalize (GObject *object)
{
EMemoShellSidebarPrivate *priv;
- priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_MEMO_SHELL_SIDEBAR (object)->priv;
g_hash_table_destroy (priv->client_table);
@@ -549,7 +545,7 @@ memo_shell_sidebar_constructed (GObject *object)
GtkWidget *widget;
AtkObject *a11y;
- priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_MEMO_SHELL_SIDEBAR (object)->priv;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -744,8 +740,7 @@ memo_shell_sidebar_init (EMemoShellSidebar *memo_shell_sidebar)
(GDestroyNotify) g_free,
(GDestroyNotify) g_object_unref);
- memo_shell_sidebar->priv =
- E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (memo_shell_sidebar);
+ memo_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_sidebar, E_TYPE_MEMO_SHELL_SIDEBAR, EMemoShellSidebarPrivate);
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 0b8867a5b3..0a6a390004 100644
--- a/modules/calendar/e-memo-shell-view-private.h
+++ b/modules/calendar/e-memo-shell-view-private.h
@@ -50,10 +50,6 @@
#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 219497577c..4cef169ae8 100644
--- a/modules/calendar/e-memo-shell-view.c
+++ b/modules/calendar/e-memo-shell-view.c
@@ -302,8 +302,7 @@ static void
memo_shell_view_init (EMemoShellView *memo_shell_view,
EShellViewClass *shell_view_class)
{
- memo_shell_view->priv =
- E_MEMO_SHELL_VIEW_GET_PRIVATE (memo_shell_view);
+ memo_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_view, E_TYPE_MEMO_SHELL_VIEW, EMemoShellViewPrivate);
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 a55bd75fcc..9d85dc87b8 100644
--- a/modules/calendar/e-task-shell-backend.c
+++ b/modules/calendar/e-task-shell-backend.c
@@ -43,10 +43,6 @@
#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;
};
@@ -494,7 +490,7 @@ task_shell_backend_dispose (GObject *object)
{
ETaskShellBackendPrivate *priv;
- priv = E_TASK_SHELL_BACKEND_GET_PRIVATE (object);
+ priv = E_TASK_SHELL_BACKEND (object)->priv;
if (priv->source_list != NULL) {
g_object_unref (priv->source_list);
@@ -568,8 +564,7 @@ task_shell_backend_class_init (ETaskShellBackendClass *class)
static void
task_shell_backend_init (ETaskShellBackend *task_shell_backend)
{
- task_shell_backend->priv =
- E_TASK_SHELL_BACKEND_GET_PRIVATE (task_shell_backend);
+ task_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_backend, E_TYPE_TASK_SHELL_BACKEND, ETaskShellBackendPrivate);
}
GType
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index 9cc924642c..78680bc307 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -34,10 +34,6 @@
#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>" \
@@ -275,7 +271,7 @@ task_shell_content_restore_state_cb (EShellWindow *shell_window,
GObject *object;
const gchar *key;
- priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (shell_content);
+ priv = E_TASK_SHELL_CONTENT (shell_content)->priv;
/* Bind GObject properties to GConf keys. */
@@ -365,7 +361,7 @@ task_shell_content_dispose (GObject *object)
{
ETaskShellContentPrivate *priv;
- priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_TASK_SHELL_CONTENT (object)->priv;
if (priv->paned != NULL) {
g_object_unref (priv->paned);
@@ -401,7 +397,7 @@ task_shell_content_finalize (GObject *object)
{
ETaskShellContentPrivate *priv;
- priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_TASK_SHELL_CONTENT (object)->priv;
g_free (priv->current_uid);
@@ -425,7 +421,7 @@ task_shell_content_constructed (GObject *object)
GtkWidget *widget;
gint n_targets;
- priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_TASK_SHELL_CONTENT (object)->priv;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -627,7 +623,7 @@ task_shell_content_focus_search_results (EShellContent *shell_content)
{
ETaskShellContentPrivate *priv;
- priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (shell_content);
+ priv = E_TASK_SHELL_CONTENT (shell_content)->priv;
gtk_widget_grab_focus (priv->task_table);
}
@@ -680,8 +676,7 @@ task_shell_content_class_init (ETaskShellContentClass *class)
static void
task_shell_content_init (ETaskShellContent *task_shell_content)
{
- task_shell_content->priv =
- E_TASK_SHELL_CONTENT_GET_PRIVATE (task_shell_content);
+ task_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_content, E_TYPE_TASK_SHELL_CONTENT, ETaskShellContentPrivate);
/* 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 62973d2efc..c6f6e1526d 100644
--- a/modules/calendar/e-task-shell-sidebar.c
+++ b/modules/calendar/e-task-shell-sidebar.c
@@ -35,10 +35,6 @@
#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;
@@ -234,7 +230,7 @@ task_shell_sidebar_default_loaded_cb (ESource *source,
ECal *client;
GError *error = NULL;
- priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
+ priv = E_TASK_SHELL_SIDEBAR (shell_sidebar)->priv;
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
shell_content = e_shell_view_get_shell_content (shell_view);
@@ -412,7 +408,7 @@ task_shell_sidebar_restore_state_cb (EShellWindow *shell_window,
GtkTreeModel *model;
GSList *list, *iter;
- priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
+ priv = E_TASK_SHELL_SIDEBAR (shell_sidebar)->priv;
shell = e_shell_window_get_shell (shell_window);
shell_settings = e_shell_get_shell_settings (shell);
@@ -499,7 +495,7 @@ task_shell_sidebar_dispose (GObject *object)
{
ETaskShellSidebarPrivate *priv;
- priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_TASK_SHELL_SIDEBAR (object)->priv;
if (priv->selector != NULL) {
g_object_unref (priv->selector);
@@ -528,7 +524,7 @@ task_shell_sidebar_finalize (GObject *object)
{
ETaskShellSidebarPrivate *priv;
- priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_TASK_SHELL_SIDEBAR (object)->priv;
g_hash_table_destroy (priv->client_table);
@@ -549,7 +545,7 @@ task_shell_sidebar_constructed (GObject *object)
GtkWidget *widget;
AtkObject *a11y;
- priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_TASK_SHELL_SIDEBAR (object)->priv;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -744,8 +740,7 @@ task_shell_sidebar_init (ETaskShellSidebar *task_shell_sidebar)
(GDestroyNotify) g_free,
(GDestroyNotify) g_object_unref);
- task_shell_sidebar->priv =
- E_TASK_SHELL_SIDEBAR_GET_PRIVATE (task_shell_sidebar);
+ task_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_sidebar, E_TYPE_TASK_SHELL_SIDEBAR, ETaskShellSidebarPrivate);
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 b95c0d5e5b..b7dace83b7 100644
--- a/modules/calendar/e-task-shell-view-private.h
+++ b/modules/calendar/e-task-shell-view-private.h
@@ -54,10 +54,6 @@
#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 7b575f84d4..e4b5e03a5b 100644
--- a/modules/calendar/e-task-shell-view.c
+++ b/modules/calendar/e-task-shell-view.c
@@ -467,8 +467,7 @@ static void
task_shell_view_init (ETaskShellView *task_shell_view,
EShellViewClass *shell_view_class)
{
- task_shell_view->priv =
- E_TASK_SHELL_VIEW_GET_PRIVATE (task_shell_view);
+ task_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_view, E_TYPE_TASK_SHELL_VIEW, ETaskShellViewPrivate);
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 b868c3069d..c2b0cf5460 100644
--- a/modules/mail/e-mail-attachment-handler.c
+++ b/modules/mail/e-mail-attachment-handler.c
@@ -27,10 +27,6 @@
#include "mail/e-mail-backend.h"
#include "mail/em-composer-utils.h"
-#define E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_MAIL_ATTACHMENT_HANDLER, EMailAttachmentHandlerPrivate))
-
struct _EMailAttachmentHandlerPrivate {
EShell *shell;
EMailSession *session;
@@ -71,7 +67,7 @@ mail_attachment_handler_forward (GtkAction *action,
GList *selected;
view = e_attachment_handler_get_view (handler);
- priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
+ priv = E_MAIL_ATTACHMENT_HANDLER (handler)->priv;
selected = e_attachment_view_get_selected_attachments (view);
g_return_if_fail (g_list_length (selected) == 1);
@@ -106,7 +102,7 @@ mail_attachment_handler_reply_all (GtkAction *action,
GList *selected;
view = e_attachment_handler_get_view (handler);
- priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
+ priv = E_MAIL_ATTACHMENT_HANDLER (handler)->priv;
selected = e_attachment_view_get_selected_attachments (view);
g_return_if_fail (g_list_length (selected) == 1);
@@ -142,7 +138,7 @@ mail_attachment_handler_reply_sender (GtkAction *action,
GList *selected;
view = e_attachment_handler_get_view (handler);
- priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
+ priv = E_MAIL_ATTACHMENT_HANDLER (handler)->priv;
selected = e_attachment_view_get_selected_attachments (view);
g_return_if_fail (g_list_length (selected) == 1);
@@ -286,7 +282,7 @@ mail_attachment_handler_x_uid_list (EAttachmentView *view,
return;
store = e_attachment_view_get_store (view);
- priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
+ priv = E_MAIL_ATTACHMENT_HANDLER (handler)->priv;
parent = gtk_widget_get_toplevel (GTK_WIDGET (view));
parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
@@ -453,7 +449,7 @@ mail_attachment_handler_dispose (GObject *object)
{
EMailAttachmentHandlerPrivate *priv;
- priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (object);
+ priv = E_MAIL_ATTACHMENT_HANDLER (object)->priv;
if (priv->shell != NULL) {
g_object_unref (priv->shell);
@@ -483,7 +479,7 @@ mail_attachment_handler_constructed (GObject *object)
GError *error = NULL;
handler = E_ATTACHMENT_HANDLER (object);
- priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (object);
+ priv = E_MAIL_ATTACHMENT_HANDLER (object)->priv;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -563,7 +559,7 @@ mail_attachment_handler_class_init (EMailAttachmentHandlerClass *class)
static void
mail_attachment_handler_init (EMailAttachmentHandler *handler)
{
- handler->priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
+ handler->priv = G_TYPE_INSTANCE_GET_PRIVATE (handler, E_TYPE_MAIL_ATTACHMENT_HANDLER, EMailAttachmentHandlerPrivate);
}
GType
diff --git a/modules/mail/e-mail-junk-hook.c b/modules/mail/e-mail-junk-hook.c
index 24c1ac77fc..5ee982f27f 100644
--- a/modules/mail/e-mail-junk-hook.c
+++ b/modules/mail/e-mail-junk-hook.c
@@ -31,10 +31,6 @@
#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;
};
@@ -195,7 +191,7 @@ mail_junk_hook_finalize (GObject *object)
{
EMailJunkHookPrivate *priv;
- priv = E_MAIL_JUNK_HOOK_GET_PRIVATE (object);
+ priv = E_MAIL_JUNK_HOOK (object)->priv;
g_free (priv->interface.check_junk);
g_free (priv->interface.report_junk);
@@ -220,7 +216,7 @@ mail_junk_hook_construct (EPluginHook *hook,
EMailSession *session;
gchar *property;
- priv = E_MAIL_JUNK_HOOK_GET_PRIVATE (hook);
+ priv = E_MAIL_JUNK_HOOK (hook)->priv;
/* Chain up to parent's construct() method. */
if (E_PLUGIN_HOOK_CLASS (parent_class)->construct (hook, plugin, node) == -1)
@@ -302,7 +298,7 @@ mail_junk_hook_init (EMailJunkHook *mail_junk_hook)
{
EMJunkInterface *interface;
- mail_junk_hook->priv = E_MAIL_JUNK_HOOK_GET_PRIVATE (mail_junk_hook);
+ mail_junk_hook->priv = G_TYPE_INSTANCE_GET_PRIVATE (mail_junk_hook, E_TYPE_MAIL_JUNK_HOOK, EMailJunkHookPrivate);
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 d5096c6185..d30dd2efda 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -55,10 +55,6 @@
#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 {
@@ -374,7 +370,7 @@ mail_shell_backend_prepare_for_quit_cb (EShell *shell,
{
EMailShellBackendPrivate *priv;
- priv = E_MAIL_SHELL_BACKEND_GET_PRIVATE (shell_backend);
+ priv = E_MAIL_SHELL_BACKEND (shell_backend)->priv;
/* Prevent a sync from starting while trying to shutdown. */
if (priv->mail_sync_source_id > 0) {
@@ -535,7 +531,7 @@ mail_shell_backend_start (EShellBackend *shell_backend)
gboolean enable_search_folders;
const gchar *data_dir;
- priv = E_MAIL_SHELL_BACKEND_GET_PRIVATE (shell_backend);
+ priv = E_MAIL_SHELL_BACKEND (shell_backend)->priv;
shell = e_shell_backend_get_shell (shell_backend);
shell_settings = e_shell_get_shell_settings (shell);
@@ -706,8 +702,7 @@ mail_shell_backend_class_init (EMailShellBackendClass *class)
static void
mail_shell_backend_init (EMailShellBackend *mail_shell_backend)
{
- mail_shell_backend->priv =
- E_MAIL_SHELL_BACKEND_GET_PRIVATE (mail_shell_backend);
+ mail_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (mail_shell_backend, E_TYPE_MAIL_SHELL_BACKEND, EMailShellBackendPrivate);
}
GType
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c
index 2f7bea3017..d367994086 100644
--- a/modules/mail/e-mail-shell-content.c
+++ b/modules/mail/e-mail-shell-content.c
@@ -43,10 +43,6 @@
#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;
};
@@ -154,7 +150,7 @@ mail_shell_content_dispose (GObject *object)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_MAIL_SHELL_CONTENT (object)->priv;
if (priv->mail_view != NULL) {
g_object_unref (priv->mail_view);
@@ -174,7 +170,7 @@ mail_shell_content_constructed (GObject *object)
GtkWidget *container;
GtkWidget *widget;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_MAIL_SHELL_CONTENT (object)->priv;
/* Chain up to parent's constructed () method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -213,7 +209,7 @@ mail_shell_content_check_state (EShellContent *shell_content)
EMailShellContentPrivate *priv;
EMailReader *reader;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (shell_content);
+ priv = E_MAIL_SHELL_CONTENT (shell_content)->priv;
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -229,7 +225,7 @@ mail_shell_content_focus_search_results (EShellContent *shell_content)
GtkWidget *message_list;
EMailReader *reader;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (shell_content);
+ priv = E_MAIL_SHELL_CONTENT (shell_content)->priv;
reader = E_MAIL_READER (priv->mail_view);
message_list = e_mail_reader_get_message_list (reader);
@@ -242,7 +238,7 @@ mail_shell_content_open_selected_mail (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
+ priv = E_MAIL_SHELL_CONTENT (reader)->priv;
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -270,7 +266,7 @@ mail_shell_content_get_alert_sink (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
+ priv = E_MAIL_SHELL_CONTENT (reader)->priv;
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -284,7 +280,7 @@ mail_shell_content_get_backend (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
+ priv = E_MAIL_SHELL_CONTENT (reader)->priv;
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -298,7 +294,7 @@ mail_shell_content_get_formatter (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
+ priv = E_MAIL_SHELL_CONTENT (reader)->priv;
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -312,7 +308,7 @@ mail_shell_content_get_hide_deleted (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
+ priv = E_MAIL_SHELL_CONTENT (reader)->priv;
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -326,7 +322,7 @@ mail_shell_content_get_message_list (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
+ priv = E_MAIL_SHELL_CONTENT (reader)->priv;
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -340,7 +336,7 @@ mail_shell_content_get_popup_menu (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
+ priv = E_MAIL_SHELL_CONTENT (reader)->priv;
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -354,7 +350,7 @@ mail_shell_content_get_window (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
+ priv = E_MAIL_SHELL_CONTENT (reader)->priv;
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -370,7 +366,7 @@ mail_shell_content_set_folder (EMailReader *reader,
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
+ priv = E_MAIL_SHELL_CONTENT (reader)->priv;
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -384,7 +380,7 @@ mail_shell_content_show_search_bar (EMailReader *reader)
{
EMailShellContentPrivate *priv;
- priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
+ priv = E_MAIL_SHELL_CONTENT (reader)->priv;
/* Forward this to our internal EMailView, which
* also implements the EMailReader interface. */
@@ -444,8 +440,7 @@ mail_shell_content_class_init (EMailShellContentClass *class)
static void
mail_shell_content_init (EMailShellContent *mail_shell_content)
{
- mail_shell_content->priv =
- E_MAIL_SHELL_CONTENT_GET_PRIVATE (mail_shell_content);
+ mail_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (mail_shell_content, E_TYPE_MAIL_SHELL_CONTENT, EMailShellContentPrivate);
/* 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 8a3587b1c8..5e5e515a9a 100644
--- a/modules/mail/e-mail-shell-sidebar.c
+++ b/modules/mail/e-mail-shell-sidebar.c
@@ -25,10 +25,6 @@
#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;
};
@@ -99,7 +95,7 @@ mail_shell_sidebar_dispose (GObject *object)
{
EMailShellSidebarPrivate *priv;
- priv = E_MAIL_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_MAIL_SHELL_SIDEBAR (object)->priv;
if (priv->folder_tree != NULL) {
g_object_unref (priv->folder_tree);
@@ -294,7 +290,7 @@ mail_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
EMailShellSidebarPrivate *priv;
EMailSidebar *sidebar;
- priv = E_MAIL_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
+ priv = E_MAIL_SHELL_SIDEBAR (shell_sidebar)->priv;
sidebar = E_MAIL_SIDEBAR (priv->folder_tree);
return e_mail_sidebar_check_state (sidebar);
@@ -336,8 +332,7 @@ mail_shell_sidebar_class_init (EMailShellSidebarClass *class)
static void
mail_shell_sidebar_init (EMailShellSidebar *mail_shell_sidebar)
{
- mail_shell_sidebar->priv =
- E_MAIL_SHELL_SIDEBAR_GET_PRIVATE (mail_shell_sidebar);
+ mail_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (mail_shell_sidebar, E_TYPE_MAIL_SHELL_SIDEBAR, EMailShellSidebarPrivate);
/* 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 d69ba8da3b..08ed7a97e7 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 = E_MAIL_SHELL_VIEW_GET_PRIVATE (mail_shell_view);
+ priv = mail_shell_view->priv;
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 a3aa3455e4..ac460a7b40 100644
--- a/modules/mail/e-mail-shell-view-private.h
+++ b/modules/mail/e-mail-shell-view-private.h
@@ -66,10 +66,6 @@
#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 f43b1f3732..c808ea3d7a 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_GET_PRIVATE (shell_view);
+ priv = E_MAIL_SHELL_VIEW (shell_view)->priv;
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_GET_PRIVATE (shell_view);
+ priv = E_MAIL_SHELL_VIEW (shell_view)->priv;
shell_window = e_shell_view_get_shell_window (shell_view);
shell_backend = e_shell_view_get_shell_backend (shell_view);
@@ -1059,8 +1059,7 @@ static void
mail_shell_view_init (EMailShellView *mail_shell_view,
EShellViewClass *shell_view_class)
{
- mail_shell_view->priv =
- E_MAIL_SHELL_VIEW_GET_PRIVATE (mail_shell_view);
+ mail_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (mail_shell_view, E_TYPE_MAIL_SHELL_VIEW, EMailShellViewPrivate);
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 e309d2c4ba..378207c365 100644
--- a/modules/mail/em-account-prefs.c
+++ b/modules/mail/em-account-prefs.c
@@ -42,10 +42,6 @@
#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 */
@@ -162,7 +158,7 @@ account_prefs_dispose (GObject *object)
{
EMAccountPrefsPrivate *priv;
- priv = EM_ACCOUNT_PREFS_GET_PRIVATE (object);
+ priv = EM_ACCOUNT_PREFS (object)->priv;
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -192,7 +188,7 @@ account_prefs_add_account (EAccountManager *manager)
EMAccountEditor *emae;
gpointer parent;
- priv = EM_ACCOUNT_PREFS_GET_PRIVATE (manager);
+ priv = EM_ACCOUNT_PREFS (manager)->priv;
if (priv->assistant != NULL) {
gtk_window_present (GTK_WINDOW (priv->assistant));
@@ -239,7 +235,7 @@ account_prefs_edit_account (EAccountManager *manager)
EAccount *account;
gpointer parent;
- priv = EM_ACCOUNT_PREFS_GET_PRIVATE (manager);
+ priv = EM_ACCOUNT_PREFS (manager)->priv;
if (priv->editor != NULL) {
gtk_window_present (GTK_WINDOW (priv->editor));
@@ -286,7 +282,7 @@ account_prefs_delete_account (EAccountManager *manager)
gpointer parent;
gint response;
- priv = EM_ACCOUNT_PREFS_GET_PRIVATE (manager);
+ priv = EM_ACCOUNT_PREFS (manager)->priv;
account_list = e_account_manager_get_account_list (manager);
tree_view = e_account_manager_get_tree_view (manager);
@@ -364,7 +360,7 @@ em_account_prefs_init (EMAccountPrefs *prefs)
EAccountManager *manager;
EAccountTreeView *tree_view;
- prefs->priv = EM_ACCOUNT_PREFS_GET_PRIVATE (prefs);
+ prefs->priv = G_TYPE_INSTANCE_GET_PRIVATE (prefs, EM_TYPE_ACCOUNT_PREFS, EMAccountPrefsPrivate);
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 e47c9ac29c..8fc3fc02c1 100644
--- a/modules/plugin-mono/e-plugin-mono.c
+++ b/modules/plugin-mono/e-plugin-mono.c
@@ -34,10 +34,6 @@
#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;
@@ -234,7 +230,7 @@ plugin_mono_init (EPluginMono *plugin_mono)
(GDestroyNotify) g_free,
(GDestroyNotify) NULL);
- plugin_mono->priv = E_PLUGIN_MONO_GET_PRIVATE (plugin_mono);
+ plugin_mono->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin_mono, E_TYPE_PLUGIN_MONO, EPluginMonoPrivate);
plugin_mono->priv->methods = methods;
}
diff --git a/modules/plugin-python/e-plugin-python.c b/modules/plugin-python/e-plugin-python.c
index 1b8057c6b7..2cbee6512f 100644
--- a/modules/plugin-python/e-plugin-python.c
+++ b/modules/plugin-python/e-plugin-python.c
@@ -28,10 +28,6 @@
#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;
@@ -197,7 +193,7 @@ plugin_python_init (EPluginPython *plugin_python)
(GDestroyNotify) g_free,
(GDestroyNotify) NULL);
- plugin_python->priv = E_PLUGIN_PYTHON_GET_PRIVATE (plugin_python);
+ plugin_python->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin_python, E_TYPE_PLUGIN_PYTHON, EPluginPythonPrivate);
plugin_python->priv->methods = methods;
}
diff --git a/shell/e-shell-backend.c b/shell/e-shell-backend.c
index c2abb470a2..cd672842f1 100644
--- a/shell/e-shell-backend.c
+++ b/shell/e-shell-backend.c
@@ -37,10 +37,6 @@
#include "e-shell.h"
#include "e-shell-view.h"
-#define E_SHELL_BACKEND_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL_BACKEND, EShellBackendPrivate))
-
struct _EShellBackendPrivate {
/* We keep a reference to corresponding EShellView subclass
@@ -171,7 +167,7 @@ shell_backend_dispose (GObject *object)
{
EShellBackendPrivate *priv;
- priv = E_SHELL_BACKEND_GET_PRIVATE (object);
+ priv = E_SHELL_BACKEND (object)->priv;
if (priv->shell_view_class != NULL) {
g_type_class_unref (priv->shell_view_class);
@@ -187,7 +183,7 @@ shell_backend_finalize (GObject *object)
{
EShellBackendPrivate *priv;
- priv = E_SHELL_BACKEND_GET_PRIVATE (object);
+ priv = E_SHELL_BACKEND (object)->priv;
g_warn_if_fail (g_queue_is_empty (priv->activities));
g_queue_free (priv->activities);
@@ -294,7 +290,7 @@ e_shell_backend_class_init (EShellBackendClass *class)
static void
e_shell_backend_init (EShellBackend *shell_backend)
{
- shell_backend->priv = E_SHELL_BACKEND_GET_PRIVATE (shell_backend);
+ shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_backend, E_TYPE_SHELL_BACKEND, EShellBackendPrivate);
shell_backend->priv->activities = g_queue_new ();
}
diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c
index 5b53fb5334..96e56f75a9 100644
--- a/shell/e-shell-content.c
+++ b/shell/e-shell-content.c
@@ -44,10 +44,6 @@
#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 */
@@ -150,7 +146,7 @@ shell_content_dispose (GObject *object)
{
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_SHELL_CONTENT (object)->priv;
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -172,7 +168,7 @@ shell_content_finalize (GObject *object)
{
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_SHELL_CONTENT (object)->priv;
g_free (priv->user_filename);
@@ -222,7 +218,7 @@ shell_content_get_preferred_width (GtkWidget *widget,
gint child_min, child_nat;
GtkWidget *child;
- priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
+ priv = E_SHELL_CONTENT (widget)->priv;
*minimum = *natural = 0;
@@ -250,7 +246,7 @@ shell_content_get_preferred_height (GtkWidget *widget,
gint min, nat;
GtkWidget *child;
- priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
+ priv = E_SHELL_CONTENT (widget)->priv;
child = gtk_bin_get_child (GTK_BIN (widget));
gtk_widget_get_preferred_height (child, minimum, natural);
@@ -273,7 +269,7 @@ shell_content_size_allocate (GtkWidget *widget,
GtkWidget *child;
gint remaining_height;
- priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
+ priv = E_SHELL_CONTENT (widget)->priv;
remaining_height = allocation->height;
gtk_widget_set_allocation (widget, allocation);
@@ -332,7 +328,7 @@ shell_content_remove (GtkContainer *container,
GtkContainerClass *container_class;
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT_GET_PRIVATE (container);
+ priv = E_SHELL_CONTENT (container)->priv;
if (widget == priv->alert_bar) {
gtk_widget_unparent (priv->alert_bar);
@@ -359,7 +355,7 @@ shell_content_forall (GtkContainer *container,
{
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT_GET_PRIVATE (container);
+ priv = E_SHELL_CONTENT (container)->priv;
if (priv->alert_bar != NULL)
callback (priv->alert_bar, callback_data);
@@ -470,7 +466,7 @@ e_shell_content_alert_sink_init (EAlertSinkInterface *interface)
static void
e_shell_content_init (EShellContent *shell_content)
{
- shell_content->priv = E_SHELL_CONTENT_GET_PRIVATE (shell_content);
+ shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_content, E_TYPE_SHELL_CONTENT, EShellContentPrivate);
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 4b7dc88ae2..97349f9b89 100644
--- a/shell/e-shell-searchbar.c
+++ b/shell/e-shell-searchbar.c
@@ -37,10 +37,6 @@
#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] */
@@ -631,7 +627,7 @@ shell_searchbar_dispose (GObject *object)
{
EShellSearchbarPrivate *priv;
- priv = E_SHELL_SEARCHBAR_GET_PRIVATE (object);
+ priv = E_SHELL_SEARCHBAR (object)->priv;
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -913,7 +909,7 @@ e_shell_searchbar_init (EShellSearchbar *searchbar)
GtkLabel *label;
GtkWidget *widget;
- searchbar->priv = E_SHELL_SEARCHBAR_GET_PRIVATE (searchbar);
+ searchbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (searchbar, E_TYPE_SHELL_SEARCHBAR, EShellSearchbarPrivate);
gtk_box_set_spacing (GTK_BOX (searchbar), 24);
diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c
index 9503f967f7..c8a507e630 100644
--- a/shell/e-shell-settings.c
+++ b/shell/e-shell-settings.c
@@ -29,10 +29,6 @@
#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;
@@ -180,7 +176,7 @@ shell_settings_set_property (GObject *object,
EShellSettingsPrivate *priv;
GValue *dest_value;
- priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
+ priv = E_SHELL_SETTINGS (object)->priv;
dest_value = &g_array_index (
priv->value_array, GValue, property_id - 1);
@@ -208,7 +204,7 @@ shell_settings_get_property (GObject *object,
EShellSettingsPrivate *priv;
GValue *src_value;
- priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
+ priv = E_SHELL_SETTINGS (object)->priv;
src_value = &g_array_index (
priv->value_array, GValue, property_id - 1);
@@ -222,7 +218,7 @@ shell_settings_finalize (GObject *object)
EShellSettingsPrivate *priv;
guint ii;
- priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
+ priv = E_SHELL_SETTINGS (object)->priv;
for (ii = 0; ii < priv->value_array->len; ii++)
g_value_unset (&g_array_index (priv->value_array, GValue, ii));
@@ -260,7 +256,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 = E_SHELL_SETTINGS_GET_PRIVATE (shell_settings);
+ shell_settings->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_settings, E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate);
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 ed5567e406..1a9f7d7c22 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -31,10 +31,6 @@
#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 */
@@ -149,7 +145,7 @@ shell_sidebar_dispose (GObject *object)
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_SHELL_SIDEBAR (object)->priv;
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -176,7 +172,7 @@ shell_sidebar_finalize (GObject *object)
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_SHELL_SIDEBAR (object)->priv;
g_free (priv->icon_name);
g_free (priv->primary_text);
@@ -241,7 +237,7 @@ shell_sidebar_get_preferred_height (GtkWidget *widget,
gint child_min, child_nat;
GtkWidget *child;
- priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget);
+ priv = E_SHELL_SIDEBAR (widget)->priv;
child = gtk_bin_get_child (GTK_BIN (widget));
gtk_widget_get_preferred_height (child, minimum, natural);
@@ -262,7 +258,7 @@ shell_sidebar_size_allocate (GtkWidget *widget,
GtkRequisition child_requisition;
GtkWidget *child;
- priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget);
+ priv = E_SHELL_SIDEBAR (widget)->priv;
gtk_widget_set_allocation (widget, allocation);
@@ -293,7 +289,7 @@ shell_sidebar_forall (GtkContainer *container,
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR_GET_PRIVATE (container);
+ priv = E_SHELL_SIDEBAR (container)->priv;
if (include_internals && callback && priv->event_box)
callback (priv->event_box, callback_data);
@@ -401,7 +397,7 @@ e_shell_sidebar_init (EShellSidebar *shell_sidebar)
const GdkColor *color;
const gchar *icon_name;
- shell_sidebar->priv = E_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
+ shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_sidebar, E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate);
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 f785054c08..b1d896dee0 100644
--- a/shell/e-shell-switcher.c
+++ b/shell/e-shell-switcher.c
@@ -30,10 +30,6 @@
#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
@@ -235,7 +231,7 @@ shell_switcher_dispose (GObject *object)
{
EShellSwitcherPrivate *priv;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (object);
+ priv = E_SHELL_SWITCHER (object)->priv;
while (priv->proxies != NULL) {
GtkWidget *widget = priv->proxies->data;
@@ -255,7 +251,7 @@ shell_switcher_get_preferred_width (GtkWidget *widget,
GtkWidget *child;
GList *iter;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
+ priv = E_SHELL_SWITCHER (widget)->priv;
*minimum = *natural = 0;
@@ -290,7 +286,7 @@ shell_switcher_get_preferred_height (GtkWidget *widget,
GtkWidget *child;
GList *iter;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
+ priv = E_SHELL_SWITCHER (widget)->priv;
*minimum = *natural = 0;
@@ -351,7 +347,7 @@ shell_switcher_screen_changed (GtkWidget *widget,
EShellSwitcherPrivate *priv;
GtkSettings *settings;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
+ priv = E_SHELL_SWITCHER (widget)->priv;
if (gtk_widget_has_screen (widget))
settings = gtk_widget_get_settings (widget);
@@ -386,7 +382,7 @@ shell_switcher_remove (GtkContainer *container,
EShellSwitcherPrivate *priv;
GList *link;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (container);
+ priv = E_SHELL_SWITCHER (container)->priv;
/* Look in the internal widgets first. */
@@ -413,7 +409,7 @@ shell_switcher_forall (GtkContainer *container,
{
EShellSwitcherPrivate *priv;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (container);
+ priv = E_SHELL_SWITCHER (container)->priv;
if (include_internals)
g_list_foreach (
@@ -551,7 +547,7 @@ e_shell_switcher_class_init (EShellSwitcherClass *class)
static void
e_shell_switcher_init (EShellSwitcher *switcher)
{
- switcher->priv = E_SHELL_SWITCHER_GET_PRIVATE (switcher);
+ switcher->priv = G_TYPE_INSTANCE_GET_PRIVATE (switcher, E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate);
gtk_widget_set_has_window (GTK_WIDGET (switcher), FALSE);
diff --git a/shell/e-shell-taskbar.c b/shell/e-shell-taskbar.c
index 8b8cc1d4a7..f4621fc780 100644
--- a/shell/e-shell-taskbar.c
+++ b/shell/e-shell-taskbar.c
@@ -32,10 +32,6 @@
#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 */
@@ -202,7 +198,7 @@ shell_taskbar_dispose (GObject *object)
{
EShellTaskbarPrivate *priv;
- priv = E_SHELL_TASKBAR_GET_PRIVATE (object);
+ priv = E_SHELL_TASKBAR (object)->priv;
g_hash_table_foreach_remove (
priv->proxy_table, (GHRFunc)
@@ -241,7 +237,7 @@ shell_taskbar_finalize (GObject *object)
{
EShellTaskbarPrivate *priv;
- priv = E_SHELL_TASKBAR_GET_PRIVATE (object);
+ priv = E_SHELL_TASKBAR (object)->priv;
g_hash_table_destroy (priv->proxy_table);
@@ -330,7 +326,7 @@ e_shell_taskbar_init (EShellTaskbar *shell_taskbar)
GtkWidget *widget;
gint height;
- shell_taskbar->priv = E_SHELL_TASKBAR_GET_PRIVATE (shell_taskbar);
+ shell_taskbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_taskbar, E_TYPE_SHELL_TASKBAR, EShellTaskbarPrivate);
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 6911b54f59..379b5ab528 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -41,10 +41,6 @@
#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
@@ -498,7 +494,7 @@ shell_view_dispose (GObject *object)
{
EShellViewPrivate *priv;
- priv = E_SHELL_VIEW_GET_PRIVATE (object);
+ priv = E_SHELL_VIEW (object)->priv;
/* Expedite any pending state saves. */
if (priv->state_save_timeout_id > 0) {
@@ -555,7 +551,7 @@ shell_view_finalize (GObject *object)
{
EShellViewPrivate *priv;
- priv = E_SHELL_VIEW_GET_PRIVATE (object);
+ priv = E_SHELL_VIEW (object)->priv;
g_key_file_free (priv->state_key_file);
@@ -1082,7 +1078,7 @@ e_shell_view_init (EShellView *shell_view,
size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
- shell_view->priv = E_SHELL_VIEW_GET_PRIVATE (shell_view);
+ shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_view, E_TYPE_SHELL_VIEW, EShellViewPrivate);
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 3faf3be50c..6a9744d971 100644
--- a/shell/e-shell-window-private.h
+++ b/shell/e-shell-window-private.h
@@ -49,10 +49,6 @@
#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 25986f07a7..c62bd6411a 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 = E_SHELL_WINDOW_GET_PRIVATE (shell_window);
+ shell_window->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_window, E_TYPE_SHELL_WINDOW, EShellWindowPrivate);
e_shell_window_private_init (shell_window);
}
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 6e37e7e533..79ca26cb1c 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -42,10 +42,6 @@
#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;
@@ -639,7 +635,7 @@ shell_dispose (GObject *object)
EShellPrivate *priv;
EAlert *alert;
- priv = E_SHELL_GET_PRIVATE (object);
+ priv = E_SHELL (object)->priv;
while ((alert = g_queue_pop_head (&priv->alerts)) != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -682,7 +678,7 @@ shell_finalize (GObject *object)
{
EShellPrivate *priv;
- priv = E_SHELL_GET_PRIVATE (object);
+ priv = E_SHELL (object)->priv;
g_hash_table_destroy (priv->backends_by_name);
g_hash_table_destroy (priv->backends_by_scheme);
@@ -1173,7 +1169,7 @@ e_shell_init (EShell *shell)
GtkIconTheme *icon_theme;
EggSMClient *sm_client;
- shell->priv = E_SHELL_GET_PRIVATE (shell);
+ shell->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell, E_TYPE_SHELL, EShellPrivate);
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 983b40e8d9..9e5f757490 100644
--- a/shell/test/e-test-shell-backend.c
+++ b/shell/test/e-test-shell-backend.c
@@ -28,10 +28,6 @@
#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;
};
@@ -182,8 +178,7 @@ test_shell_backend_class_init (ETestShellBackendClass *class)
static void
test_shell_backend_init (ETestShellBackend *test_shell_backend)
{
- test_shell_backend->priv =
- E_TEST_SHELL_BACKEND_GET_PRIVATE (test_shell_backend);
+ test_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (test_shell_backend, E_TYPE_TEST_SHELL_BACKEND, ETestShellBackendPrivate);
}
GType
diff --git a/shell/test/e-test-shell-view.c b/shell/test/e-test-shell-view.c
index 68d4ff9a7b..7080009dd4 100644
--- a/shell/test/e-test-shell-view.c
+++ b/shell/test/e-test-shell-view.c
@@ -24,10 +24,6 @@
#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;
};
@@ -53,7 +49,7 @@ test_shell_view_dispose (GObject *object)
{
ETestShellViewPrivate *priv;
- priv = E_TEST_SHELL_VIEW_GET_PRIVATE (object);
+ priv = E_TEST_SHELL_VIEW (object)->priv;
if (priv->activity != NULL) {
e_activity_set_state (priv->activity, E_ACTIVITY_COMPLETED);
@@ -80,7 +76,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_GET_PRIVATE (object);
+ priv = E_TEST_SHELL_VIEW (object)->priv;
shell_view = E_SHELL_VIEW (object);
shell_backend = e_shell_view_get_shell_backend (shell_view);
@@ -127,8 +123,7 @@ test_shell_view_class_init (ETestShellViewClass *class,
static void
test_shell_view_init (ETestShellView *test_shell_view)
{
- test_shell_view->priv =
- E_TEST_SHELL_VIEW_GET_PRIVATE (test_shell_view);
+ test_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (test_shell_view, E_TYPE_TEST_SHELL_VIEW, ETestShellViewPrivate);
}
GType
diff --git a/smclient/eggsmclient.c b/smclient/eggsmclient.c
index e7dda1226c..738be4e9e5 100644
--- a/smclient/eggsmclient.c
+++ b/smclient/eggsmclient.c
@@ -44,10 +44,6 @@ 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;
@@ -56,7 +52,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
@@ -392,7 +388,7 @@ egg_sm_client_is_resumed (EggSMClient *client)
GKeyFile *
egg_sm_client_get_state_file (EggSMClient *client)
{
- EggSMClientPrivate *priv = EGG_SM_CLIENT_GET_PRIVATE (client);
+ EggSMClientPrivate *priv = client->priv;
gchar *state_file_path;
GError *err = NULL;
diff --git a/smclient/eggsmclient.h b/smclient/eggsmclient.h
index 5efc486df0..a24ac23b19 100644
--- a/smclient/eggsmclient.h
+++ b/smclient/eggsmclient.h
@@ -50,8 +50,9 @@ 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 1969d333bb..8c744e1051 100644
--- a/widgets/menus/gal-view-factory-etable.c
+++ b/widgets/menus/gal-view-factory-etable.c
@@ -29,10 +29,6 @@
#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;
};
@@ -96,7 +92,7 @@ view_factory_etable_dispose (GObject *object)
{
GalViewFactoryEtablePrivate *priv;
- priv = GAL_VIEW_FACTORY_ETABLE_GET_PRIVATE (object);
+ priv = GAL_VIEW_FACTORY_ETABLE (object)->priv;
if (priv->specification != NULL) {
g_object_unref (priv->specification);
@@ -125,7 +121,7 @@ view_factory_etable_new_view (GalViewFactory *factory,
{
GalViewFactoryEtablePrivate *priv;
- priv = GAL_VIEW_FACTORY_ETABLE_GET_PRIVATE (factory);
+ priv = GAL_VIEW_FACTORY_ETABLE (factory)->priv;
return gal_view_etable_new (priv->specification, name);
}
@@ -163,7 +159,7 @@ gal_view_factory_etable_class_init (GalViewFactoryEtableClass *class)
static void
gal_view_factory_etable_init (GalViewFactoryEtable *factory)
{
- factory->priv = GAL_VIEW_FACTORY_ETABLE_GET_PRIVATE (factory);
+ factory->priv = G_TYPE_INSTANCE_GET_PRIVATE (factory, GAL_TYPE_VIEW_FACTORY_ETABLE, GalViewFactoryEtablePrivate);
}
/**
diff --git a/widgets/misc/e-account-combo-box.c b/widgets/misc/e-account-combo-box.c
index 91a843cc8d..ed3615a276 100644
--- a/widgets/misc/e-account-combo-box.c
+++ b/widgets/misc/e-account-combo-box.c
@@ -23,10 +23,6 @@
#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
@@ -258,7 +254,7 @@ account_combo_box_dispose (GObject *object)
{
EAccountComboBoxPrivate *priv;
- priv = E_ACCOUNT_COMBO_BOX_GET_PRIVATE (object);
+ priv = E_ACCOUNT_COMBO_BOX (object)->priv;
if (priv->account_list != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -279,7 +275,7 @@ account_combo_box_finalize (GObject *object)
{
EAccountComboBoxPrivate *priv;
- priv = E_ACCOUNT_COMBO_BOX_GET_PRIVATE (object);
+ priv = E_ACCOUNT_COMBO_BOX (object)->priv;
g_hash_table_destroy (priv->index);
@@ -319,7 +315,7 @@ e_account_combo_box_init (EAccountComboBox *combo_box)
(GDestroyNotify) g_object_unref,
(GDestroyNotify) gtk_tree_row_reference_free);
- combo_box->priv = E_ACCOUNT_COMBO_BOX_GET_PRIVATE (combo_box);
+ combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box, E_TYPE_ACCOUNT_COMBO_BOX, EAccountComboBoxPrivate);
combo_box->priv->index = index;
}
@@ -366,7 +362,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 = E_ACCOUNT_COMBO_BOX_GET_PRIVATE (combo_box);
+ priv = combo_box->priv;
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 d8415f8d3a..e4ab1e798d 100644
--- a/widgets/misc/e-account-manager.c
+++ b/widgets/misc/e-account-manager.c
@@ -25,10 +25,6 @@
#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;
@@ -168,7 +164,7 @@ account_manager_dispose (GObject *object)
{
EAccountManagerPrivate *priv;
- priv = E_ACCOUNT_MANAGER_GET_PRIVATE (object);
+ priv = E_ACCOUNT_MANAGER (object)->priv;
if (priv->account_list != NULL) {
g_object_unref (priv->account_list);
@@ -260,7 +256,7 @@ e_account_manager_init (EAccountManager *manager)
GtkWidget *container;
GtkWidget *widget;
- manager->priv = E_ACCOUNT_MANAGER_GET_PRIVATE (manager);
+ manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, E_TYPE_ACCOUNT_MANAGER, EAccountManagerPrivate);
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 923f395f0f..5a0ace2403 100644
--- a/widgets/misc/e-account-tree-view.c
+++ b/widgets/misc/e-account-tree-view.c
@@ -24,10 +24,6 @@
#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,
@@ -337,7 +333,7 @@ account_tree_view_dispose (GObject *object)
{
EAccountTreeViewPrivate *priv;
- priv = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (object);
+ priv = E_ACCOUNT_TREE_VIEW (object)->priv;
if (priv->account_list != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -358,7 +354,7 @@ account_tree_view_finalize (GObject *object)
{
EAccountTreeViewPrivate *priv;
- priv = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (object);
+ priv = E_ACCOUNT_TREE_VIEW (object)->priv;
g_hash_table_destroy (priv->index);
@@ -482,7 +478,7 @@ e_account_tree_view_init (EAccountTreeView *tree_view)
(GDestroyNotify) g_object_unref,
(GDestroyNotify) gtk_tree_row_reference_free);
- tree_view->priv = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (tree_view);
+ tree_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (tree_view, E_TYPE_ACCOUNT_TREE_VIEW, EAccountTreeViewPrivate);
tree_view->priv->index = index;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
@@ -534,7 +530,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 = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (tree_view);
+ priv = tree_view->priv;
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 ee88b7d199..5c9c44267b 100644
--- a/widgets/misc/e-action-combo-box.c
+++ b/widgets/misc/e-action-combo-box.c
@@ -22,10 +22,6 @@
#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
@@ -319,7 +315,7 @@ action_combo_box_get_property (GObject *object,
static void
action_combo_box_dispose (GObject *object)
{
- EActionComboBoxPrivate *priv = E_ACTION_COMBO_BOX_GET_PRIVATE (object);
+ EActionComboBoxPrivate *priv = E_ACTION_COMBO_BOX (object)->priv;
if (priv->action != NULL) {
g_object_unref (priv->action);
@@ -340,7 +336,7 @@ action_combo_box_dispose (GObject *object)
static void
action_combo_box_finalize (GObject *object)
{
- EActionComboBoxPrivate *priv = E_ACTION_COMBO_BOX_GET_PRIVATE (object);
+ EActionComboBoxPrivate *priv = E_ACTION_COMBO_BOX (object)->priv;
g_hash_table_destroy (priv->index);
@@ -431,7 +427,7 @@ e_action_combo_box_class_init (EActionComboBoxClass *class)
static void
e_action_combo_box_init (EActionComboBox *combo_box)
{
- combo_box->priv = E_ACTION_COMBO_BOX_GET_PRIVATE (combo_box);
+ combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box, E_TYPE_ACTION_COMBO_BOX, EActionComboBoxPrivate);
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 a86e37cbdf..e23e043b02 100644
--- a/widgets/misc/e-activity-bar.c
+++ b/widgets/misc/e-activity-bar.c
@@ -18,10 +18,6 @@
#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"
@@ -206,7 +202,7 @@ activity_bar_dispose (GObject *object)
{
EActivityBarPrivate *priv;
- priv = E_ACTIVITY_BAR_GET_PRIVATE (object);
+ priv = E_ACTIVITY_BAR (object)->priv;
if (priv->timeout_id > 0) {
g_source_remove (priv->timeout_id);
@@ -257,7 +253,7 @@ e_activity_bar_init (EActivityBar *bar)
GtkWidget *container;
GtkWidget *widget;
- bar->priv = E_ACTIVITY_BAR_GET_PRIVATE (bar);
+ bar->priv = G_TYPE_INSTANCE_GET_PRIVATE (bar, E_TYPE_ACTIVITY_BAR, EActivityBarPrivate);
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 aea025d9a7..b949c1caa4 100644
--- a/widgets/misc/e-activity-proxy.c
+++ b/widgets/misc/e-activity-proxy.c
@@ -23,10 +23,6 @@
#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"
@@ -212,7 +208,7 @@ activity_proxy_dispose (GObject *object)
{
EActivityProxyPrivate *priv;
- priv = E_ACTIVITY_PROXY_GET_PRIVATE (object);
+ priv = E_ACTIVITY_PROXY (object)->priv;
if (priv->timeout_id > 0) {
g_source_remove (priv->timeout_id);
@@ -263,7 +259,7 @@ e_activity_proxy_init (EActivityProxy *proxy)
GtkWidget *container;
GtkWidget *widget;
- proxy->priv = E_ACTIVITY_PROXY_GET_PRIVATE (proxy);
+ proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, E_TYPE_ACTIVITY_PROXY, EActivityProxyPrivate);
container = GTK_WIDGET (proxy);
diff --git a/widgets/misc/e-alert-bar.c b/widgets/misc/e-alert-bar.c
index d5c1f953d4..8fa7eff6ba 100644
--- a/widgets/misc/e-alert-bar.c
+++ b/widgets/misc/e-alert-bar.c
@@ -21,10 +21,6 @@
#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
@@ -152,7 +148,7 @@ alert_bar_dispose (GObject *object)
{
EAlertBarPrivate *priv;
- priv = E_ALERT_BAR_GET_PRIVATE (object);
+ priv = E_ALERT_BAR (object)->priv;
while (!g_queue_is_empty (&priv->alerts)) {
EAlert *alert = g_queue_pop_head (&priv->alerts);
@@ -184,7 +180,7 @@ e_alert_bar_init (EAlertBar *alert_bar)
PangoAttribute *attr;
PangoAttrList *attr_list;
- alert_bar->priv = E_ALERT_BAR_GET_PRIVATE (alert_bar);
+ alert_bar->priv = G_TYPE_INSTANCE_GET_PRIVATE (alert_bar, E_TYPE_ALERT_BAR, EAlertBarPrivate);
g_queue_init (&alert_bar->priv->alerts);
diff --git a/widgets/misc/e-attachment-button.c b/widgets/misc/e-attachment-button.c
index 16ddaab063..8a9b135abd 100644
--- a/widgets/misc/e-attachment-button.c
+++ b/widgets/misc/e-attachment-button.c
@@ -23,10 +23,6 @@
#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;
@@ -441,7 +437,7 @@ attachment_button_dispose (GObject *object)
{
EAttachmentButtonPrivate *priv;
- priv = E_ATTACHMENT_BUTTON_GET_PRIVATE (object);
+ priv = E_ATTACHMENT_BUTTON (object)->priv;
if (priv->view != NULL) {
g_object_unref (priv->view);
@@ -568,7 +564,7 @@ e_attachment_button_init (EAttachmentButton *button)
GtkWidget *widget;
gint n_targets;
- button->priv = E_ATTACHMENT_BUTTON_GET_PRIVATE (button);
+ button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button, E_TYPE_ATTACHMENT_BUTTON, EAttachmentButtonPrivate);
/* Configure Widgets */
diff --git a/widgets/misc/e-attachment-dialog.c b/widgets/misc/e-attachment-dialog.c
index cb504219df..a85e0bef98 100644
--- a/widgets/misc/e-attachment-dialog.c
+++ b/widgets/misc/e-attachment-dialog.c
@@ -23,10 +23,6 @@
#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;
@@ -158,7 +154,7 @@ attachment_dialog_dispose (GObject *object)
{
EAttachmentDialogPrivate *priv;
- priv = E_ATTACHMENT_DIALOG_GET_PRIVATE (object);
+ priv = E_ATTACHMENT_DIALOG (object)->priv;
if (priv->attachment != NULL) {
g_object_unref (priv->attachment);
@@ -223,7 +219,7 @@ attachment_dialog_response (GtkDialog *dialog,
if (response_id != GTK_RESPONSE_OK)
return;
- priv = E_ATTACHMENT_DIALOG_GET_PRIVATE (dialog);
+ priv = E_ATTACHMENT_DIALOG (dialog)->priv;
g_return_if_fail (E_IS_ATTACHMENT (priv->attachment));
attachment = priv->attachment;
@@ -295,7 +291,7 @@ e_attachment_dialog_init (EAttachmentDialog *dialog)
GtkWidget *container;
GtkWidget *widget;
- dialog->priv = E_ATTACHMENT_DIALOG_GET_PRIVATE (dialog);
+ dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog, E_TYPE_ATTACHMENT_DIALOG, EAttachmentDialogPrivate);
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 8b57cc80b6..1c850685be 100644
--- a/widgets/misc/e-attachment-handler-image.c
+++ b/widgets/misc/e-attachment-handler-image.c
@@ -26,10 +26,6 @@
#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;
};
@@ -247,5 +243,5 @@ e_attachment_handler_image_class_init (EAttachmentHandlerImageClass *class)
static void
e_attachment_handler_image_init (EAttachmentHandlerImage *handler)
{
- handler->priv = E_ATTACHMENT_HANDLER_IMAGE_GET_PRIVATE (handler);
+ handler->priv = G_TYPE_INSTANCE_GET_PRIVATE (handler, E_TYPE_ATTACHMENT_HANDLER_IMAGE, EAttachmentHandlerImagePrivate);
}
diff --git a/widgets/misc/e-attachment-handler.c b/widgets/misc/e-attachment-handler.c
index d388faca34..c125d29ea5 100644
--- a/widgets/misc/e-attachment-handler.c
+++ b/widgets/misc/e-attachment-handler.c
@@ -21,10 +21,6 @@
#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;
};
@@ -77,7 +73,7 @@ e_attachment_handler_class_init (EAttachmentHandlerClass *class)
static void
e_attachment_handler_init (EAttachmentHandler *handler)
{
- handler->priv = E_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
+ handler->priv = G_TYPE_INSTANCE_GET_PRIVATE (handler, E_TYPE_ATTACHMENT_HANDLER, EAttachmentHandlerPrivate);
}
EAttachmentView *
diff --git a/widgets/misc/e-attachment-icon-view.c b/widgets/misc/e-attachment-icon-view.c
index 54bf9be9ed..5677370f0b 100644
--- a/widgets/misc/e-attachment-icon-view.c
+++ b/widgets/misc/e-attachment-icon-view.c
@@ -28,10 +28,6 @@
#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;
};
@@ -348,7 +344,7 @@ attachment_icon_view_get_private (EAttachmentView *view)
{
EAttachmentIconViewPrivate *priv;
- priv = E_ATTACHMENT_ICON_VIEW_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_ICON_VIEW (view)->priv;
return &priv->view_priv;
}
@@ -531,7 +527,7 @@ e_attachment_icon_view_class_init (EAttachmentIconViewClass *class)
static void
e_attachment_icon_view_init (EAttachmentIconView *icon_view)
{
- icon_view->priv = E_ATTACHMENT_ICON_VIEW_GET_PRIVATE (icon_view);
+ icon_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (icon_view, E_TYPE_ATTACHMENT_ICON_VIEW, EAttachmentIconViewPrivate);
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 0eaada1e8e..21d736b50b 100644
--- a/widgets/misc/e-attachment-paned.c
+++ b/widgets/misc/e-attachment-paned.c
@@ -30,10 +30,6 @@
#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. */
@@ -222,7 +218,7 @@ attachment_paned_dispose (GObject *object)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (object);
+ priv = E_ATTACHMENT_PANED (object)->priv;
if (priv->model != NULL) {
g_object_unref (priv->model);
@@ -285,7 +281,7 @@ attachment_paned_constructed (GObject *object)
GConfBridge *bridge;
const gchar *key;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (object);
+ priv = E_ATTACHMENT_PANED (object)->priv;
bridge = gconf_bridge_get ();
@@ -359,7 +355,7 @@ attachment_paned_get_private (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_PANED (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_private (view);
@@ -370,7 +366,7 @@ attachment_paned_get_store (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_PANED (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_store (view);
@@ -383,7 +379,7 @@ attachment_paned_get_path_at_pos (EAttachmentView *view,
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_PANED (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_path_at_pos (view, x, y);
@@ -394,7 +390,7 @@ attachment_paned_get_selected_paths (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_PANED (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_get_selected_paths (view);
@@ -406,7 +402,7 @@ attachment_paned_path_is_selected (EAttachmentView *view,
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_PANED (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
return e_attachment_view_path_is_selected (view, path);
@@ -418,7 +414,7 @@ attachment_paned_select_path (EAttachmentView *view,
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_PANED (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_select_path (view, path);
@@ -430,7 +426,7 @@ attachment_paned_unselect_path (EAttachmentView *view,
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_PANED (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_unselect_path (view, path);
@@ -441,7 +437,7 @@ attachment_paned_select_all (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_PANED (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_select_all (view);
@@ -452,7 +448,7 @@ attachment_paned_unselect_all (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_PANED (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_unselect_all (view);
@@ -463,7 +459,7 @@ attachment_paned_update_actions (EAttachmentView *view)
{
EAttachmentPanedPrivate *priv;
- priv = E_ATTACHMENT_PANED_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_PANED (view)->priv;
view = E_ATTACHMENT_VIEW (priv->icon_view);
e_attachment_view_update_actions (view);
@@ -522,7 +518,7 @@ e_attachment_paned_init (EAttachmentPaned *paned)
GtkWidget *widget;
GtkAction *action;
- paned->priv = E_ATTACHMENT_PANED_GET_PRIVATE (paned);
+ paned->priv = G_TYPE_INSTANCE_GET_PRIVATE (paned, E_TYPE_ATTACHMENT_PANED, EAttachmentPanedPrivate);
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 4068e5efdc..392dfe6fc7 100644
--- a/widgets/misc/e-attachment-store.c
+++ b/widgets/misc/e-attachment-store.c
@@ -29,10 +29,6 @@
#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;
@@ -114,7 +110,7 @@ attachment_store_dispose (GObject *object)
{
EAttachmentStorePrivate *priv;
- priv = E_ATTACHMENT_STORE_GET_PRIVATE (object);
+ priv = E_ATTACHMENT_STORE (object)->priv;
g_hash_table_remove_all (priv->attachment_index);
@@ -127,7 +123,7 @@ attachment_store_finalize (GObject *object)
{
EAttachmentStorePrivate *priv;
- priv = E_ATTACHMENT_STORE_GET_PRIVATE (object);
+ priv = E_ATTACHMENT_STORE (object)->priv;
g_hash_table_destroy (priv->attachment_index);
@@ -226,7 +222,7 @@ e_attachment_store_init (EAttachmentStore *store)
(GDestroyNotify) g_object_unref,
(GDestroyNotify) gtk_tree_row_reference_free);
- store->priv = E_ATTACHMENT_STORE_GET_PRIVATE (store);
+ store->priv = G_TYPE_INSTANCE_GET_PRIVATE (store, E_TYPE_ATTACHMENT_STORE, EAttachmentStorePrivate);
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 5cc427502d..d3c3e68262 100644
--- a/widgets/misc/e-attachment-tree-view.c
+++ b/widgets/misc/e-attachment-tree-view.c
@@ -28,10 +28,6 @@
#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;
};
@@ -305,7 +301,7 @@ attachment_tree_view_get_private (EAttachmentView *view)
{
EAttachmentTreeViewPrivate *priv;
- priv = E_ATTACHMENT_TREE_VIEW_GET_PRIVATE (view);
+ priv = E_ATTACHMENT_TREE_VIEW (view)->priv;
return &priv->view_priv;
}
@@ -508,7 +504,7 @@ e_attachment_tree_view_init (EAttachmentTreeView *tree_view)
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
- tree_view->priv = E_ATTACHMENT_TREE_VIEW_GET_PRIVATE (tree_view);
+ tree_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (tree_view, E_TYPE_ATTACHMENT_TREE_VIEW, EAttachmentTreeViewPrivate);
e_attachment_view_init (E_ATTACHMENT_VIEW (tree_view));
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index a96f7ed4ad..2c219a79ce 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -33,10 +33,6 @@
#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"
@@ -667,7 +663,7 @@ attachment_dispose (GObject *object)
{
EAttachmentPrivate *priv;
- priv = E_ATTACHMENT_GET_PRIVATE (object);
+ priv = E_ATTACHMENT (object)->priv;
if (priv->file != NULL) {
g_object_unref (priv->file);
@@ -712,7 +708,7 @@ attachment_finalize (GObject *object)
{
EAttachmentPrivate *priv;
- priv = E_ATTACHMENT_GET_PRIVATE (object);
+ priv = E_ATTACHMENT (object)->priv;
g_free (priv->disposition);
@@ -881,7 +877,7 @@ e_attachment_class_init (EAttachmentClass *class)
static void
e_attachment_init (EAttachment *attachment)
{
- attachment->priv = E_ATTACHMENT_GET_PRIVATE (attachment);
+ attachment->priv = G_TYPE_INSTANCE_GET_PRIVATE (attachment, E_TYPE_ATTACHMENT, EAttachmentPrivate);
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 e2cf06e3d1..57d958b082 100644
--- a/widgets/misc/e-charset-combo-box.c
+++ b/widgets/misc/e-charset-combo-box.c
@@ -26,10 +26,6 @@
#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
@@ -221,7 +217,7 @@ charset_combo_box_dispose (GObject *object)
{
ECharsetComboBoxPrivate *priv;
- priv = E_CHARSET_COMBO_BOX_GET_PRIVATE (object);
+ priv = E_CHARSET_COMBO_BOX (object)->priv;
if (priv->action_group != NULL) {
g_object_unref (priv->action_group);
@@ -244,7 +240,7 @@ charset_combo_box_finalize (GObject *object)
{
ECharsetComboBoxPrivate *priv;
- priv = E_CHARSET_COMBO_BOX_GET_PRIVATE (object);
+ priv = E_CHARSET_COMBO_BOX (object)->priv;
g_hash_table_destroy (priv->charset_index);
@@ -257,7 +253,7 @@ charset_combo_box_changed (GtkComboBox *combo_box)
{
ECharsetComboBoxPrivate *priv;
- priv = E_CHARSET_COMBO_BOX_GET_PRIVATE (combo_box);
+ priv = E_CHARSET_COMBO_BOX (combo_box)->priv;
/* Chain up to parent's changed() method. */
GTK_COMBO_BOX_CLASS (e_charset_combo_box_parent_class)->
@@ -312,7 +308,7 @@ e_charset_combo_box_init (ECharsetComboBox *combo_box)
(GDestroyNotify) g_free,
(GDestroyNotify) g_object_unref);
- combo_box->priv = E_CHARSET_COMBO_BOX_GET_PRIVATE (combo_box);
+ combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box, E_TYPE_CHARSET_COMBO_BOX, ECharsetComboBoxPrivate);
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 ae962081d6..9aff9de005 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -43,10 +43,6 @@
#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;
@@ -455,7 +451,7 @@ e_date_edit_class_init (EDateEditClass *class)
static void
e_date_edit_init (EDateEdit *dedit)
{
- dedit->priv = E_DATE_EDIT_GET_PRIVATE (dedit);
+ dedit->priv = G_TYPE_INSTANCE_GET_PRIVATE (dedit, E_TYPE_DATE_EDIT, EDateEditPrivate);
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 eb835b94bc..91dc7be524 100644
--- a/widgets/misc/e-focus-tracker.c
+++ b/widgets/misc/e-focus-tracker.c
@@ -26,10 +26,6 @@
#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;
@@ -357,7 +353,7 @@ focus_tracker_dispose (GObject *object)
{
EFocusTrackerPrivate *priv;
- priv = E_FOCUS_TRACKER_GET_PRIVATE (object);
+ priv = E_FOCUS_TRACKER (object)->priv;
g_signal_handlers_disconnect_matched (
gtk_clipboard_get (GDK_SELECTION_PRIMARY),
@@ -539,7 +535,7 @@ e_focus_tracker_init (EFocusTracker *focus_tracker)
{
GtkAction *action;
- focus_tracker->priv = E_FOCUS_TRACKER_GET_PRIVATE (focus_tracker);
+ focus_tracker->priv = G_TYPE_INSTANCE_GET_PRIVATE (focus_tracker, E_TYPE_FOCUS_TRACKER, EFocusTrackerPrivate);
/* 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 7d74fb3d67..a1679807a9 100644
--- a/widgets/misc/e-hinted-entry.c
+++ b/widgets/misc/e-hinted-entry.c
@@ -21,10 +21,6 @@
#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;
@@ -118,7 +114,7 @@ hinted_entry_finalize (GObject *object)
{
EHintedEntryPrivate *priv;
- priv = E_HINTED_ENTRY_GET_PRIVATE (object);
+ priv = E_HINTED_ENTRY (object)->priv;
g_free (priv->hint);
@@ -214,7 +210,7 @@ e_hinted_entry_class_init (EHintedEntryClass *class)
static void
e_hinted_entry_init (EHintedEntry *entry)
{
- entry->priv = E_HINTED_ENTRY_GET_PRIVATE (entry);
+ entry->priv = G_TYPE_INSTANCE_GET_PRIVATE (entry, E_TYPE_HINTED_ENTRY, EHintedEntryPrivate);
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 e9a497f4c4..4da38be9a9 100644
--- a/widgets/misc/e-image-chooser.c
+++ b/widgets/misc/e-image-chooser.c
@@ -30,10 +30,6 @@
#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;
@@ -374,7 +370,7 @@ image_chooser_dispose (GObject *object)
{
EImageChooserPrivate *priv;
- priv = E_IMAGE_CHOOSER_GET_PRIVATE (object);
+ priv = E_IMAGE_CHOOSER (object)->priv;
if (priv->frame != NULL) {
g_object_unref (priv->frame);
@@ -395,7 +391,7 @@ image_chooser_finalize (GObject *object)
{
EImageChooserPrivate *priv;
- priv = E_IMAGE_CHOOSER_GET_PRIVATE (object);
+ priv = E_IMAGE_CHOOSER (object)->priv;
g_free (priv->image_buf);
g_free (priv->icon_name);
@@ -444,7 +440,7 @@ e_image_chooser_init (EImageChooser *chooser)
GtkWidget *container;
GtkWidget *widget;
- chooser->priv = E_IMAGE_CHOOSER_GET_PRIVATE (chooser);
+ chooser->priv = G_TYPE_INSTANCE_GET_PRIVATE (chooser, E_TYPE_IMAGE_CHOOSER, EImageChooserPrivate);
container = GTK_WIDGET (chooser);
diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c
index 55ea1bbc62..11059ebf1a 100644
--- a/widgets/misc/e-import-assistant.c
+++ b/widgets/misc/e-import-assistant.c
@@ -33,10 +33,6 @@
#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;
@@ -147,7 +143,7 @@ filename_changed (GtkWidget *widget,
const gchar *filename;
gint fileok;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->file_page;
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
@@ -219,7 +215,7 @@ filetype_changed_cb (GtkComboBox *combo_box,
GtkTreeModel *model;
GtkTreeIter iter;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
g_return_if_fail (gtk_combo_box_get_active_iter (combo_box, &iter));
@@ -503,7 +499,7 @@ prepare_intelligent_page (GtkAssistant *assistant,
gint row;
ImportSelectionPage *page;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->selection_page;
if (page->target != NULL) {
@@ -604,7 +600,7 @@ import_simple_done (EImport *ei, gpointer user_data)
g_return_if_fail (import_assistant != NULL);
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (import_assistant);
+ priv = import_assistant->priv;
g_return_if_fail (priv != NULL);
g_return_if_fail (priv->fileuris != NULL);
g_return_if_fail (priv->simple_page.target != NULL);
@@ -664,7 +660,7 @@ prepare_file_page (GtkAssistant *assistant,
GtkListStore *store;
ImportFilePage *page;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->file_page;
if (page->target != NULL) {
@@ -727,7 +723,7 @@ prepare_destination_page (GtkAssistant *assistant,
EImportAssistantPrivate *priv;
ImportDestinationPage *page;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->destination_page;
if (page->control)
@@ -754,7 +750,7 @@ prepare_progress_page (GtkAssistant *assistant,
gboolean intelligent_import;
gboolean is_simple = FALSE;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->selection_page;
/* Because we're a GTK_ASSISTANT_PAGE_PROGRESS, this will
@@ -817,7 +813,7 @@ simple_filetype_changed_cb (GtkComboBox *combo_box, GtkAssistant *assistant)
GtkWidget *vbox;
GtkWidget *control;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->simple_page;
g_return_if_fail (gtk_combo_box_get_active_iter (combo_box, &iter));
@@ -860,7 +856,7 @@ prepare_simple_page (GtkAssistant *assistant, GtkWidget *vbox)
ImportSimplePage *page;
gchar *uri;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->simple_page;
g_return_if_fail (priv->fileuris != NULL);
@@ -938,7 +934,7 @@ prepare_simple_destination_page (GtkAssistant *assistant,
ImportDestinationPage *page;
ImportSimplePage *simple_page;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->destination_page;
simple_page = &priv->simple_page;
@@ -999,7 +995,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_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
for (i = 0; uris[i]; i++) {
gchar *uri = uris[i];
@@ -1071,7 +1067,7 @@ import_assistant_dispose (GObject *object)
{
EImportAssistantPrivate *priv;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (object);
+ priv = E_IMPORT_ASSISTANT (object)->priv;
if (priv->file_page.target != NULL) {
e_import_target_free (
@@ -1114,7 +1110,7 @@ import_assistant_finalize (GObject *object)
{
EImportAssistantPrivate *priv;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (object);
+ priv = E_IMPORT_ASSISTANT (object)->priv;
g_slist_free (priv->selection_page.importers);
@@ -1130,7 +1126,7 @@ import_assistant_set_property (GObject *object,
{
switch (property_id) {
case PROP_IS_SIMPLE:
- E_IMPORT_ASSISTANT_GET_PRIVATE (object)->is_simple = g_value_get_boolean (value);
+ E_IMPORT_ASSISTANT (object)->priv->is_simple = g_value_get_boolean (value);
return;
}
@@ -1146,7 +1142,7 @@ import_assistant_get_property (GObject *object,
switch (property_id) {
case PROP_IS_SIMPLE:
g_value_set_boolean (value,
- E_IMPORT_ASSISTANT_GET_PRIVATE (object)->is_simple);
+ E_IMPORT_ASSISTANT (object)->priv->is_simple);
return;
}
@@ -1257,9 +1253,6 @@ 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");
@@ -1363,7 +1356,7 @@ import_assistant_construct (EImportAssistant *import_assistant)
static void
e_import_assistant_init (EImportAssistant *import_assistant)
{
- /* do nothing here */
+ import_assistant->priv = G_TYPE_INSTANCE_GET_PRIVATE (import_assistant, E_TYPE_IMPORT_ASSISTANT, EImportAssistantPrivate);
}
GtkWidget *
diff --git a/widgets/misc/e-online-button.c b/widgets/misc/e-online-button.c
index 10a838888a..643ebc418a 100644
--- a/widgets/misc/e-online-button.c
+++ b/widgets/misc/e-online-button.c
@@ -19,10 +19,6 @@
#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.")
@@ -101,7 +97,7 @@ online_button_dispose (GObject *object)
{
EOnlineButtonPrivate *priv;
- priv = E_ONLINE_BUTTON_GET_PRIVATE (object);
+ priv = E_ONLINE_BUTTON (object)->priv;
if (priv->image != NULL) {
g_object_unref (priv->image);
@@ -141,7 +137,7 @@ e_online_button_init (EOnlineButton *button)
{
GtkWidget *widget;
- button->priv = E_ONLINE_BUTTON_GET_PRIVATE (button);
+ button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button, E_TYPE_ONLINE_BUTTON, EOnlineButtonPrivate);
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 6af4b466c8..f184244203 100644
--- a/widgets/misc/e-paned.c
+++ b/widgets/misc/e-paned.c
@@ -24,10 +24,6 @@
#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
@@ -217,7 +213,7 @@ paned_realize (GtkWidget *widget)
GdkWindowState state;
GdkWindow *window;
- priv = E_PANED_GET_PRIVATE (widget);
+ priv = E_PANED (widget)->priv;
/* Chain up to parent's realize() method. */
GTK_WIDGET_CLASS (e_paned_parent_class)->realize (widget);
@@ -351,7 +347,7 @@ e_paned_class_init (EPanedClass *class)
static void
e_paned_init (EPaned *paned)
{
- paned->priv = E_PANED_GET_PRIVATE (paned);
+ paned->priv = G_TYPE_INSTANCE_GET_PRIVATE (paned, E_TYPE_PANED, EPanedPrivate);
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 084a6f49a0..dcbbe61c09 100644
--- a/widgets/misc/e-picture-gallery.c
+++ b/widgets/misc/e-picture-gallery.c
@@ -23,10 +23,6 @@
#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;
@@ -406,7 +402,7 @@ e_picture_gallery_class_init (EPictureGalleryClass *class)
static void
e_picture_gallery_init (EPictureGallery *gallery)
{
- gallery->priv = E_PICTURE_GALLERY_GET_PRIVATE (gallery);
+ gallery->priv = G_TYPE_INSTANCE_GET_PRIVATE (gallery, E_TYPE_PICTURE_GALLERY, EPictureGalleryPrivate);
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 99e1994010..a27137c289 100644
--- a/widgets/misc/e-popup-action.c
+++ b/widgets/misc/e-popup-action.c
@@ -23,10 +23,6 @@
#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,
@@ -197,7 +193,7 @@ popup_action_dispose (GObject *object)
{
EPopupActionPrivate *priv;
- priv = E_POPUP_ACTION_GET_PRIVATE (object);
+ priv = E_POPUP_ACTION (object)->priv;
if (priv->related_action != NULL) {
g_signal_handler_disconnect (
@@ -334,7 +330,7 @@ e_popup_action_class_init (EPopupActionClass *class)
static void
e_popup_action_init (EPopupAction *popup_action)
{
- popup_action->priv = E_POPUP_ACTION_GET_PRIVATE (popup_action);
+ popup_action->priv = G_TYPE_INSTANCE_GET_PRIVATE (popup_action, E_TYPE_POPUP_ACTION, EPopupActionPrivate);
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 9b6d7266fc..7c58061642 100644
--- a/widgets/misc/e-preferences-window.c
+++ b/widgets/misc/e-preferences-window.c
@@ -27,10 +27,6 @@
#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;
@@ -165,7 +161,7 @@ preferences_window_dispose (GObject *object)
{
EPreferencesWindowPrivate *priv;
- priv = E_PREFERENCES_WINDOW_GET_PRIVATE (object);
+ priv = E_PREFERENCES_WINDOW (object)->priv;
if (priv->icon_view != NULL) {
g_object_unref (priv->icon_view);
@@ -193,7 +189,7 @@ preferences_window_finalize (GObject *object)
{
EPreferencesWindowPrivate *priv;
- priv = E_PREFERENCES_WINDOW_GET_PRIVATE (object);
+ priv = E_PREFERENCES_WINDOW (object)->priv;
g_hash_table_destroy (priv->index);
@@ -208,7 +204,7 @@ preferences_window_show (GtkWidget *widget)
GtkIconView *icon_view;
GtkTreePath *path;
- priv = E_PREFERENCES_WINDOW_GET_PRIVATE (widget);
+ priv = E_PREFERENCES_WINDOW (widget)->priv;
if (!priv->setup)
g_warning ("Preferences window has not been setup correctly");
@@ -258,7 +254,7 @@ e_preferences_window_init (EPreferencesWindow *window)
(GDestroyNotify) g_free,
(GDestroyNotify) gtk_tree_row_reference_free);
- window->priv = E_PREFERENCES_WINDOW_GET_PRIVATE (window);
+ window->priv = G_TYPE_INSTANCE_GET_PRIVATE (window, E_TYPE_PREFERENCES_WINDOW, EPreferencesWindowPrivate);
window->priv->index = index;
window->priv->filter_view = NULL;
@@ -511,7 +507,7 @@ e_preferences_window_setup (EPreferencesWindow *window)
g_return_if_fail (E_IS_PREFERENCES_WINDOW (window));
- priv = E_PREFERENCES_WINDOW_GET_PRIVATE (window);
+ priv = window->priv;
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 8cc1612129..b65d1a79ff 100644
--- a/widgets/misc/e-preview-pane.c
+++ b/widgets/misc/e-preview-pane.c
@@ -23,10 +23,6 @@
#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;
@@ -105,7 +101,7 @@ preview_pane_dispose (GObject *object)
{
EPreviewPanePrivate *priv;
- priv = E_PREVIEW_PANE_GET_PRIVATE (object);
+ priv = E_PREVIEW_PANE (object)->priv;
if (priv->search_bar != NULL) {
g_object_unref (priv->search_bar);
@@ -127,7 +123,7 @@ preview_pane_constructed (GObject *object)
EPreviewPanePrivate *priv;
GtkWidget *widget;
- priv = E_PREVIEW_PANE_GET_PRIVATE (object);
+ priv = E_PREVIEW_PANE (object)->priv;
widget = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (
@@ -215,7 +211,7 @@ e_preview_pane_class_init (EPreviewPaneClass *class)
static void
e_preview_pane_init (EPreviewPane *preview_pane)
{
- preview_pane->priv = E_PREVIEW_PANE_GET_PRIVATE (preview_pane);
+ preview_pane->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview_pane, E_TYPE_PREVIEW_PANE, EPreviewPanePrivate);
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 59476a61e1..0f83fd9683 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -25,10 +25,6 @@
#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;
@@ -314,7 +310,7 @@ search_bar_dispose (GObject *object)
{
ESearchBarPrivate *priv;
- priv = E_SEARCH_BAR_GET_PRIVATE (object);
+ priv = E_SEARCH_BAR (object)->priv;
if (priv->web_view != NULL) {
g_object_unref (priv->web_view);
@@ -360,7 +356,7 @@ search_bar_finalize (GObject *object)
{
ESearchBarPrivate *priv;
- priv = E_SEARCH_BAR_GET_PRIVATE (object);
+ priv = E_SEARCH_BAR (object)->priv;
g_free (priv->active_search);
@@ -373,7 +369,7 @@ search_bar_constructed (GObject *object)
{
ESearchBarPrivate *priv;
- priv = E_SEARCH_BAR_GET_PRIVATE (object);
+ priv = E_SEARCH_BAR (object)->priv;
g_object_bind_property (
object, "case-sensitive",
@@ -535,7 +531,7 @@ e_search_bar_init (ESearchBar *search_bar)
GtkWidget *widget;
GtkWidget *container;
- search_bar->priv = E_SEARCH_BAR_GET_PRIVATE (search_bar);
+ search_bar->priv = G_TYPE_INSTANCE_GET_PRIVATE (search_bar, E_TYPE_SEARCH_BAR, ESearchBarPrivate);
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 b2581799c1..087551fc76 100644
--- a/widgets/misc/e-searching-tokenizer.c
+++ b/widgets/misc/e-searching-tokenizer.c
@@ -37,10 +37,6 @@
#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
@@ -943,7 +939,7 @@ searching_tokenizer_finalize (GObject *object)
{
ESearchingTokenizerPrivate *priv;
- priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (object);
+ priv = E_SEARCHING_TOKENIZER (object)->priv;
search_info_free (priv->primary);
search_info_free (priv->secondary);
@@ -961,7 +957,7 @@ searching_tokenizer_begin (HTMLTokenizer *tokenizer,
{
ESearchingTokenizerPrivate *priv;
- priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer);
+ priv = E_SEARCHING_TOKENIZER (tokenizer)->priv;
/* reset search */
if (priv->engine != NULL) {
@@ -985,7 +981,7 @@ searching_tokenizer_peek_token (HTMLTokenizer *tokenizer)
{
ESearchingTokenizerPrivate *priv;
- priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer);
+ priv = E_SEARCHING_TOKENIZER (tokenizer)->priv;
if (priv->engine != NULL)
return searcher_peek_token (priv->engine);
@@ -1002,7 +998,7 @@ searching_tokenizer_next_token (HTMLTokenizer *tokenizer)
gint oldmatched;
gchar *token;
- priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer);
+ priv = E_SEARCHING_TOKENIZER (tokenizer)->priv;
/* If no search is active, just use the default method. */
if (priv->engine == NULL)
@@ -1026,7 +1022,7 @@ searching_tokenizer_has_more (HTMLTokenizer *tokenizer)
{
ESearchingTokenizerPrivate *priv;
- priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer);
+ priv = E_SEARCHING_TOKENIZER (tokenizer)->priv;
return (priv->engine != NULL && searcher_pending (priv->engine)) ||
HTML_TOKENIZER_CLASS (e_searching_tokenizer_parent_class)->
@@ -1084,7 +1080,7 @@ e_searching_tokenizer_class_init (ESearchingTokenizerClass *class)
static void
e_searching_tokenizer_init (ESearchingTokenizer *tokenizer)
{
- tokenizer->priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer);
+ tokenizer->priv = G_TYPE_INSTANCE_GET_PRIVATE (tokenizer, E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizerPrivate);
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 e24cb14b7a..63d0b53a8a 100644
--- a/widgets/misc/e-signature-combo-box.c
+++ b/widgets/misc/e-signature-combo-box.c
@@ -27,10 +27,6 @@
#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
@@ -162,7 +158,7 @@ signature_combo_box_dispose (GObject *object)
{
ESignatureComboBoxPrivate *priv;
- priv = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (object);
+ priv = E_SIGNATURE_COMBO_BOX (object)->priv;
if (priv->signature_list != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -183,7 +179,7 @@ signature_combo_box_finalize (GObject *object)
{
ESignatureComboBoxPrivate *priv;
- priv = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (object);
+ priv = E_SIGNATURE_COMBO_BOX (object)->priv;
g_hash_table_destroy (priv->index);
@@ -223,7 +219,7 @@ e_signature_combo_box_init (ESignatureComboBox *combo_box)
(GDestroyNotify) g_object_unref,
(GDestroyNotify) gtk_tree_row_reference_free);
- combo_box->priv = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (combo_box);
+ combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box, E_TYPE_SIGNATURE_COMBO_BOX, ESignatureComboBoxPrivate);
combo_box->priv->index = index;
}
@@ -252,7 +248,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 = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (combo_box);
+ priv = combo_box->priv;
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 fcc76c8cb9..30f432d637 100644
--- a/widgets/misc/e-signature-editor.c
+++ b/widgets/misc/e-signature-editor.c
@@ -29,10 +29,6 @@
#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,
@@ -283,7 +279,7 @@ signature_editor_dispose (GObject *object)
{
ESignatureEditorPrivate *priv;
- priv = E_SIGNATURE_EDITOR_GET_PRIVATE (object);
+ priv = E_SIGNATURE_EDITOR (object)->priv;
if (priv->action_group != NULL) {
g_object_unref (priv->action_group);
@@ -314,7 +310,7 @@ signature_editor_finalize (GObject *object)
{
ESignatureEditorPrivate *priv;
- priv = E_SIGNATURE_EDITOR_GET_PRIVATE (object);
+ priv = E_SIGNATURE_EDITOR (object)->priv;
g_free (priv->original_name);
@@ -400,7 +396,7 @@ e_signature_editor_init (ESignatureEditor *editor)
GtkWidget *vbox;
GError *error = NULL;
- editor->priv = E_SIGNATURE_EDITOR_GET_PRIVATE (editor);
+ editor->priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, E_TYPE_SIGNATURE_EDITOR, ESignatureEditorPrivate);
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 f7529d37e4..f5c7dd21fb 100644
--- a/widgets/misc/e-signature-manager.c
+++ b/widgets/misc/e-signature-manager.c
@@ -27,10 +27,6 @@
#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;
@@ -234,7 +230,7 @@ signature_manager_dispose (GObject *object)
{
ESignatureManagerPrivate *priv;
- priv = E_SIGNATURE_MANAGER_GET_PRIVATE (object);
+ priv = E_SIGNATURE_MANAGER (object)->priv;
if (priv->signature_list != NULL) {
g_object_unref (priv->signature_list);
@@ -505,7 +501,7 @@ e_signature_manager_init (ESignatureManager *manager)
GtkWidget *container;
GtkWidget *widget;
- manager->priv = E_SIGNATURE_MANAGER_GET_PRIVATE (manager);
+ manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, E_TYPE_SIGNATURE_MANAGER, ESignatureManagerPrivate);
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 af266dd5b3..ec4370bbc3 100644
--- a/widgets/misc/e-signature-preview.c
+++ b/widgets/misc/e-signature-preview.c
@@ -27,10 +27,6 @@
#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,
@@ -105,7 +101,7 @@ signature_preview_dispose (GObject *object)
{
ESignaturePreviewPrivate *priv;
- priv = E_SIGNATURE_PREVIEW_GET_PRIVATE (object);
+ priv = E_SIGNATURE_PREVIEW (object)->priv;
if (priv->signature != NULL) {
g_object_unref (priv->signature);
@@ -215,7 +211,7 @@ e_signature_preview_class_init (ESignaturePreviewClass *class)
static void
e_signature_preview_init (ESignaturePreview *preview)
{
- preview->priv = E_SIGNATURE_PREVIEW_GET_PRIVATE (preview);
+ preview->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview, E_TYPE_SIGNATURE_PREVIEW, ESignaturePreviewPrivate);
}
GtkWidget *
diff --git a/widgets/misc/e-signature-script-dialog.c b/widgets/misc/e-signature-script-dialog.c
index 1364737735..1977526db1 100644
--- a/widgets/misc/e-signature-script-dialog.c
+++ b/widgets/misc/e-signature-script-dialog.c
@@ -23,10 +23,6 @@
#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;
@@ -144,7 +140,7 @@ signature_script_dialog_dispose (GObject *object)
{
ESignatureScriptDialogPrivate *priv;
- priv = E_SIGNATURE_SCRIPT_DIALOG_GET_PRIVATE (object);
+ priv = E_SIGNATURE_SCRIPT_DIALOG (object)->priv;
if (priv->entry != NULL) {
g_object_unref (priv->entry);
@@ -230,7 +226,7 @@ e_signature_script_dialog_init (ESignatureScriptDialog *dialog)
GtkWidget *widget;
gchar *markup;
- dialog->priv = E_SIGNATURE_SCRIPT_DIALOG_GET_PRIVATE (dialog);
+ dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog, E_TYPE_SIGNATURE_SCRIPT_DIALOG, ESignatureScriptDialogPrivate);
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 9d27ec1929..0c8cd626f9 100644
--- a/widgets/misc/e-signature-tree-view.c
+++ b/widgets/misc/e-signature-tree-view.c
@@ -21,10 +21,6 @@
#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
@@ -215,7 +211,7 @@ signature_tree_view_dispose (GObject *object)
{
ESignatureTreeViewPrivate *priv;
- priv = E_SIGNATURE_TREE_VIEW_GET_PRIVATE (object);
+ priv = E_SIGNATURE_TREE_VIEW (object)->priv;
if (priv->signature_list != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -236,7 +232,7 @@ signature_tree_view_finalize (GObject *object)
{
ESignatureTreeViewPrivate *priv;
- priv = E_SIGNATURE_TREE_VIEW_GET_PRIVATE (object);
+ priv = E_SIGNATURE_TREE_VIEW (object)->priv;
g_hash_table_destroy (priv->index);
@@ -300,7 +296,7 @@ e_signature_tree_view_init (ESignatureTreeView *tree_view)
(GDestroyNotify) g_object_unref,
(GDestroyNotify) gtk_tree_row_reference_free);
- tree_view->priv = E_SIGNATURE_TREE_VIEW_GET_PRIVATE (tree_view);
+ tree_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (tree_view, E_TYPE_SIGNATURE_TREE_VIEW, ESignatureTreeViewPrivate);
tree_view->priv->index = index;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
@@ -336,7 +332,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 = E_SIGNATURE_TREE_VIEW_GET_PRIVATE (tree_view);
+ priv = tree_view->priv;
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 c21fee95db..8e44db729f 100644
--- a/widgets/misc/e-web-view-preview.c
+++ b/widgets/misc/e-web-view-preview.c
@@ -25,10 +25,6 @@
#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 */
@@ -97,7 +93,7 @@ web_view_preview_dispose (GObject *object)
{
EWebViewPreviewPrivate *priv;
- priv = E_WEB_VIEW_PREVIEW_GET_PRIVATE (object);
+ priv = E_WEB_VIEW_PREVIEW (object)->priv;
if (priv->updating_content != NULL) {
g_string_free (priv->updating_content, TRUE);
@@ -172,11 +168,9 @@ static void
e_web_view_preview_init (EWebViewPreview *preview)
{
GtkWidget *tree_view_sw, *web_view_sw;
- EWebViewPreviewPrivate *priv;
- priv = E_WEB_VIEW_PREVIEW_GET_PRIVATE (preview);
- preview->priv = priv;
- priv->escape_values = TRUE;
+ preview->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview, E_TYPE_WEB_VIEW_PREVIEW, EWebViewPreviewPrivate);
+ preview->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 afc0476ad5..d227a720ad 100644
--- a/widgets/misc/e-web-view.c
+++ b/widgets/misc/e-web-view.c
@@ -34,10 +34,6 @@
#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 {
@@ -674,7 +670,7 @@ web_view_dispose (GObject *object)
{
EWebViewPrivate *priv;
- priv = E_WEB_VIEW_GET_PRIVATE (object);
+ priv = E_WEB_VIEW (object)->priv;
if (priv->ui_manager != NULL) {
g_object_unref (priv->ui_manager);
@@ -715,7 +711,7 @@ web_view_finalize (GObject *object)
{
EWebViewPrivate *priv;
- priv = E_WEB_VIEW_GET_PRIVATE (object);
+ priv = E_WEB_VIEW (object)->priv;
/* All URI requests should be complete or cancelled by now. */
if (priv->requests != NULL)
@@ -1362,7 +1358,7 @@ e_web_view_init (EWebView *web_view)
const gchar *id;
GError *error = NULL;
- web_view->priv = E_WEB_VIEW_GET_PRIVATE (web_view);
+ web_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (web_view, E_TYPE_WEB_VIEW, EWebViewPrivate);
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 ae7fcc703b..3d514c40e4 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -38,10 +38,6 @@
#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;
@@ -100,7 +96,7 @@ cell_toggle_dispose (GObject *object)
{
ECellTogglePrivate *priv;
- priv = E_CELL_TOGGLE_GET_PRIVATE (object);
+ priv = E_CELL_TOGGLE (object)->priv;
if (priv->empty != NULL) {
g_object_unref (priv->empty);
@@ -120,7 +116,7 @@ cell_toggle_finalize (GObject *object)
ECellTogglePrivate *priv;
guint ii;
- priv = E_CELL_TOGGLE_GET_PRIVATE (object);
+ priv = E_CELL_TOGGLE (object)->priv;
/* The array is not NULL-terminated,
* so g_strfreev() will not work. */
@@ -187,7 +183,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_GET_PRIVATE (ecell_view->ecell);
+ priv = E_CELL_TOGGLE (ecell_view->ecell)->priv;
if (value < 0 || value >= priv->pixbufs->len) {
g_warning ("Value from the table model is %d, the states we support are [0..%d)\n",
@@ -222,7 +218,7 @@ etog_set_value (ECellToggleView *toggle_view,
{
ECellTogglePrivate *priv;
- priv = E_CELL_TOGGLE_GET_PRIVATE (toggle_view->cell_view.ecell);
+ priv = E_CELL_TOGGLE (toggle_view->cell_view.ecell)->priv;
if (value >= priv->pixbufs->len)
value = 0;
@@ -270,7 +266,7 @@ cell_toggle_height (ECellView *ecell_view,
{
ECellTogglePrivate *priv;
- priv = E_CELL_TOGGLE_GET_PRIVATE (ecell_view->ecell);
+ priv = E_CELL_TOGGLE (ecell_view->ecell)->priv;
return priv->height;
}
@@ -292,7 +288,7 @@ cell_toggle_print (ECellView *ecell_view,
cairo_t *cr;
- priv = E_CELL_TOGGLE_GET_PRIVATE (ecell_view->ecell);
+ priv = E_CELL_TOGGLE (ecell_view->ecell)->priv;
if (value >= priv->pixbufs->len) {
g_warning ("Value from the table model is %d, the states we support are [0..%d)\n",
@@ -328,7 +324,7 @@ cell_toggle_print_height (ECellView *ecell_view,
{
ECellTogglePrivate *priv;
- priv = E_CELL_TOGGLE_GET_PRIVATE (ecell_view->ecell);
+ priv = E_CELL_TOGGLE (ecell_view->ecell)->priv;
return priv->height;
}
@@ -343,7 +339,7 @@ cell_toggle_max_width (ECellView *ecell_view,
gint number_of_rows;
gint row;
- priv = E_CELL_TOGGLE_GET_PRIVATE (ecell_view->ecell);
+ priv = E_CELL_TOGGLE (ecell_view->ecell)->priv;
number_of_rows = e_table_model_row_count (ecell_view->e_table_model);
for (row = 0; row < number_of_rows; row++) {
@@ -390,7 +386,7 @@ e_cell_toggle_class_init (ECellToggleClass *class)
static void
e_cell_toggle_init (ECellToggle *cell_toggle)
{
- cell_toggle->priv = E_CELL_TOGGLE_GET_PRIVATE (cell_toggle);
+ cell_toggle->priv = G_TYPE_INSTANCE_GET_PRIVATE (cell_toggle, E_TYPE_CELL_TOGGLE, ECellTogglePrivate);
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 f6dc1118da..c2fc291c3a 100644
--- a/widgets/table/e-table-extras.c
+++ b/widgets/table/e-table-extras.c
@@ -41,10 +41,6 @@
#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;
@@ -61,7 +57,7 @@ ete_finalize (GObject *object)
{
ETableExtrasPrivate *priv;
- priv = E_TABLE_EXTRAS_GET_PRIVATE (object);
+ priv = E_TABLE_EXTRAS (object)->priv;
if (priv->cells) {
g_hash_table_destroy (priv->cells);
@@ -234,7 +230,7 @@ ete_init (ETableExtras *extras)
{
ECell *cell, *sub_cell;
- extras->priv = E_TABLE_EXTRAS_GET_PRIVATE (extras);
+ extras->priv = G_TYPE_INSTANCE_GET_PRIVATE (extras, E_TYPE_TABLE_EXTRAS, ETableExtrasPrivate);
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 5a0263b308..37816c8a18 100644
--- a/widgets/table/e-table-memory-store.c
+++ b/widgets/table/e-table-memory-store.c
@@ -28,10 +28,6 @@
#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 {
@@ -230,7 +226,7 @@ etms_finalize (GObject *object)
{
ETableMemoryStorePrivate *priv;
- priv = E_TABLE_MEMORY_STORE_GET_PRIVATE (object);
+ priv = E_TABLE_MEMORY_STORE (object)->priv;
e_table_memory_store_clear (E_TABLE_MEMORY_STORE (object));
@@ -244,7 +240,7 @@ etms_finalize (GObject *object)
static void
e_table_memory_store_init (ETableMemoryStore *etms)
{
- etms->priv = E_TABLE_MEMORY_STORE_GET_PRIVATE (etms);
+ etms->priv = G_TYPE_INSTANCE_GET_PRIVATE (etms, E_TYPE_TABLE_MEMORY_STORE, ETableMemoryStorePrivate);
}
static void
diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c
index 0c0237531b..d55aa04b51 100644
--- a/widgets/table/e-table-memory.c
+++ b/widgets/table/e-table-memory.c
@@ -37,10 +37,6 @@
#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 {
@@ -54,7 +50,7 @@ etmm_finalize (GObject *object)
{
ETableMemoryPrivate *priv;
- priv = E_TABLE_MEMORY_GET_PRIVATE (object);
+ priv = E_TABLE_MEMORY (object)->priv;
g_free (priv->data);
@@ -88,7 +84,7 @@ e_table_memory_class_init (ETableMemoryClass *class)
static void
e_table_memory_init (ETableMemory *etmm)
{
- etmm->priv = E_TABLE_MEMORY_GET_PRIVATE (etmm);
+ etmm->priv = G_TYPE_INSTANCE_GET_PRIVATE (etmm, E_TYPE_TABLE_MEMORY, ETableMemoryPrivate);
}
/**
diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c
index 10ed919571..23e8cdf002 100644
--- a/widgets/table/e-table-search.c
+++ b/widgets/table/e-table-search.c
@@ -30,10 +30,6 @@
#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 {
@@ -112,7 +108,7 @@ e_table_search_finalize (GObject *object)
{
ETableSearchPrivate *priv;
- priv = E_TABLE_SEARCH_GET_PRIVATE (object);
+ priv = E_TABLE_SEARCH (object)->priv;
drop_timeout (E_TABLE_SEARCH (object));
@@ -157,7 +153,7 @@ e_table_search_class_init (ETableSearchClass *class)
static void
e_table_search_init (ETableSearch *ets)
{
- ets->priv = E_TABLE_SEARCH_GET_PRIVATE (ets);
+ ets->priv = G_TYPE_INSTANCE_GET_PRIVATE (ets, E_TYPE_TABLE_SEARCH, ETableSearchPrivate);
ets->priv->search_string = g_strdup ("");
}
diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c
index 881c21bf16..54e733fdad 100644
--- a/widgets/table/e-table-without.c
+++ b/widgets/table/e-table-without.c
@@ -30,10 +30,6 @@
#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)
@@ -141,7 +137,7 @@ etw_dispose (GObject *object)
{
ETableWithoutPrivate *priv;
- priv = E_TABLE_WITHOUT_GET_PRIVATE (object);
+ priv = E_TABLE_WITHOUT (object)->priv;
if (priv->hash != NULL) {
g_hash_table_foreach (priv->hash, delete_hash_element, object);
@@ -252,7 +248,7 @@ etw_class_init (ETableWithoutClass *class)
static void
etw_init (ETableWithout *etw)
{
- etw->priv = E_TABLE_WITHOUT_GET_PRIVATE (etw);
+ etw->priv = G_TYPE_INSTANCE_GET_PRIVATE (etw, E_TYPE_TABLE_WITHOUT, ETableWithoutPrivate);
}
ETableModel *
diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c
index bb26fa773f..5c7b8f46d2 100644
--- a/widgets/table/e-tree-memory.c
+++ b/widgets/table/e-tree-memory.c
@@ -37,10 +37,6 @@
#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 {
@@ -221,7 +217,7 @@ etmm_dispose (GObject *object)
{
ETreeMemoryPrivate *priv;
- priv = E_TREE_MEMORY_GET_PRIVATE (object);
+ priv = E_TREE_MEMORY (object)->priv;
if (priv->root)
e_tree_memory_node_remove (
@@ -393,7 +389,7 @@ e_tree_memory_class_init (ETreeMemoryClass *class)
static void
e_tree_memory_init (ETreeMemory *etmm)
{
- etmm->priv = E_TREE_MEMORY_GET_PRIVATE (etmm);
+ etmm->priv = G_TYPE_INSTANCE_GET_PRIVATE (etmm, E_TYPE_TREE_MEMORY, ETreeMemoryPrivate);
}
/**
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index cd438a77e2..18ec388530 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -29,10 +29,6 @@
#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)
@@ -290,7 +286,7 @@ etsm_finalize (GObject *object)
{
ETreeSelectionModelPrivate *priv;
- priv = E_TREE_SELECTION_MODEL_GET_PRIVATE (object);
+ priv = E_TREE_SELECTION_MODEL (object)->priv;
clear_selection (E_TREE_SELECTION_MODEL (object));
g_hash_table_destroy (priv->paths);
@@ -745,7 +741,7 @@ e_tree_selection_model_get_cursor (ETreeSelectionModel *etsm)
static void
e_tree_selection_model_init (ETreeSelectionModel *etsm)
{
- etsm->priv = E_TREE_SELECTION_MODEL_GET_PRIVATE (etsm);
+ etsm->priv = G_TYPE_INSTANCE_GET_PRIVATE (etsm, E_TYPE_TREE_SELECTION_MODEL, ETreeSelectionModelPrivate);
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 40b10c0dec..5b5bc80f24 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -48,10 +48,6 @@
#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 {
@@ -588,7 +584,7 @@ ets_dispose (GObject *object)
{
ETreeSortedPrivate *priv;
- priv = E_TREE_SORTED_GET_PRIVATE (object);
+ priv = E_TREE_SORTED (object)->priv;
if (priv->source) {
g_signal_handler_disconnect (
@@ -654,7 +650,7 @@ ets_finalize (GObject *object)
{
ETreeSortedPrivate *priv;
- priv = E_TREE_SORTED_GET_PRIVATE (object);
+ priv = E_TREE_SORTED (object)->priv;
if (priv->root)
free_path (priv->root);
@@ -1207,7 +1203,7 @@ e_tree_sorted_class_init (ETreeSortedClass *class)
static void
e_tree_sorted_init (ETreeSorted *ets)
{
- ets->priv = E_TREE_SORTED_GET_PRIVATE (ets);
+ ets->priv = G_TYPE_INSTANCE_GET_PRIVATE (ets, E_TYPE_TREE_SORTED, ETreeSortedPrivate);
}
/**
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index 4ca80d97a0..bbeed6ee38 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -38,10 +38,6 @@
#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)
@@ -514,7 +510,7 @@ etta_finalize (GObject *object)
{
ETreeTableAdapterPrivate *priv;
- priv = E_TREE_TABLE_ADAPTER_GET_PRIVATE (object);
+ priv = E_TREE_TABLE_ADAPTER (object)->priv;
if (priv->resort_idle_id) {
g_source_remove (priv->resort_idle_id);
@@ -539,7 +535,7 @@ etta_dispose (GObject *object)
{
ETreeTableAdapterPrivate *priv;
- priv = E_TREE_TABLE_ADAPTER_GET_PRIVATE (object);
+ priv = E_TREE_TABLE_ADAPTER (object)->priv;
if (priv->sort_info) {
g_signal_handler_disconnect (
@@ -747,7 +743,7 @@ etta_class_init (ETreeTableAdapterClass *class)
static void
etta_init (ETreeTableAdapter *etta)
{
- etta->priv = E_TREE_TABLE_ADAPTER_GET_PRIVATE (etta);
+ etta->priv = G_TYPE_INSTANCE_GET_PRIVATE (etta, E_TYPE_TREE_TABLE_ADAPTER, ETreeTableAdapterPrivate);
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 fd5340dcad..dfbc3ccdce 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -56,10 +56,6 @@
#define d(x)
-#define E_TREE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_TREE, ETreePrivate))
-
enum {
CURSOR_CHANGE,
CURSOR_ACTIVATED,
@@ -387,7 +383,7 @@ et_dispose (GObject *object)
{
ETreePrivate *priv;
- priv = E_TREE_GET_PRIVATE (object);
+ priv = E_TREE (object)->priv;
if (priv->search != NULL) {
g_signal_handler_disconnect (
@@ -585,7 +581,7 @@ e_tree_init (ETree *e_tree)
gtk_table_set_homogeneous (GTK_TABLE (e_tree), FALSE);
- e_tree->priv = E_TREE_GET_PRIVATE (e_tree);
+ e_tree->priv = G_TYPE_INSTANCE_GET_PRIVATE (e_tree, E_TYPE_TREE, ETreePrivate);
e_tree->priv->alternating_row_colors = 1;
e_tree->priv->horizontal_draw_grid = 1;