diff options
author | Dan Winship <danw@src.gnome.org> | 2004-04-09 23:56:21 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2004-04-09 23:56:21 +0800 |
commit | 4a8b6d717107d83401695ffdec711a5452095c27 (patch) | |
tree | b5089994caf758d256c733330738deb95d4c163c /calendar/gui/e-tasks.c | |
parent | c35cccb170c74c3656ce0981b7e6376d712fca5b (diff) | |
download | gsoc2013-evolution-4a8b6d717107d83401695ffdec711a5452095c27.tar.gz gsoc2013-evolution-4a8b6d717107d83401695ffdec711a5452095c27.tar.zst gsoc2013-evolution-4a8b6d717107d83401695ffdec711a5452095c27.zip |
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
Diffstat (limited to 'calendar/gui/e-tasks.c')
-rw-r--r-- | calendar/gui/e-tasks.c | 16 |
1 files changed, 16 insertions, 0 deletions
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 <libecal/e-cal-time-util.h> #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; } |