aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/tasks-component.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/tasks-component.c')
-rw-r--r--calendar/gui/tasks-component.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index bdbe34db72..28e55ddf8e 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -36,6 +36,10 @@
#include "tasks-control.h"
#include "widgets/misc/e-source-selector.h"
+
+#define CREATE_TASK_ID "task"
+
+
#define PARENT_TYPE bonobo_object_get_type ()
static BonoboObjectClass *parent_class = NULL;
@@ -259,6 +263,38 @@ impl_createControls (PortableServer_Servant servant,
*corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev);
}
+static GNOME_Evolution_CreatableItemTypeList *
+impl__get_userCreatableItems (PortableServer_Servant servant,
+ CORBA_Environment *ev)
+{
+ GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
+
+ list->_length = 1;
+ list->_maximum = list->_length;
+ list->_buffer = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
+
+ CORBA_sequence_set_release (list, FALSE);
+
+ list->_buffer[0].id = CREATE_TASK_ID;
+ list->_buffer[0].description = _("New task");
+ list->_buffer[0].menuDescription = _("_Task");
+ list->_buffer[0].tooltip = _("Create a new task");
+ list->_buffer[0].menuShortcut = 't';
+ list->_buffer[0].iconName = "new_task-16.png";
+
+ return list;
+}
+
+static void
+impl_requestCreateItem (PortableServer_Servant servant,
+ const CORBA_char *item_type_name,
+ CORBA_Environment *ev)
+{
+ /* FIXME: fill me in */
+
+ CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Component_UnknownType, NULL);
+}
+
/* Initialization */
static void
@@ -269,7 +305,9 @@ tasks_component_class_init (TasksComponentClass *klass)
parent_class = g_type_class_peek_parent (klass);
- epv->createControls = impl_createControls;
+ epv->createControls = impl_createControls;
+ epv->_get_userCreatableItems = impl__get_userCreatableItems;
+ epv->requestCreateItem = impl_requestCreateItem;
object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;