aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-12-17 22:13:58 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-12-17 22:13:58 +0800
commit78c72f3ed1da95b1ec432ff9440f6517df2f3e0b (patch)
tree9d29e366011309cd02952256b0b31baa45925b68
parent5b83b0929b296bf2b3b8909b33d554a70e888b35 (diff)
downloadgsoc2013-evolution-78c72f3ed1da95b1ec432ff9440f6517df2f3e0b.tar
gsoc2013-evolution-78c72f3ed1da95b1ec432ff9440f6517df2f3e0b.tar.gz
gsoc2013-evolution-78c72f3ed1da95b1ec432ff9440f6517df2f3e0b.tar.bz2
gsoc2013-evolution-78c72f3ed1da95b1ec432ff9440f6517df2f3e0b.tar.lz
gsoc2013-evolution-78c72f3ed1da95b1ec432ff9440f6517df2f3e0b.tar.xz
gsoc2013-evolution-78c72f3ed1da95b1ec432ff9440f6517df2f3e0b.tar.zst
gsoc2013-evolution-78c72f3ed1da95b1ec432ff9440f6517df2f3e0b.zip
removed the 'NewCalendar' verb. (file_new_calendar_cb): removed callback
2003-12-17 Rodrigo Moya <rodrigo@ximian.com> * gui/calendar-commands.c: removed the 'NewCalendar' verb. (file_new_calendar_cb): removed callback for 'NewCalendar' verb. (impl__get_userCreatableItems): added 'New Calendar' to the list of user creatable items. (impl_requestCreateItem): implemented 'New Calendar'. * gui/tasks-component.c (impl__get_userCreatableItems): added 'New Task List' to the list of user creatable items. (impl_requestCreateItem): implemented 'New Task List'. svn path=/trunk/; revision=23965
-rw-r--r--calendar/ChangeLog12
-rw-r--r--calendar/gui/calendar-commands.c11
-rw-r--r--calendar/gui/calendar-component.c17
-rw-r--r--calendar/gui/tasks-component.c26
4 files changed, 44 insertions, 22 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index d59f280bee..3e057a9554 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,17 @@
2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
+ * gui/calendar-commands.c: removed the 'NewCalendar' verb.
+ (file_new_calendar_cb): removed callback for 'NewCalendar' verb.
+ (impl__get_userCreatableItems): added 'New Calendar' to the list
+ of user creatable items.
+ (impl_requestCreateItem): implemented 'New Calendar'.
+
+ * gui/tasks-component.c (impl__get_userCreatableItems): added
+ 'New Task List' to the list of user creatable items.
+ (impl_requestCreateItem): implemented 'New Task List'.
+
+2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
+
* gui/tasks-control.[ch] (tasks_control_sensitize_commands): made
it public.
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 3ed09c3bc7..f509921594 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -71,16 +71,6 @@ typedef struct {
guint taskpad_focused : 1;
} FocusData;
-static void
-file_new_calendar_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- new_calendar_dialog (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
-}
-
/* Prints the calendar at its current view and time range */
static void
print (GnomeCalendar *gcal, gboolean preview)
@@ -691,7 +681,6 @@ gcal_taskpad_focus_change_cb (GnomeCalendar *gcal, gboolean in, gpointer data)
static BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("NewCalendar", file_new_calendar_cb),
BONOBO_UI_VERB ("CalendarPrint", file_print_cb),
BONOBO_UI_VERB ("CalendarPrintPreview", file_print_preview_cb),
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 0efea35e82..34471badc6 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -46,9 +46,10 @@
/* IDs for user creatable items */
-#define CREATE_EVENT_ID "event"
-#define CREATE_MEETING_ID "meeting"
+#define CREATE_EVENT_ID "event"
+#define CREATE_MEETING_ID "meeting"
#define CREATE_ALLDAY_EVENT_ID "allday-event"
+#define CREATE_CALENDAR_ID "calendar"
#define PARENT_TYPE bonobo_object_get_type ()
static BonoboObjectClass *parent_class = NULL;
@@ -603,7 +604,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
{
GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
- list->_length = 3;
+ list->_length = 4;
list->_maximum = list->_length;
list->_buffer = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
@@ -630,6 +631,13 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
list->_buffer[2].menuShortcut = 'd';
list->_buffer[2].iconName = "new_all_day_event.png";
+ list->_buffer[3].id = CREATE_CALENDAR_ID;
+ list->_buffer[3].description = _("New calendar");
+ list->_buffer[3].menuDescription = _("C_alendar");
+ list->_buffer[3].tooltip = _("Create a new calendar");
+ list->_buffer[3].menuShortcut = 'a';
+ list->_buffer[3].iconName = "evolution-calendar-mini.png";
+
return list;
}
@@ -750,6 +758,9 @@ impl_requestCreateItem (PortableServer_Servant servant,
} else if (strcmp (item_type_name, CREATE_MEETING_ID) == 0) {
comp = get_default_event (priv->create_ecal, FALSE);
is_meeting = TRUE;
+ } else if (strcmp (item_type_name, CREATE_CALENDAR_ID) == 0) {
+ new_calendar_dialog (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (priv->calendar))));
+ return;
} else {
bonobo_exception_set (ev, ex_GNOME_Evolution_Component_UnknownType);
return;
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 0fa40303ff..9ece3bb9a9 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -46,7 +46,8 @@
#include "widgets/misc/e-source-selector.h"
-#define CREATE_TASK_ID "task"
+#define CREATE_TASK_ID "task"
+#define CREATE_TASK_LIST_ID "task-list"
#define PARENT_TYPE bonobo_object_get_type ()
@@ -568,7 +569,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
{
GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
- list->_length = 1;
+ list->_length = 2;
list->_maximum = list->_length;
list->_buffer = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
@@ -581,6 +582,13 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
list->_buffer[0].menuShortcut = 't';
list->_buffer[0].iconName = "new_task-16.png";
+ list->_buffer[1].id = CREATE_TASK_LIST_ID;
+ list->_buffer[1].description = _("New task list");
+ list->_buffer[1].menuDescription = _("_Task List");
+ list->_buffer[1].tooltip = _("Create a new task list");
+ list->_buffer[1].menuShortcut = 'n';
+ list->_buffer[1].iconName = "evolution-tasks-mini.png";
+
return list;
}
@@ -693,15 +701,17 @@ impl_requestCreateItem (PortableServer_Servant servant,
if (strcmp (item_type_name, CREATE_TASK_ID) == 0) {
comp = get_default_task (priv->create_ecal);
+
+ comp_editor_edit_comp (COMP_EDITOR (editor), comp);
+ comp_editor_focus (COMP_EDITOR (editor));
+
+ e_comp_editor_registry_add (comp_editor_registry, COMP_EDITOR (editor), TRUE);
+ } else if (strcmp (item_type_name, CREATE_TASK_LIST_ID) == 0) {
+ new_task_list_dialog (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (priv->tasks))));
} else {
bonobo_exception_set (ev, ex_GNOME_Evolution_Component_UnknownType);
return;
- }
-
- comp_editor_edit_comp (COMP_EDITOR (editor), comp);
- comp_editor_focus (COMP_EDITOR (editor));
-
- e_comp_editor_registry_add (comp_editor_registry, COMP_EDITOR (editor), TRUE);
+ }
}
/* Initialization */