Commit Graph

60100 Commits

Author SHA1 Message Date
Matthias Clasen
2ee087f25f iconbrowser: Use GDK content formats api 2020-01-08 18:48:22 -05:00
Matthias Clasen
9cc29efa25 gtk-demo: Use GDK content formats api 2020-01-08 18:48:22 -05:00
Matthias Clasen
a04d314910 text: Fix dragging of text across focus changes
When dragging selected text from an entry over a stackswitcher
to show a different page, the focus changes, causing the selection
to be lost; we should not lose the dragged content in this case.
2020-01-08 18:48:22 -05:00
Matthias Clasen
f83f7a2b4d Adwaita: Add drop highlight for iconview items 2020-01-08 18:48:22 -05:00
Matthias Clasen
edb175cf75 iconview: Render drop highlight properly
Use :drop(active) and render a frame, not focus.
2020-01-08 18:48:22 -05:00
Matthias Clasen
1eefaf8b41 dragsource: Fix cancellation
We need to properly end the drag.
2020-01-08 18:48:22 -05:00
Matthias Clasen
0224517806 filechooser: Stop using gtk_drag_source_get_drag 2020-01-08 18:48:22 -05:00
Matthias Clasen
27c521cce8 placessidebar: Update a comment 2020-01-08 18:48:22 -05:00
Matthias Clasen
62b87182c5 Remove an unused enum
We are not using GtkDragResult anymore.
2020-01-08 18:48:22 -05:00
Matthias Clasen
c95659bf32 testdnd2: Update to the api change in the previous commit 2020-01-08 18:48:22 -05:00
Matthias Clasen
865fc9c925 dragsource: Rename ::drag-failed to ::drag-cancel
This matches the names of the GdkDrag signals.
2020-01-08 18:48:22 -05:00
Matthias Clasen
a1f4f52fcb dragsource: Tweak docs more 2020-01-08 18:48:22 -05:00
Matthias Clasen
bdb4bf00c5 dragsource: Document prepare 2020-01-08 18:48:22 -05:00
Matthias Clasen
aca252837d dragsource: Make ::prepare return a boolean
Make ::prepare return TRUE to start a drag.
The default handler simply checks that we
have a content provider and actions.
2020-01-08 18:48:22 -05:00
Matthias Clasen
8b058572f0 dragsource: Drop gtk_drag_get_source 2020-01-08 18:48:22 -05:00
Matthias Clasen
df050c51bb notebook: Stop using gtk_drag_get_source 2020-01-08 18:48:21 -05:00
Matthias Clasen
bd20ae4fa5 dragsource: Drop gtk_drag_source_get_origin 2020-01-08 18:48:21 -05:00
Matthias Clasen
818b456f9f filechooserwidget: Stop using gtk_drag_source_get_origin 2020-01-08 18:48:21 -05:00
Matthias Clasen
c1c8abf275 notebook: Stop using gtk_drag_source_get_origin 2020-01-08 18:48:21 -05:00
Matthias Clasen
c1029535ca testtoolbar: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
a5ca5eb865 testlist3: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
2227d2a2b5 testdnd2: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
61559e38f4 testdnd: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
134fca47e3 pathbar: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
4630dd8d68 notebook: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
d2f7d1b1d7 linkbutton: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
cfa9e6da4a colorswatch: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
ceca2f9202 colorbutton: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
bf98ebcb12 iconbrowser: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
1a5dece09c gtk-demo: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
8e8254feae filechooserwidget: wip 2020-01-08 18:48:21 -05:00
Matthias Clasen
90cda9e307 treeview: Use gdk_drag_begin 2020-01-08 18:48:21 -05:00
Matthias Clasen
fdfa371d90 iconview: Use gdk_drag_begin
This is a little more involved here.
2020-01-08 18:48:21 -05:00
Matthias Clasen
deb16c1a00 Make GtkDragSource a gesture 2020-01-08 18:48:21 -05:00
Matthias Clasen
8c3736709e notebook: Use gdk_drag_begin
Use gdk_drag_begin for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
f459164f8a placessidebar: Use gdk_drag_begin
Use gdk_drag_begin for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
00169a06bf textview: Use gdk_drag_begin
Use gdk_drag_begin for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
e09f2b8b56 entry: Use gdk_drag_begin
Use gdk_drag_begin for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
092c115ff0 text: Use gdk_drag_begin
Use gdk_drag_begin directly for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
5144d15168 calendar: Use gdk_drag_begin
Use gdk_drag_begin directly for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
5a6ab8cbd3 label: Use gdk_drag_begin
Use gdk_drag_begin directly for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
8c73f882af dragsource: Use public drag icon api 2020-01-08 18:48:21 -05:00
Matthias Clasen
78832c65b5 Make GtkDragIcon public
This is needed if we want to use gdk_drag_begin
for one-off drags, without a GtkDragSource.
2020-01-08 18:48:21 -05:00
Matthias Clasen
e8b830a3dd dragsource: Reshuffle api a bit
Remove arguments from the constructor.

For actions, we now default to COPY, which is the most common one
that we should enable by default (MOVE requires handling deletion
on the the source side, and ASK only makes sense if we have
multiple actions).

For the content provider, we add a new ::prepare signal where
it should be provided just-in-time.
2020-01-08 18:48:21 -05:00
Matthias Clasen
38974d7d2b dragsource: Tweak api, update all callers
Add GdkDrag back to signals, drop ::drag-data-delete,
and replace it with a boolean in ::drag-end.
2020-01-08 18:48:21 -05:00
Carlos Garnacho
f6f331efe3 gdk/x11: Forward suggested action (if any) to XdndStatus
Go ahead with the suggested action, so the drag source may update
cursor feedback properly, and eventually result in the correct
action.
2020-01-08 18:48:21 -05:00
Carlos Garnacho
dbb3727b03 popover: Use g_signal_connect_object on parent widget signal
The popover may be destroyed, leaving this dangling signal. This
may cause crashes on future parent widget resizes.
2020-01-08 18:48:21 -05:00
Matthias Clasen
508570864d Remove gtk_drop_target_get_target
Now that drop targets are event controllers,
we can just use gtk_event_controller_get_widget.
Update all callers.
2020-01-08 18:48:21 -05:00
Matthias Clasen
96c77b61c1 Remove an unused signal 2020-01-08 18:48:21 -05:00
Matthias Clasen
2b819c830b docs: Tweak GtkDropTarget docs 2020-01-08 18:48:21 -05:00