From 23f5773903d64a554d977ae7d0ebbaca73528f1f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 30 Nov 2011 20:53:20 -0600 Subject: Coding style and whitespace cleanup. --- calendar/gui/dialogs/memo-editor.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'calendar/gui/dialogs/memo-editor.c') diff --git a/calendar/gui/dialogs/memo-editor.c b/calendar/gui/dialogs/memo-editor.c index e7dd1e7f93..ae0d351618 100644 --- a/calendar/gui/dialogs/memo-editor.c +++ b/calendar/gui/dialogs/memo-editor.c @@ -38,6 +38,10 @@ #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; @@ -69,7 +73,7 @@ memo_editor_show_categories (CompEditor *editor, { MemoEditorPrivate *priv; - priv = MEMO_EDITOR (editor)->priv; + priv = MEMO_EDITOR_GET_PRIVATE (editor); memo_page_set_show_categories (priv->memo_page, visible); } @@ -79,7 +83,7 @@ memo_editor_dispose (GObject *object) { MemoEditorPrivate *priv; - priv = MEMO_EDITOR (object)->priv; + priv = MEMO_EDITOR_GET_PRIVATE (object); if (priv->memo_page) { g_object_unref (priv->memo_page); @@ -96,7 +100,7 @@ memo_editor_constructed (GObject *object) MemoEditorPrivate *priv; CompEditor *editor; - priv = MEMO_EDITOR (object)->priv; + priv = MEMO_EDITOR_GET_PRIVATE (object); editor = COMP_EDITOR (object); priv->memo_page = memo_page_new (editor); @@ -136,8 +140,7 @@ memo_editor_init (MemoEditor *me) const gchar *id; GError *error = NULL; - me->priv = G_TYPE_INSTANCE_GET_PRIVATE ( - me, TYPE_MEMO_EDITOR, MemoEditorPrivate); + me->priv = MEMO_EDITOR_GET_PRIVATE (me); me->priv->updating = FALSE; ui_manager = comp_editor_get_ui_manager (editor); -- cgit