aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-04 01:27:31 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-04 01:27:31 +0800
commit643db1689446521b73c589ef61c82c9536f24f46 (patch)
tree99b64d882e907c5467fed3c94f29dc8c521507f4 /shell
parentd0841e7c2490436c664cfec87099b86d54d4127d (diff)
downloadgsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar.gz
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar.bz2
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar.lz
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar.xz
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar.zst
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.zip
Get the "save-calendar" plugin working.
Based on initial work by Milan Crha.
Diffstat (limited to 'shell')
-rw-r--r--shell/Makefile.am2
-rw-r--r--shell/e-shell-view.c33
-rw-r--r--shell/e-shell-window.c7
3 files changed, 8 insertions, 34 deletions
diff --git a/shell/Makefile.am b/shell/Makefile.am
index a17c11a875..7358a1466b 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -57,6 +57,7 @@ eshellinclude_HEADERS = \
e-shell-taskbar.h \
e-shell-view.h \
e-shell-window.h \
+ e-shell-window-actions.h \
es-event.h
libeshell_la_SOURCES = \
@@ -78,7 +79,6 @@ libeshell_la_SOURCES = \
e-shell-importer.h \
e-shell-migrate.c \
e-shell-migrate.h \
- e-shell-window-actions.h \
e-shell-window-actions.c \
es-event.c
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index ff54c59b2f..ccd5de6f31 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -189,31 +189,6 @@ shell_view_state_timeout_cb (EShellView *shell_view)
return FALSE;
}
-static gboolean
-shell_view_register_ui_manager (EShellView *shell_view)
-{
- EShellViewClass *shell_view_class;
- EShellWindow *shell_window;
- GtkUIManager *ui_manager;
- const gchar *id;
-
- /* This is a one-time, post-construction idle callback. */
-
- shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
- shell_window = e_shell_view_get_shell_window (shell_view);
- ui_manager = e_shell_window_get_ui_manager (shell_window);
- id = shell_view_class->ui_manager_id;
-
- e_plugin_ui_register_manager (ui_manager, id, shell_view);
-
- if (e_shell_view_is_active (shell_view)) {
- e_plugin_ui_enable_manager (ui_manager, id);
- e_shell_view_update_actions (shell_view);
- }
-
- return FALSE;
-}
-
static void
shell_view_emit_toggled (EShellView *shell_view)
{
@@ -427,14 +402,6 @@ shell_view_constructed (GObject *object)
shell_view = E_SHELL_VIEW (object);
shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
- /* Defer EPluginUI registration to an idle callback to give the
- * shell view subclass a chance to register its own actions and
- * action groups. Registration will immediately load EPlugins
- * that specify the shell view's GtkUIManager ID, and their
- * initialization routines may require those actions or action
- * groups that have not yet been added. */
- g_idle_add ((GSourceFunc) shell_view_register_ui_manager, shell_view);
-
shell_view_load_state (shell_view);
/* Invoke factory methods. */
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 6b43877aba..a6ac5706e2 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -42,10 +42,12 @@ shell_window_new_view (EShellBackend *shell_backend,
{
GHashTable *loaded_views;
EShellView *shell_view;
+ GtkUIManager *ui_manager;
GtkNotebook *notebook;
GtkAction *action;
GtkWidget *widget;
const gchar *name;
+ const gchar *id;
gint page_num;
GType type;
@@ -71,6 +73,11 @@ shell_window_new_view (EShellBackend *shell_backend,
loaded_views = shell_window->priv->loaded_views;
g_hash_table_insert (loaded_views, g_strdup (name), shell_view);
+ /* Register the GtkUIManager ID for the shell view. */
+ id = E_SHELL_VIEW_GET_CLASS (shell_view)->ui_manager_id;
+ ui_manager = e_shell_window_get_ui_manager (shell_window);
+ e_plugin_ui_register_manager (ui_manager, id, shell_view);
+
/* Add pages to the various shell window notebooks. */
/* We can't determine the shell view's page number until after the