[totem/gnome-3-4] main: Fix drag'n'drop ordering on the playlist
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-4] main: Fix drag'n'drop ordering on the playlist
- Date: Fri, 13 Jul 2012 14:51:54 +0000 (UTC)
commit a3c6a2c63049f60f9c2a3517e3aae0d28090feac
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jul 13 15:46:24 2012 +0100
main: Fix drag'n'drop ordering on the playlist
Since made the processing of playlists asynchronous, adding files
to the playlist didn't insert them at the position we told them to,
because the ->tree_path used to check where to insert it was freed
before we had any chance to process the added MRLs.
https://bugzilla.gnome.org/show_bug.cgi?id=663951
src/totem-playlist.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/totem-playlist.c b/src/totem-playlist.c
index 815006a..56d0ae1 100644
--- a/src/totem-playlist.c
+++ b/src/totem-playlist.c
@@ -479,6 +479,11 @@ drop_finished_cb (TotemPlaylist *playlist, GAsyncResult *result, gpointer user_d
{
totem_playlist_add_mrls_finish (playlist, result, NULL);
+ if (playlist->priv->tree_path != NULL) {
+ gtk_tree_path_free (playlist->priv->tree_path);
+ playlist->priv->tree_path = NULL;
+ }
+
/* Emit the "changed" signal once the last dropped MRL has been added to the playlist */
g_signal_emit (G_OBJECT (playlist),
totem_playlist_table_signals[CHANGED], 0,
@@ -573,8 +578,6 @@ drop_cb (GtkWidget *widget,
g_strfreev (list);
g_list_free (file_list);
gtk_drag_finish (context, TRUE, FALSE, _time);
- gtk_tree_path_free (playlist->priv->tree_path);
- playlist->priv->tree_path = NULL;
}
void
@@ -1637,6 +1640,11 @@ totem_playlist_finalize (GObject *object)
if (playlist->priv->current != NULL)
gtk_tree_path_free (playlist->priv->current);
+ if (playlist->priv->tree_path != NULL) {
+ gtk_tree_path_free (playlist->priv->tree_path);
+ playlist->priv->tree_path = NULL;
+ }
+
G_OBJECT_CLASS (totem_playlist_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]