diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-25 07:02:33 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-25 07:02:33 +0800 |
commit | e7a31c5035a0afeed6c1675e30487c1e2bdc139f (patch) | |
tree | eb1e733a6fe69773498725efa64304a9234270bc /shell/e-shell-content.c | |
parent | 95cae9b166587d19db3aadde6a21cc12c30da6e6 (diff) | |
download | gsoc2013-evolution-e7a31c5035a0afeed6c1675e30487c1e2bdc139f.tar.gz gsoc2013-evolution-e7a31c5035a0afeed6c1675e30487c1e2bdc139f.tar.zst gsoc2013-evolution-e7a31c5035a0afeed6c1675e30487c1e2bdc139f.zip |
Commit recent work so I can merge from trunk.
svn path=/branches/kill-bonobo/; revision=36684
Diffstat (limited to 'shell/e-shell-content.c')
-rw-r--r-- | shell/e-shell-content.c | 42 |
1 files changed, 42 insertions, 0 deletions
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 + * <structfield>check_state</structfield> 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) { |