From e7a31c5035a0afeed6c1675e30487c1e2bdc139f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 24 Oct 2008 23:02:33 +0000 Subject: Commit recent work so I can merge from trunk. svn path=/branches/kill-bonobo/; revision=36684 --- shell/e-shell-content.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'shell/e-shell-content.c') diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c index 7a9d7cf3f0..bde5a84084 100644 --- a/shell/e-shell-content.c +++ b/shell/e-shell-content.c @@ -910,6 +910,14 @@ e_shell_content_get_type (void) return type; } +/** + * e_shell_content_new: + * @shell_view: an #EShellView + * + * Creates a new #EShellContent instance belonging to @shell_view. + * + * Returns: a new #EShellContent instance + **/ GtkWidget * e_shell_content_new (EShellView *shell_view) { @@ -919,6 +927,40 @@ e_shell_content_new (EShellView *shell_view) E_TYPE_SHELL_CONTENT, "shell-view", shell_view, NULL); } +/** + * e_shell_content_check_state: + * @shell_content: an #EShellContent + * + * #EShellContent subclasses should implement the + * check_state method in #EShellContentClass + * to return a set of flags describing the current content selection. + * Subclasses are responsible for defining their own flags. This is + * primarily used to assist shell views with updating actions (see + * e_shell_view_update_actions()). + * + * Returns: a set of flags describing the current @shell_content selection + **/ +guint32 +e_shell_content_check_state (EShellContent *shell_content) +{ + EShellContentClass *shell_content_class; + + g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), 0); + + shell_content_class = E_SHELL_CONTENT_GET_CLASS (shell_content); + g_return_val_if_fail (shell_content_class->check_state != NULL, 0); + + return shell_content_class->check_state (shell_content); +} + +/** + * e_shell_content_get_shell_view: + * @shell_content: an #EShellContent + * + * Returns the #EShellView that was passed to e_shell_content_new(). + * + * Returns: the #EShellView to which @shell_content belongs + **/ EShellView * e_shell_content_get_shell_view (EShellContent *shell_content) { -- cgit