aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorAndrew Wu <Yang.Wu@sun.com>2003-07-16 16:05:05 +0800
committerBolian Yin <byin@src.gnome.org>2003-07-16 16:05:05 +0800
commitd706bab5418aefe14c0994f25b05464cd140fc24 (patch)
tree3b1bd2f397eb69f54906eef6f7ccd83e1ee1fa7c /calendar
parent6c397fa70c89c4e3dbcab5b30901a64dbc5b89a2 (diff)
downloadgsoc2013-evolution-d706bab5418aefe14c0994f25b05464cd140fc24.tar.gz
gsoc2013-evolution-d706bab5418aefe14c0994f25b05464cd140fc24.tar.zst
gsoc2013-evolution-d706bab5418aefe14c0994f25b05464cd140fc24.zip
Fixes #45772
2003-07-16 Andrew Wu <Yang.Wu@sun.com> Fixes #45772 * gui/gnome-cal.c(gnome_calendar_goto_date): implemented Alt+Left/Right to go to the same day of the previous/next week. * gui/gnome-cal.h:add two element in GnomeCalendarGotoDateType. svn path=/trunk/; revision=21836
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/gui/gnome-cal.c37
-rw-r--r--calendar/gui/gnome-cal.h2
3 files changed, 47 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 2f6c22a5cf..f4d63df1af 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2003-07-16 Andrew Wu <Yang.Wu@sun.com>
+
+ Fixes #45772
+
+ * gui/gnome-cal.c(gnome_calendar_goto_date): implemented Alt+Left/Right
+ to go to the same day of the previous/next week.
+ * gui/gnome-cal.h:add two element in GnomeCalendarGotoDateType.
+
2003-07-14 Rodrigo Moya <rodrigo@ximian.com>
Fixes #41676
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 417dd5d5a7..66d1c38d0f 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -326,6 +326,28 @@ gnome_calendar_class_init (GnomeCalendarClass *class)
"goto_date", 1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_LAST_DAY_OF_WEEK);
+
+ /*Alt+Left/Right, go to the same day of the previous/next week*/
+ gtk_binding_entry_add_signal (binding_set,GDK_Left,
+ GDK_MOD1_MASK,
+ "goto_date",1,
+ G_TYPE_ENUM,
+ GNOME_CAL_GOTO_SAME_DAY_OF_PREVIOUS_WEEK);
+ gtk_binding_entry_add_signal (binding_set,GDK_KP_Left,
+ GDK_MOD1_MASK,
+ "goto_date",1,
+ G_TYPE_ENUM,
+ GNOME_CAL_GOTO_SAME_DAY_OF_PREVIOUS_WEEK);
+ gtk_binding_entry_add_signal (binding_set,GDK_Right,
+ GDK_MOD1_MASK,
+ "goto_date",1,
+ G_TYPE_ENUM,
+ GNOME_CAL_GOTO_SAME_DAY_OF_NEXT_WEEK);
+ gtk_binding_entry_add_signal (binding_set,GDK_KP_Right,
+ GDK_MOD1_MASK,
+ "goto_date",1,
+ G_TYPE_ENUM,
+ GNOME_CAL_GOTO_SAME_DAY_OF_NEXT_WEEK);
}
/* Callback used when the calendar query reports of an updated object */
@@ -1121,6 +1143,21 @@ gnome_calendar_goto_date (GnomeCalendar *gcal,
1, priv->zone);
need_updating = TRUE;
break;
+ case GNOME_CAL_GOTO_SAME_DAY_OF_PREVIOUS_WEEK:
+ priv->selection_start_time = time_add_day_with_zone (start_time,
+ -7, priv->zone);
+ priv->selection_end_time = time_add_day_with_zone (end_time,
+ -7,priv->zone);
+ need_updating = TRUE;
+ break;
+ case GNOME_CAL_GOTO_SAME_DAY_OF_NEXT_WEEK:
+ priv->selection_start_time = time_add_day_with_zone (start_time,
+ 7, priv->zone);
+ priv->selection_end_time = time_add_day_with_zone (end_time,
+ 7,priv->zone);
+ need_updating = TRUE;
+ break;
+
default:
break;
}
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
index ce25f4544b..22bae4f735 100644
--- a/calendar/gui/gnome-cal.h
+++ b/calendar/gui/gnome-cal.h
@@ -65,6 +65,8 @@ typedef enum
GNOME_CAL_GOTO_LAST_DAY_OF_MONTH,
GNOME_CAL_GOTO_FIRST_DAY_OF_WEEK,
GNOME_CAL_GOTO_LAST_DAY_OF_WEEK,
+ GNOME_CAL_GOTO_SAME_DAY_OF_PREVIOUS_WEEK,
+ GNOME_CAL_GOTO_SAME_DAY_OF_NEXT_WEEK
} GnomeCalendarGotoDateType;
struct _GnomeCalendar {