diff options
author | Thouis R. Jones <thouis@csail.mit.edu> | 2005-05-13 19:08:28 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2005-05-13 19:08:28 +0800 |
commit | 51490d54078a67793ab48584a4f672d0ae3d3bd4 (patch) | |
tree | b448ad9371d92e8edbe0126f60cdf01cb77571a5 /calendar/gui/gnome-cal.c | |
parent | 8b3b58503dca17206fd530fc4828fdd51faa08a3 (diff) | |
download | gsoc2013-evolution-51490d54078a67793ab48584a4f672d0ae3d3bd4.tar.gz gsoc2013-evolution-51490d54078a67793ab48584a4f672d0ae3d3bd4.tar.zst gsoc2013-evolution-51490d54078a67793ab48584a4f672d0ae3d3bd4.zip |
Fixes #272301
2005-05-13 Thouis R. Jones <thouis@csail.mit.edu>
Fixes #272301
* gui/apps_evolution_calendar.schemas.in.in:
* gui/calendar-config-keys.h:
* gui/calendar-config.c: (calendar_config_get_marcus_bains,
calendar_config_add_notification_marcus_bains):
* gui/calendar-config.h:
* gui/e-day-view-config.c: (set_marcus_bains,
marcus_bains_changed_cb, e_day_view_config_set_view):
* gui/e-day-view-main-item.c: (e_day_view_main_item_draw):
* gui/e-day-view-time-item.c: (e_day_view_time_item_draw):
* gui/e-day-view.c: (e_day_view_init, e_day_view_set_colors,
e_day_view_get_show_marcus_bains, e_day_view_set_marcus_bains,
e_day_view_update_marcus_bains):
* gui/e-day-view.h:
* gui/gnome-cal.c: (update_marcus_bains_line_cb, setup_widgets,
gnome_calendar_destroy): Added Marcus Bains Line to main item
view and time bar.
svn path=/trunk/; revision=29351
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r-- | calendar/gui/gnome-cal.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index cf129a5bf4..960f22aa63 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -138,6 +138,7 @@ struct _GnomeCalendarPrivate { char *sexp; char *todo_sexp; guint update_timeout; + guint update_marcus_bains_line_timeout; /* This is the view currently shown. We use it to keep track of the positions of the panes. range_selected is TRUE if a range of dates @@ -1087,6 +1088,21 @@ update_todo_view_cb (GnomeCalendar *gcal) return TRUE; } +static gboolean +update_marcus_bains_line_cb (GnomeCalendar *gcal) +{ + GnomeCalendarPrivate *priv; + + priv = gcal->priv; + + if ((priv->current_view_type == GNOME_CAL_DAY_VIEW) || + (priv->current_view_type == GNOME_CAL_WORK_WEEK_VIEW)) { + e_day_view_update_marcus_bains (E_DAY_VIEW (gnome_calendar_get_current_view_widget (gcal))); + } + + return TRUE; +} + static void config_hide_completed_tasks_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data) { @@ -1319,6 +1335,9 @@ setup_widgets (GnomeCalendar *gcal) e_calendar_view_set_timezone (E_CALENDAR_VIEW (priv->work_week_view), priv->zone); connect_day_view_focus (gcal, E_DAY_VIEW (priv->work_week_view)); + /* The Marcus Bains line */ + priv->update_marcus_bains_line_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_marcus_bains_line_cb, gcal, NULL); + /* The Week View. */ priv->week_view = e_week_view_new (); e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->week_view), gcal); @@ -1520,6 +1539,11 @@ gnome_calendar_destroy (GtkObject *object) priv->view_instance = NULL; } + if (priv->update_marcus_bains_line_timeout) { + g_source_remove (priv->update_marcus_bains_line_timeout); + priv->update_marcus_bains_line_timeout = 0; + } + if (priv->view_menus) { g_object_unref (priv->view_menus); priv->view_menus = NULL; |