Matthias Clasen
df684b8d04
Hook up the GtkDragSource docs
2020-01-03 13:02:16 -05:00
Matthias Clasen
ced714e8be
Move the rest of the drag-source api over
...
Just reshuffling some source.
2020-01-03 13:02:16 -05:00
Matthias Clasen
84127c7f7b
docs: Mention DND in the migration guide
2020-01-03 13:02:16 -05:00
Matthias Clasen
2b4e9e10c2
Remove traditional drag source API
...
gtk_drag_source_set, gtk_drag_begin, related apis
and the GtkWidget source-side signals have all been
replaced by GtkDragSource.
2020-01-03 13:02:16 -05:00
Matthias Clasen
435e4e0fb0
tests: Convert to GtkDragSource
...
Some tests, such as testimage did not have
anything particularly worth keeping, so
were removed instead of fixed.
2020-01-03 13:02:16 -05:00
Matthias Clasen
3616c33ddd
notebook: Port to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
811b1005f9
filechooser: Port to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
caeb0d3907
treeview: Port to GtkDragSource
...
A small api change here is that
gtk_tree_view_enable_model_drag_source now returns
a GtkDragSource that can be used to connect signals.
2020-01-03 13:02:16 -05:00
Matthias Clasen
4a3e75c123
placessidebar: Port to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
28aeb01f9b
iconview: Port to GtkDragSource
...
A small api change here is that
gtk_icon_view_enable_model_drag_source now returns
a GtkDragSource that can be used to connect signals.
2020-01-03 13:02:16 -05:00
Matthias Clasen
ad11933eee
Add another callback-based provider
...
This one can be used in cases where data needs
to be served in multiple formats that may not
all be covered by content serializers.
2020-01-03 13:02:16 -05:00
Matthias Clasen
27460826b3
iconbrowser: Port to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
9d65f8d5b2
gtk-demo: Convert the clipboard demo to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
783af4c868
pathbar: Convert to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
7df168859b
colorswatch: Convert to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
29418978f7
colorbutton: Port to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
63856c4830
Add a generic callback content provider
...
This one is convenient to use in cases where a
drag is just serving an existing GType which
is covered by content serializers.
2020-01-03 13:02:16 -05:00
Matthias Clasen
f207b2be00
Add (de)serializers for GdkRGBA
...
This is a format that we use in various
color picker widgets, so support it in GDK.
2020-01-03 13:02:16 -05:00
Matthias Clasen
132373f032
textview: Port to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
5d7e637165
textbuffer: Add a content provider api
...
We need a content provider for the selection,
to implement DND, and the text buffer already
has one. Just add an api to get it.
2020-01-03 13:02:16 -05:00
Matthias Clasen
adab150ac1
text: Convert to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
63362bcd41
entry: Port icon dnd to GtkDragSource
...
This requires a small change in the api,
since we need to provide a GdkContentProvider now.
2020-01-03 13:02:16 -05:00
Matthias Clasen
1bc6a25a01
calendar: Port to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
93f1e74bfa
linkbutton: Port to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
fef5d7d200
label: Port to GtkDragSource
2020-01-03 13:02:16 -05:00
Matthias Clasen
cd7b278e77
dnd: Patch up gtk_drag_get_source_widget
...
This is temporary until gtk_drag_dest_set users
have been ported over.
2020-01-03 13:02:16 -05:00
Matthias Clasen
9809a313db
Add a GtkDragSource object
...
Add an explicit GtkDragSource object, and move the source-side
DND signals here. The object can be used on the spot, by calling
gtk_drag_source_drag_begin() yourself, or for static drag-source
configuration, by calling gtk_drag_source_attach(). In the latter
case, we set up and conect a drag gesture to trigger the drag_begin
call.
2020-01-03 13:02:16 -05:00
Matthias Clasen
f8347cb228
marshalers: Add another
2020-01-03 13:02:16 -05:00
Matthias Clasen
189ff2d99a
docs: Add content format api
...
Putting these in the GtkSelectionData chapter is
temporary; GtkSelectionData is going away.
2020-01-03 13:02:16 -05:00
Matthias Clasen
df58d0acf3
Adwaita: Make dnd marks in text views green
...
We already do this in entries, this just updates
text views to match.
2020-01-03 13:00:53 -05:00
Matthias Clasen
9c2c5665df
textview: Render visible marks better
...
The only other visible mark that is in common use
besides insert and selection_bound is dnd_mark, and
we don't want it to blink or be affected by 'cursor'
visibility.
Therefore, cache not just the cursor positions, but
also whether they are insert or selection_bound,
and take that into account when rendering them.
2020-01-03 13:00:53 -05:00
Matthias Clasen
1be9c6aa3f
Merge branch 'remove-xim' into 'master'
...
Remove the XIM input method
See merge request GNOME/gtk!1195
2020-01-03 17:56:26 +00:00
Matthias Clasen
96d2bf10b9
Add a text view mark/cursor test
...
This has testcases for some issues around invalidation
of marks.
2020-01-03 11:18:08 -05:00
Matthias Clasen
7a1aefc7f3
Fix the previous commit
...
We need to actually use the right coordinates.
2020-01-02 00:43:27 -05:00
Matthias Clasen
f7f06f810b
stackswitcher: Fix switch-while-drag functionality
2020-01-02 00:24:54 -05:00
Matthias Clasen
e02fd80adb
dnd: Be safer
...
The contents of the selection are documented
to not be NULL if size is non-negative. So
use an empty string instead of NULL for size 0,
avoiding a crash.
2020-01-01 12:51:19 -05:00
Matthias Clasen
4b818495ca
wayland: Fix dnd type negotiation
...
We need to call gdk_content_formats_union_serialize_mime_types
like GdkClipboard does, in order to get mime types that we can
sent out.
2020-01-01 12:51:19 -05:00
Matthias Clasen
1841ec4f8e
contentprovider: cosmetic fix
2020-01-01 12:51:19 -05:00
Matthias Clasen
21708e4352
contentserializer: Fix an annotation
2020-01-01 12:51:19 -05:00
Daniel Mustieles
662bcb34b1
Updated Spanish translation
2019-12-31 08:45:12 +01:00
Matthias Clasen
f8a19506ab
Merge branch 'drag-icon' into 'master'
...
Drag icon
See merge request GNOME/gtk!1274
2019-12-30 21:20:26 +00:00
Matthias Clasen
67d1d5ec80
mountoperation: Handle D-Bus missing
...
Still not great to make sync calls here, but
at least we should handle failure without criticals.
2019-12-30 16:03:47 -05:00
Matthias Clasen
49c6e99970
Merge branch 'fix-dnd' into 'master'
...
Fix dnd
See merge request GNOME/gtk!1273
2019-12-30 17:12:30 +00:00
Matthias Clasen
15242d66e1
wayland: Pass root coordinates for dnd events
...
That is what the api currently requires, so provide it.
This fixes DND to work again, for the most part.
2019-12-30 12:00:53 -05:00
Matthias Clasen
94a0bc01f9
gdk: Populate dnd event coords
...
The GdkDrop emit... apis take root coordinates.
That should be changed to surface coordinates,
eventually. For now, make the functions fill
the x, y fields.
2019-12-30 11:58:11 -05:00
Matthias Clasen
677c4b140c
gdk: Fix coordinates in dnd events
...
Don't store coordinates as shorts. Use doubles,
as everywhere else. Also add x, y in addition
to x_root, y_root, and actually return those
in gdk_event_get_coords.
2019-12-30 11:56:49 -05:00
Piotr Drąg
838ad5ed6d
Update POTFILES.in
2019-12-30 17:30:18 +01:00
Matthias Clasen
772ac2b0c5
tooltip: Never set a window to be its own parent
...
We do get events on the tooltip window too, and
we better ignore them, or bad things may happen,
such as widgets that are their own parents and
cause infinite loops.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2339
2019-12-30 09:52:13 -05:00
Matthias Clasen
68b3b66c03
tooltipwindow: Cosmetic fix
2019-12-30 09:28:22 -05:00
Daniel Mustieles García
0d1614be63
Revert "Updated Spanish translation"
...
This reverts commit 62b95e33b8
2019-12-30 13:59:22 +00:00