diff options
Diffstat (limited to 'shell/e-shell-sidebar.c')
-rw-r--r-- | shell/e-shell-sidebar.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c index 62652dee1f..b7e523f733 100644 --- a/shell/e-shell-sidebar.c +++ b/shell/e-shell-sidebar.c @@ -37,6 +37,10 @@ #include <e-util/e-unicode.h> #include <shell/e-shell-view.h> +#define E_SHELL_SIDEBAR_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE \ + ((obj), E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate)) + struct _EShellSidebarPrivate { gpointer shell_view; /* weak pointer */ @@ -157,7 +161,7 @@ shell_sidebar_dispose (GObject *object) { EShellSidebarPrivate *priv; - priv = E_SHELL_SIDEBAR (object)->priv; + priv = E_SHELL_SIDEBAR_GET_PRIVATE (object); if (priv->shell_view != NULL) { g_object_remove_weak_pointer ( @@ -184,7 +188,7 @@ shell_sidebar_finalize (GObject *object) { EShellSidebarPrivate *priv; - priv = E_SHELL_SIDEBAR (object)->priv; + priv = E_SHELL_SIDEBAR_GET_PRIVATE (object); g_free (priv->icon_name); g_free (priv->primary_text); @@ -249,7 +253,7 @@ shell_sidebar_get_preferred_height (GtkWidget *widget, gint child_min, child_nat; GtkWidget *child; - priv = E_SHELL_SIDEBAR (widget)->priv; + priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget); child = gtk_bin_get_child (GTK_BIN (widget)); gtk_widget_get_preferred_height (child, minimum, natural); @@ -270,7 +274,7 @@ shell_sidebar_size_allocate (GtkWidget *widget, GtkRequisition child_requisition; GtkWidget *child; - priv = E_SHELL_SIDEBAR (widget)->priv; + priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget); gtk_widget_set_allocation (widget, allocation); @@ -301,7 +305,7 @@ shell_sidebar_forall (GtkContainer *container, { EShellSidebarPrivate *priv; - priv = E_SHELL_SIDEBAR (container)->priv; + priv = E_SHELL_SIDEBAR_GET_PRIVATE (container); if (include_internals && callback && priv->event_box) callback (priv->event_box, callback_data); @@ -434,8 +438,7 @@ e_shell_sidebar_init (EShellSidebar *shell_sidebar) const GdkColor *color; const gchar *icon_name; - shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE ( - shell_sidebar, E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate); + shell_sidebar->priv = E_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar); gtk_widget_set_has_window (GTK_WIDGET (shell_sidebar), FALSE); |