From 4c8aa5982c0132716f473873d0e1d7601df14607 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 11 Sep 2008 14:44:18 +0000 Subject: Add popup menu stubs for calendars, tasks and memos. svn path=/branches/kill-bonobo/; revision=36303 --- calendar/gui/calendar-commands.c | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index cbeca7c9e3..3b619134be 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -582,35 +582,6 @@ static BonoboUIVerb verbs [] = { BONOBO_UI_VERB_END }; -static EPixmap pixmaps [] = { - E_PIXMAP ("/commands/CalendarPrev", "go-previous", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/CalendarPrint", "document-print", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/DeleteAllOccurrences", "edit-delete", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/DeleteOccurrence", "edit-delete", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/CalendarGoto", "go-jump", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/CalendarNext", "go-next", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/CalendarPrintPreview", "document-print-preview", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/Copy", "edit-copy", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/Cut", "edit-cut", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/Delete", "edit-delete", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/Paste", "edit-paste", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/CalendarToday", "go-today", E_ICON_SIZE_MENU), - - E_PIXMAP ("/Toolbar/Print", "document-print", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/Delete", "edit-delete", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/Prev", "go-previous", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/Next", "go-next", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/Goto", "go-jump", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/DayView", "view-calendar-day", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/WorkWeekView", "view-calendar-workweek", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/WeekView", "view-calendar-week", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/MonthView", "view-calendar-month", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/ListView", "view-calendar-list", E_ICON_SIZE_LARGE_TOOLBAR), - E_PIXMAP ("/Toolbar/Today", "go-today", E_ICON_SIZE_LARGE_TOOLBAR), - - E_PIXMAP_END -}; - void calendar_control_activate (BonoboControl *control, GnomeCalendar *gcal) @@ -642,8 +613,6 @@ calendar_control_activate (BonoboControl *control, NULL); g_free (xmlfile); - e_pixmaps_update (uic, pixmaps); - gnome_calendar_setup_view_menus (gcal, uic); g_signal_connect (gcal, "calendar_focus_change", -- cgit v1.2.3 From 79aa45cfed7e87150de85869795ef0dd3be06db0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 13 Oct 2008 17:57:46 +0000 Subject: Progress update: - Calendar is kind of a mess at the moment. Doesn't compile. - Roughed in the Mail module, including all the actions. That _does_ compile. Runs, even. svn path=/branches/kill-bonobo/; revision=36611 --- calendar/gui/calendar-commands.c | 236 --------------------------------------- 1 file changed, 236 deletions(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 3b619134be..c2a46fb4e5 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -68,53 +68,6 @@ typedef struct { guint taskpad_focused : 1; } FocusData; -static void -file_open_event_cb (BonoboUIComponent *uic, gpointer data, const char *path) -{ - GnomeCalendar *gcal; - - gcal = GNOME_CALENDAR (data); - - e_calendar_view_open_event (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal))); -} - - -/* Prints the calendar at its current view and time range */ -void -calendar_command_print (GnomeCalendar *gcal, GtkPrintOperationAction action) -{ - if (gnome_calendar_get_view (gcal) == GNOME_CAL_LIST_VIEW) { - ECalListView *list_view; - ETable *table; - - list_view = E_CAL_LIST_VIEW (gnome_calendar_get_current_view_widget (gcal)); - table = e_table_scrolled_get_table (list_view->table_scrolled); - print_table (table, _("Print"), _("Calendar"), action); - } else { - time_t start; - - gnome_calendar_get_current_time_range (gcal, &start, NULL); - print_calendar (gcal, action, start); - } -} - -/* File/Print callback */ -static void -file_print_cb (BonoboUIComponent *uic, gpointer data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (data); - - calendar_command_print (gcal, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG); -} - -static void -file_print_preview_cb (BonoboUIComponent *uic, gpointer data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (data); - - calendar_command_print (gcal, GTK_PRINT_OPERATION_ACTION_PREVIEW); -} - /* Sets a clock cursor for the specified calendar window */ static void set_clock_cursor (GnomeCalendar *gcal) @@ -135,58 +88,6 @@ set_normal_cursor (GnomeCalendar *gcal) gdk_flush (); } -static void -previous_clicked (BonoboUIComponent *uic, gpointer data, const char *path) -{ - GnomeCalendar *gcal; - - gcal = GNOME_CALENDAR (data); - - set_clock_cursor (gcal); - gnome_calendar_previous (gcal); - set_normal_cursor (gcal); -} - -static void -next_clicked (BonoboUIComponent *uic, gpointer data, const char *path) -{ - GnomeCalendar *gcal; - - gcal = GNOME_CALENDAR (data); - - set_clock_cursor (gcal); - gnome_calendar_next (gcal); - set_normal_cursor (gcal); -} - -void -calendar_goto_today (GnomeCalendar *gcal) -{ - set_clock_cursor (gcal); - gnome_calendar_goto_today (gcal); - set_normal_cursor (gcal); -} - -static void -today_clicked (BonoboUIComponent *uic, gpointer data, const char *path) -{ - GnomeCalendar *gcal; - - gcal = GNOME_CALENDAR (data); - - calendar_goto_today (gcal); -} - -static void -goto_clicked (BonoboUIComponent *uic, gpointer data, const char *path) -{ - GnomeCalendar *gcal; - - gcal = GNOME_CALENDAR (data); - - goto_dialog (gcal); -} - static void show_day_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) { @@ -239,65 +140,6 @@ show_list_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) } -static void -cut_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) -{ - GnomeCalendar *gcal; - - gcal = GNOME_CALENDAR (data); - set_clock_cursor (gcal); - gnome_calendar_cut_clipboard (gcal); - set_normal_cursor (gcal); -} - -static void -copy_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) -{ - GnomeCalendar *gcal; - - gcal = GNOME_CALENDAR (data); - - set_clock_cursor (gcal); - gnome_calendar_copy_clipboard (gcal); - set_normal_cursor (gcal); -} - -static void -paste_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) -{ - GnomeCalendar *gcal; - - gcal = GNOME_CALENDAR (data); - - set_clock_cursor (gcal); - gnome_calendar_paste_clipboard (gcal); - set_normal_cursor (gcal); -} - -static void -delete_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) -{ - GnomeCalendar *gcal; - - gcal = GNOME_CALENDAR (data); - - set_clock_cursor (gcal); - gnome_calendar_delete_selection (gcal); - set_normal_cursor (gcal); -} - -static void -delete_occurrence_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) -{ - GnomeCalendar *gcal; - - gcal = GNOME_CALENDAR (data); - - set_clock_cursor (gcal); - gnome_calendar_delete_selected_occurrence (gcal); - set_normal_cursor (gcal); -} - static void purge_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) { @@ -370,69 +212,6 @@ sensitize_items(BonoboUIComponent *uic, struct _sensitize_item *items, guint32 m } } -static struct _sensitize_item calendar_sensitize_table[] = { - { "EventOpen", E_CAL_MENU_SELECT_ONE }, - { "Cut", E_CAL_MENU_SELECT_EDITABLE }, - { "Copy", E_CAL_MENU_SELECT_ANY }, - { "Paste", E_CAL_MENU_SELECT_EDITABLE }, - { "Delete", E_CAL_MENU_SELECT_EDITABLE|E_CAL_MENU_SELECT_NONRECURRING }, - { "DeleteOccurrence", E_CAL_MENU_SELECT_EDITABLE|E_CAL_MENU_SELECT_RECURRING }, - { "DeleteAllOccurrences", E_CAL_MENU_SELECT_EDITABLE|E_CAL_MENU_SELECT_RECURRING }, - { NULL } -}; - -/* Sensitizes the UI Component menu/toolbar calendar commands based on the - * number of selected events. (This will always be 0 or 1 currently.) If enable - * is FALSE, all will be disabled. Otherwise, the currently-selected number of - * events will be used. - */ -void -calendar_control_sensitize_calendar_commands (BonoboControl *control, GnomeCalendar *gcal, gboolean enable) -{ - BonoboUIComponent *uic; - GtkWidget *view; - ECalMenu *menu; - ECalModel *model; - GPtrArray *events; - GList *selected, *l; - ECalMenuTargetSelect *t; - - uic = bonobo_control_get_ui_component (control); - g_return_if_fail (uic != NULL); - - if (bonobo_ui_component_get_container (uic) == CORBA_OBJECT_NIL) - return; - - view = gnome_calendar_get_current_view_widget (gcal); - - menu = gnome_calendar_get_calendar_menu (gcal); - model = e_calendar_view_get_model((ECalendarView *)view); - events = g_ptr_array_new(); - selected = e_calendar_view_get_selected_events((ECalendarView *)view); - for (l=selected;l;l=g_list_next(l)) { - ECalendarViewEvent *event = l->data; - if (event && event->comp_data) - g_ptr_array_add (events, e_cal_model_copy_component_data(event->comp_data)); - } - g_list_free(selected); - - t = e_cal_menu_target_new_select(menu, model, events); - if (!enable) - t->target.mask = ~0; - - sensitize_items(uic, calendar_sensitize_table, t->target.mask); -#if 0 - /* retrieve read-onlyness of the default client */ - e_cal = e_cal_model_get_default_client (gnome_calendar_get_calendar_model (gcal)); - if (e_cal) - e_cal_is_read_only (e_cal, &default_read_only, NULL); - else - default_read_only = TRUE; -#endif - - e_menu_update_target((EMenu *)menu, (EMenuTarget *)t); -} - static struct _sensitize_item taskpad_sensitize_table[] = { { "Cut", E_CAL_MENU_SELECT_EDITABLE }, { "Copy", E_CAL_MENU_SELECT_ANY }, @@ -555,21 +334,6 @@ gcal_taskpad_focus_change_cb (GnomeCalendar *gcal, gboolean in, gpointer data) static BonoboUIVerb verbs [] = { - BONOBO_UI_VERB ("EventOpen", file_open_event_cb), - BONOBO_UI_VERB ("CalendarPrint", file_print_cb), - BONOBO_UI_VERB ("CalendarPrintPreview", file_print_preview_cb), - - BONOBO_UI_VERB ("Cut", cut_cmd), - BONOBO_UI_VERB ("Copy", copy_cmd), - BONOBO_UI_VERB ("Paste", paste_cmd), - BONOBO_UI_VERB ("Delete", delete_cmd), - BONOBO_UI_VERB ("DeleteOccurrence", delete_occurrence_cmd), - BONOBO_UI_VERB ("DeleteAllOccurrences", delete_cmd), - - BONOBO_UI_VERB ("CalendarPrev", previous_clicked), - BONOBO_UI_VERB ("CalendarToday", today_clicked), - BONOBO_UI_VERB ("CalendarNext", next_clicked), - BONOBO_UI_VERB ("CalendarGoto", goto_clicked), BONOBO_UI_VERB ("ShowDayView", show_day_view_clicked), BONOBO_UI_VERB ("ShowWorkWeekView", show_work_week_view_clicked), -- cgit v1.2.3 From 85b2913a380c69f14ae0254ad23b10fabfb33667 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 24 Oct 2008 23:52:05 +0000 Subject: Merge revisions 36534:36684 from trunk. svn path=/branches/kill-bonobo/; revision=36685 --- calendar/gui/calendar-commands.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index c2a46fb4e5..c398b6e12b 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -1,27 +1,28 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* Evolution calendar - Commands for the calendar GUI control - * - * Copyright (C) 1998 The Free Software Foundation - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Miguel de Icaza - * Federico Mena-Quintero - * Seth Alves - * Rodrigo Moya +/* + * Evolution calendar - Commands for the calendar GUI control * * 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. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * 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. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Miguel de Icaza + * Federico Mena-Quintero + * Seth Alves + * Rodrigo Moya + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * 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. */ #ifdef HAVE_CONFIG_H -- cgit v1.2.3 From d6445f8abfa78c0a9c8680a3ba7422d331391f8f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 7 Nov 2008 22:04:53 +0000 Subject: Merge revisions 36685:36729 from trunk. svn path=/branches/kill-bonobo/; revision=36763 --- calendar/gui/calendar-commands.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index c398b6e12b..6fcada753e 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -47,6 +47,7 @@ #include #include "shell/Evolution.h" #include "calendar-commands.h" +#include "calendar-component.h" #include "calendar-config.h" #include "e-day-view.h" #include "e-week-view.h" @@ -333,6 +334,11 @@ gcal_taskpad_focus_change_cb (GnomeCalendar *gcal, gboolean in, gpointer data) } +static void +help_debug (BonoboUIComponent *uid, void *data, const char *path) +{ + calendar_component_show_logger ((GtkWidget *) data); +} static BonoboUIVerb verbs [] = { @@ -343,7 +349,7 @@ static BonoboUIVerb verbs [] = { BONOBO_UI_VERB ("ShowListView", show_list_view_clicked), BONOBO_UI_VERB ("CalendarPurge", purge_cmd), - + BONOBO_UI_VERB ("HelpDebug", help_debug), BONOBO_UI_VERB_END }; -- cgit v1.2.3 From c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 12 Jan 2009 04:12:01 +0000 Subject: Merge revisions 36866:37046 from trunk. svn path=/branches/kill-bonobo/; revision=37050 --- calendar/gui/calendar-commands.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 6fcada753e..e4b72d2299 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -37,10 +37,6 @@ #include #include -#include -#include -#include -#include #include #include #include -- cgit v1.2.3 From e4afd3f9fb962ea1295a0657ec9f83a427829171 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 23:21:02 -0400 Subject: Remove trailing whitespace, again. --- calendar/gui/calendar-commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 94a35f3e65..e69cd463ea 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -12,7 +12,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see + * License along with the program; if not, see * * * Authors: -- cgit v1.2.3 From 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 27 May 2009 10:29:19 -0400 Subject: Prefer GLib basic types over C types. --- calendar/gui/calendar-commands.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 9f00044a4b..7f7c043943 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -87,7 +87,7 @@ set_normal_cursor (GnomeCalendar *gcal) } static void -show_day_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +show_day_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -97,7 +97,7 @@ show_day_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) } static void -show_work_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +show_work_week_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -107,7 +107,7 @@ show_work_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char * } static void -show_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +show_week_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -117,7 +117,7 @@ show_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) } static void -show_month_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +show_month_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -128,7 +128,7 @@ show_month_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path static void -show_list_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +show_list_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -143,7 +143,7 @@ purge_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; GtkWidget *dialog, *parent, *box, *label, *spin; - int response; + gint response; gcal = GNOME_CALENDAR (data); @@ -195,7 +195,7 @@ static void sensitize_items(BonoboUIComponent *uic, struct _sensitize_item *items, guint32 mask) { while (items->command) { - char command[32]; + gchar command[32]; if (strlen(items->command)>=21) { g_warning ("items->command >= 21: %s\n", items->command); @@ -331,7 +331,7 @@ gcal_taskpad_focus_change_cb (GnomeCalendar *gcal, gboolean in, gpointer data) } static void -help_debug (BonoboUIComponent *uid, void *data, const char *path) +help_debug (BonoboUIComponent *uid, gpointer data, const gchar *path) { calendar_component_show_logger ((GtkWidget *) data); } -- cgit v1.2.3 From 14f8eee012382f04090ea9277e9567d5f32e8bf0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 28 May 2009 13:06:29 -0400 Subject: Whitespace cleanup. --- calendar/gui/calendar-commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 7f7c043943..01e4fe5439 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -427,5 +427,5 @@ calendar_control_deactivate (BonoboControl *control, GnomeCalendar *gcal) g_signal_handlers_disconnect_matched (gcal, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, control); bonobo_ui_component_rm (uic, "/", NULL); - bonobo_ui_component_unset_container (uic, NULL); + bonobo_ui_component_unset_container (uic, NULL); } -- cgit v1.2.3 From 374bd42f69aca2e132fd854c9619f3d7491f1f96 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 12 Jul 2009 23:33:07 -0400 Subject: Fix excessive whitespace. --- calendar/gui/calendar-commands.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 01e4fe5439..e849bf2e0b 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -126,7 +126,6 @@ show_month_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *pat gnome_calendar_set_view (gcal, GNOME_CAL_MONTH_VIEW); } - static void show_list_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { @@ -137,7 +136,6 @@ show_list_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path gnome_calendar_set_view (gcal, GNOME_CAL_LIST_VIEW); } - static void purge_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) { -- cgit v1.2.3 From 741d49c900ecc01002513060826b43dc26d4e55d Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 27 Jul 2009 17:43:02 +0200 Subject: Bug #203853 - Cut/Copy key bindings don't work in day and week views --- calendar/gui/calendar-commands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index e849bf2e0b..32bf54ea85 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -209,7 +209,7 @@ sensitize_items(BonoboUIComponent *uic, struct _sensitize_item *items, guint32 m } static struct _sensitize_item taskpad_sensitize_table[] = { - { "Cut", E_CAL_MENU_SELECT_EDITABLE }, + { "Cut", E_CAL_MENU_SELECT_EDITABLE | E_CAL_MENU_SELECT_ANY }, { "Copy", E_CAL_MENU_SELECT_ANY }, { "Paste", E_CAL_MENU_SELECT_EDITABLE }, { "Delete", E_CAL_MENU_SELECT_EDITABLE }, @@ -245,7 +245,7 @@ sensitize_taskpad_commands (GnomeCalendar *gcal, BonoboControl *control, gboolea t = e_cal_menu_target_new_select(menu, model, events); if (!enable) - t->target.mask = ~0; + t->target.mask = ~((~t->target.mask) & E_CAL_MENU_SELECT_EDITABLE); sensitize_items(uic, taskpad_sensitize_table, t->target.mask); } -- cgit v1.2.3 From ad17dfabe588f03cc21e4ee5aca86f4c540e517e Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 14 Aug 2009 19:34:43 -0400 Subject: Get the calendar view popup menu working. --- calendar/gui/calendar-commands.c | 49 ---------------------------------------- 1 file changed, 49 deletions(-) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 32bf54ea85..6368857ead 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -136,54 +136,6 @@ show_list_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path gnome_calendar_set_view (gcal, GNOME_CAL_LIST_VIEW); } -static void -purge_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) -{ - GnomeCalendar *gcal; - GtkWidget *dialog, *parent, *box, *label, *spin; - gint response; - - gcal = GNOME_CALENDAR (data); - - /* create the dialog */ - parent = gtk_widget_get_toplevel (GTK_WIDGET (gcal)); - dialog = gtk_message_dialog_new ( - (GtkWindow *)parent, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_WARNING, - GTK_BUTTONS_OK_CANCEL, - _("This operation will permanently erase all events older than the selected amount of time. If you continue, you will not be able to recover these events.")); - gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL); - - box = gtk_hbox_new (FALSE, 6); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), box, TRUE, FALSE, 6); - - label = gtk_label_new (_("Purge events older than")); - gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 6); - spin = gtk_spin_button_new_with_range (0.0, 1000.0, 1.0); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), 60.0); - gtk_box_pack_start (GTK_BOX (box), spin, FALSE, FALSE, 6); - label = gtk_label_new (_("days")); - gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 6); - - gtk_widget_show_all (box); - - /* run the dialog */ - response = gtk_dialog_run (GTK_DIALOG (dialog)); - if (response == GTK_RESPONSE_OK) { - gint days; - time_t tt; - - days = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); - tt = time (NULL); - tt -= (days * (24 * 3600)); - - gnome_calendar_purge (gcal, tt); - } - - gtk_widget_destroy (dialog); -} - struct _sensitize_item { const gchar *command; guint32 enable; @@ -342,7 +294,6 @@ static BonoboUIVerb verbs [] = { BONOBO_UI_VERB ("ShowMonthView", show_month_view_clicked), BONOBO_UI_VERB ("ShowListView", show_list_view_clicked), - BONOBO_UI_VERB ("CalendarPurge", purge_cmd), BONOBO_UI_VERB ("HelpDebug", help_debug), BONOBO_UI_VERB_END }; -- cgit v1.2.3