aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-10-01 11:48:51 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-10-01 11:48:51 +0800
commitc6795be3a8b7b17ced9e99e17db9ac6cbed6e018 (patch)
tree9623c989150fd850c5ca9dc6cfb61f599efae573 /shell/e-shell-view.c
parentb639d1ed02e9788d98f2a202fc53105ff4bc4387 (diff)
downloadgsoc2013-evolution-c6795be3a8b7b17ced9e99e17db9ac6cbed6e018.tar.gz
gsoc2013-evolution-c6795be3a8b7b17ced9e99e17db9ac6cbed6e018.tar.zst
gsoc2013-evolution-c6795be3a8b7b17ced9e99e17db9ac6cbed6e018.zip
Continue documenting the new shell API.
svn path=/branches/kill-bonobo/; revision=36511
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index ab1039b0e5..9273376f2d 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -458,7 +458,7 @@ shell_view_class_init (EShellViewClass *class)
g_param_spec_string (
"view-id",
_("Current View ID"),
- _("The current view ID"),
+ _("The current GAL view ID"),
NULL,
G_PARAM_READWRITE));
@@ -602,6 +602,22 @@ e_shell_view_get_shell_window (EShellView *shell_view)
return E_SHELL_WINDOW (shell_view->priv->shell_window);
}
+EShellModule *
+e_shell_view_get_shell_module (EShellView *shell_view)
+{
+ EShellViewClass *shell_view_class;
+
+ g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
+
+ /* Calling this function during the shell view's instance
+ * initialization function will return the wrong result,
+ * so catch that and emit a warning. */
+ shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
+ g_return_val_if_fail (E_IS_SHELL_VIEW_CLASS (shell_view_class), NULL);
+
+ return E_SHELL_MODULE (shell_view_class->type_module);
+}
+
gboolean
e_shell_view_is_active (EShellView *shell_view)
{
@@ -618,14 +634,12 @@ void
e_shell_view_add_activity (EShellView *shell_view,
EActivity *activity)
{
- EShellViewClass *shell_view_class;
EShellModule *shell_module;
g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
g_return_if_fail (E_IS_ACTIVITY (activity));
- shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
- shell_module = E_SHELL_MODULE (shell_view_class->type_module);
+ shell_module = e_shell_view_get_shell_module (shell_view);
e_shell_module_add_activity (shell_module, activity);
}