diff options
author | Federico Mena Quintero <federico@nuclecu.unam.mx> | 1998-11-03 00:43:52 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1998-11-03 00:43:52 +0800 |
commit | c9f5b15c16b95596f3bc8ef55a6b8cc9bdb1e37a (patch) | |
tree | 20fb663393218d355b381735a11de5c92ede8a9e | |
parent | 86ef4d8ab5e648eca5fe2a39da4acae2d876a76c (diff) | |
download | gsoc2013-evolution-c9f5b15c16b95596f3bc8ef55a6b8cc9bdb1e37a.tar gsoc2013-evolution-c9f5b15c16b95596f3bc8ef55a6b8cc9bdb1e37a.tar.gz gsoc2013-evolution-c9f5b15c16b95596f3bc8ef55a6b8cc9bdb1e37a.tar.bz2 gsoc2013-evolution-c9f5b15c16b95596f3bc8ef55a6b8cc9bdb1e37a.tar.lz gsoc2013-evolution-c9f5b15c16b95596f3bc8ef55a6b8cc9bdb1e37a.tar.xz gsoc2013-evolution-c9f5b15c16b95596f3bc8ef55a6b8cc9bdb1e37a.tar.zst gsoc2013-evolution-c9f5b15c16b95596f3bc8ef55a6b8cc9bdb1e37a.zip |
Add the offset from the beginning of the current time unit
1998-10-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gnome-cal.c (gnome_calendar_direction): Add the offset from the
beginning of the current time unit (day/month/etc), otherwise it
does not work right, for example, you are on the 31st day of a
month and the next month is a 30-day one and you jump to the next
month.
svn path=/trunk/; revision=459
-rw-r--r-- | calendar/ChangeLog | 8 | ||||
-rw-r--r-- | calendar/gnome-cal.c | 8 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 8 |
3 files changed, 16 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 9bcf73a445..eb2f5c1a3e 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +1998-10-31 Federico Mena Quintero <federico@nuclecu.unam.mx> + + * gnome-cal.c (gnome_calendar_direction): Add the offset from the + beginning of the current time unit (day/month/etc), otherwise it + does not work right, for example, you are on the 31st day of a + month and the next month is a 30-day one and you jump to the next + month. + 1998-10-16 Federico Mena Quintero <federico@nuclecu.unam.mx> * month-view.c: Changed a lot of stuff not to use the layout code diff --git a/calendar/gnome-cal.c b/calendar/gnome-cal.c index 979c6df667..4468eeb483 100644 --- a/calendar/gnome-cal.c +++ b/calendar/gnome-cal.c @@ -119,13 +119,13 @@ gnome_calendar_direction (GnomeCalendar *gcal, int direction) time_t new_time; if (cp == gcal->day_view) - new_time = time_add_day (gcal->current_display, 1 * direction); + new_time = time_add_day (time_day_begin (gcal->current_display), 1 * direction); else if (cp == gcal->week_view) - new_time = time_add_week (gcal->current_display, 1 * direction); + new_time = time_add_week (time_week_begin (gcal->current_display), 1 * direction); else if (cp == gcal->month_view) - new_time = time_add_month (gcal->current_display, 1 * direction); + new_time = time_add_month (time_month_begin (gcal->current_display), 1 * direction); else if (cp == gcal->year_view) - new_time = time_add_year (gcal->current_display, 1 * direction); + new_time = time_add_year (time_year_begin (gcal->current_display), 1 * direction); else { g_warning ("Weee! Where did the penguin go?"); g_assert_not_reached (); diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 979c6df667..4468eeb483 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -119,13 +119,13 @@ gnome_calendar_direction (GnomeCalendar *gcal, int direction) time_t new_time; if (cp == gcal->day_view) - new_time = time_add_day (gcal->current_display, 1 * direction); + new_time = time_add_day (time_day_begin (gcal->current_display), 1 * direction); else if (cp == gcal->week_view) - new_time = time_add_week (gcal->current_display, 1 * direction); + new_time = time_add_week (time_week_begin (gcal->current_display), 1 * direction); else if (cp == gcal->month_view) - new_time = time_add_month (gcal->current_display, 1 * direction); + new_time = time_add_month (time_month_begin (gcal->current_display), 1 * direction); else if (cp == gcal->year_view) - new_time = time_add_year (gcal->current_display, 1 * direction); + new_time = time_add_year (time_year_begin (gcal->current_display), 1 * direction); else { g_warning ("Weee! Where did the penguin go?"); g_assert_not_reached (); |