Matthias Clasen
dcfe1a471e
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-04 12:51:58 -05:00
Matthias Clasen
5547db6748
placessidebar: Port to GtkDragSource
2020-01-04 12:51:58 -05:00
Matthias Clasen
c14ee91023
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-04 12:51:58 -05:00
Matthias Clasen
06eb51cb8e
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-04 12:51:58 -05:00
Matthias Clasen
4e5da7c470
iconbrowser: Port to GtkDragSource
2020-01-04 12:51:58 -05:00
Matthias Clasen
5663141f88
gtk-demo: Convert the clipboard demo to GtkDragSource
2020-01-04 12:51:58 -05:00
Matthias Clasen
2c4c2500dd
pathbar: Convert to GtkDragSource
2020-01-04 12:51:58 -05:00
Matthias Clasen
21915fef6e
colorswatch: Convert to GtkDragSource
2020-01-04 12:51:58 -05:00
Matthias Clasen
16c09b0dc5
colorbutton: Port to GtkDragSource
2020-01-04 12:51:58 -05:00
Matthias Clasen
33c6936d22
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-04 12:51:58 -05:00
Matthias Clasen
291143ccb4
Add (de)serializers for GdkRGBA
...
This is a format that we use in various
color picker widgets, so support it in GDK.
2020-01-04 12:51:58 -05:00
Matthias Clasen
b58f71f982
textview: Port to GtkDragSource
2020-01-04 12:51:58 -05:00
Matthias Clasen
7a45520f85
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-04 12:51:58 -05:00
Matthias Clasen
354bc325b7
text: Convert to GtkDragSource
2020-01-04 12:51:58 -05:00
Matthias Clasen
cb1246391c
entry: Port icon dnd to GtkDragSource
...
This requires a small change in the api,
since we need to provide a GdkContentProvider now.
2020-01-04 12:51:58 -05:00
Matthias Clasen
52549c17f7
calendar: Port to GtkDragSource
2020-01-04 12:51:58 -05:00
Matthias Clasen
0803407801
linkbutton: Port to GtkDragSource
2020-01-04 12:51:58 -05:00
Matthias Clasen
1585ebffc5
label: Port to GtkDragSource
2020-01-04 12:51:58 -05:00
Matthias Clasen
5da9fff665
dnd: Patch up gtk_drag_get_source_widget
...
This is temporary until gtk_drag_dest_set users
have been ported over.
2020-01-04 12:51:58 -05:00
Matthias Clasen
95ccff2758
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-04 12:51:58 -05:00
Matthias Clasen
a7d910c1c4
marshalers: Add another
2020-01-04 12:51:58 -05:00
Matthias Clasen
87b947fbde
docs: Add content format api
...
Putting these in the GtkSelectionData chapter is
temporary; GtkSelectionData is going away.
2020-01-04 12:51:58 -05:00
Matthias Clasen
759d53cfa0
wayland: Don't artificially prefer ASK
...
We were always adding ASK to the list of possible
actions, and preferring it. This was causing the
ask cursor to show up when both the source and
the target support ASK, even though it is only
meant to happen if you hold the Alt modifier.
Instead, use one of the supported actions as
preferred action.
2020-01-04 12:51:32 -05:00
Matthias Clasen
814d20d61a
docs: Small clarifications to DND docs
...
Clear up the documentation around ASK handling
a bit.
2020-01-04 12:48:39 -05:00
Matthias Clasen
6cef520804
wayland: Minor cleanup
...
Stop storing selected_action, mainly since the name
is confusing. Instead, just pass the value directly
in the 2 places where it is used.
2020-01-04 12:48:39 -05:00
Matthias Clasen
8c77491150
wayland: Fix action handling more
...
When updating GdkDrop::actions from changes sent by
the compositor, we were inadvertently setting them to 0,
causing drops to appear impossible.
2020-01-04 09:38:31 -05:00
Matthias Clasen
709ebcedd4
wayland: Finish pending offer handling
...
When creating a new GdkDrop object on drag_enter, take pending
source_actions and action into account. The code to store the
pending actions was already there, they were just not passed
on to the drop object when we create it.
2020-01-04 09:38:01 -05:00
Matthias Clasen
47e6b88555
wayland: Clean up drags
...
We need to set the drag to NULL in gdk_wayland_drag_drop_done,
otherwise, all future drags will be considered local after the
first local one. Worse, they will also provide the wrong data.
2020-01-04 09:36:38 -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
Daniel Mustieles
62b95e33b8
Updated Spanish translation
2019-12-30 12:53:45 +01:00