[Xfce4-commits] <midori:master> Make toolbar drag/ drop work in GTK+3

Christian Dywan noreply at xfce.org
Tue Mar 26 09:04:01 CET 2013


Updating branch refs/heads/master
         to 7e2bbd1df5b32ce92b48a8d4fb039644776d0d34 (commit)
       from 8918d50f27d4e53ed9915ba086b322a0e0af28ee (commit)

commit 7e2bbd1df5b32ce92b48a8d4fb039644776d0d34
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Mar 26 09:01:24 2013 +0100

    Make toolbar drag/ drop work in GTK+3
    
    Fixes: https://bugs.launchpad.net/midori/+bug/1159521

 extensions/toolbar-editor.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/extensions/toolbar-editor.c b/extensions/toolbar-editor.c
index 9348668..8966a70 100644
--- a/extensions/toolbar-editor.c
+++ b/extensions/toolbar-editor.c
@@ -276,16 +276,15 @@ static void tb_editor_drag_data_rcvd_cb(GtkWidget *widget, GdkDragContext *conte
 										gint x, gint y, GtkSelectionData *data, guint info,
 										guint ltime, TBEditorWidget *tbw)
 {
-#if !GTK_CHECK_VERSION(3,0,0) /* TODO */
 	GtkTreeView *tree = GTK_TREE_VIEW(widget);
 	gboolean del = FALSE;
 
-	if (data->length >= 0 && data->format == 8)
+	if (gtk_selection_data_get_length (data) >= 0 && gtk_selection_data_get_format (data) == 8)
 	{
 		gboolean is_sep;
 		gchar *text = NULL;
 
-		text = (gchar*) data->data;
+		text = (gchar*) gtk_selection_data_get_data (data);
 
 		/* We allow re-ordering the Location item but not removing it from the list. */
 		if (g_strcmp0(text, "Location") == 0 && widget != tbw->drag_source)
@@ -334,7 +333,6 @@ static void tb_editor_drag_data_rcvd_cb(GtkWidget *widget, GdkDragContext *conte
 	tbw->drag_source = NULL; /* reset the value just to be sure */
 	tb_editor_free_path(tbw);
 	gtk_drag_finish(context, TRUE, del, ltime);
-#endif
 }
 
 


More information about the Xfce4-commits mailing list