aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2004-04-09 23:56:21 +0800
committerDan Winship <danw@src.gnome.org>2004-04-09 23:56:21 +0800
commit4a8b6d717107d83401695ffdec711a5452095c27 (patch)
treeb5089994caf758d256c733330738deb95d4c163c /calendar/gui/gnome-cal.c
parentc35cccb170c74c3656ce0981b7e6376d712fca5b (diff)
downloadgsoc2013-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/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 617d01c11c..31cec1741f 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -42,6 +42,7 @@
#include <libgnomeui/gnome-dialog-util.h>
#include <bonobo/bonobo-exception.h>
#include "e-util/e-url.h"
+#include "shell/e-user-creatable-items-handler.h"
#include <libecal/e-cal-time-util.h>
#include <gal/menus/gal-view-factory-etable.h>
#include <gal/menus/gal-view-etable.h>
@@ -154,6 +155,9 @@ struct _GnomeCalendarPrivate {
'dates-shown-changed' signal.*/
time_t visible_start;
time_t visible_end;
+
+ /* Our associated creatable items handler */
+ EUserCreatableItemsHandler *creatable_items_handler;
};
/* Signal IDs */
@@ -1193,6 +1197,11 @@ gnome_calendar_destroy (GtkObject *object)
priv->view_menus = NULL;
}
+ if (priv->creatable_items_handler) {
+ g_object_unref (priv->creatable_items_handler);
+ priv->creatable_items_handler = NULL;
+ }
+
g_free (priv);
gcal->priv = NULL;
}
@@ -1992,6 +2001,14 @@ gnome_calendar_set_ui_component (GnomeCalendar *gcal,
g_return_if_fail (ui_component == NULL || BONOBO_IS_UI_COMPONENT (ui_component));
e_search_bar_set_ui_component (E_SEARCH_BAR (gcal->priv->search_bar), ui_component);
+
+ if (ui_component) {
+ if (!gcal->priv->creatable_items_handler) {
+ gcal->priv->creatable_items_handler =
+ e_user_creatable_items_handler_new ("calendar");
+ }
+ e_user_creatable_items_handler_activate (gcal->priv->creatable_items_handler, ui_component);
+ }
}
/**