aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-sidebar.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-09-09 10:53:40 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-09-09 10:53:40 +0800
commit935897c9a256e0d260adc1dd0dc56b1a5c760cd9 (patch)
tree5c9aab3145e9c8e60e8a2b18d6d7ef93e8bb1d8f /shell/e-shell-sidebar.c
parent5350eebb5ef8c07e69110616ce1662e0e92bea16 (diff)
downloadgsoc2013-evolution-935897c9a256e0d260adc1dd0dc56b1a5c760cd9.tar
gsoc2013-evolution-935897c9a256e0d260adc1dd0dc56b1a5c760cd9.tar.gz
gsoc2013-evolution-935897c9a256e0d260adc1dd0dc56b1a5c760cd9.tar.bz2
gsoc2013-evolution-935897c9a256e0d260adc1dd0dc56b1a5c760cd9.tar.lz
gsoc2013-evolution-935897c9a256e0d260adc1dd0dc56b1a5c760cd9.tar.xz
gsoc2013-evolution-935897c9a256e0d260adc1dd0dc56b1a5c760cd9.tar.zst
gsoc2013-evolution-935897c9a256e0d260adc1dd0dc56b1a5c760cd9.zip
Fix some bugs in the way the shell widgets get initialized.
svn path=/branches/kill-bonobo/; revision=36279
Diffstat (limited to 'shell/e-shell-sidebar.c')
-rw-r--r--shell/e-shell-sidebar.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c
index 4a83b3462a..560c20c278 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -201,12 +201,22 @@ shell_sidebar_finalize (GObject *object)
}
static void
-shell_sidebar_constructed (GObject *object)
+shell_sidebar_realize (GtkWidget *widget)
{
EShellSidebar *shell_sidebar;
- shell_sidebar = E_SHELL_SIDEBAR (object);
+ /* We can't call this during object construction because the
+ * shell view is still in its instance initialization phase,
+ * and so its GET_CLASS() macro won't work correctly. So we
+ * delay the bits of our own initialization that require the
+ * E_SHELL_VIEW_GET_CLASS() macro until after the shell view
+ * is fully constructed. */
+
+ shell_sidebar = E_SHELL_SIDEBAR (widget);
shell_sidebar_init_icon_and_text (shell_sidebar);
+
+ /* Chain up to parent's realize() method. */
+ GTK_WIDGET_CLASS (parent_class)->realize (widget);
}
static void
@@ -316,9 +326,9 @@ shell_sidebar_class_init (EShellSidebarClass *class)
object_class->get_property = shell_sidebar_get_property;
object_class->dispose = shell_sidebar_dispose;
object_class->finalize = shell_sidebar_finalize;
- object_class->constructed = shell_sidebar_constructed;
widget_class = GTK_WIDGET_CLASS (class);
+ widget_class->realize = shell_sidebar_realize;
widget_class->size_request = shell_sidebar_size_request;
widget_class->size_allocate = shell_sidebar_size_allocate;