diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-08-01 04:36:16 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-08-01 04:36:16 +0800 |
commit | ec3f54257d3d3ddcd22779547f543ba9a9716f89 (patch) | |
tree | 5fc3f964d9adc7032c3484cec0e09fc0bce3cec4 /calendar | |
parent | 6135f6ad4544f68ef23bdf9dca698a93cfae7067 (diff) | |
download | gsoc2013-evolution-ec3f54257d3d3ddcd22779547f543ba9a9716f89.tar gsoc2013-evolution-ec3f54257d3d3ddcd22779547f543ba9a9716f89.tar.gz gsoc2013-evolution-ec3f54257d3d3ddcd22779547f543ba9a9716f89.tar.bz2 gsoc2013-evolution-ec3f54257d3d3ddcd22779547f543ba9a9716f89.tar.lz gsoc2013-evolution-ec3f54257d3d3ddcd22779547f543ba9a9716f89.tar.xz gsoc2013-evolution-ec3f54257d3d3ddcd22779547f543ba9a9716f89.tar.zst gsoc2013-evolution-ec3f54257d3d3ddcd22779547f543ba9a9716f89.zip |
Pass "contacts" as the @folder_type to
* gui/component/addressbook-component.c (add_creatable_item): Pass
"contacts" as the @folder_type to
evolution_shell_component_add_user_creatable_item().
* gui/component-factory.c (add_creatable_item): New arg
@folder_type, pass it to
evolution_shell_component_add_user_creatable_item().
(create_object): Set the right folder types for the various
user-creatable items.
* component-factory.c (create_component): Pass "mail" as
@folder_type to
evolution_shell_component_add_user_creatable_item().
* evolution-test-component.c (register_component): Pass NULL for
@folder_type to
evolution_shell_component_add_user_creatable_item().
* e-shell-user-creatable-items-handler.c: New member folder_type
in struct MenuItem.
(ensure_menu_items): Initialize ->folder_type.
(item_is_default): New helper function.
(create_menu_xml): New arg @folder_type. Put the items on the top
using item_is_default().
(shell_view_view_changed_callback): Pass the folder type to
create_menu_xml().
* evolution-shell-component.c: New member folder_type in
UserCreatableItemType.
(user_creatable_item_type_new): New arg @folder_type.
(user_creatable_item_type_free): Free ->folder_type.
(evolution_shell_component_add_user_creatable_item): New arg
@folder_type.
(impl__get_userCreatableItemTypes): Set ->folderType in the
returned CORBA structs.
* Evolution-ShellComponent.idl: New member folderType in struct
UserCreatableItemType.
* e-shell-user-creatable-items-handler.c: New member component_id
in struct MenuItem. Removed member menu_xml from
EShellUserCreatableItemsHandlerPrivate.
(init): No need to initialize menu_xml here anymore.
(impl_destroy): ...And no need to free here, either.
(setup_menu_xml): New, derived from ensure_menu_xml(). This
orders the menu so that the items for the current component go at
the top.
(create_menu_xml): Removed.
(e_shell_user_creatable_items_handler_attach_menus): Set up
properly for the current component ID, using setup_menu_xml().
svn path=/trunk/; revision=17658
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 8 | ||||
-rw-r--r-- | calendar/gui/calendar-component.c | 10 | ||||
-rw-r--r-- | calendar/gui/component-factory.c | 10 |
3 files changed, 20 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 56c7a06016..ac94f62045 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2002-07-31 Ettore Perazzoli <ettore@ximian.com> + + * gui/component-factory.c (add_creatable_item): New arg + @folder_type, pass it to + evolution_shell_component_add_user_creatable_item(). + (create_object): Set the right folder types for the various + user-creatable items. + 2002-07-31 JP Rosevear <jpr@ximian.com> * gui/e-tasks.c (e_tasks_destroy): we no longer need to manually diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 9c23a62899..3f7b280e1f 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -646,6 +646,7 @@ add_creatable_item (EvolutionShellComponent *shell_component, const char *description, const char *menu_description, const char *tooltip, + const char *folder_type, char menu_shortcut, const char *icon_name) { @@ -665,6 +666,7 @@ add_creatable_item (EvolutionShellComponent *shell_component, description, menu_description, tooltip, + folder_type, menu_shortcut, icon); @@ -705,22 +707,22 @@ create_object (void) add_creatable_item (shell_component, CREATE_MEETING_ID, _("New meeting"), _("_Meeting"), _("Create a new meeting request"), - 's', "meeting-request.png"); + "calendar", 's', "meeting-request.png"); add_creatable_item (shell_component, CREATE_TASK_ID, _("New task"), _("_Task"), _("Create a new task"), - 't', "new_task-16.png"); + "tasks", 't', "new_task-16.png"); add_creatable_item (shell_component, CREATE_ALLDAY_EVENT_ID, _("New All Day Appointment"), _("All _Day Appointment"), _("Create a new all-day appointment"), - 'd', "new_all_day_event.png"); + "calendar", 'd', "new_all_day_event.png"); add_creatable_item (shell_component, CREATE_EVENT_ID, _("New appointment"), _("_Appointment"), _("Create a new appointment"), - 'a', "new_appointment.xpm"); + "calendar", 'a', "new_appointment.xpm"); gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item", GTK_SIGNAL_FUNC (sc_user_create_new_item_cb), NULL); diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c index 9c23a62899..3f7b280e1f 100644 --- a/calendar/gui/component-factory.c +++ b/calendar/gui/component-factory.c @@ -646,6 +646,7 @@ add_creatable_item (EvolutionShellComponent *shell_component, const char *description, const char *menu_description, const char *tooltip, + const char *folder_type, char menu_shortcut, const char *icon_name) { @@ -665,6 +666,7 @@ add_creatable_item (EvolutionShellComponent *shell_component, description, menu_description, tooltip, + folder_type, menu_shortcut, icon); @@ -705,22 +707,22 @@ create_object (void) add_creatable_item (shell_component, CREATE_MEETING_ID, _("New meeting"), _("_Meeting"), _("Create a new meeting request"), - 's', "meeting-request.png"); + "calendar", 's', "meeting-request.png"); add_creatable_item (shell_component, CREATE_TASK_ID, _("New task"), _("_Task"), _("Create a new task"), - 't', "new_task-16.png"); + "tasks", 't', "new_task-16.png"); add_creatable_item (shell_component, CREATE_ALLDAY_EVENT_ID, _("New All Day Appointment"), _("All _Day Appointment"), _("Create a new all-day appointment"), - 'd', "new_all_day_event.png"); + "calendar", 'd', "new_all_day_event.png"); add_creatable_item (shell_component, CREATE_EVENT_ID, _("New appointment"), _("_Appointment"), _("Create a new appointment"), - 'a', "new_appointment.xpm"); + "calendar", 'a', "new_appointment.xpm"); gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item", GTK_SIGNAL_FUNC (sc_user_create_new_item_cb), NULL); |