aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
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 /addressbook
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 'addressbook')
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.c14
-rw-r--r--addressbook/gui/component/e-book-shell-view.c24
2 files changed, 15 insertions, 23 deletions
diff --git a/addressbook/gui/component/e-book-shell-view-private.c b/addressbook/gui/component/e-book-shell-view-private.c
index e2f23e8324..e8dca482a3 100644
--- a/addressbook/gui/component/e-book-shell-view-private.c
+++ b/addressbook/gui/component/e-book-shell-view-private.c
@@ -284,6 +284,9 @@ void
e_book_shell_view_private_init (EBookShellView *book_shell_view)
{
EBookShellViewPrivate *priv = book_shell_view->priv;
+ EShellContent *shell_content;
+ EShellSidebar *shell_sidebar;
+ EShellTaskbar *shell_taskbar;
EShellView *shell_view;
GHashTable *uid_to_view;
GHashTable *uid_to_editor;
@@ -312,20 +315,27 @@ e_book_shell_view_private_init (EBookShellView *book_shell_view)
/* Construct view widgets. */
widget = gtk_notebook_new ();
+ shell_content = e_shell_view_get_content (shell_view);
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE);
gtk_notebook_set_show_border (GTK_NOTEBOOK (widget), FALSE);
- priv->notebook = g_object_ref_sink (widget);
+ gtk_container_add (GTK_CONTAINER (shell_content), widget);
+ priv->notebook = g_object_ref (widget);
gtk_widget_show (widget);
widget = gtk_scrolled_window_new (NULL, NULL);
+ shell_sidebar = e_shell_view_get_sidebar (shell_view);
gtk_scrolled_window_set_policy (
GTK_SCROLLED_WINDOW (widget),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (
GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
- priv->scrolled_window = g_object_ref_sink (widget);
+ gtk_container_add (GTK_CONTAINER (shell_sidebar), widget);
gtk_widget_show (widget);
+ shell_taskbar = e_shell_view_get_taskbar (shell_view);
+ e_activity_handler_attach_task_bar (
+ priv->activity_handler, shell_taskbar);
+
container = widget;
widget = e_addressbook_selector_new (priv->source_list);
diff --git a/addressbook/gui/component/e-book-shell-view.c b/addressbook/gui/component/e-book-shell-view.c
index e383e8bb7b..218a0e9929 100644
--- a/addressbook/gui/component/e-book-shell-view.c
+++ b/addressbook/gui/component/e-book-shell-view.c
@@ -172,32 +172,14 @@ static void
book_shell_view_constructed (GObject *object)
{
EBookShellView *book_shell_view;
- EShellContent *shell_content;
- EShellSidebar *shell_sidebar;
- EShellTaskbar *shell_taskbar;
- 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);
book_shell_view = E_BOOK_SHELL_VIEW (object);
- widget = book_shell_view->priv->notebook;
- shell_content = e_shell_view_get_content (shell_view);
- gtk_container_add (GTK_CONTAINER (shell_content), widget);
-
- widget = book_shell_view->priv->scrolled_window;
- shell_sidebar = e_shell_view_get_sidebar (shell_view);
- gtk_container_add (GTK_CONTAINER (shell_sidebar), widget);
-
- shell_taskbar = e_shell_view_get_taskbar (shell_view);
- e_activity_handler_attach_task_bar (
- book_shell_view->priv->activity_handler, shell_taskbar);
-
e_book_shell_view_actions_init (book_shell_view);
e_book_shell_view_update_search_filter (book_shell_view);
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (parent_class)->constructed (object);
}
static void