aboutsummaryrefslogtreecommitdiffstats
path: root/shell/test
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-09-10 01:29:09 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-09-10 01:29:09 +0800
commit2e83206b30fad6e108b4a393002c171df0474c9e (patch)
treef7160b2e5f7a1b7b4a7ebce1f47e8ef7bf124739 /shell/test
parent935897c9a256e0d260adc1dd0dc56b1a5c760cd9 (diff)
downloadgsoc2013-evolution-2e83206b30fad6e108b4a393002c171df0474c9e.tar
gsoc2013-evolution-2e83206b30fad6e108b4a393002c171df0474c9e.tar.gz
gsoc2013-evolution-2e83206b30fad6e108b4a393002c171df0474c9e.tar.bz2
gsoc2013-evolution-2e83206b30fad6e108b4a393002c171df0474c9e.tar.lz
gsoc2013-evolution-2e83206b30fad6e108b4a393002c171df0474c9e.tar.xz
gsoc2013-evolution-2e83206b30fad6e108b4a393002c171df0474c9e.tar.zst
gsoc2013-evolution-2e83206b30fad6e108b4a393002c171df0474c9e.zip
Fix some bootstrapping issues.
svn path=/branches/kill-bonobo/; revision=36291
Diffstat (limited to 'shell/test')
-rw-r--r--shell/test/e-test-shell-view.c45
1 files changed, 28 insertions, 17 deletions
diff --git a/shell/test/e-test-shell-view.c b/shell/test/e-test-shell-view.c
index ea771e0982..be2a747354 100644
--- a/shell/test/e-test-shell-view.c
+++ b/shell/test/e-test-shell-view.c
@@ -43,14 +43,42 @@ test_shell_view_changed (EShellView *shell_view)
}
static void
+test_shell_view_constructed (GObject *object)
+{
+ EShellContent *shell_content;
+ EShellSidebar *shell_sidebar;
+ EShellView *shell_view;
+ GtkWidget *widget;
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (parent_class)->constructed (object);
+
+ shell_view = E_SHELL_VIEW (object);
+ shell_content = e_shell_view_get_content (shell_view);
+ shell_sidebar = e_shell_view_get_sidebar (shell_view);
+
+ widget = gtk_label_new ("Content Widget");
+ gtk_container_add (GTK_CONTAINER (shell_content), widget);
+ gtk_widget_show (widget);
+
+ widget = gtk_label_new ("Sidebar Widget");
+ gtk_container_add (GTK_CONTAINER (shell_sidebar), widget);
+ gtk_widget_show (widget);
+}
+
+static void
test_shell_view_class_init (ETestShellViewClass *class,
GTypeModule *type_module)
{
+ GObjectClass *object_class;
EShellViewClass *shell_view_class;
parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (ETestShellViewPrivate));
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = test_shell_view_constructed;
+
shell_view_class = E_SHELL_VIEW_CLASS (class);
shell_view_class->label = "Test";
shell_view_class->icon_name = "face-monkey";
@@ -61,25 +89,8 @@ test_shell_view_class_init (ETestShellViewClass *class,
static void
test_shell_view_init (ETestShellView *test_shell_view)
{
- EShellContent *shell_content;
- EShellSidebar *shell_sidebar;
- EShellView *shell_view;
- GtkWidget *widget;
-
test_shell_view->priv =
E_TEST_SHELL_VIEW_GET_PRIVATE (test_shell_view);
-
- shell_view = E_SHELL_VIEW (test_shell_view);
- shell_content = e_shell_view_get_content (shell_view);
- shell_sidebar = e_shell_view_get_sidebar (shell_view);
-
- widget = gtk_label_new ("Content Widget");
- gtk_container_add (GTK_CONTAINER (shell_content), widget);
- gtk_widget_show (widget);
-
- widget = gtk_label_new ("Sidebar Widget");
- gtk_container_add (GTK_CONTAINER (shell_sidebar), widget);
- gtk_widget_show (widget);
}
GType