From 6545899a2972546a035da4d73c3625b9e8bb7438 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 11 Sep 2008 04:42:53 +0000 Subject: Add menu and toolbar UI for calendars, memos and tasks. svn path=/branches/kill-bonobo/; revision=36299 --- Makefile.am | 1 + calendar/gui/Makefile.am | 387 +++++++++++++++++-------------- calendar/gui/dialogs/cal-prefs-dialog.h | 1 - calendar/gui/dialogs/comp-editor.c | 1 - calendar/gui/dialogs/event-editor.c | 1 - calendar/gui/dialogs/memo-editor.c | 1 - calendar/gui/dialogs/task-details-page.c | 1 - calendar/gui/dialogs/task-editor.c | 1 - calendar/gui/dialogs/task-page.c | 1 - calendar/gui/e-cal-shell-module.c | 149 ++++++++++++ calendar/gui/e-cal-shell-view-actions.c | 241 ++++++++++++++++++- calendar/gui/e-cal-shell-view-private.c | 4 +- calendar/gui/e-cal-shell-view-private.h | 6 +- calendar/gui/e-cal-shell-view.c | 4 +- calendar/gui/e-memo-shell-module.c | 136 +++++++++++ calendar/gui/e-memo-shell-view-actions.c | 111 +++++++++ calendar/gui/e-memo-shell-view-actions.h | 18 ++ calendar/gui/e-memo-shell-view-private.h | 3 + calendar/gui/e-memo-shell-view.c | 2 +- calendar/gui/e-task-shell-module.c | 136 +++++++++++ calendar/gui/e-task-shell-view-actions.c | 163 +++++++++++++ calendar/gui/e-task-shell-view-actions.h | 38 ++- calendar/gui/e-task-shell-view-private.h | 3 + calendar/gui/e-task-shell-view.c | 2 +- calendar/gui/memos-control.c | 19 -- shell/e-shell-view.h | 2 +- ui/Makefile.am | 11 +- ui/evolution-addressbook.xml | 190 --------------- ui/evolution-calendar.xml | 101 -------- ui/evolution-calendars.ui | 55 +++++ ui/evolution-memos.ui | 33 +++ ui/evolution-memos.xml | 56 ----- ui/evolution-tasks.ui | 42 ++++ ui/evolution-tasks.xml | 81 ------- 34 files changed, 1347 insertions(+), 654 deletions(-) create mode 100644 calendar/gui/e-cal-shell-module.c create mode 100644 calendar/gui/e-memo-shell-module.c create mode 100644 calendar/gui/e-task-shell-module.c delete mode 100644 ui/evolution-addressbook.xml delete mode 100644 ui/evolution-calendar.xml create mode 100644 ui/evolution-calendars.ui create mode 100644 ui/evolution-memos.ui delete mode 100644 ui/evolution-memos.xml create mode 100644 ui/evolution-tasks.ui delete mode 100644 ui/evolution-tasks.xml diff --git a/Makefile.am b/Makefile.am index 785e39bf96..e052ef86b1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -64,6 +64,7 @@ SUBDIRS = \ shell \ $(SMIME_DIR) \ addressbook \ + calendar \ art \ ui \ views \ diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am index a6908118da..df9485d139 100644 --- a/calendar/gui/Makefile.am +++ b/calendar/gui/Makefile.am @@ -2,34 +2,12 @@ if OS_WIN32 WIN32_BOOTSTRAP_LIBS = $(top_builddir)/win32/libevolution-mail.la endif -## CORBA stuff - -IDLS = \ - $(top_srcdir)/calendar/idl/evolution-calendar.idl - -CALENDAR_IDL_GENERATED_H = \ - evolution-calendar.h -CALENDAR_IDL_GENERATED_C = \ - evolution-calendar-common.c \ - evolution-calendar-skels.c \ - evolution-calendar-stubs.c -CALENDAR_IDL_GENERATED = $(CALENDAR_IDL_GENERATED_C) $(CALENDAR_IDL_GENERATED_H) - -$(CALENDAR_IDL_GENERATED_H): $(IDLS) - $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) \ - $(top_srcdir)/calendar/idl/evolution-calendar.idl -$(CALENDAR_IDL_GENERATED_C): $(CALENDAR_IDL_GENERATED_H) - -IDL_GENERATED = $(CALENDAR_IDL_GENERATED) - # The marshallers MARSHAL_GENERATED = e-calendar-marshal.c e-calendar-marshal.h @EVO_MARSHAL_RULE@ SUBDIRS = alarm-notify dialogs -component_LTLIBRARIES = libevolution-calendar.la - ecalendarincludedir = $(privincludedir)/calendar/gui ecalendarinclude_HEADERS = \ @@ -60,6 +38,38 @@ INCLUDES = \ $(LIBSOUP_CFLAGS) \ $(EVOLUTION_CALENDAR_CFLAGS) +module_LTLIBRARIES = \ + libevolution-calendar.la \ + libevolution-memos.la \ + libevolution-tasks.la + +libevolution_calendar_la_SOURCES = \ + e-cal-shell-module.c \ + e-cal-shell-view.c \ + e-cal-shell-view.h \ + e-cal-shell-view-actions.c \ + e-cal-shell-view-actions.h \ + e-cal-shell-view-private.c \ + e-cal-shell-view-private.h + +libevolution_memos_la_SOURCES = \ + e-memo-shell-module.c \ + e-memo-shell-view.c \ + e-memo-shell-view.h \ + e-memo-shell-view-actions.c \ + e-memo-shell-view-actions.h \ + e-memo-shell-view-private.c \ + e-memo-shell-view-private.h + +libevolution_tasks_la_SOURCES = \ + e-task-shell-module.c \ + e-task-shell-view.c \ + e-task-shell-view.h \ + e-task-shell-view-actions.c \ + e-task-shell-view-actions.h \ + e-task-shell-view-private.c \ + e-task-shell-view-private.h + glade_DATA = \ e-itip-control.glade \ goto-dialog.glade @@ -70,153 +80,152 @@ etspec_DATA = \ e-cal-list-view.etspec \ e-memo-table.etspec -libevolution_calendar_la_SOURCES = \ - $(IDL_GENERATED) \ - $(MARSHAL_GENERATED) \ - cal-search-bar.c \ - cal-search-bar.h \ - calendar-config.c \ - calendar-config.h \ - calendar-config-keys.h \ - calendar-commands.c \ - calendar-commands.h \ - calendar-component.c \ - calendar-component.h \ - calendar-view.c \ - calendar-view.h \ - calendar-view-factory.c \ - calendar-view-factory.h \ - comp-editor-factory.c \ - comp-editor-factory.h \ - comp-util.c \ - comp-util.h \ - control-factory.c \ - control-factory.h \ - e-alarm-list.c \ - e-alarm-list.h \ - e-cal-component-preview.c \ - e-cal-component-preview.h \ - e-cal-component-memo-preview.c \ - e-cal-component-memo-preview.h \ - e-cal-config.c \ - e-cal-config.h \ - e-cal-event.c \ - e-cal-event.h \ - e-cal-menu.c \ - e-cal-menu.h \ - e-cal-model-calendar.h \ - e-cal-model-calendar.c \ - e-cal-model-calendar.h \ - e-cal-model-tasks.c \ - e-cal-model-tasks.h \ - e-cal-model.c \ - e-cal-model.h \ - e-cal-popup.h \ - e-cal-popup.c \ - e-calendar-view.c \ - e-calendar-view.h \ - e-cal-list-view.c \ - e-cal-list-view.h \ - e-cal-list-view-config.c \ - e-cal-list-view-config.h \ - e-cal-model-memos.c \ - e-cal-model-memos.h \ - e-calendar-table.c \ - e-calendar-table.h \ - e-calendar-table-config.c \ - e-calendar-table-config.h \ - e-cell-date-edit-config.c \ - e-cell-date-edit-config.h \ - e-cell-date-edit-text.h \ - e-cell-date-edit-text.c \ - e-comp-editor-registry.c \ - e-comp-editor-registry.h \ - e-date-edit-config.c \ - e-date-edit-config.h \ - e-date-time-list.c \ - e-date-time-list.h \ - e-day-view-config.c \ - e-day-view-config.h \ - e-day-view-layout.c \ - e-day-view-layout.h \ - e-day-view-main-item.c \ - e-day-view-main-item.h \ - e-day-view-time-item.c \ - e-day-view-time-item.h \ - e-day-view-top-item.c \ - e-day-view-top-item.h \ - e-day-view.c \ - e-day-view.h \ - e-itip-control.h \ - e-itip-control.c \ - e-meeting-attendee.c \ - e-meeting-attendee.h \ - e-meeting-list-view.c \ - e-meeting-list-view.h \ - e-meeting-store.c \ - e-meeting-store.h \ - e-meeting-time-sel.c \ - e-meeting-time-sel.h \ - e-meeting-time-sel-item.c \ - e-meeting-time-sel-item.h \ - e-meeting-types.h \ - e-meeting-utils.c \ - e-meeting-utils.h \ - e-memo-table.c \ - e-memo-table.h \ - e-memo-table-config.c \ - e-memo-table-config.h \ - e-memos.c \ - e-memos.h \ - e-mini-calendar-config.c \ - e-mini-calendar-config.h \ - e-select-names-editable.c \ - e-select-names-editable.h \ - e-select-names-renderer.c \ - e-select-names-renderer.h \ - e-week-view-config.c \ - e-week-view-config.h \ - e-week-view-event-item.c \ - e-week-view-event-item.h \ - e-week-view-layout.c \ - e-week-view-layout.h \ - e-week-view-main-item.c \ - e-week-view-main-item.h \ - e-week-view-titles-item.c \ - e-week-view-titles-item.h \ - e-week-view.c \ - e-week-view.h \ - e-tasks.c \ - e-tasks.h \ - e-timezone-entry.c \ - e-timezone-entry.h \ - gnome-cal.c \ - gnome-cal.h \ - goto.c \ - goto.h \ - itip-bonobo-control.c \ - itip-bonobo-control.h \ - itip-utils.c \ - itip-utils.h \ - main.c \ - memos-component.c \ - memos-component.h \ - memos-control.c \ - memos-control.h \ - migration.c \ - migration.h \ - misc.c \ - misc.h \ - print.c \ - print.h \ - tag-calendar.c \ - tag-calendar.h \ - tasks-component.c \ - tasks-component.h \ - tasks-control.c \ - tasks-control.h \ - weekday-picker.c \ - weekday-picker.h +#libevolution_calendar_la_SOURCES = \ +# $(MARSHAL_GENERATED) \ +# cal-search-bar.c \ +# cal-search-bar.h \ +# calendar-config.c \ +# calendar-config.h \ +# calendar-config-keys.h \ +# calendar-commands.c \ +# calendar-commands.h \ +# calendar-component.c \ +# calendar-component.h \ +# calendar-view.c \ +# calendar-view.h \ +# calendar-view-factory.c \ +# calendar-view-factory.h \ +# comp-editor-factory.c \ +# comp-editor-factory.h \ +# comp-util.c \ +# comp-util.h \ +# control-factory.c \ +# control-factory.h \ +# e-alarm-list.c \ +# e-alarm-list.h \ +# e-cal-component-preview.c \ +# e-cal-component-preview.h \ +# e-cal-component-memo-preview.c \ +# e-cal-component-memo-preview.h \ +# e-cal-config.c \ +# e-cal-config.h \ +# e-cal-event.c \ +# e-cal-event.h \ +# e-cal-menu.c \ +# e-cal-menu.h \ +# e-cal-model-calendar.h \ +# e-cal-model-calendar.c \ +# e-cal-model-calendar.h \ +# e-cal-model-tasks.c \ +# e-cal-model-tasks.h \ +# e-cal-model.c \ +# e-cal-model.h \ +# e-cal-popup.h \ +# e-cal-popup.c \ +# e-calendar-view.c \ +# e-calendar-view.h \ +# e-cal-list-view.c \ +# e-cal-list-view.h \ +# e-cal-list-view-config.c \ +# e-cal-list-view-config.h \ +# e-cal-model-memos.c \ +# e-cal-model-memos.h \ +# e-calendar-table.c \ +# e-calendar-table.h \ +# e-calendar-table-config.c \ +# e-calendar-table-config.h \ +# e-cell-date-edit-config.c \ +# e-cell-date-edit-config.h \ +# e-cell-date-edit-text.h \ +# e-cell-date-edit-text.c \ +# e-comp-editor-registry.c \ +# e-comp-editor-registry.h \ +# e-date-edit-config.c \ +# e-date-edit-config.h \ +# e-date-time-list.c \ +# e-date-time-list.h \ +# e-day-view-config.c \ +# e-day-view-config.h \ +# e-day-view-layout.c \ +# e-day-view-layout.h \ +# e-day-view-main-item.c \ +# e-day-view-main-item.h \ +# e-day-view-time-item.c \ +# e-day-view-time-item.h \ +# e-day-view-top-item.c \ +# e-day-view-top-item.h \ +# e-day-view.c \ +# e-day-view.h \ +# e-itip-control.h \ +# e-itip-control.c \ +# e-meeting-attendee.c \ +# e-meeting-attendee.h \ +# e-meeting-list-view.c \ +# e-meeting-list-view.h \ +# e-meeting-store.c \ +# e-meeting-store.h \ +# e-meeting-time-sel.c \ +# e-meeting-time-sel.h \ +# e-meeting-time-sel-item.c \ +# e-meeting-time-sel-item.h \ +# e-meeting-types.h \ +# e-meeting-utils.c \ +# e-meeting-utils.h \ +# e-memo-table.c \ +# e-memo-table.h \ +# e-memo-table-config.c \ +# e-memo-table-config.h \ +# e-memos.c \ +# e-memos.h \ +# e-mini-calendar-config.c \ +# e-mini-calendar-config.h \ +# e-select-names-editable.c \ +# e-select-names-editable.h \ +# e-select-names-renderer.c \ +# e-select-names-renderer.h \ +# e-week-view-config.c \ +# e-week-view-config.h \ +# e-week-view-event-item.c \ +# e-week-view-event-item.h \ +# e-week-view-layout.c \ +# e-week-view-layout.h \ +# e-week-view-main-item.c \ +# e-week-view-main-item.h \ +# e-week-view-titles-item.c \ +# e-week-view-titles-item.h \ +# e-week-view.c \ +# e-week-view.h \ +# e-tasks.c \ +# e-tasks.h \ +# e-timezone-entry.c \ +# e-timezone-entry.h \ +# gnome-cal.c \ +# gnome-cal.h \ +# goto.c \ +# goto.h \ +# itip-bonobo-control.c \ +# itip-bonobo-control.h \ +# itip-utils.c \ +# itip-utils.h \ +# main.c \ +# memos-component.c \ +# memos-component.h \ +# memos-control.c \ +# memos-control.h \ +# migration.c \ +# migration.h \ +# misc.c \ +# misc.h \ +# print.c \ +# print.h \ +# tag-calendar.c \ +# tag-calendar.h \ +# tasks-component.c \ +# tasks-component.h \ +# tasks-control.c \ +# tasks-control.h \ +# weekday-picker.c \ +# weekday-picker.h libevolution_calendar_la_LIBADD = \ $(WIN32_BOOTSTRAP_LIBS) \ @@ -226,7 +235,38 @@ libevolution_calendar_la_LIBADD = \ $(top_builddir)/calendar/gui/dialogs/libcal-dialogs.la \ $(top_builddir)/calendar/importers/libevolution-calendar-importers.la \ $(top_builddir)/widgets/e-timezone-dialog/libetimezonedialog.la \ - $(top_builddir)/widgets/misc/libefilterbar.la \ + $(top_builddir)/widgets/misc/libemiscwidgets.la \ + $(top_builddir)/filter/libfilter.la \ + $(top_builddir)/e-util/libeutil.la \ + $(top_builddir)/a11y/calendar/libevolution-calendar-a11y.la \ + $(LIBSOUP_LIBS) \ + $(CAMEL_LIBS) \ + $(EVOLUTION_CALENDAR_LIBS) + +libevolution_memos_la_LIBADD = \ + $(WIN32_BOOTSTRAP_LIBS) \ + $(top_builddir)/widgets/menus/libmenus.la \ + $(top_builddir)/shell/libeshell.la \ + $(top_builddir)/calendar/common/libevolution-calendarprivate.la \ + $(top_builddir)/calendar/gui/dialogs/libcal-dialogs.la \ + $(top_builddir)/calendar/importers/libevolution-calendar-importers.la \ + $(top_builddir)/widgets/e-timezone-dialog/libetimezonedialog.la \ + $(top_builddir)/widgets/misc/libemiscwidgets.la \ + $(top_builddir)/filter/libfilter.la \ + $(top_builddir)/e-util/libeutil.la \ + $(top_builddir)/a11y/calendar/libevolution-calendar-a11y.la \ + $(LIBSOUP_LIBS) \ + $(CAMEL_LIBS) \ + $(EVOLUTION_CALENDAR_LIBS) + +libevolution_tasks_la_LIBADD = \ + $(WIN32_BOOTSTRAP_LIBS) \ + $(top_builddir)/widgets/menus/libmenus.la \ + $(top_builddir)/shell/libeshell.la \ + $(top_builddir)/calendar/common/libevolution-calendarprivate.la \ + $(top_builddir)/calendar/gui/dialogs/libcal-dialogs.la \ + $(top_builddir)/calendar/importers/libevolution-calendar-importers.la \ + $(top_builddir)/widgets/e-timezone-dialog/libetimezonedialog.la \ $(top_builddir)/widgets/misc/libemiscwidgets.la \ $(top_builddir)/filter/libfilter.la \ $(top_builddir)/e-util/libeutil.la \ @@ -236,10 +276,9 @@ libevolution_calendar_la_LIBADD = \ $(EVOLUTION_CALENDAR_LIBS) libevolution_calendar_la_LDFLAGS = -avoid-version -module $(NO_UNDEFINED) +libevolution_memos_la_LDFLAGS = -avoid-version -module $(NO_UNDEFINED) +libevolution_tasks_la_LDFLAGS = -avoid-version -module $(NO_UNDEFINED) -server_in_files = GNOME_Evolution_Calendar.server.in.in -server_DATA = $(server_in_files:.server.in.in=.server) -@EVO_SERVER_RULE@ @INTLTOOL_SERVER_RULE@ # GConf schemas @@ -255,10 +294,8 @@ EXTRA_DIST = \ $(glade_DATA) \ $(schema_in_files) \ $(etspec_DATA) \ - $(server_in_files) \ $(search_files) -BUILT_SOURCES = $(IDL_GENERATED) $(server_DATA) CLEANFILES = $(BUILT_SOURCES) DISTCLEANFILES = $(schema_DATA) diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h index 46eff11cef..9ab4ebefd9 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.h +++ b/calendar/gui/dialogs/cal-prefs-dialog.h @@ -29,7 +29,6 @@ #include #include #include -#include "evolution-config-control.h" G_BEGIN_DECLS diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 441358adc8..ee5ad096d0 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index ca1b581ee6..99750b27c5 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "event-page.h" #include "recurrence-page.h" diff --git a/calendar/gui/dialogs/memo-editor.c b/calendar/gui/dialogs/memo-editor.c index a4c73e8dee..692e1fc256 100644 --- a/calendar/gui/dialogs/memo-editor.c +++ b/calendar/gui/dialogs/memo-editor.c @@ -34,7 +34,6 @@ #include #include -#include #include "memo-page.h" #include "cancel-comp.h" diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index 487ed4e9c5..ffd3be6c6e 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -522,7 +522,6 @@ date_changed_cb (EDateEdit *dedit, icalproperty_status status; gboolean date_set; - tdpage = TASK_DETAILS_PAGE (data); priv = tdpage->priv; if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (tdpage))) diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 1d947ead13..17339e31b5 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -33,7 +33,6 @@ #include #include -#include #include "task-page.h" #include "task-details-page.h" diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 31c10b5dc2..29f443c0d6 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -1482,7 +1482,6 @@ date_changed_cb (EDateEdit *dedit, struct icaltimetype start_tt = icaltime_null_time(); struct icaltimetype due_tt = icaltime_null_time(); - tpage = TASK_PAGE (data); priv = tpage->priv; if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (tpage))) diff --git a/calendar/gui/e-cal-shell-module.c b/calendar/gui/e-cal-shell-module.c new file mode 100644 index 0000000000..e928631298 --- /dev/null +++ b/calendar/gui/e-cal-shell-module.c @@ -0,0 +1,149 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* e-cal-shell-module.c + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include + +#include + +#define MODULE_NAME "calendar" +#define MODULE_ALIASES "" +#define MODULE_SCHEMES "calendar" +#define MODULE_SEARCHES "caltypes.xml" +#define MODULE_SORT_ORDER 400 + +/* Module Entry Point */ +void e_shell_module_init (GTypeModule *type_module); + +static void +action_appointment_new_cb (GtkAction *action, + EShellWindow *shell_window) +{ +} + +static void +action_appointment_all_day_new_cb (GtkAction *action, + EShellWindow *shell_window) +{ +} + +static void +action_meeting_new_cb (GtkAction *action, + EShellWindow *shell_window) +{ +} + +static void +action_calendar_new_cb (GtkAction *action, + EShellWindow *shell_window) +{ +} + +static GtkActionEntry item_entries[] = { + + { "appointment-new", + "appointment-new", + N_("_Appointment"), /* XXX Need C_() here */ + "a", + N_("Create a new appointment"), + G_CALLBACK (action_appointment_new_cb) }, + + { "appointment-all-day-new", + "stock_new-24h-appointment", + N_("All Day A_ppointment"), + NULL, + N_("Create a new all-day appointment"), + G_CALLBACK (action_appointment_all_day_new_cb) }, + + { "meeting-new", + "stock_new-meeting", + N_("M_eeting"), + "e", + N_("Create a new meeting request"), + G_CALLBACK (action_meeting_new_cb) } +}; + +static GtkActionEntry source_entries[] = { + + { "calendar-new", + "x-office-calendar", + N_("Cale_ndar"), + NULL, + N_("Create a new calendar"), + G_CALLBACK (action_calendar_new_cb) } +}; + +static gboolean +cal_module_handle_uri (EShellModule *shell_module, + const gchar *uri) +{ + /* FIXME */ + return FALSE; +} + +static void +cal_module_window_created (EShellModule *shell_module, + EShellWindow *shell_window) +{ + const gchar *module_name; + + module_name = G_TYPE_MODULE (shell_module)->name; + + e_shell_window_register_new_item_actions ( + shell_window, module_name, + item_entries, G_N_ELEMENTS (item_entries)); + + e_shell_window_register_new_source_actions ( + shell_window, module_name, + source_entries, G_N_ELEMENTS (source_entries)); +} + +static EShellModuleInfo module_info = { + + MODULE_NAME, + MODULE_ALIASES, + MODULE_SCHEMES, + MODULE_SEARCHES, + MODULE_SORT_ORDER +}; + +void +e_shell_module_init (GTypeModule *type_module) +{ + EShell *shell; + EShellModule *shell_module; + + shell_module = E_SHELL_MODULE (type_module); + shell = e_shell_module_get_shell (shell_module); + + e_cal_shell_view_get_type (type_module); + e_shell_module_set_info (shell_module, &module_info); + + g_signal_connect_swapped ( + shell, "handle-uri", + G_CALLBACK (cal_module_handle_uri), shell_module); + + g_signal_connect_swapped ( + shell, "window-created", + G_CALLBACK (cal_module_window_created), shell_module); +} diff --git a/calendar/gui/e-cal-shell-view-actions.c b/calendar/gui/e-cal-shell-view-actions.c index 8b89e31cc0..638dc58ad0 100644 --- a/calendar/gui/e-cal-shell-view-actions.c +++ b/calendar/gui/e-cal-shell-view-actions.c @@ -20,7 +20,234 @@ #include "e-cal-shell-view-private.h" -static GtkActionEntry cal_entries[] = { +static void +action_calendar_go_back_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_calendar_go_forward_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_calendar_go_today_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_calendar_jump_to_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_calendar_print_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_calendar_print_preview_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_calendar_purge_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_calendar_view_cb (GtkRadioAction *action, + GtkRadioAction *current, + ECalShellView *cal_shell_view) +{ +} + +static void +action_event_clipboard_copy_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_event_clipboard_cut_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_event_clipboard_paste_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_event_delete_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_event_delete_occurrence_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_event_delete_occurrence_all_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static void +action_event_open_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ +} + +static GtkActionEntry calendar_entries[] = { + + { "calendar-go-back", + GTK_STOCK_GO_BACK, + N_("Previous"), + NULL, + N_("Go Back"), + G_CALLBACK (action_calendar_go_back_cb) }, + + { "calendar-go-forward", + GTK_STOCK_GO_FORWARD, + N_("Next"), + NULL, + N_("Go Forward"), + G_CALLBACK (action_calendar_go_forward_cb) }, + + { "calendar-go-today", + "go-today", + N_("Select _Today"), + "t", + N_("Select today"), + G_CALLBACK (action_calendar_go_today_cb) }, + + { "calendar-jump-to", + GTK_STOCK_JUMP_TO, + N_("Select _Date"), + "g", + N_("Select a specific date"), + G_CALLBACK (action_calendar_jump_to_cb) }, + + { "calendar-print", + GTK_STOCK_PRINT, + NULL, + NULL, + N_("Print this calendar"), + G_CALLBACK (action_calendar_print_cb) }, + + { "calendar-print-preview", + GTK_STOCK_PRINT_PREVIEW, + NULL, + NULL, + N_("Preview the calendar to be printed"), + G_CALLBACK (action_calendar_print_preview_cb) }, + + { "calendar-purge", + NULL, + N_("Purg_e"), + "e", + N_("Purge old appointments and meetings"), + G_CALLBACK (action_calendar_purge_cb) }, + + { "event-clipboard-copy", + GTK_STOCK_COPY, + NULL, + NULL, + N_("Copy the selection"), + G_CALLBACK (action_event_clipboard_copy_cb) }, + + { "event-clipboard-cut", + GTK_STOCK_CUT, + NULL, + NULL, + N_("Cut the selection"), + G_CALLBACK (action_event_clipboard_cut_cb) }, + + { "event-clipboard-paste", + GTK_STOCK_PASTE, + NULL, + NULL, + N_("Paste the clipboard"), + G_CALLBACK (action_event_clipboard_paste_cb) }, + + { "event-delete", + GTK_STOCK_DELETE, + NULL, + NULL, + N_("Delete the appointment"), + G_CALLBACK (action_event_delete_cb) }, + + { "event-delete-occurrence", + GTK_STOCK_DELETE, + N_("Delete This _Occurrence"), + NULL, + N_("Delete this occurrence"), + G_CALLBACK (action_event_delete_occurrence_cb) }, + + { "event-delete-occurrence-all", + GTK_STOCK_DELETE, + N_("Delete _All Occurrences"), + NULL, + N_("Delete all occurrences"), + G_CALLBACK (action_event_delete_occurrence_all_cb) }, + + { "event-open", + NULL, + N_("_Open Appointment"), + "o", + N_("View the current appointment"), + G_CALLBACK (action_event_open_cb) } +}; + +static GtkRadioActionEntry calendar_view_entries[] = { + + { "calendar-view-day", + "view-calendar-day", + N_("Day"), + NULL, + N_("Show one day"), + GNOME_CAL_DAY_VIEW }, + + { "calendar-view-list", + "view-calendar-list", + N_("List"), + NULL, + N_("Show as list"), + GNOME_CAL_LIST_VIEW }, + + { "calendar-view-month", + "view-calendar-month", + N_("Month"), + NULL, + N_("Show one month"), + GNOME_CAL_MONTH_VIEW }, + + { "calendar-view-week", + "view-calendar-week", + N_("Week"), + NULL, + N_("Show one week"), + GNOME_CAL_WEEK_VIEW }, + + { "calendar-view-workweek", + "view-calendar-workweek", + N_("Work Week"), + NULL, + N_("Show one work week"), + GNOME_CAL_WORK_WEEK_VIEW } }; void @@ -37,12 +264,16 @@ e_cal_shell_view_actions_init (ECalShellView *cal_shell_view) manager = e_shell_window_get_ui_manager (shell_window); domain = GETTEXT_PACKAGE; - e_load_ui_definition (manager, "evolution-cals.ui"); + e_load_ui_definition (manager, "evolution-calendars.ui"); - action_group = cal_shell_view->priv->cal_actions; + action_group = cal_shell_view->priv->calendar_actions; gtk_action_group_set_translation_domain (action_group, domain); gtk_action_group_add_actions ( - action_group, cal_entries, - G_N_ELEMENTS (cal_entries), cal_shell_view); + action_group, calendar_entries, + G_N_ELEMENTS (calendar_entries), cal_shell_view); + gtk_action_group_add_radio_actions ( + action_group, calendar_view_entries, + G_N_ELEMENTS (calendar_view_entries), GNOME_CAL_DAY_VIEW, + G_CALLBACK (action_calendar_view_cb), cal_shell_view); gtk_ui_manager_insert_action_group (manager, action_group, 0); } diff --git a/calendar/gui/e-cal-shell-view-private.c b/calendar/gui/e-cal-shell-view-private.c index 3e3eef3c6a..100a12b09f 100644 --- a/calendar/gui/e-cal-shell-view-private.c +++ b/calendar/gui/e-cal-shell-view-private.c @@ -25,7 +25,7 @@ e_cal_shell_view_private_init (ECalShellView *cal_shell_view) { ECalShellViewPrivate *priv = cal_shell_view->priv; - priv->cal_actions = gtk_action_group_new ("cals"); + priv->calendar_actions = gtk_action_group_new ("calendars"); } void @@ -39,7 +39,7 @@ e_cal_shell_view_private_dispose (ECalShellView *cal_shell_view) { ECalShellViewPrivate *priv = cal_shell_view->priv; - DISPOSE (priv->cal_actions); + DISPOSE (priv->calendar_actions); } void diff --git a/calendar/gui/e-cal-shell-view-private.h b/calendar/gui/e-cal-shell-view-private.h index 3ea9adb674..fa591d11ed 100644 --- a/calendar/gui/e-cal-shell-view-private.h +++ b/calendar/gui/e-cal-shell-view-private.h @@ -23,9 +23,13 @@ #include "e-cal-shell-view.h" +#include + +#include #include #include +#include #include #define E_CAL_SHELL_VIEW_GET_PRIVATE(obj) \ @@ -50,7 +54,7 @@ struct _ECalShellViewPrivate { /*** UI Management ***/ - GtkActionGroup *cal_actions; + GtkActionGroup *calendar_actions; }; void e_cal_shell_view_private_init diff --git a/calendar/gui/e-cal-shell-view.c b/calendar/gui/e-cal-shell-view.c index 8dd7bfcd5d..7a77d84991 100644 --- a/calendar/gui/e-cal-shell-view.c +++ b/calendar/gui/e-cal-shell-view.c @@ -59,9 +59,9 @@ cal_shell_view_changed (EShellView *shell_view) priv = E_CAL_SHELL_VIEW_GET_PRIVATE (shell_view); - action_group = priv->cal_actions; + action_group = priv->calendar_actions; visible = e_shell_view_is_selected (shell_view); - gtk_action_group_visible (action_group, visible); + gtk_action_group_set_visible (action_group, visible); } static void diff --git a/calendar/gui/e-memo-shell-module.c b/calendar/gui/e-memo-shell-module.c new file mode 100644 index 0000000000..d5c0a2d60d --- /dev/null +++ b/calendar/gui/e-memo-shell-module.c @@ -0,0 +1,136 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* e-memo-shell-module.c + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include + +#include + +#define MODULE_NAME "memos" +#define MODULE_ALIASES "" +#define MODULE_SCHEMES "memo" +#define MODULE_SEARCHES "memotypes.xml" +#define MODULE_SORT_ORDER 500 + +/* Module Entry Point */ +void e_shell_module_init (GTypeModule *type_module); + +static void +action_memo_new_cb (GtkAction *action, + EShellWindow *shell_window) +{ +} + +static void +action_memo_shared_new_cb (GtkAction *action, + EShellWindow *shell_window) +{ +} + +static void +action_memo_list_new_cb (GtkAction *action, + EShellWindow *shell_window) +{ +} + +static GtkActionEntry item_entries[] = { + + { "memo-new", + "stock_insert-note", + N_("Mem_o"), /* XXX Need C_() here */ + "o", + N_("Create a new memo"), + G_CALLBACK (action_memo_new_cb) }, + + { "memo-shared-new", + "stock_insert-note", + N_("_Shared Memo"), + "h", + N_("Create a new shared memo"), + G_CALLBACK (action_memo_shared_new_cb) } +}; + +static GtkActionEntry source_entries[] = { + + { "memo-list-new", + "stock_notes", + N_("Memo Li_st"), + NULL, + N_("Create a new memo list"), + G_CALLBACK (action_memo_list_new_cb) } +}; + +static gboolean +memo_module_handle_uri (EShellModule *shell_module, + const gchar *uri) +{ + /* FIXME */ + return FALSE; +} + +static void +memo_module_window_created (EShellModule *shell_module, + EShellWindow *shell_window) +{ + const gchar *module_name; + + module_name = G_TYPE_MODULE (shell_module)->name; + + e_shell_window_register_new_item_actions ( + shell_window, module_name, + item_entries, G_N_ELEMENTS (item_entries)); + + e_shell_window_register_new_source_actions ( + shell_window, module_name, + source_entries, G_N_ELEMENTS (source_entries)); +} + +static EShellModuleInfo module_info = { + + MODULE_NAME, + MODULE_ALIASES, + MODULE_SCHEMES, + MODULE_SEARCHES, + MODULE_SORT_ORDER +}; + +void +e_shell_module_init (GTypeModule *type_module) +{ + EShell *shell; + EShellModule *shell_module; + + shell_module = E_SHELL_MODULE (type_module); + shell = e_shell_module_get_shell (shell_module); + + e_memo_shell_view_get_type (type_module); + e_shell_module_set_info (shell_module, &module_info); + + g_signal_connect_swapped ( + shell, "handle-uri", + G_CALLBACK (memo_module_handle_uri), shell_module); + + g_signal_connect_swapped ( + shell, "window-created", + G_CALLBACK (memo_module_window_created), shell_module); +} diff --git a/calendar/gui/e-memo-shell-view-actions.c b/calendar/gui/e-memo-shell-view-actions.c index e08a853c09..5086c0bb69 100644 --- a/calendar/gui/e-memo-shell-view-actions.c +++ b/calendar/gui/e-memo-shell-view-actions.c @@ -20,7 +20,115 @@ #include "e-memo-shell-view-private.h" +static void +action_memo_clipboard_copy_cb (GtkAction *action, + EMemoShellView *memo_shell_view) +{ +} + +static void +action_memo_clipboard_cut_cb (GtkAction *action, + EMemoShellView *memo_shell_view) +{ +} + +static void +action_memo_clipboard_paste_cb (GtkAction *action, + EMemoShellView *memo_shell_view) +{ +} + +static void +action_memo_delete_cb (GtkAction *action, + EMemoShellView *memo_shell_view) +{ +} + +static void +action_memo_open_cb (GtkAction *action, + EMemoShellView *memo_shell_view) +{ +} + +static void +action_memo_preview_cb (GtkToggleAction *action, + EMemoShellView *memo_shell_view) +{ +} + +static void +action_memo_print_cb (GtkAction *action, + EMemoShellView *memo_shell_view) +{ +} + +static void +action_memo_print_preview_cb (GtkAction *action, + EMemoShellView *memo_shell_view) +{ +} + static GtkActionEntry memo_entries[] = { + + { "memo-clipboard-copy", + GTK_STOCK_COPY, + NULL, + NULL, + N_("Copy selected memo"), + G_CALLBACK (action_memo_clipboard_copy_cb) }, + + { "memo-clipboard-cut", + GTK_STOCK_CUT, + NULL, + NULL, + N_("Cut selected memo"), + G_CALLBACK (action_memo_clipboard_cut_cb) }, + + { "memo-clipboard-paste", + GTK_STOCK_PASTE, + NULL, + NULL, + N_("Paste memo from the clipboard"), + G_CALLBACK (action_memo_clipboard_paste_cb) }, + + { "memo-delete", + GTK_STOCK_DELETE, + NULL, + NULL, + N_("Delete selected memos"), + G_CALLBACK (action_memo_delete_cb) }, + + { "memo-open", + NULL, + N_("Open Memo"), + "o", + N_("View the selected memo"), + G_CALLBACK (action_memo_open_cb) }, + + { "memo-print", + GTK_STOCK_PRINT, + NULL, + NULL, + N_("Print the list of memos"), + G_CALLBACK (action_memo_print_cb) }, + + { "memo-print-preview", + GTK_STOCK_PRINT_PREVIEW, + NULL, + NULL, + N_("Preview the list of memos to be printed"), + G_CALLBACK (action_memo_print_preview_cb) }, +}; + +static GtkToggleActionEntry memo_toggle_entries[] = { + + { "memo-preview", + NULL, + N_("Memo _Preview"), + "m", + N_("Show memo preview pane"), + G_CALLBACK (action_memo_preview_cb), + TRUE } }; void @@ -44,5 +152,8 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view) gtk_action_group_add_actions ( action_group, memo_entries, G_N_ELEMENTS (memo_entries), memo_shell_view); + gtk_action_group_add_toggle_actions ( + action_group, memo_toggle_entries, + G_N_ELEMENTS (memo_toggle_entries), memo_shell_view); gtk_ui_manager_insert_action_group (manager, action_group, 0); } diff --git a/calendar/gui/e-memo-shell-view-actions.h b/calendar/gui/e-memo-shell-view-actions.h index 9d38c4d1d0..4ac71c2083 100644 --- a/calendar/gui/e-memo-shell-view-actions.h +++ b/calendar/gui/e-memo-shell-view-actions.h @@ -23,6 +23,24 @@ #include +/* Memo Actions */ +#define E_SHELL_WINDOW_ACTION_MEMO_CLIPBOARD_COPY(window) \ + E_SHELL_WINDOW_ACTION ((window), "memo-clipboard-copy") +#define E_SHELL_WINDOW_ACTION_MEMO_CLIPBOARD_CUT(window) \ + E_SHELL_WINDOW_ACTION ((window), "memo-clipboard-cut") +#define E_SHELL_WINDOW_ACTION_MEMO_CLIPBOARD_PASTE(window) \ + E_SHELL_WINDOW_ACTION ((window), "memo-clipboard-paste") +#define E_SHELL_WINDOW_ACTION_MEMO_DELETE(window) \ + E_SHELL_WINDOW_ACTION ((window), "memo-delete") +#define E_SHELL_WINDOW_ACTION_MEMO_OPEN(window) \ + E_SHELL_WINDOW_ACTION ((window), "memo-open") +#define E_SHELL_WINDOW_ACTION_MEMO_PREVIEW(window) \ + E_SHELL_WINDOW_ACTION ((window), "memo-preview") +#define E_SHELL_WINDOW_ACTION_MEMO_PRINT(window) \ + E_SHELL_WINDOW_ACTION ((window), "memo-print") +#define E_SHELL_WINDOW_ACTION_MEMO_PRINT_PREVIEW(window) \ + E_SHELL_WINDOW_ACTION ((window), "memo-print-preview") + /* Action Groups */ #define E_SHELL_WINDOW_ACTION_GROUP_MEMOS(window) \ E_SHELL_WINDOW_ACTION_GROUP ((window), "memos") diff --git a/calendar/gui/e-memo-shell-view-private.h b/calendar/gui/e-memo-shell-view-private.h index 3ff9c30a8f..ad75d4f2b8 100644 --- a/calendar/gui/e-memo-shell-view-private.h +++ b/calendar/gui/e-memo-shell-view-private.h @@ -23,6 +23,9 @@ #include "e-memo-shell-view.h" +#include + +#include #include #include diff --git a/calendar/gui/e-memo-shell-view.c b/calendar/gui/e-memo-shell-view.c index 8f1504848f..c6ece950f0 100644 --- a/calendar/gui/e-memo-shell-view.c +++ b/calendar/gui/e-memo-shell-view.c @@ -61,7 +61,7 @@ memo_shell_view_changed (EShellView *shell_view) action_group = priv->memo_actions; visible = e_shell_view_is_selected (shell_view); - gtk_action_group_visible (action_group, visible); + gtk_action_group_set_visible (action_group, visible); } static void diff --git a/calendar/gui/e-task-shell-module.c b/calendar/gui/e-task-shell-module.c new file mode 100644 index 0000000000..a87b63ea60 --- /dev/null +++ b/calendar/gui/e-task-shell-module.c @@ -0,0 +1,136 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* e-task-shell-module.c + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include + +#include + +#define MODULE_NAME "tasks" +#define MODULE_ALIASES "" +#define MODULE_SCHEMES "task" +#define MODULE_SEARCHES "tasktypes.xml" +#define MODULE_SORT_ORDER 600 + +/* Module Entry Point */ +void e_shell_module_init (GTypeModule *type_module); + +static void +action_task_new_cb (GtkAction *action, + EShellWindow *shell_window) +{ +} + +static void +action_task_assigned_new_cb (GtkAction *action, + EShellWindow *shell_window) +{ +} + +static void +action_task_list_new_cb (GtkAction *action, + EShellWindow *shell_window) +{ +} + +static GtkActionEntry item_entries[] = { + + { "task-new", + "stock_task", + N_("_Task"), /* XXX Need C_() here */ + "t", + N_("Create a new task"), + G_CALLBACK (action_task_new_cb) }, + + { "task-assigned-new", + "stock_task", + N_("Assigne_d Task"), + NULL, + N_("Create a new assigned task"), + G_CALLBACK (action_task_assigned_new_cb) } +}; + +static GtkActionEntry source_entries[] = { + + { "task-list-new", + "stock_todo", + N_("Tas_k List"), + NULL, + N_("Create a new task list"), + G_CALLBACK (action_task_list_new_cb) } +}; + +static gboolean +task_module_handle_uri (EShellModule *shell_module, + const gchar *uri) +{ + /* FIXME */ + return FALSE; +} + +static void +task_module_window_created (EShellModule *shell_module, + EShellWindow *shell_window) +{ + const gchar *module_name; + + module_name = G_TYPE_MODULE (shell_module)->name; + + e_shell_window_register_new_item_actions ( + shell_window, module_name, + item_entries, G_N_ELEMENTS (item_entries)); + + e_shell_window_register_new_source_actions ( + shell_window, module_name, + source_entries, G_N_ELEMENTS (source_entries)); +} + +static EShellModuleInfo module_info = { + + MODULE_NAME, + MODULE_ALIASES, + MODULE_SCHEMES, + MODULE_SEARCHES, + MODULE_SORT_ORDER +}; + +void +e_shell_module_init (GTypeModule *type_module) +{ + EShell *shell; + EShellModule *shell_module; + + shell_module = E_SHELL_MODULE (type_module); + shell = e_shell_module_get_shell (shell_module); + + e_task_shell_view_get_type (type_module); + e_shell_module_set_info (shell_module, &module_info); + + g_signal_connect_swapped ( + shell, "handle-uri", + G_CALLBACK (task_module_handle_uri), shell_module); + + g_signal_connect_swapped ( + shell, "window-created", + G_CALLBACK (task_module_window_created), shell_module); +} diff --git a/calendar/gui/e-task-shell-view-actions.c b/calendar/gui/e-task-shell-view-actions.c index baf89b4526..36d2d3a3d0 100644 --- a/calendar/gui/e-task-shell-view-actions.c +++ b/calendar/gui/e-task-shell-view-actions.c @@ -20,7 +20,167 @@ #include "e-task-shell-view-private.h" +static void +action_task_assign_cb (GtkAction *action, + ETaskShellView *task_shell_view) +{ +} + +static void +action_task_clipboard_copy_cb (GtkAction *action, + ETaskShellView *task_shell_view) +{ +} + +static void +action_task_clipboard_cut_cb (GtkAction *action, + ETaskShellView *task_shell_view) +{ +} + +static void +action_task_clipboard_paste_cb (GtkAction *action, + ETaskShellView *task_shell_view) +{ +} + +static void +action_task_delete_cb (GtkAction *action, + ETaskShellView *task_shell_view) +{ +} + +static void +action_task_forward_cb (GtkAction *action, + ETaskShellView *task_shell_view) +{ +} + +static void +action_task_mark_complete_cb (GtkAction *action, + ETaskShellView *task_shell_view) +{ +} + +static void +action_task_open_cb (GtkAction *action, + ETaskShellView *task_shell_view) +{ +} + +static void +action_task_preview_cb (GtkToggleAction *action, + ETaskShellView *task_shell_view) +{ +} + +static void +action_task_print_cb (GtkAction *action, + ETaskShellView *task_shell_view) +{ +} + +static void +action_task_print_preview_cb (GtkAction *action, + ETaskShellView *task_shell_view) +{ +} + +static void +action_task_purge_cb (GtkAction *action, + ETaskShellView *task_shell_view) +{ +} + static GtkActionEntry task_entries[] = { + + { "task-assign", + NULL, + N_("_Assign Task"), + NULL, + NULL, /* XXX Add a tooltip! */ + G_CALLBACK (action_task_assign_cb) }, + + { "task-clipboard-copy", + GTK_STOCK_COPY, + NULL, + NULL, + N_("Copy selected tasks"), + G_CALLBACK (action_task_clipboard_copy_cb) }, + + { "task-clipboard-cut", + GTK_STOCK_CUT, + NULL, + NULL, + N_("Cut selected tasks"), + G_CALLBACK (action_task_clipboard_cut_cb) }, + + { "task-clipboard-paste", + GTK_STOCK_PASTE, + NULL, + NULL, + N_("Paste tasks from the clipboard"), + G_CALLBACK (action_task_clipboard_paste_cb) }, + + { "task-delete", + GTK_STOCK_DELETE, + NULL, + NULL, + N_("Delete selected tasks"), + G_CALLBACK (action_task_delete_cb) }, + + { "task-forward", + "mail-forward", + N_("_Forward as iCalendar"), + "f", + NULL, /* XXX Add a tooltip! */ + G_CALLBACK (action_task_forward_cb) }, + + { "task-mark-complete", + NULL, + N_("Mar_k as Complete"), + "k", + N_("Mark selected tasks as complete"), + G_CALLBACK (action_task_mark_complete_cb) }, + + { "task-open", + NULL, + N_("_Open Task"), + "o", + N_("View the selected task"), + G_CALLBACK (action_task_open_cb) }, + + { "task-print", + GTK_STOCK_PRINT, + NULL, + NULL, + N_("Print the list of tasks"), + G_CALLBACK (action_task_print_cb) }, + + { "task-print-preview", + GTK_STOCK_PRINT_PREVIEW, + NULL, + NULL, + N_("Preview the list of tasks to be printed"), + G_CALLBACK (action_task_print_preview_cb) }, + + { "task-purge", + NULL, + N_("Purg_e"), + "e", + N_("Delete completed tasks"), + G_CALLBACK (action_task_purge_cb) } +}; + +static GtkToggleActionEntry task_toggle_entries[] = { + + { "task-preview", + NULL, + N_("Task _Preview"), + "m", + N_("Show task preview pane"), + G_CALLBACK (action_task_preview_cb), + TRUE } }; void @@ -44,5 +204,8 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view) gtk_action_group_add_actions ( action_group, task_entries, G_N_ELEMENTS (task_entries), task_shell_view); + gtk_action_group_add_toggle_actions ( + action_group, task_toggle_entries, + G_N_ELEMENTS (task_toggle_entries), task_shell_view); gtk_ui_manager_insert_action_group (manager, action_group, 0); } diff --git a/calendar/gui/e-task-shell-view-actions.h b/calendar/gui/e-task-shell-view-actions.h index 9d38c4d1d0..9c31590814 100644 --- a/calendar/gui/e-task-shell-view-actions.h +++ b/calendar/gui/e-task-shell-view-actions.h @@ -1,5 +1,5 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-memo-shell-view-actions.h +/* e-task-shell-view-actions.h * * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * @@ -18,13 +18,39 @@ * Boston, MA 02110-1301, USA. */ -#ifndef E_MEMO_SHELL_VIEW_ACTIONS_H -#define E_MEMO_SHELL_VIEW_ACTIONS_H +#ifndef E_TASK_SHELL_VIEW_ACTIONS_H +#define E_TASK_SHELL_VIEW_ACTIONS_H #include +/* Task Actions */ +#define E_SHELL_WINDOW_ACTION_TASK_ASSIGN(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-assign") +#define E_SHELL_WINDOW_ACTION_TASK_CLIPBOARD_COPY(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-clipboard-copy") +#define E_SHELL_WINDOW_ACTION_TASK_CLIPBOARD_CUT(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-clibpard-cut") +#define E_SHELL_WINDOW_ACTION_TASK_CLIPBOARD_PASTE(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-clipboard-paste") +#define E_SHELL_WINDOW_ACTION_TASK_DELETE(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-delete") +#define E_SHELL_WINDOW_ACTION_TASK_FORWARD(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-forward") +#define E_SHELL_WINDOW_ACTION_TASK_MARK_COMPLETE(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-mark-complete") +#define E_SHELL_WINDOW_ACTION_TASK_OPEN(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-open") +#define E_SHELL_WINDOW_ACTION_TASK_PREVIEW(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-preview") +#define E_SHELL_WINDOW_ACTION_TASK_PRINT(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-print") +#define E_SHELL_WINDOW_ACTION_TASK_PRINT_PREVIEW(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-print-preview") +#define E_SHELL_WINDOW_ACTION_TASK_PURGE(window) \ + E_SHELL_WINDOW_ACTION ((window), "task-purge") + /* Action Groups */ -#define E_SHELL_WINDOW_ACTION_GROUP_MEMOS(window) \ - E_SHELL_WINDOW_ACTION_GROUP ((window), "memos") +#define E_SHELL_WINDOW_ACTION_GROUP_TASKS(window) \ + E_SHELL_WINDOW_ACTION_GROUP ((window), "tasks") -#endif /* E_MEMO_SHELL_VIEW_ACTIONS_H */ +#endif /* E_TASK_SHELL_VIEW_ACTIONS_H */ diff --git a/calendar/gui/e-task-shell-view-private.h b/calendar/gui/e-task-shell-view-private.h index 6faae53039..42a9ea10bc 100644 --- a/calendar/gui/e-task-shell-view-private.h +++ b/calendar/gui/e-task-shell-view-private.h @@ -23,6 +23,9 @@ #include "e-task-shell-view.h" +#include + +#include #include #include diff --git a/calendar/gui/e-task-shell-view.c b/calendar/gui/e-task-shell-view.c index 4beecf6947..526769234f 100644 --- a/calendar/gui/e-task-shell-view.c +++ b/calendar/gui/e-task-shell-view.c @@ -61,7 +61,7 @@ task_shell_view_changed (EShellView *shell_view) action_group = priv->task_actions; visible = e_shell_view_is_selected (shell_view); - gtk_action_group_visible (action_group, visible); + gtk_action_group_set_visible (action_group, visible); } static void diff --git a/calendar/gui/memos-control.c b/calendar/gui/memos-control.c index e7f9132665..d6a80a0067 100644 --- a/calendar/gui/memos-control.c +++ b/calendar/gui/memos-control.c @@ -181,23 +181,6 @@ static BonoboUIVerb verbs [] = { BONOBO_UI_VERB_END }; -static EPixmap pixmaps [] = { - E_PIXMAP ("/commands/MemosCopy", "edit-copy", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/MemosCut", "edit-cut", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/MemosDelete", "edit-delete", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/MemosPaste", "edit-paste", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/MemosPrint", "document-print", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/MemosPrintPreview", "document-print-preview", E_ICON_SIZE_MENU), - - E_PIXMAP ("/Toolbar/Cut", "edit-cut", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/Copy", "edit-copy", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/Paste", "edit-paste", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/Print", "document-print", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/Delete", "edit-delete", E_ICON_SIZE_LARGE_TOOLBAR), - - E_PIXMAP_END -}; - void memos_control_activate (BonoboControl *control, EMemos *memos) { @@ -230,8 +213,6 @@ memos_control_activate (BonoboControl *control, EMemos *memos) NULL); g_free (xmlfile); - e_pixmaps_update (uic, pixmaps); - e_memos_setup_view_menus (memos, uic); /* Signals from the memos widget; also sensitize the menu items as appropriate */ diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h index ee41aade9e..4b9bf8683d 100644 --- a/shell/e-shell-view.h +++ b/shell/e-shell-view.h @@ -27,7 +27,7 @@ #include #include -#include +#include /* Standard GObject macros */ #define E_TYPE_SHELL_VIEW \ diff --git a/ui/Makefile.am b/ui/Makefile.am index 5023d30148..fb02f4f427 100644 --- a/ui/Makefile.am +++ b/ui/Makefile.am @@ -1,17 +1,16 @@ XML_FILES = \ evolution.xml \ - evolution-addressbook.xml \ - evolution-calendar.xml \ evolution-mail-message.xml \ evolution-mail-list.xml \ evolution-mail-global.xml \ - evolution-mail-messagedisplay.xml \ - evolution-memos.xml \ - evolution-tasks.xml + evolution-mail-messagedisplay.xml UI_FILES = \ + evolution-calendars.ui \ evolution-contacts.ui \ - evolution-shell.ui + evolution-memos.ui \ + evolution-shell.ui \ + evolution-tasks.ui evolutionui_DATA = $(UI_FILES) $(XML_FILES) diff --git a/ui/evolution-addressbook.xml b/ui/evolution-addressbook.xml deleted file mode 100644 index 999509013b..0000000000 --- a/ui/evolution-addressbook.xml +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui/evolution-calendar.xml b/ui/evolution-calendar.xml deleted file mode 100644 index 5d7a5d875b..0000000000 --- a/ui/evolution-calendar.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui/evolution-calendars.ui b/ui/evolution-calendars.ui new file mode 100644 index 0000000000..5bda2a179f --- /dev/null +++ b/ui/evolution-calendars.ui @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/evolution-memos.ui b/ui/evolution-memos.ui new file mode 100644 index 0000000000..a2a70455ba --- /dev/null +++ b/ui/evolution-memos.ui @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/evolution-memos.xml b/ui/evolution-memos.xml deleted file mode 100644 index 9a132d2add..0000000000 --- a/ui/evolution-memos.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui/evolution-tasks.ui b/ui/evolution-tasks.ui new file mode 100644 index 0000000000..ccfccd77bf --- /dev/null +++ b/ui/evolution-tasks.ui @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/evolution-tasks.xml b/ui/evolution-tasks.xml deleted file mode 100644 index e0902b6806..0000000000 --- a/ui/evolution-tasks.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3