aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-11-13 21:49:01 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-11-13 21:49:01 +0800
commit87bf984862f7623b76e8af7583647a3e2553cbb1 (patch)
treebee15aff0136217a7d7f886a2ef40b9a77817c7f /calendar
parent4c1f563a18177e4f8cd7c2f308ef1f7b50e662be (diff)
downloadgsoc2013-evolution-87bf984862f7623b76e8af7583647a3e2553cbb1.tar
gsoc2013-evolution-87bf984862f7623b76e8af7583647a3e2553cbb1.tar.gz
gsoc2013-evolution-87bf984862f7623b76e8af7583647a3e2553cbb1.tar.bz2
gsoc2013-evolution-87bf984862f7623b76e8af7583647a3e2553cbb1.tar.lz
gsoc2013-evolution-87bf984862f7623b76e8af7583647a3e2553cbb1.tar.xz
gsoc2013-evolution-87bf984862f7623b76e8af7583647a3e2553cbb1.tar.zst
gsoc2013-evolution-87bf984862f7623b76e8af7583647a3e2553cbb1.zip
New. (impl_requestCreateItem): New. (tasks_component_class_init): Install.
* gui/tasks-component.c (impl__get_userCreatableItems): New. (impl_requestCreateItem): New. (tasks_component_class_init): Install. * gui/calendar-component.c (impl__get_userCreatableItems): New. (impl_requestCreateItem): New, for now just a stub. (calendar_component_class_init): Install into the EPV. svn path=/trunk/; revision=23327
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog4
-rw-r--r--calendar/gui/calendar-component.c1
-rw-r--r--calendar/gui/tasks-component.c40
3 files changed, 43 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index d14aa6d2a5..a01392384c 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,9 @@
2003-11-13 Ettore Perazzoli <ettore@ximian.com>
+ * gui/tasks-component.c (impl__get_userCreatableItems): New.
+ (impl_requestCreateItem): New.
+ (tasks_component_class_init): Install.
+
* gui/calendar-component.c (impl__get_userCreatableItems): New.
(impl_requestCreateItem): New, for now just a stub.
(calendar_component_class_init): Install into the EPV.
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 35edc8529d..4794f3b2ee 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -365,7 +365,6 @@ impl_createControls (PortableServer_Servant servant,
}
-
static GNOME_Evolution_CreatableItemTypeList *
impl__get_userCreatableItems (PortableServer_Servant servant,
CORBA_Environment *ev)
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;