diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-07-11 02:11:48 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-07-11 02:11:48 +0800 |
commit | 31fd01398cc76d3c00abbc05d419dfe873bc04c6 (patch) | |
tree | 35c238cdb2a8a68936fa659e5269e75ee0042b49 /calendar/gui/gnome-cal.c | |
parent | f9049cded460a9e316fa83ff1941970abfe0fd09 (diff) | |
parent | 10fef4ac0f4ef7dc907e8bfae9844d4e8be3d80d (diff) | |
download | gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.gz gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.zst gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.zip |
Merge branch 'master' into kill-bonobo
Conflicts:
addressbook/util/addressbook.h
calendar/gui/e-week-view-main-item.c
configure.ac
e-util/Makefile.am
mail/em-account-editor.c
mail/em-folder-selection-button.c
shell/e-shell.c
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r-- | calendar/gui/gnome-cal.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 8fe302293f..25b0336d16 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1178,6 +1178,7 @@ static gboolean update_marcus_bains_line_cb (GnomeCalendar *gcal) { GnomeCalendarPrivate *priv; + time_t now, day_begin; priv = gcal->priv; @@ -1186,6 +1187,23 @@ update_marcus_bains_line_cb (GnomeCalendar *gcal) e_day_view_update_marcus_bains (E_DAY_VIEW (gnome_calendar_get_current_view_widget (gcal))); } + time (&now); + day_begin = time_day_begin (now); + + /* check in the first two minutes */ + if (now >= day_begin && now <= day_begin + 120) { + ECalendarView *view = priv->views[priv->current_view_type]; + time_t start_time = 0, end_time = 0; + + g_return_val_if_fail (view != NULL, TRUE); + + e_calendar_view_get_selected_time_range (view, &start_time, &end_time); + + if (end_time >= time_add_day (day_begin, -1) && start_time <= day_begin) { + gnome_calendar_goto (gcal, now); + } + } + return TRUE; } @@ -2744,7 +2762,7 @@ gnome_calendar_new_task (GnomeCalendar *gcal, time_t *dtstart, time_t *dtend) flags |= COMP_EDITOR_NEW_ITEM; editor = task_editor_new (ecal, flags); - icalcomp = e_cal_model_create_component_with_defaults (model); + icalcomp = e_cal_model_create_component_with_defaults (model, FALSE); comp = e_cal_component_new (); e_cal_component_set_icalcomponent (comp, icalcomp); |