aboutsummaryrefslogtreecommitdiffstats
path: root/shell/test
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-09-05 23:47:38 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-09-05 23:47:38 +0800
commiteca687589d106ff87cd4fca7bf581cb0532caf96 (patch)
treec6832474edfc52edd323a7d8d3ee5726f2b83ae3 /shell/test
parent8bbf952350c37970e8947b807513e58e91435998 (diff)
downloadgsoc2013-evolution-eca687589d106ff87cd4fca7bf581cb0532caf96.tar.gz
gsoc2013-evolution-eca687589d106ff87cd4fca7bf581cb0532caf96.tar.zst
gsoc2013-evolution-eca687589d106ff87cd4fca7bf581cb0532caf96.zip
Saving progress. Lots of changes. Things are a bit broken at the moment.
svn path=/branches/kill-bonobo/; revision=36260
Diffstat (limited to 'shell/test')
-rw-r--r--shell/test/Makefile.am2
-rw-r--r--shell/test/e-test-shell-view.c85
2 files changed, 11 insertions, 76 deletions
diff --git a/shell/test/Makefile.am b/shell/test/Makefile.am
index e355da60c8..d1ddefa268 100644
--- a/shell/test/Makefile.am
+++ b/shell/test/Makefile.am
@@ -2,6 +2,8 @@ module_LTLIBRARIES = libevolution-test.la
INCLUDES = \
-I$(top_srcdir)/shell \
+ -I$(top_srcdir)/widgets \
+ -I$(top_srcdir)/widgets/menus \
-I$(top_srcdir)/widgets/misc \
-I$(top_builddir)/shell \
-DG_LOG_DOMAIN=\"evolution-test\" \
diff --git a/shell/test/e-test-shell-view.c b/shell/test/e-test-shell-view.c
index db008fafea..e88df99d96 100644
--- a/shell/test/e-test-shell-view.c
+++ b/shell/test/e-test-shell-view.c
@@ -25,71 +25,13 @@
((obj), E_TYPE_TEST_SHELL_VIEW, ETestShellViewPrivate))
struct _ETestShellViewPrivate {
- GtkWidget *content_widget;
- GtkWidget *sidebar_widget;
- GtkWidget *status_widget;
+ gint dummy;
};
GType e_test_shell_view_type = 0;
static gpointer parent_class;
static void
-test_shell_view_dispose (GObject *object)
-{
- ETestShellViewPrivate *priv;
-
- priv = E_TEST_SHELL_VIEW_GET_PRIVATE (object);
-
- if (priv->content_widget != NULL) {
- g_object_unref (priv->content_widget);
- priv->content_widget = NULL;
- }
-
- if (priv->sidebar_widget != NULL) {
- g_object_unref (priv->sidebar_widget);
- priv->sidebar_widget = NULL;
- }
-
- if (priv->status_widget != NULL) {
- g_object_unref (priv->status_widget);
- priv->status_widget = NULL;
- }
-
- /* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static GtkWidget *
-test_shell_view_get_content_widget (EShellView *shell_view)
-{
- ETestShellViewPrivate *priv;
-
- priv = E_TEST_SHELL_VIEW_GET_PRIVATE (shell_view);
-
- return priv->content_widget;
-}
-
-static GtkWidget *
-test_shell_view_get_sidebar_widget (EShellView *shell_view)
-{
- ETestShellViewPrivate *priv;
-
- priv = E_TEST_SHELL_VIEW_GET_PRIVATE (shell_view);
-
- return priv->sidebar_widget;
-}
-
-static GtkWidget *
-test_shell_view_get_status_widget (EShellView *shell_view)
-{
- ETestShellViewPrivate *priv;
-
- priv = E_TEST_SHELL_VIEW_GET_PRIVATE (shell_view);
-
- return priv->status_widget;
-}
-
-static void
test_shell_view_changed (EShellView *shell_view)
{
gboolean is_selected;
@@ -104,47 +46,38 @@ 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->dispose = test_shell_view_dispose;
-
shell_view_class = E_SHELL_VIEW_CLASS (class);
shell_view_class->label = "Test";
shell_view_class->icon_name = "face-monkey";
shell_view_class->type_module = type_module;
shell_view_class->changed = test_shell_view_changed;
-
- shell_view_class->get_content_widget =
- test_shell_view_get_content_widget;
- shell_view_class->get_sidebar_widget =
- test_shell_view_get_sidebar_widget;
- shell_view_class->get_status_widget =
- test_shell_view_get_status_widget;
}
static void
test_shell_view_init (ETestShellView *test_shell_view)
{
+ EShellView *shell_view;
+ GtkWidget *container;
GtkWidget *widget;
test_shell_view->priv =
E_TEST_SHELL_VIEW_GET_PRIVATE (test_shell_view);
+ shell_view = E_SHELL_VIEW (test_shell_view);
+
+ container = e_shell_view_get_content_widget (shell_view);
widget = gtk_label_new ("Content Widget");
- test_shell_view->priv->content_widget = g_object_ref_sink (widget);
+ gtk_container_add (GTK_CONTAINER (container), widget);
gtk_widget_show (widget);
+ container = e_shell_view_get_sidebar_widget (shell_view);
widget = gtk_label_new ("Sidebar Widget");
- test_shell_view->priv->sidebar_widget = g_object_ref_sink (widget);
- gtk_widget_show (widget);
-
- widget = gtk_label_new ("Status Widget");
- test_shell_view->priv->status_widget = g_object_ref_sink (widget);
+ gtk_container_add (GTK_CONTAINER (container), widget);
gtk_widget_show (widget);
}