diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-08-27 04:22:32 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-08-27 04:22:32 +0800 |
commit | cf3b01017162cbba568ee4317eee2efe5f6fdc10 (patch) | |
tree | 448dc3adee36e401a6aea2ebc1c27a586b14a644 /shell/e-shell-view.c | |
parent | 2ef1b5bf42b5d429e00f94710458f237d18315b2 (diff) | |
download | gsoc2013-evolution-cf3b01017162cbba568ee4317eee2efe5f6fdc10.tar.gz gsoc2013-evolution-cf3b01017162cbba568ee4317eee2efe5f6fdc10.tar.zst gsoc2013-evolution-cf3b01017162cbba568ee4317eee2efe5f6fdc10.zip |
Progress update:
- Further refinements of the shell API.
- Kill ESMenu and EUserCreatableItemsHandler.
- Start ripping apart the addressbook component.
svn path=/branches/kill-bonobo/; revision=36093
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r-- | shell/e-shell-view.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 52f6479b18..5da8af55ff 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -20,6 +20,7 @@ #include "e-shell-view.h" +#include <string.h> #include <glib/gi18n.h> #include "e-shell-window.h" @@ -211,10 +212,10 @@ e_shell_view_get_name (EShellView *shell_view) * module that registered the shell view subclass. */ class = E_SHELL_VIEW_GET_CLASS (shell_view); - g_return_val_if_fail (class->module != NULL, NULL); - g_return_val_if_fail (class->module->name != NULL, NULL); + g_return_val_if_fail (class->type_module != NULL, NULL); + g_return_val_if_fail (class->type_module->name != NULL, NULL); - return class->module->name; + return class->type_module->name; } const gchar * @@ -237,12 +238,31 @@ e_shell_view_set_title (EShellView *shell_view, g_object_notify (G_OBJECT (shell_view), "title"); } -GtkWidget * +EShellWindow * e_shell_view_get_window (EShellView *shell_view) { g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL); - return shell_view->priv->window; + return E_SHELL_WINDOW (shell_view->priv->window); +} + +gboolean +e_shell_view_is_selected (EShellView *shell_view) +{ + EShellViewClass *class; + EShellWindow *shell_window; + const gchar *curr_view_name; + const gchar *this_view_name; + + g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE); + + class = E_SHELL_VIEW_GET_CLASS (shell_view); + shell_window = e_shell_view_get_window (shell_view); + this_view_name = e_shell_view_get_name (shell_view); + curr_view_name = e_shell_window_get_current_view (shell_window); + g_return_val_if_fail (curr_view_name != NULL, FALSE); + + return (strcmp (curr_view_name, this_view_name) == 0); } GtkWidget * |