[glade] dnd: Enable Drag&Drop on wayland
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] dnd: Enable Drag&Drop on wayland
- Date: Tue, 6 Aug 2019 03:23:59 +0000 (UTC)
commit 23b9b9fc4a8efd96546a4e09c0e7b3bbdd844e30
Author: Alberto Fanjul <albertofanjul gmail com>
Date: Tue Aug 6 05:22:12 2019 +0200
dnd: Enable Drag&Drop on wayland
gladeui/glade-adaptor-chooser-widget.c | 2 +-
gladeui/glade-design-layout.c | 2 +-
gladeui/glade-dnd.c | 2 +-
gladeui/glade-inspector.c | 2 +-
gladeui/glade-palette.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gladeui/glade-adaptor-chooser-widget.c b/gladeui/glade-adaptor-chooser-widget.c
index 71622cd1..3dcaac84 100644
--- a/gladeui/glade-adaptor-chooser-widget.c
+++ b/gladeui/glade-adaptor-chooser-widget.c
@@ -461,7 +461,7 @@ _glade_adaptor_chooser_widget_constructed (GObject *object)
chooser, NULL);
/* Enable Drag & Drop */
gtk_tree_view_enable_model_drag_source (priv->treeview, GDK_BUTTON1_MASK,
- _glade_dnd_get_target (), 1, 0);
+ _glade_dnd_get_target (), 1, GDK_ACTION_MOVE | GDK_ACTION_COPY);
g_signal_connect_after (priv->treeview, "drag-begin",
G_CALLBACK (glade_adaptor_chooser_widget_drag_begin),
NULL);
diff --git a/gladeui/glade-design-layout.c b/gladeui/glade-design-layout.c
index 3b90b483..567d5ef3 100644
--- a/gladeui/glade-design-layout.c
+++ b/gladeui/glade-design-layout.c
@@ -446,7 +446,7 @@ glade_design_layout_motion_notify_event (GtkWidget *widget, GdkEventMotion *ev)
if (target == NULL)
target = gtk_target_list_new (_glade_dnd_get_target (), 1);
- gtk_drag_begin_with_coordinates (widget, target, 0, 1, (GdkEvent*)ev, x, y);
+ gtk_drag_begin_with_coordinates (widget, target, GDK_ACTION_MOVE | GDK_ACTION_COPY, 1, (GdkEvent*)ev,
x, y);
return TRUE;
}
diff --git a/gladeui/glade-dnd.c b/gladeui/glade-dnd.c
index 1a2991cf..fae793a5 100644
--- a/gladeui/glade-dnd.c
+++ b/gladeui/glade-dnd.c
@@ -35,7 +35,7 @@ _glade_dnd_get_target (void)
void
_glade_dnd_dest_set (GtkWidget *target)
{
- gtk_drag_dest_set (target, 0, _glade_dnd_get_target (), 1, GDK_ACTION_COPY);
+ gtk_drag_dest_set (target, 0, _glade_dnd_get_target (), 1, GDK_ACTION_MOVE | GDK_ACTION_COPY);
}
GObject *
diff --git a/gladeui/glade-inspector.c b/gladeui/glade-inspector.c
index e8b4a5a5..af906211 100644
--- a/gladeui/glade-inspector.c
+++ b/gladeui/glade-inspector.c
@@ -602,7 +602,7 @@ glade_inspector_init (GladeInspector *inspector)
/* Set it as a drag source */
gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (priv->view),
GDK_BUTTON1_MASK,
- _glade_dnd_get_target (), 1, 0);
+ _glade_dnd_get_target (), 1, GDK_ACTION_MOVE | GDK_ACTION_COPY);
g_signal_connect (G_OBJECT (priv->view), "row-activated",
G_CALLBACK (item_activated_cb), inspector);
diff --git a/gladeui/glade-palette.c b/gladeui/glade-palette.c
index 6366a61e..e56ac728 100644
--- a/gladeui/glade-palette.c
+++ b/gladeui/glade-palette.c
@@ -344,7 +344,7 @@ glade_palette_new_item (GladePalette *palette, GladeWidgetAdaptor *adaptor)
g_signal_connect_object (button, "drag-data-get",
G_CALLBACK (glade_palette_drag_data_get), adaptor, 0);
- gtk_drag_source_set (button, GDK_BUTTON1_MASK, _glade_dnd_get_target (), 1, 0);
+ gtk_drag_source_set (button, GDK_BUTTON1_MASK, _glade_dnd_get_target (), 1, GDK_ACTION_MOVE |
GDK_ACTION_COPY);
gtk_widget_show (item);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]