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/memo-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/memo-editor.c')
-rw-r--r-- | calendar/gui/dialogs/memo-editor.c | 12 |
1 files changed, 4 insertions, 8 deletions
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); |