From 2b9fd2bf21dbc1bfdcc92b6826768cbb69706610 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 9 Sep 2009 13:26:37 -0400 Subject: Bug 593646 - Starting in day view does not restore panels correctly --- modules/calendar/e-cal-shell-view-actions.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c index 3dfb4888e7..37c7e38413 100644 --- a/modules/calendar/e-cal-shell-view-actions.c +++ b/modules/calendar/e-cal-shell-view-actions.c @@ -21,6 +21,11 @@ #include "e-cal-shell-view-private.h" +/* This is for radio action groups whose value is persistent. We + * initialize it to a bogus value to ensure a "changed" signal is + * emitted when a valid value is restored. */ +#define BOGUS_INITIAL_VALUE G_MININT + static void action_calendar_copy_cb (GtkAction *action, ECalShellView *cal_shell_view) @@ -1484,6 +1489,16 @@ static EPopupActionEntry calendar_popup_entries[] = { static GtkRadioActionEntry calendar_view_entries[] = { + /* This action represents the initial calendar view. + * It should not be visible in the UI, nor should it be + * possible to switch to it from another calendar view. */ + { "calendar-view-initial", + NULL, + NULL, + NULL, + NULL, + BOGUS_INITIAL_VALUE }, + { "calendar-view-day", "view-calendar-day", N_("Day"), @@ -1627,7 +1642,7 @@ e_cal_shell_view_actions_init (ECalShellView *cal_shell_view) G_N_ELEMENTS (calendar_popup_entries)); gtk_action_group_add_radio_actions ( action_group, calendar_view_entries, - G_N_ELEMENTS (calendar_view_entries), GNOME_CAL_DAY_VIEW, + G_N_ELEMENTS (calendar_view_entries), BOGUS_INITIAL_VALUE, G_CALLBACK (action_calendar_view_cb), cal_shell_view); gtk_action_group_add_radio_actions ( action_group, calendar_search_entries, -- cgit