From 4a8b6d717107d83401695ffdec711a5452095c27 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 9 Apr 2004 15:56:21 +0000 Subject: Create an EUserCreatableItemsHandler for the view if there isn't one yet, * gui/gnome-cal.c (gnome_calendar_set_ui_component): Create an EUserCreatableItemsHandler for the view if there isn't one yet, and then activate it. (gnome_calendar_destroy): destroy it. * gui/calendar-component.c (impl__get_userCreatableItems): add object/folder flags to items. * gui/e-tasks.c (e_tasks_set_ui_component): Create an EUserCreatableItemsHandler for the view if there isn't one yet, and then activate it. (e_tasks_destroy): destroy it. * gui/tasks-component.c (impl__get_userCreatableItems): add object/folder flags. Change "Task List" to "Tasks Group" per new specs. * gui/calendar-commands.c (calendar_control_deactivate): clear the GnomeCal's ui_component rather than setting it again svn path=/trunk/; revision=25382 --- calendar/gui/e-tasks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'calendar/gui/e-tasks.c') diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 162634c035..0072e26873 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -36,6 +36,7 @@ #include "e-util/e-categories-config.h" #include "e-util/e-time-utils.h" #include "e-util/e-url.h" +#include "shell/e-user-creatable-items-handler.h" #include #include "widgets/menus/gal-view-menus.h" #include "dialogs/delete-error.h" @@ -75,6 +76,8 @@ struct _ETasksPrivate { GalViewMenus *view_menus; GList *notifications; + + EUserCreatableItemsHandler *creatable_items_handler; }; @@ -692,6 +695,14 @@ e_tasks_set_ui_component (ETasks *tasks, g_return_if_fail (ui_component == NULL || BONOBO_IS_UI_COMPONENT (ui_component)); e_search_bar_set_ui_component (E_SEARCH_BAR (tasks->priv->search_bar), ui_component); + + if (ui_component) { + if (!tasks->priv->creatable_items_handler) { + tasks->priv->creatable_items_handler = + e_user_creatable_items_handler_new ("tasks"); + } + e_user_creatable_items_handler_activate (tasks->priv->creatable_items_handler, ui_component); + } } @@ -733,6 +744,11 @@ e_tasks_destroy (GtkObject *object) calendar_config_remove_notification (GPOINTER_TO_UINT (l->data)); priv->notifications = NULL; + if (priv->creatable_items_handler) { + g_object_unref (priv->creatable_items_handler); + priv->creatable_items_handler = NULL; + } + g_free (priv); tasks->priv = NULL; } -- cgit v1.2.3