aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-switcher.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-11-23 07:22:14 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-11-23 09:43:04 +0800
commite64d6fe05c30c2cc1d7625a202afba3ba2da07cd (patch)
treef99df204ecdd5629acdc9f7e7b00d1c0d7903d6d /shell/e-shell-switcher.c
parent2e60b6a4a21105bb4a1e2badd1be51b3e684d165 (diff)
downloadgsoc2013-evolution-e64d6fe05c30c2cc1d7625a202afba3ba2da07cd.tar
gsoc2013-evolution-e64d6fe05c30c2cc1d7625a202afba3ba2da07cd.tar.gz
gsoc2013-evolution-e64d6fe05c30c2cc1d7625a202afba3ba2da07cd.tar.bz2
gsoc2013-evolution-e64d6fe05c30c2cc1d7625a202afba3ba2da07cd.tar.lz
gsoc2013-evolution-e64d6fe05c30c2cc1d7625a202afba3ba2da07cd.tar.xz
gsoc2013-evolution-e64d6fe05c30c2cc1d7625a202afba3ba2da07cd.tar.zst
gsoc2013-evolution-e64d6fe05c30c2cc1d7625a202afba3ba2da07cd.zip
Miscellaneous cleanups.
Diffstat (limited to 'shell/e-shell-switcher.c')
-rw-r--r--shell/e-shell-switcher.c19
1 files changed, 11 insertions, 8 deletions
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 <glib/gi18n.h>
#include <libebackend/e-extensible.h>
+#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);