diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:39 +0800 |
commit | c003c99a75587ba39a45d164272760c33f9666b5 (patch) | |
tree | ad6d0583fa9e8f078fb1c118f994371d2f1f79d8 /calendar/gui/dialogs/comp-editor.c | |
parent | f55aaa5e00a40a137f403a8d5c68dd508059b0b4 (diff) | |
download | gsoc2013-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 'calendar/gui/dialogs/comp-editor.c')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 14 |
1 files changed, 5 insertions, 9 deletions
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) |