diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-08-06 08:59:18 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-08-06 10:12:26 +0800 |
commit | 07be2453e059c1cf0a5a2f8f7883e7de84411e97 (patch) | |
tree | a35669cf5ea51b57da5635b0fdc30ee81f488c5f /widgets | |
parent | 74d33d365d99684b279088f2a24b53896b51f899 (diff) | |
download | gsoc2013-evolution-07be2453e059c1cf0a5a2f8f7883e7de84411e97.tar gsoc2013-evolution-07be2453e059c1cf0a5a2f8f7883e7de84411e97.tar.gz gsoc2013-evolution-07be2453e059c1cf0a5a2f8f7883e7de84411e97.tar.bz2 gsoc2013-evolution-07be2453e059c1cf0a5a2f8f7883e7de84411e97.tar.lz gsoc2013-evolution-07be2453e059c1cf0a5a2f8f7883e7de84411e97.tar.xz gsoc2013-evolution-07be2453e059c1cf0a5a2f8f7883e7de84411e97.tar.zst gsoc2013-evolution-07be2453e059c1cf0a5a2f8f7883e7de84411e97.zip |
Remove all GDK threads usage.
According to [1], we don't need to worry about GDK's global lock since
we don't call gdk_threads_init() or gdk_threads_set_lock_functions().
The GDK threads API is being aggressively deprecated by GTK+ developers
so let's just abandon it entirely. I've never really understood when
you're supposed to use it or not use it anyway, so it's good to be rid
of this confusion.
[1] https://mail.gnome.org/archives/desktop-devel-list/2012-August/msg00005.html
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/e-calendar-item.c | 3 | ||||
-rw-r--r-- | widgets/misc/e-calendar.c | 7 | ||||
-rw-r--r-- | widgets/misc/e-canvas.c | 4 | ||||
-rw-r--r-- | widgets/misc/e-mail-identity-combo-box.c | 2 | ||||
-rw-r--r-- | widgets/misc/e-mail-signature-combo-box.c | 2 | ||||
-rw-r--r-- | widgets/misc/e-mail-signature-tree-view.c | 2 | ||||
-rw-r--r-- | widgets/misc/e-map.c | 2 |
7 files changed, 4 insertions, 18 deletions
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index 4e821e740b..87c25370d0 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -3623,8 +3623,6 @@ e_calendar_item_signal_emission_idle_cb (gpointer data) g_return_val_if_fail (E_IS_CALENDAR_ITEM (data), FALSE); - GDK_THREADS_ENTER (); - calitem = E_CALENDAR_ITEM (data); calitem->signal_emission_idle_id = 0; @@ -3645,7 +3643,6 @@ e_calendar_item_signal_emission_idle_cb (gpointer data) g_object_unref ((calitem)); - GDK_THREADS_LEAVE (); return FALSE; } diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c index a03c855971..fcad4edb4b 100644 --- a/widgets/misc/e-calendar.c +++ b/widgets/misc/e-calendar.c @@ -598,8 +598,6 @@ e_calendar_auto_move_year_handler (gpointer data) cal = E_CALENDAR (data); calitem = cal->calitem; - GDK_THREADS_ENTER (); - if (cal->timeout_delay > 0) { cal->timeout_delay--; } else { @@ -608,8 +606,6 @@ e_calendar_auto_move_year_handler (gpointer data) calitem->month + offset); } - GDK_THREADS_LEAVE (); - return TRUE; } @@ -625,8 +621,6 @@ e_calendar_auto_move_handler (gpointer data) cal = E_CALENDAR (data); calitem = cal->calitem; - GDK_THREADS_ENTER (); - if (cal->timeout_delay > 0) { cal->timeout_delay--; } else { @@ -635,7 +629,6 @@ e_calendar_auto_move_handler (gpointer data) calitem->month + offset); } - GDK_THREADS_LEAVE (); return TRUE; } diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index db6f12a150..00c069525b 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -732,8 +732,6 @@ idle_handler (gpointer data) { ECanvas *canvas; - GDK_THREADS_ENTER (); - canvas = E_CANVAS (data); do_reflow (canvas); @@ -742,8 +740,6 @@ idle_handler (gpointer data) g_signal_emit (canvas, signals[REFLOW], 0); - GDK_THREADS_LEAVE (); - return FALSE; } diff --git a/widgets/misc/e-mail-identity-combo-box.c b/widgets/misc/e-mail-identity-combo-box.c index cfd04b4eda..465ef3502f 100644 --- a/widgets/misc/e-mail-identity-combo-box.c +++ b/widgets/misc/e-mail-identity-combo-box.c @@ -71,7 +71,7 @@ mail_identity_combo_box_registry_changed (ESourceRegistry *registry, if (combo_box->priv->refresh_idle_id > 0) return; - combo_box->priv->refresh_idle_id = gdk_threads_add_idle ( + combo_box->priv->refresh_idle_id = g_idle_add ( (GSourceFunc) mail_identity_combo_box_refresh_idle_cb, combo_box); } diff --git a/widgets/misc/e-mail-signature-combo-box.c b/widgets/misc/e-mail-signature-combo-box.c index d7a7039344..26f87b95eb 100644 --- a/widgets/misc/e-mail-signature-combo-box.c +++ b/widgets/misc/e-mail-signature-combo-box.c @@ -76,7 +76,7 @@ mail_signature_combo_box_registry_changed (ESourceRegistry *registry, if (combo_box->priv->refresh_idle_id > 0) return; - combo_box->priv->refresh_idle_id = gdk_threads_add_idle ( + combo_box->priv->refresh_idle_id = g_idle_add ( (GSourceFunc) mail_signature_combo_box_refresh_idle_cb, combo_box); } diff --git a/widgets/misc/e-mail-signature-tree-view.c b/widgets/misc/e-mail-signature-tree-view.c index f1d5d03753..05a2580d78 100644 --- a/widgets/misc/e-mail-signature-tree-view.c +++ b/widgets/misc/e-mail-signature-tree-view.c @@ -72,7 +72,7 @@ mail_signature_tree_view_registry_changed (ESourceRegistry *registry, if (tree_view->priv->refresh_idle_id > 0) return; - tree_view->priv->refresh_idle_id = gdk_threads_add_idle ( + tree_view->priv->refresh_idle_id = g_idle_add ( (GSourceFunc) mail_signature_tree_view_refresh_idle_cb, tree_view); } diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c index 1d114d0c07..7732626760 100644 --- a/widgets/misc/e-map.c +++ b/widgets/misc/e-map.c @@ -204,7 +204,7 @@ e_map_start_tweening (EMap *map) map->priv->timer = g_timer_new (); map->priv->timer_current_ms = 0; - map->priv->tween_id = gdk_threads_add_timeout ( + map->priv->tween_id = g_timeout_add ( E_MAP_TWEEN_TIMEOUT_MSECS, e_map_do_tween_cb, map); g_timer_start (map->priv->timer); } |