aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:39 +0800
commitc003c99a75587ba39a45d164272760c33f9666b5 (patch)
treead6d0583fa9e8f078fb1c118f994371d2f1f79d8 /widgets
parentf55aaa5e00a40a137f403a8d5c68dd508059b0b4 (diff)
downloadgsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.gz
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.bz2
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.lz
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.xz
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.zst
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.zip
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'widgets')
-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
50 files changed, 159 insertions, 364 deletions
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;