aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/memo-page.c
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 /calendar/gui/dialogs/memo-page.c
parentf55aaa5e00a40a137f403a8d5c68dd508059b0b4 (diff)
downloadgsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.gz
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-page.c')
-rw-r--r--calendar/gui/dialogs/memo-page.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 03cf7e7b95..45b18a5982 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -54,10 +54,6 @@
#include "e-send-options-utils.h"
#include "memo-page.h"
-#define MEMO_PAGE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_MEMO_PAGE, MemoPagePrivate))
-
/* Private part of the MemoPage structure */
struct _MemoPagePrivate {
GtkBuilder *builder;
@@ -140,7 +136,7 @@ memo_page_dispose (GObject *object)
{
MemoPagePrivate *priv;
- priv = MEMO_PAGE_GET_PRIVATE (object);
+ priv = MEMO_PAGE (object)->priv;
g_list_foreach (priv->address_strings, (GFunc) g_free, NULL);
g_list_free (priv->address_strings);
@@ -154,7 +150,7 @@ memo_page_finalize (GObject *object)
{
MemoPagePrivate *priv;
- priv = MEMO_PAGE_GET_PRIVATE (object);
+ priv = MEMO_PAGE (object)->priv;
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -175,7 +171,7 @@ memo_page_finalize (GObject *object)
static GtkWidget *
memo_page_get_widget (CompEditorPage *page)
{
- MemoPagePrivate *priv = MEMO_PAGE_GET_PRIVATE (page);
+ MemoPagePrivate *priv = MEMO_PAGE (page)->priv;
return priv->main;
}
@@ -183,7 +179,7 @@ memo_page_get_widget (CompEditorPage *page)
static void
memo_page_focus_main_widget (CompEditorPage *page)
{
- MemoPagePrivate *priv = MEMO_PAGE_GET_PRIVATE (page);
+ MemoPagePrivate *priv = MEMO_PAGE (page)->priv;
gtk_widget_grab_focus (priv->summary_entry);
}
@@ -319,7 +315,7 @@ memo_page_class_init (MemoPageClass *class)
static void
memo_page_init (MemoPage *mpage)
{
- mpage->priv = MEMO_PAGE_GET_PRIVATE (mpage);
+ mpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (mpage, TYPE_MEMO_PAGE, MemoPagePrivate);
}
/* returns whether changed info text */