summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2006-03-09 15:27:26 +0000
committerBastien Nocera <hadess@src.gnome.org>2006-03-09 15:27:26 +0000
commitc44a8eb885146be653f59b092144cc8993e97004 (patch)
tree0057bc78db992d1cf6d26ebb94340f91aced07b9
parentb4d3fbbc1084c401481e5f90466a7befcbbde661 (diff)
downloadtotem-c44a8eb885146be653f59b092144cc8993e97004.tar.gz
update to be able to compile with older glibs
2006-03-09 Bastien Nocera <hadess@hadess.net> * src/backend/bacon-video-widget-xine.c: (bacon_video_widget_queue_sort), (xine_try_error): update to be able to compile with older glibs
-rw-r--r--ChangeLog6
-rw-r--r--src/backend/bacon-video-widget-xine.c26
2 files changed, 32 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f94428a02..ecc202983 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-09 Bastien Nocera <hadess@hadess.net>
+
+ * src/backend/bacon-video-widget-xine.c:
+ (bacon_video_widget_queue_sort), (xine_try_error):
+ update to be able to compile with older glibs
+
2006-02-08 Bastien Nocera <hadess@hadess.net>
* src/totem-playlist.c: (totem_playlist_move_files):
diff --git a/src/backend/bacon-video-widget-xine.c b/src/backend/bacon-video-widget-xine.c
index 330e600d6..0d4b94c18 100644
--- a/src/backend/bacon-video-widget-xine.c
+++ b/src/backend/bacon-video-widget-xine.c
@@ -1436,6 +1436,28 @@ bacon_video_widget_sort_queue (gconstpointer a, gconstpointer b, gpointer data)
return -1;
}
+#if (!(GLIB_CHECK_VERSION(2,9,1)))
+static void
+bacon_video_widget_queue_sort (GAsyncQueue *queue)
+{
+ GList *list = NULL, *l;
+ signal_data *data;
+
+ while ((data = g_async_queue_try_pop (queue)) != NULL) {
+ list = g_list_insert_sorted (list, data, (GCompareFunc) bacon_video_widget_sort_queue);
+ }
+
+ if (list == NULL)
+ return;
+
+ for (l = list; l != NULL; l = l->next) {
+ g_async_queue_push (queue, l->data);
+ }
+ g_list_free (list);
+}
+
+#endif /* ! GLIB_CHECK_VERSION 2.9.1 */
+
static void
xine_try_error (BaconVideoWidget *bvw, gboolean probe_error, GError **error)
{
@@ -1447,7 +1469,11 @@ xine_try_error (BaconVideoWidget *bvw, gboolean probe_error, GError **error)
sched_yield ();
/* Sort the queue with the errors first */
+#if GLIB_CHECK_VERSION(2,9,1)
g_async_queue_sort (bvw->priv->queue, bacon_video_widget_sort_queue, bvw);
+#else
+ bacon_video_widget_queue_sort (bvw->priv->queue);
+#endif
/* Steal messages from the async queue, if there's an error,
* to use as the error message rather than the crappy errors from