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-view.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-view.c')
-rw-r--r-- | shell/e-shell-view.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index e307847116..3ab67b6ab0 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -136,13 +136,6 @@ shell_view_set_action (EShellView *shell_view, } static void -shell_view_set_page_num (EShellView *shell_view, - gint page_num) -{ - shell_view->priv->page_num = page_num; -} - -static void shell_view_set_shell_window (EShellView *shell_view, GtkWidget *shell_window) { @@ -169,7 +162,7 @@ shell_view_set_property (GObject *object, return; case PROP_PAGE_NUM: - shell_view_set_page_num ( + e_shell_view_set_page_num ( E_SHELL_VIEW (object), g_value_get_int (value)); return; @@ -406,8 +399,7 @@ shell_view_class_init (EShellViewClass *class) -1, G_MAXINT, -1, - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_READWRITE)); /** * EShellView:title @@ -814,6 +806,26 @@ e_shell_view_get_page_num (EShellView *shell_view) } /** + * e_shell_view_set_page_num: + * @shell_view: an #EShellView + * @page_num: a notebook page number + * + * This function is only interesting to #EShellWindow. It sets the + * #GtkNotebook page number for @shell_view. The rest of the application + * must never call this because it could mess up shell view switching. + **/ +void +e_shell_view_set_page_num (EShellView *shell_view, + gint page_num) +{ + g_return_if_fail (E_IS_SHELL_VIEW (shell_view)); + + shell_view->priv->page_num = page_num; + + g_object_notify (G_OBJECT (shell_view), "page-num"); +} + +/** * e_shell_view_get_size_group: * @shell_view: an #EShellView * |