aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-11-13 13:56:14 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-11-13 13:56:14 +0800
commit7a5ecfbb6c09b5350e5ce0600f42098eb6a2f5de (patch)
tree4fa518fa98738666004beb7a329560a579396227 /shell/e-shell.c
parent35b15cb0516407c8ab0bd3ba403e04dffaaef0a1 (diff)
downloadgsoc2013-evolution-7a5ecfbb6c09b5350e5ce0600f42098eb6a2f5de.tar.gz
gsoc2013-evolution-7a5ecfbb6c09b5350e5ce0600f42098eb6a2f5de.tar.zst
gsoc2013-evolution-7a5ecfbb6c09b5350e5ce0600f42098eb6a2f5de.zip
New signal "component_changed". (class_init): Install. (switch_view):
* e-shell-window.c: New signal "component_changed". (class_init): Install. (switch_view): Emit. (e_shell_window_new): Call e_user_creatable_items_handler_attach_menus() to attach the "New..." menus. (e_shell_window_peek_current_component_id): New. (e_shell_window_peek_shell): Add precondition. (e_shell_window_peek_current_component_id): Likewise. (e_shell_window_peek_bonobo_ui_component): Likewise. * e-user-creatable-items-handler.c: New. * e-user-creatable-items-handler.h: New. * e-shell-window.h: #include <bonobo/bonobo-ui-component.h>. * e-shell.c (struct _EShellPrivate): Add member user_creatable_items_handler. (e_shell_get_user_creatable_items_handler): Remove. (e_shell_peek_user_creatable_items_handler): New. * Evolution-Component.idl (GNOME.Evolution.RequestCreateItem): New method. (GNOME.Evolution.creatableItems): New attribute. * e-shell-user-creatable-items-handler.c: Remove. * e-shell-user-creatable-items-handler.h: Remove. svn path=/trunk/; revision=23314
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index d4b8fdf131..e69b04a0a3 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -78,6 +78,7 @@ struct _EShellPrivate {
GList *windows;
+ EUserCreatableItemsHandler *user_creatable_items_handler;
EUriSchemaRegistry *uri_schema_registry;
EComponentRegistry *component_registry;
@@ -354,6 +355,11 @@ impl_dispose (GObject *object)
priv->is_initialized = FALSE;
+ if (priv->user_creatable_items_handler != NULL) {
+ g_object_unref (priv->user_creatable_items_handler);
+ priv->user_creatable_items_handler = NULL;
+ }
+
if (priv->uri_schema_registry != NULL) {
g_object_unref (priv->uri_schema_registry);
priv->uri_schema_registry = NULL;
@@ -460,8 +466,9 @@ e_shell_init (EShell *shell)
EShellPrivate *priv;
priv = g_new0 (EShellPrivate, 1);
- priv->line_status = E_SHELL_LINE_STATUS_OFFLINE;
- priv->component_registry = e_component_registry_new ();
+ priv->line_status = E_SHELL_LINE_STATUS_OFFLINE;
+ priv->component_registry = e_component_registry_new ();
+ priv->user_creatable_items_handler = e_user_creatable_items_handler_new (priv->component_registry);
shell->priv = priv;
}
@@ -866,14 +873,6 @@ e_shell_show_settings (EShell *shell,
}
-EShellUserCreatableItemsHandler *
-e_shell_get_user_creatable_items_handler (EShell *shell)
-{
- g_assert_not_reached (); /* FIXME */
- return NULL;
-}
-
-
const char *
e_shell_construct_result_to_string (EShellConstructResult result)
{
@@ -954,4 +953,13 @@ e_shell_prepare_for_quit (EShell *shell)
}
+EUserCreatableItemsHandler *
+e_shell_peek_user_creatable_items_handler (EShell *shell)
+{
+ g_return_val_if_fail (E_IS_SHELL (shell), NULL);
+
+ return shell->priv->user_creatable_items_handler;
+}
+
+
BONOBO_TYPE_FUNC_FULL (EShell, GNOME_Evolution_Shell, PARENT_TYPE, e_shell)