[evolution] Bug 593646 - Starting in day view does not restore panels correctly
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution] Bug 593646 - Starting in day view does not restore panels correctly
- Date: Wed, 9 Sep 2009 20:55:30 +0000 (UTC)
commit 2b9fd2bf21dbc1bfdcc92b6826768cbb69706610
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Sep 9 13:26:37 2009 -0400
Bug 593646 - Starting in day view does not restore panels correctly
calendar/gui/gnome-cal.c | 2 +-
modules/calendar/e-cal-shell-view-actions.c | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 2c309c6..bcdb27a 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -535,7 +535,7 @@ gnome_calendar_class_init (GnomeCalendarClass *class)
NULL,
GNOME_CAL_DAY_VIEW,
GNOME_CAL_LIST_VIEW,
- 0,
+ GNOME_CAL_DAY_VIEW,
G_PARAM_READWRITE));
signals[DATES_SHOWN_CHANGED] =
diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c
index 3dfb488..37c7e38 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]