diff options
| author | Bastien Nocera <hadess@hadess.net> | 2013-10-30 02:04:54 +0800 |
|---|---|---|
| committer | Matthew Barnes <mbarnes@redhat.com> | 2013-10-30 03:22:35 +0800 |
| commit | bc0d5d40ed39c92dcdf62ae891a2e99c25237d74 (patch) | |
| tree | a07763eeaa20602bd4c0620b2fe67c443c52d29c /calendar/gui | |
| parent | d3e0f96c73dde49acde92f6347b9e362d85e94aa (diff) | |
| download | gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar.gz gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar.bz2 gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar.lz gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar.xz gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar.zst gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.zip | |
Bug 710797 - Name all the timeouts added with g_timeout_add()
Diffstat (limited to 'calendar/gui')
| -rw-r--r-- | calendar/gui/e-cal-model.c | 2 | ||||
| -rw-r--r-- | calendar/gui/e-day-view.c | 10 | ||||
| -rw-r--r-- | calendar/gui/e-meeting-time-sel.c | 5 | ||||
| -rw-r--r-- | calendar/gui/e-week-view.c | 8 | ||||
| -rw-r--r-- | calendar/gui/gnome-cal.c | 11 |
5 files changed, 23 insertions, 13 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 02020ae2cf..5748e23d78 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -3735,7 +3735,7 @@ redo_queries (ECalModel *model) if (!g_main_context_is_owner (g_main_context_default ())) { /* function called from other than main thread */ - g_timeout_add (10, cleanup_content_cb, &data); + e_named_timeout_add (10, cleanup_content_cb, &data); e_flag_wait (data.eflag); } else { cleanup_content_cb (&data); diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 65f3855b0d..93f66408d9 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -7102,7 +7102,7 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item, data->day = day; data->event_num = event_num; data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, gint)) tooltip_get_view_event; - pevent->timeout = g_timeout_add_full ( + pevent->timeout = e_named_timeout_add_full ( G_PRIORITY_DEFAULT, 500, (GSourceFunc) e_calendar_view_get_tooltips, data, (GDestroyNotify) g_free); @@ -7773,7 +7773,9 @@ e_day_view_start_auto_scroll (EDayView *day_view, gboolean scroll_up) { if (day_view->auto_scroll_timeout_id == 0) { - day_view->auto_scroll_timeout_id = g_timeout_add (E_DAY_VIEW_AUTO_SCROLL_TIMEOUT, e_day_view_auto_scroll_handler, day_view); + day_view->auto_scroll_timeout_id = e_named_timeout_add ( + E_DAY_VIEW_AUTO_SCROLL_TIMEOUT, + e_day_view_auto_scroll_handler, day_view); day_view->auto_scroll_delay = E_DAY_VIEW_AUTO_SCROLL_DELAY; } day_view->auto_scroll_up = scroll_up; @@ -9287,7 +9289,9 @@ static void e_day_view_queue_layout (EDayView *day_view) { if (day_view->layout_timeout_id == 0) { - day_view->layout_timeout_id = g_timeout_add (E_DAY_VIEW_LAYOUT_TIMEOUT, e_day_view_layout_timeout_cb, day_view); + day_view->layout_timeout_id = e_named_timeout_add ( + E_DAY_VIEW_LAYOUT_TIMEOUT, + e_day_view_layout_timeout_cb, day_view); } } diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index e896abebd9..674059dc71 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -2721,7 +2721,8 @@ e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts, if (x < scroll_x || x > scroll_x + canvas_width) { /* If we haven't added a timeout function, add one. */ if (mts->auto_scroll_timeout_id == 0) { - mts->auto_scroll_timeout_id = g_timeout_add (60, e_meeting_time_selector_timeout_handler, mts); + mts->auto_scroll_timeout_id = e_named_timeout_add ( + 60, e_meeting_time_selector_timeout_handler, mts); mts->scroll_count = 0; /* Call the handler to start scrolling now. */ @@ -3297,6 +3298,6 @@ free_busy_template_changed_cb (EMeetingTimeSelector *mts) if (mts->fb_refresh_not != 0) g_source_remove (mts->fb_refresh_not); - mts->fb_refresh_not = g_timeout_add_seconds ( + mts->fb_refresh_not = e_named_timeout_add_seconds ( REFRESH_PAUSE, free_busy_timeout_refresh, mts); } diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 92fca66db6..a45cb0cb77 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -3301,7 +3301,7 @@ tooltip_event_cb (GnomeCanvasItem *item, data->day = -1; data->event_num = event_num; data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, gint)) tooltip_get_view_event; - pevent->timeout = g_timeout_add_full ( + pevent->timeout = e_named_timeout_add_full ( G_PRIORITY_DEFAULT, 500, (GSourceFunc) e_calendar_view_get_tooltips, data, (GDestroyNotify) g_free); @@ -3982,7 +3982,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item, data->day = -1; data->event_num = nevent; data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, gint)) tooltip_get_view_event; - pevent->timeout = g_timeout_add_full ( + pevent->timeout = e_named_timeout_add_full ( G_PRIORITY_DEFAULT, 500, (GSourceFunc) e_calendar_view_get_tooltips, data, (GDestroyNotify) g_free); @@ -4915,7 +4915,9 @@ static void e_week_view_queue_layout (EWeekView *week_view) { if (week_view->layout_timeout_id == 0) { - week_view->layout_timeout_id = g_timeout_add (E_WEEK_VIEW_LAYOUT_TIMEOUT, e_week_view_layout_timeout_cb, week_view); + week_view->layout_timeout_id = e_named_timeout_add ( + E_WEEK_VIEW_LAYOUT_TIMEOUT, + e_week_view_layout_timeout_cb, week_view); } } diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index a686dc26bd..591153023c 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1470,12 +1470,14 @@ update_task_and_memo_views (GnomeCalendar *gcal) } static gboolean -update_marcus_bains_line_cb (GnomeCalendar *gcal) +update_marcus_bains_line_cb (gpointer user_data) { + GnomeCalendar *gcal; GnomeCalendarViewType view_type; ECalendarView *view; time_t now, day_begin; + gcal = GNOME_CALENDAR (user_data); view_type = gnome_calendar_get_view (gcal); view = gnome_calendar_get_calendar_view (gcal, view_type); @@ -1518,9 +1520,10 @@ setup_widgets (GnomeCalendar *gcal) #endif /* 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); + priv->update_marcus_bains_line_timeout = + e_named_timeout_add_seconds_full ( + G_PRIORITY_LOW, 60, + update_marcus_bains_line_cb, gcal, NULL); /* update_memo_view (gcal); */ } |
