[brasero/gnome-2-28] Fix #603871 - [Audio project] Song order inverted when moving songs up in the tracklist
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero/gnome-2-28] Fix #603871 - [Audio project] Song order inverted when moving songs up in the tracklist
- Date: Mon, 14 Dec 2009 16:57:39 +0000 (UTC)
commit 44bac4cfd65a5b2e7aaad5c5ca9caea856869d3f
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Mon Dec 7 19:56:10 2009 +0100
Fix #603871 - [Audio project] Song order inverted when moving songs up in the tracklist
This should be backported to 2.28
src/brasero-video-tree-model.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/brasero-video-tree-model.c b/src/brasero-video-tree-model.c
index 2423052..60bbde1 100644
--- a/src/brasero-video-tree-model.c
+++ b/src/brasero-video-tree-model.c
@@ -846,15 +846,18 @@ brasero_video_tree_model_drag_data_received (GtkTreeDragDest *drag_dest,
* them to VideoProject */
if (selection_data->target == gdk_atom_intern (BRASERO_DND_TARGET_SELF_FILE_NODES, TRUE)) {
BraseroDNDVideoContext *context;
+ GtkTreeRowReference *dest;
GList *iter;
context = (BraseroDNDVideoContext *) selection_data->data;
if (context->model != GTK_TREE_MODEL (drag_dest))
return TRUE;
+ dest = gtk_tree_row_reference_new (GTK_TREE_MODEL (drag_dest), dest_path);
/* That's us: move the row and its children. */
for (iter = context->references; iter; iter = iter->next) {
GtkTreeRowReference *reference;
+ GtkTreePath *destination;
GtkTreePath *treepath;
GtkTreeIter tree_iter;
@@ -865,10 +868,13 @@ brasero_video_tree_model_drag_data_received (GtkTreeDragDest *drag_dest,
treepath);
gtk_tree_path_free (treepath);
+ destination = gtk_tree_row_reference_get_path (dest);
brasero_video_tree_model_move_before (BRASERO_VIDEO_TREE_MODEL (drag_dest),
&tree_iter,
- dest_path);
+ destination);
+ gtk_tree_path_free (destination);
}
+ gtk_tree_row_reference_free (dest);
}
else if (selection_data->target == gdk_atom_intern ("text/uri-list", TRUE)) {
gint i;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]