aboutsummaryrefslogtreecommitdiffstats
path: root/shell
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
parent086a96050b16f6dabd99a391b5a4faf0411963a1 (diff)
downloadgsoc2013-evolution-253e90b8de63d9c064a0df05cf0e2e153f913474.tar
gsoc2013-evolution-253e90b8de63d9c064a0df05cf0e2e153f913474.tar.gz
gsoc2013-evolution-253e90b8de63d9c064a0df05cf0e2e153f913474.tar.bz2
gsoc2013-evolution-253e90b8de63d9c064a0df05cf0e2e153f913474.tar.lz
gsoc2013-evolution-253e90b8de63d9c064a0df05cf0e2e153f913474.tar.xz
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')
-rw-r--r--shell/e-shell-content.h2
-rw-r--r--shell/e-shell-module.h2
-rw-r--r--shell/e-shell-sidebar.h2
-rw-r--r--shell/e-shell-taskbar.h2
-rw-r--r--shell/e-shell-window-actions.c9
-rw-r--r--shell/e-shell-window.c17
-rw-r--r--shell/e-shell-window.h6
7 files changed, 21 insertions, 19 deletions
diff --git a/shell/e-shell-content.h b/shell/e-shell-content.h
index 3a3c2eeb46..68e80f7dac 100644
--- a/shell/e-shell-content.h
+++ b/shell/e-shell-content.h
@@ -53,7 +53,7 @@
G_BEGIN_DECLS
-/* Avoid including <e-shell-view.h> */
+/* Avoid including <e-shell-view.h>, because it includes us! */
struct _EShellView;
typedef struct _EShellContent EShellContent;
diff --git a/shell/e-shell-module.h b/shell/e-shell-module.h
index abb4bd213b..8b00660e91 100644
--- a/shell/e-shell-module.h
+++ b/shell/e-shell-module.h
@@ -52,7 +52,7 @@
G_BEGIN_DECLS
-/* Avoid including <e-shell.h> */
+/* Avoid including <e-shell.h>, because it includes us! */
struct _EShell;
typedef struct _EShellModule EShellModule;
diff --git a/shell/e-shell-sidebar.h b/shell/e-shell-sidebar.h
index c7e73b8c64..275e66a7ca 100644
--- a/shell/e-shell-sidebar.h
+++ b/shell/e-shell-sidebar.h
@@ -51,7 +51,7 @@
G_BEGIN_DECLS
-/* Avoid including <e-shell-view.h> */
+/* Avoid including <e-shell-view.h>, because it includes us! */
struct _EShellView;
typedef struct _EShellSidebar EShellSidebar;
diff --git a/shell/e-shell-taskbar.h b/shell/e-shell-taskbar.h
index 6742191885..b0aab3bdde 100644
--- a/shell/e-shell-taskbar.h
+++ b/shell/e-shell-taskbar.h
@@ -51,7 +51,7 @@
G_BEGIN_DECLS
-/* Avoid including <e-shell-view.h> */
+/* Avoid including <e-shell-view.h>, because it includes us! */
struct _EShellView;
typedef struct _EShellTaskbar EShellTaskbar;
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index 9dac1127c3..9e7c4aaee7 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -1519,7 +1519,7 @@ static GtkActionEntry shell_entries[] = {
{ "search-execute",
GTK_STOCK_FIND,
N_("_Find Now"),
- NULL,
+ "", /* Block the default Ctrl+F. */
N_("Execute the current search parameters"),
NULL }, /* Handled by EShellContent and subclasses. */
@@ -1970,12 +1970,7 @@ e_shell_window_create_switcher_actions (EShellWindow *shell_window)
/* Construct a group of radio actions from the various EShellView
* subclasses and register them with the EShellSwitcher. These
* actions are manifested as switcher buttons and View->Window
- * menu items.
- *
- * Note: The shell window has already selected a view by now,
- * so we have to be careful not to overwrite that when setting
- * up the radio action group. That means not connecting to any
- * "changed" signals until after the group is built. */
+ * menu items. */
for (ii = 0; ii < n_children; ii++) {
EShellViewClass *class;
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;
}
/**
diff --git a/shell/e-shell-window.h b/shell/e-shell-window.h
index d55afc6e53..e3bc22beef 100644
--- a/shell/e-shell-window.h
+++ b/shell/e-shell-window.h
@@ -51,6 +51,9 @@
G_BEGIN_DECLS
+/* Avoid including <e-shell-view.h>, because it includes us! */
+struct _EShellView;
+
typedef struct _EShellWindow EShellWindow;
typedef struct _EShellWindowClass EShellWindowClass;
typedef struct _EShellWindowPrivate EShellWindowPrivate;
@@ -74,7 +77,8 @@ GType e_shell_window_get_type (void);
GtkWidget * e_shell_window_new (EShell *shell,
gboolean safe_mode);
EShell * e_shell_window_get_shell (EShellWindow *shell_window);
-gpointer e_shell_window_get_shell_view (EShellWindow *shell_window,
+struct _EShellView *
+ e_shell_window_get_shell_view (EShellWindow *shell_window,
const gchar *view_name);
GtkUIManager * e_shell_window_get_ui_manager (EShellWindow *shell_window);
GtkAction * e_shell_window_get_action (EShellWindow *shell_window,