[gedit] When dragging a tab, check if dest notebook is the same and skip the move



commit b1668c0920f5f29b445530731ea3864148452955
Author: Paolo Borelli <pborelli gnome org>
Date:   Fri Oct 29 21:42:57 2010 +0200

    When dragging a tab, check if dest notebook is the same and skip the
    move

 gedit/gedit-view.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gedit/gedit-view.c b/gedit/gedit-view.c
index 044364c..7848413 100644
--- a/gedit/gedit-view.c
+++ b/gedit/gedit-view.c
@@ -861,10 +861,13 @@ gedit_view_drag_data_received (GtkWidget        *widget,
 		   because we can have several notebooks per window */
 		new_notebook = get_notebook_from_view (widget);
 
-		gedit_notebook_move_tab (GEDIT_NOTEBOOK (notebook),
-		                         GEDIT_NOTEBOOK (new_notebook),
-		                         GEDIT_TAB (page),
-		                         0);
+		if (notebook != new_notebook)
+		{
+			gedit_notebook_move_tab (GEDIT_NOTEBOOK (notebook),
+				                 GEDIT_NOTEBOOK (new_notebook),
+				                 GEDIT_TAB (page),
+				                 0);
+		}
 
 		gtk_drag_finish (context, TRUE, TRUE, timestamp);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]