Benjamin Otte
a4ed6fde9d
device: Handle missing axis
2020-03-05 07:59:05 +01:00
Benjamin Otte
dc86c744bf
rbtree: Simplify macros
...
* NODE_FROM_POINTER() can not be NULL
* shuffle NODE_TO_POINTER() code for readability so that the NULL check
is on the outside and not the cast
2020-03-05 07:59:05 +01:00
Benjamin Otte
9fedcec82e
rbtree: Simplify code
...
This makes it easier to understand for gcc (and hopefully humans, too)
that by rotating we essentially just swap `node` and `p`.
2020-03-05 07:59:05 +01:00
Benjamin Otte
f6b11a5158
build: Add more useful warning flags
...
I found those on the interwebs and decided they are useful.
2020-03-05 07:56:28 +01:00
Benjamin Otte
38dcc8f63b
mountoperation-x11: Fix copy/paste thinko
2020-03-05 07:05:48 +01:00
Benjamin Otte
18b011a717
tests: Add a test for changing the hovered widget
...
The add/remove one crashes after a few enter/leave events.
2020-03-05 07:05:48 +01:00
Benjamin Otte
8fc360dac5
imcontextwayland: Fix copy/paste error
2020-03-05 04:03:02 +01:00
Benjamin Otte
4313c47113
textview: Fix copy/paste error
2020-03-05 04:03:02 +01:00
Timm Bäder
b376d9617e
Merge branch 'patch-1' into 'master'
...
gdk_monitor_get_model: Fix a typo in the function documentation
See merge request GNOME/gtk!1499
2020-03-04 11:01:30 +00:00
Antenore Gatta
efbae75f3d
gdk_monitor_get_model: Fix a typo in the function documentation
2020-03-04 11:05:46 +01:00
Piotr Drąg
3f7a7d4ca1
Update POTFILES.in
2020-03-03 17:10:36 +01:00
Emmanuele Bassi
2c04e9441a
Merge branch 'doc-fixes' into 'master'
...
Small documentation fixes
See merge request GNOME/gtk!1500
2020-03-03 15:30:43 +00:00
Emmanuele Bassi
a3b9dba13c
Fix annotation for GtkDropTarget.get_gtypes()
...
The argument name must match in the documentation, and the `allow-none`
annotation is deprecated, and should be replaced by `optional` in this
case.
2020-03-03 13:17:31 +00:00
Emmanuele Bassi
5e099e2606
Remove incorrect rename-to annotations
...
The `rename-to` annotation is used to "shadow" a symbol with another
one, which means both symbols need to exist. It can't be used to rename
a symbol to something else.
2020-03-03 13:13:26 +00:00
Emmanuele Bassi
041043eec1
Fix introspection warnings for GtkDragIcon
2020-03-03 13:12:52 +00:00
Emmanuele Bassi
ec9038a8f2
Add missing annotation for GtkIconTheme
2020-03-03 13:04:06 +00:00
sicklylife
c7414db684
Update Japanese translation
2020-03-03 12:09:06 +00:00
sicklylife
6d2c6b1257
Update Japanese translation
2020-03-03 12:06:32 +00:00
Matthias Clasen
9f829ebd4a
Merge branch 'gbsneto/gtkeventcontrollerfocus' into 'master'
...
build: Install gtkeventcontrollerfocus.h
See merge request GNOME/gtk!1498
2020-03-03 08:40:43 +00:00
Georges Basile Stavracas Neto
8e14b21e52
build: Install gtkeventcontrollerfocus.h
...
It's a public class, and is included by gtk.h. Ship it.
2020-03-03 00:38:13 -03:00
Matt Guerrette
46ba019522
builder-tool: rename show-close-button to show-title-buttons
...
For GtkHeaderBar show-close-button has been renamed to
show-title-buttons for GTK4. This commit adds this fixup to the builder
tool
2020-03-02 22:24:46 -05:00
Benjamin Otte
3ef1dca51c
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!1496
2020-03-02 21:32:20 +00:00
Benjamin Otte
2e55c9cf8c
droptarget: Fast-path local value load
...
This way, we can ensure that for local same-type drops the GValue
is set when ::enter is emitted.
This is the common case for dnd between widgets inside larger
applications, so it's worth it to speed it up.
2020-03-02 21:45:59 +01:00
Benjamin Otte
7427f4f311
drop: Don't use g_object_get()
2020-03-02 21:45:42 +01:00
Benjamin Otte
c0a63e6dd2
dnd: Fix some documentation gotchas
2020-03-02 21:26:08 +01:00
Benjamin Otte
47230f191f
Merge branch 'wip/otte/dnd' into 'master'
...
DND: Sync drop target
See merge request GNOME/gtk!1495
2020-03-02 18:09:05 +00:00
Benjamin Otte
0e72adf6dd
drop: Remove unused convenience APIs
...
With the new event controllers, these are unused.
2020-03-02 04:43:56 +01:00
Benjamin Otte
f5fda3ae58
themes: Set proper foreground color for DND icons
2020-03-02 04:43:56 +01:00
Benjamin Otte
f4a00e7909
calendar: Use a drag source
2020-03-02 04:43:56 +01:00
Benjamin Otte
e7db386018
dnd: Don't create custom color drag icons
...
... use the default one. It looks much better.
2020-03-02 04:43:56 +01:00
Benjamin Otte
2a697827e1
dragicon: Add gtk_drag_icon_create_widget_for_value()
...
... and use it to set a drag icon.
2020-03-02 04:43:56 +01:00
Benjamin Otte
b2c3e39c89
contentformats: Constify some functions
2020-03-02 04:43:56 +01:00
Benjamin Otte
03882e1f96
dragicon: Change how to acquire drag icons
...
Before, gtk_drag_icon_new_for_drag() allowed creating new drag icons.
This could cause multiple drag icons to exist for a single drag.
Now, gtk_drag_icon_get_for_drag() makes sure that only one drag icon is
created.
2020-03-02 04:43:56 +01:00
Benjamin Otte
9efc4e6777
dragicon: Add GtkDragIcon::child
2020-03-02 04:43:56 +01:00
Benjamin Otte
7cd728a0ea
gdk: Make gdk_drop_status() take preferred action
...
This allows textview/text dnd to properly display a MOVE icon when in
the widget the drag started from but a COPY icon otherwise.
2020-03-02 04:43:56 +01:00
Benjamin Otte
c3fb6ca747
colorswatch: Switch to dragged color during dnd
...
This is really simple to implement now, so do it.
2020-03-02 03:18:55 +01:00
Benjamin Otte
3f7b401de0
gtk-demo: Add a simple peg solitaire DND demo
2020-03-02 03:18:55 +01:00
Benjamin Otte
a411959c91
droptarget: Redo
...
This is a huge reorganization of GtkDropTarget. I did not know how to
split this up, so it's unfortunately all one commit.
Highlights:
- Split GtkDropTarget into GtkDropTarget and GtkDropTargetAsync
GtkDropTarget is the simple one that only works with GTypes and offers
a synchronous interface.
GtkDropTargetAsync retains the full old functionality and allows
handling mime types.
- Drop events are handled differently
Instead of picking a single drop target and sending all DND events to
it, every event is sent to every drop target. The first one to handle
the event gets to call gdk_drop_status(), further handlers do not
interact with the GdkDrop.
Of course, for the ultimate GDK_DROP_STARTING event, only the first
one to accept the drop gets to handle it.
This allows stacking DND event controllers that aren't necessarily
interested in handling the event or that might decide later to drop
it.
- Port all widgets to either of those
Both have a somewhat changed API due to the new event handling.
For the ones who should use the sync version, lots of cleanup was
involved to operate on a sync API.
2020-03-02 03:18:55 +01:00
Benjamin Otte
f4ac74795c
placessidebar: Don't use the GdkDrag
...
First, it should have been a GdkDrop, but even then, proper DND code
should not rely on internals.
It's only been used in an unused signal emission anyway.
2020-03-02 03:18:55 +01:00
Benjamin Otte
b64a0273c5
notebook: Make dnd page switching a drop controller
...
This untangles tab dnd from page switching.
2020-03-02 03:18:55 +01:00
Benjamin Otte
b799bc5ce1
textview: Move drop scrolling to drop motion controller
...
Don't confuse the drop target with it.
2020-03-02 03:18:55 +01:00
Benjamin Otte
fdb39b095b
treeview, iconview: Don't return the drop target
...
Not a good idea to hand internal event controllers out to public API.
2020-03-02 03:18:55 +01:00
Benjamin Otte
d9fa839097
testsuite: Use g_assert() in tests
2020-03-02 03:18:55 +01:00
Emmanuele Bassi
35f8f05a63
Merge branch 'piotrdrag/placessidebar-typos' into 'master'
...
placessidebar: Fix a couple of typos and thinkos in menu labels
See merge request GNOME/gtk!1494
2020-03-01 15:07:17 +00:00
Piotr Drąg
810d567cc9
placessidebar: Fix a couple of typos and thinkos in menu labels
2020-03-01 15:05:28 +01:00
Matthias Clasen
c9d3f87e43
Merge branch 'kill-grabs-2' into 'master'
...
Kill grabs
See merge request GNOME/gtk!1492
2020-02-29 01:19:48 +00:00
Matthias Clasen
3d11973df8
Drop gtk_grab_add/remove from public api
...
The only form in which we still allow grabs to take place
is with modal toplevels.
2020-02-28 16:36:17 -05:00
Matthias Clasen
57c8a643ff
Drop gtk_grab_get_current
...
Another grab-related api that we are not using.
2020-02-28 16:29:56 -05:00
Matthias Clasen
0ffb35c9e7
Drop device grabs
...
We were not using this api at all, so lets drop it.
2020-02-28 16:27:42 -05:00
Matthias Clasen
d60097f8fe
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Fix the "Software GL" switch
See merge request GNOME/gtk!1491
2020-02-28 20:35:11 +00:00