From e64d6fe05c30c2cc1d7625a202afba3ba2da07cd Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 22 Nov 2011 18:22:14 -0500 Subject: Miscellaneous cleanups. --- shell/e-shell-switcher.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'shell/e-shell-switcher.c') diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c index 77c1fd2929..3a72851f97 100644 --- a/shell/e-shell-switcher.c +++ b/shell/e-shell-switcher.c @@ -34,6 +34,10 @@ #include #include +#define E_SHELL_SWITCHER_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE \ + ((obj), E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate)) + #define H_PADDING 6 #define V_PADDING 6 @@ -235,7 +239,7 @@ shell_switcher_dispose (GObject *object) { EShellSwitcherPrivate *priv; - priv = E_SHELL_SWITCHER (object)->priv; + priv = E_SHELL_SWITCHER_GET_PRIVATE (object); while (priv->proxies != NULL) { GtkWidget *widget = priv->proxies->data; @@ -255,7 +259,7 @@ shell_switcher_get_preferred_width (GtkWidget *widget, GtkWidget *child; GList *iter; - priv = E_SHELL_SWITCHER (widget)->priv; + priv = E_SHELL_SWITCHER_GET_PRIVATE (widget); *minimum = *natural = 0; @@ -290,7 +294,7 @@ shell_switcher_get_preferred_height (GtkWidget *widget, GtkWidget *child; GList *iter; - priv = E_SHELL_SWITCHER (widget)->priv; + priv = E_SHELL_SWITCHER_GET_PRIVATE (widget); *minimum = *natural = 0; @@ -351,7 +355,7 @@ shell_switcher_screen_changed (GtkWidget *widget, EShellSwitcherPrivate *priv; GtkSettings *settings; - priv = E_SHELL_SWITCHER (widget)->priv; + priv = E_SHELL_SWITCHER_GET_PRIVATE (widget); if (gtk_widget_has_screen (widget)) settings = gtk_widget_get_settings (widget); @@ -386,7 +390,7 @@ shell_switcher_remove (GtkContainer *container, EShellSwitcherPrivate *priv; GList *link; - priv = E_SHELL_SWITCHER (container)->priv; + priv = E_SHELL_SWITCHER_GET_PRIVATE (container); /* Look in the internal widgets first. */ @@ -413,7 +417,7 @@ shell_switcher_forall (GtkContainer *container, { EShellSwitcherPrivate *priv; - priv = E_SHELL_SWITCHER (container)->priv; + priv = E_SHELL_SWITCHER_GET_PRIVATE (container); if (include_internals) g_list_foreach ( @@ -551,8 +555,7 @@ e_shell_switcher_class_init (EShellSwitcherClass *class) static void e_shell_switcher_init (EShellSwitcher *switcher) { - switcher->priv = G_TYPE_INSTANCE_GET_PRIVATE ( - switcher, E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate); + switcher->priv = E_SHELL_SWITCHER_GET_PRIVATE (switcher); gtk_widget_set_has_window (GTK_WIDGET (switcher), FALSE); -- cgit