Benjamin Otte
657ebd2a78
drop: Add private API for event emission
2018-06-18 23:49:52 +02:00
Benjamin Otte
05bf87cf14
drop: Add GdkDrop:surface property
...
This replaces gdk_drag_context_get_dest_surface().
2018-06-18 23:49:52 +02:00
Benjamin Otte
4aedf3d003
display: Don't wake up the main loop anymore
...
This is not needed because GTK must be run in the main thread these days,
which is the same one that runs the main loop. So when this function is
called, the main loop is awake.
https://bugzilla.gnome.org/show_bug.cgi?id=550989
2018-06-18 23:49:52 +02:00
Benjamin Otte
b1f384eec2
x11: Don't sneakily allocate memory in initializers
2018-06-18 23:49:52 +02:00
Benjamin Otte
d02b185a87
dnd: Add gdk_event_get_drop()
...
And remove gdk_event_get_drag_context().
All GTK code now only uses GdkDrop for dropping.
2018-06-18 23:49:52 +02:00
Benjamin Otte
6048b69145
wayland: Fix drop operations for new semantics
2018-06-18 23:49:52 +02:00
Benjamin Otte
4b85b5299a
dnd: Remove GdkDragContext::commit_drag_status() vfunc
...
The idea behind the vfunc doesn't work as status updates can happen
asynchronously.
A better solution needs to be found.
2018-06-18 23:49:52 +02:00
Benjamin Otte
b00609c21c
dnd: Make drag-motion and drag-drop signals use GdkDrop
2018-06-18 23:49:52 +02:00
Benjamin Otte
6d7cb2b781
dnd: Make drag-data-received use a GdkDrop
2018-06-18 23:49:52 +02:00
Benjamin Otte
a862ca41c5
drop: Add gdk_drop_get_drag()
...
For now, it'll always return NULL. We'll fix that later.
2018-06-18 23:49:20 +02:00
Benjamin Otte
314eaf7d10
widget: Make GtkWidgetClass::drag_leave() take a GdkDrop
...
Drag Contexts are on their way out!
2018-06-18 23:49:20 +02:00
Benjamin Otte
316bd6a333
dnd: Add gdk_drop_finish()
...
and move the vfunc into GdkDrop.
2018-06-18 23:49:20 +02:00
Benjamin Otte
5b0a6a52c1
dnd: Get rid of gtk_drag_finish()
...
It's just a wrapper around gdk_drag_finish(), so use that one instead.
2018-06-18 23:49:20 +02:00
Benjamin Otte
13ae11ee01
dnd: Rename gdk_drop_finish() => gdk_drag_finish()
...
This is a simple rename, so that we can reintroduce gdk_drop_finish()
with the GdkDrop object.
2018-06-18 23:49:19 +02:00
Benjamin Otte
a05af1f0f3
dnd: Move the gdk_drag_status() function
...
It's now gdk_drop_status().
Also clarify the intended semantics.
2018-06-18 23:49:19 +02:00
Benjamin Otte
b2dc303e5e
dnd: Add gdk_drop_get_actions()
...
This uses the new method without GDK_ACTION_ASK:
Either it is a single action (queryable via gdk_drag_action_is_unique())
or it is not and then the drop target has to make a decision
(potentially by asking someone).
2018-06-18 23:49:19 +02:00
Benjamin Otte
2e27967814
dnd: Make actions a private member variable
...
Use a setter in the backends.
2018-06-18 23:49:19 +02:00
Benjamin Otte
18c3b725b4
x11: Remove unused variables
2018-06-18 23:49:19 +02:00
Benjamin Otte
6573d08b08
wayland: Set correct variable
...
This got messed up in commit 7f8a8f221d
.
2018-06-18 23:49:19 +02:00
Benjamin Otte
74a8ffc4a8
dnd: Add gdk_drag_action_is_unique()
...
This will be necessary once we remove the ASK action.
2018-06-18 23:49:19 +02:00
Benjamin Otte
ac44353f9b
dnd: Remove GDK_ACTION_DEFAULT and GDK_ACTION_PRIVATE
...
They're unused and nobody knows what they're supposed to men anyway.
2018-06-18 23:49:19 +02:00
Benjamin Otte
6919d8c532
drop: Move gdk_drop_read_async() to GdkDrop class
2018-06-18 23:49:19 +02:00
Benjamin Otte
f247d268d4
dnd: Add GdkDrop base class for GdkDragContext
...
The ultimate goal of this patch series is to split GdkDragContext into
GdkDrop + GdkDrag classes for the destination and source side of a dnd
operation.
The refactoring is meant to work something like this:
1. Introduce GdkDrop as a base class
2. Make all drop related code (like GdkEvent) use GdkDrop instead of
GdkDragContext. Move/duplicate APIs to allow that.
3. Port all drop contexts in the backends from GdkDragContext to GdkDrop
4. Delete all APIs in GdkDragContext that aren't needed anymore.
5. Make GdkDragContext no longer a GdkDrop subclass
6. Rename GdkDragContext to GdkDrag
2018-06-18 23:49:19 +02:00
Matthias Clasen
841a29837e
Merge branch 'lrn/misc-gtk4-fixes' into 'master'
...
Misc GTK4 fixes
See merge request GNOME/gtk!195
2018-06-18 21:37:42 +00:00
Matthias Clasen
7554384b2d
Merge branch 'win32-filechooser-fix-file-list-order' into 'master'
...
win32 file chooser: add missing g_slist_reverse
See merge request GNOME/gtk!199
2018-06-18 20:09:47 +00:00
Timm Bäder
64313f4a4b
themes: Don't handle box.linked special
...
We don't reverse the css nodes anymore in RTL layouts.
2018-06-18 19:39:32 +02:00
Timm Bäder
34f556fc3e
filechooserbutton: Remove priv pointer
2018-06-18 17:35:03 +02:00
Timm Bäder
218b39fe01
GtkStyleContext: Remove the frame clock
...
It's unused within GtkStyleContext.
2018-06-18 17:35:03 +02:00
Timm Bäder
70c8cfa480
dnd: Fix up a comment
...
The below function does not take a GtkIconHelper anymore.
2018-06-18 17:35:03 +02:00
Timm Bäder
501efeb6b9
colorscale: Remove priv pointer
2018-06-18 17:35:03 +02:00
Timm Bäder
a7d8127d59
fontbutton: Remove priv pointer
2018-06-18 17:35:03 +02:00
Timm Bäder
beb4cb0e37
radiobutton: remove priv pointer
2018-06-18 17:35:03 +02:00
Timm Bäder
346ec706f7
picture: Fix up some docs
...
Use nullable instead of allow-none consistently, remove trailing
whitespace and fix some c&p problems.
2018-06-18 17:35:03 +02:00
Timm Bäder
d8274856de
drawingarea: Clarify some comments
2018-06-18 17:35:03 +02:00
Timm Bäder
3756234708
messagedialog: Remove priv pointer
2018-06-18 17:35:03 +02:00
Timm Bäder
2d6955285c
paned: Allocation x/y are always 0
...
The allocation position we get passed to size_allocate is always 0/0
these days.
2018-06-18 17:35:03 +02:00
Timm Bäder
10a0d6252e
paned: Remove handle_pos member
...
Query the handle bounds on demand instead.
2018-06-18 17:35:03 +02:00
Timm Bäder
f8ddc42638
paned: Chain up in snapshot
...
No need to snapshot all child widgets ourselves, the implementation in
GtkWidget can just do it for us.
2018-06-18 17:35:02 +02:00
Timm Bäder
e9a9bb069f
paned: Remove unnecessary local variable
...
We can just pass the given allocation on.
2018-06-18 17:35:02 +02:00
Timm Bäder
df79f02310
paned: Don't unnecessarily redraw handle in size_allocate
...
We size_allocate it after all, which will redraw it.
2018-06-18 17:35:02 +02:00
Timm Bäder
bd99ca2f04
paned: Store GParamSpecs
...
So we can use the more efficient g_object_notify_by_pspec everywhere.
2018-06-18 17:35:02 +02:00
Timm Bäder
889fcf64b6
Remove gtk_css_node_reverse_children
...
Not needed anymore.
2018-06-18 17:35:02 +02:00
Timm Bäder
3fadb536d9
toolbar: Stop reordering css nodes based on text direction
2018-06-18 17:35:02 +02:00
Timm Bäder
fb0d8eacc3
headerbar: Stop reordering css nodes depending on text direction
2018-06-18 17:35:02 +02:00
Timm Bäder
fffb3161bc
notebook: Stop reversing tabs based on text direction
2018-06-18 17:35:02 +02:00
Timm Bäder
3be2cb8f63
builder: Fix g-i annotations of _get_translation_domain
...
The return value can be null and is (transfer none).
2018-06-18 17:35:02 +02:00
Timm Bäder
8267605ba2
builder: Use TRUE/FALSE for error return values
...
Instead of guint and 0/1.
2018-06-18 17:35:02 +02:00
Timm Bäder
da4d8b7d94
builder: Remove priv pointer
2018-06-18 17:35:02 +02:00
Timm Bäder
01d4538223
box: Don't reorder children based on text direction
...
Make :first-child always be the first child, i.e. the leftest one in LTR
and the rightest one in RTL.
2018-06-18 17:35:02 +02:00
Timm Bäder
da27627696
paned: Don't reorder css nodes based on text direction
2018-06-18 17:35:02 +02:00