aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-component.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r--calendar/gui/calendar-component.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index d3c5e1d513..1e2747c546 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -44,6 +44,10 @@
/* OAFIID for the component factory */
#define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_ShellComponentFactory"
+/* IDs for user creatable items */
+#define CREATE_EVENT_ID "event"
+#define CREATE_TASK_ID "task"
+
static BonoboGenericFactory *factory = NULL;
char *evolution_dir;
@@ -339,6 +343,16 @@ owner_unset_cb (EvolutionShellComponent *shell_component,
gtk_main_quit ();
}
+/* Callback used when we must create a user-creatable item */
+static void
+sc_user_create_new_item_cb (EvolutionShellComponent *shell_component,
+ const char *id,
+ const char *parent_folder_physical_uri,
+ const char *parent_folder_type)
+{
+ /* FIXME */
+}
+
#if 0
static void
destroy_cb (EvolutionShellComponent *shell_component,
@@ -381,6 +395,23 @@ factory_fn (BonoboGenericFactory *factory,
shells = g_list_append (shells, shell_component);
#endif
+ /* User creatable items */
+
+ evolution_shell_component_add_user_creatable_item (shell_component,
+ CREATE_EVENT_ID,
+ _("Create a new appointment"),
+ _("New _Appointment"),
+ 'a');
+
+ evolution_shell_component_add_user_creatable_item (shell_component,
+ CREATE_TASK_ID,
+ _("Create a new task"),
+ _("New _Task"),
+ 't');
+
+ gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item",
+ GTK_SIGNAL_FUNC (sc_user_create_new_item_cb), NULL);
+
return BONOBO_OBJECT (shell_component);
}