aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-10-04 03:24:59 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-10-04 03:24:59 +0800
commit253e90b8de63d9c064a0df05cf0e2e153f913474 (patch)
treeba6608ca96849f8f0801e4e81f7ed2aef06d391d /shell/e-shell-window.c
parent086a96050b16f6dabd99a391b5a4faf0411963a1 (diff)
downloadgsoc2013-evolution-253e90b8de63d9c064a0df05cf0e2e153f913474.tar.gz
gsoc2013-evolution-253e90b8de63d9c064a0df05cf0e2e153f913474.tar.zst
gsoc2013-evolution-253e90b8de63d9c064a0df05cf0e2e153f913474.zip
Tasks is working. Still need to deal with some loose ends and test it all.
svn path=/branches/kill-bonobo/; revision=36551
Diffstat (limited to 'shell/e-shell-window.c')
-rw-r--r--shell/e-shell-window.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index ebc9cb376b..5b54b38396 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -69,8 +69,6 @@ shell_window_new_view (EShellWindow *shell_window,
loaded_views = shell_window->priv->loaded_views;
g_hash_table_insert (loaded_views, g_strdup (view_name), shell_view);
- g_message ("Creating view \"%s\" on page %d", view_name, page_num);
-
/* Add pages to the various shell window notebooks. */
notebook = GTK_NOTEBOOK (shell_window->priv->content_notebook);
@@ -379,7 +377,7 @@ e_shell_window_get_shell (EShellWindow *shell_window)
* Returns: the requested #EShellView, or %NULL if no such view is
* registered
**/
-gpointer
+EShellView *
e_shell_window_get_shell_view (EShellWindow *shell_window,
const gchar *view_name)
{
@@ -469,17 +467,20 @@ e_shell_window_get_action (EShellWindow *shell_window,
ui_manager = e_shell_window_get_ui_manager (shell_window);
iter = gtk_ui_manager_get_action_groups (ui_manager);
- while (iter != NULL && action == NULL) {
+ while (iter != NULL) {
GtkActionGroup *action_group = iter->data;
action = gtk_action_group_get_action (
action_group, action_name);
+ if (action != NULL)
+ return action;
+
iter = g_list_next (iter);
}
- g_return_val_if_fail (action != NULL, NULL);
+ g_critical ("%s: action `%s' not found", G_STRFUNC, action_name);
- return action;
+ return NULL;
}
/**
@@ -517,7 +518,9 @@ e_shell_window_get_action_group (EShellWindow *shell_window,
iter = g_list_next (iter);
}
- g_return_val_if_reached (NULL);
+ g_critical ("%s: action group `%s' not found", G_STRFUNC, group_name);
+
+ return NULL;
}
/**