From 1301cf02efdacd20fb5ce3e2554ae15b8f146e8a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 25 Feb 2011 16:20:41 +0100 Subject: Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly --- calendar/gui/e-timezone-entry.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'calendar/gui/e-timezone-entry.c') diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c index c281a4aedf..56872ea870 100644 --- a/calendar/gui/e-timezone-entry.c +++ b/calendar/gui/e-timezone-entry.c @@ -33,10 +33,6 @@ #include #include "e-timezone-entry.h" -#define E_TIMEZONE_ENTRY_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_TIMEZONE_ENTRY, ETimezoneEntryPrivate)) - struct _ETimezoneEntryPrivate { /* The current timezone, set in e_timezone_entry_set_timezone() or from the timezone dialog. Note that we don't copy it or @@ -217,7 +213,7 @@ timezone_entry_mnemonic_activate (GtkWidget *widget, { ETimezoneEntryPrivate *priv; - priv = E_TIMEZONE_ENTRY_GET_PRIVATE (widget); + priv = E_TIMEZONE_ENTRY (widget)->priv; if (gtk_widget_get_can_focus (widget)) { if (priv->button != NULL) @@ -233,7 +229,7 @@ timezone_entry_focus (GtkWidget *widget, { ETimezoneEntryPrivate *priv; - priv = E_TIMEZONE_ENTRY_GET_PRIVATE (widget); + priv = E_TIMEZONE_ENTRY (widget)->priv; if (direction == GTK_DIR_TAB_FORWARD) { if (gtk_widget_has_focus (priv->entry)) @@ -302,7 +298,7 @@ e_timezone_entry_init (ETimezoneEntry *timezone_entry) AtkObject *a11y; GtkWidget *widget; - timezone_entry->priv = E_TIMEZONE_ENTRY_GET_PRIVATE (timezone_entry); + timezone_entry->priv = G_TYPE_INSTANCE_GET_PRIVATE (timezone_entry, E_TYPE_TIMEZONE_ENTRY, ETimezoneEntryPrivate); gtk_widget_set_can_focus (GTK_WIDGET (timezone_entry), TRUE); -- cgit v1.2.3