diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
commit | 1301cf02efdacd20fb5ce3e2554ae15b8f146e8a (patch) | |
tree | 8d5f3985a82ec7d330af27ee0a29a79a2f0ecfa3 /calendar/gui/dialogs/comp-editor.c | |
parent | 1a4be6c521d674c4a60e54203521e2721b81b921 (diff) | |
download | gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.gz gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.zst gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.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) |