diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-30 04:11:07 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-30 04:11:07 +0800 |
commit | d6b8b58bb45b16c1cb3a575c277ffdc77441e2df (patch) | |
tree | c80db345f4d3e05a1ee165b40c561f2649e574cb /shell/e-shell-window.c | |
parent | 5e82bdba14fba81603f3879a46b46a011db7d2e4 (diff) | |
download | gsoc2013-evolution-d6b8b58bb45b16c1cb3a575c277ffdc77441e2df.tar.gz gsoc2013-evolution-d6b8b58bb45b16c1cb3a575c277ffdc77441e2df.tar.zst gsoc2013-evolution-d6b8b58bb45b16c1cb3a575c277ffdc77441e2df.zip |
Get the calendar's memopad and taskpad working.
What's interesting here is we're actually sharing the ECalModel across views.
Instead of having the Calendar view listen to GConf for changes to the Task
and Memo models, the Calendar view fetches the models directly from the Task
and Memo views -- starting the views if it has to, although the shell really
takes care of that -- and loads the models into its own taskpad and memopad.
We couldn't do that sort of thing before with Bonobo in the way.
Big chunks of redundant code should begin falling out shortly.
svn path=/branches/kill-bonobo/; revision=36696
Diffstat (limited to 'shell/e-shell-window.c')
-rw-r--r-- | shell/e-shell-window.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index 467e59d6cd..d1cebe78e1 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -52,7 +52,6 @@ shell_window_new_view (EShellWindow *shell_window, /* Determine the page number for the new shell view. */ notebook = GTK_NOTEBOOK (shell_window->priv->content_notebook); - page_num = gtk_notebook_get_n_pages (notebook); /* Get the switcher action for this view. */ action = e_shell_window_get_shell_view_action ( @@ -64,11 +63,19 @@ shell_window_new_view (EShellWindow *shell_window, page_num, "shell-window", shell_window, NULL); /* Register the shell view. */ + g_debug ("Loaded view '%s' (page %d)", view_name, page_num); loaded_views = shell_window->priv->loaded_views; g_hash_table_insert (loaded_views, g_strdup (view_name), shell_view); /* Add pages to the various shell window notebooks. */ + /* We can't determine the shell view's page number until after the + * shell view is fully initialized because the shell view may load + * other shell views during initialization, and those other shell + * views will append their widgets to the notebooks before us. */ + page_num = gtk_notebook_get_n_pages (notebook); + e_shell_view_set_page_num (shell_view, page_num); + notebook = GTK_NOTEBOOK (shell_window->priv->content_notebook); widget = GTK_WIDGET (e_shell_view_get_shell_content (shell_view)); gtk_notebook_append_page (notebook, widget, NULL); |