Commit Graph

70431 Commits

Author SHA1 Message Date
Alexander Mikhaylenko
f3befe530b button: Reset style classes when setting arbitrary children
Don't leave leftover .image-button or .text-button.
2021-06-24 23:06:46 +05:00
Matthias Clasen
59d4333e23 Merge branch 'wip/sadiq/reveal-controls-on-touch' into 'master'
video: Reveal controls on tap

See merge request GNOME/gtk!3648
2021-06-24 15:11:33 +00:00
Matthias Clasen
92177d9663 Merge branch 'wip/chergert/gdk-macos-gdkdrop' into 'master'
GdkDrop suport for macOS backend

See merge request GNOME/gtk!3683
2021-06-24 15:03:19 +00:00
Matthias Clasen
6a29b64850 Merge branch 'dnd-fixes' into 'master'
dnd: Add another assertion

See merge request GNOME/gtk!3689
2021-06-24 15:01:29 +00:00
Matthias Clasen
73cb60d053 Merge branch 'ebassi/filechooser-no-trash' into 'master'
Never show the Trash in the FileChooserWidget side bar

Closes #674

See merge request GNOME/gtk!3692
2021-06-24 14:59:43 +00:00
Matthias Clasen
47bd998e94 Merge branch 'checkbutton-release-outside' into 'master'
checkbutton: Match GtkButton behavior

Closes #4061

See merge request GNOME/gtk!3691
2021-06-24 14:58:42 +00:00
Matthias Clasen
e2cfa7bd11 Merge branch 'fix_tests_testdnd' into 'master'
make testdnd trashcan work again

See merge request GNOME/gtk!3700
2021-06-24 14:54:32 +00:00
Matthias Clasen
006633082d Merge branch 'macos-input-method' into 'master'
macos: fix the position of curosr of input method for macos.

Closes #4063

See merge request GNOME/gtk!3699
2021-06-24 14:50:59 +00:00
Caolán McNamara
bbf7454fc9 make testdnd trashcan work again
so that dragging into the 'trashcan' is detected
2021-06-23 15:09:44 +01:00
Emmanuele Bassi
85cb5509c4 Merge branch 'gtklistitem-autocleanup' into 'master'
gtk: Define the GtkListItem autocleanup func

See merge request GNOME/gtk!3698
2021-06-23 13:09:28 +00:00
Emmanuele Bassi
0e29f52841 Merge branch 'migration_patch' into 'master'
Add section about `gtk_widget_set_app_paintable`

Closes #4007

See merge request GNOME/gtk!3641
2021-06-23 13:08:07 +00:00
Jaap aarts
02893e37d3 Add section about gtk_widget_set_app_paintable 2021-06-23 13:08:06 +00:00
Zhi
1dbb5188ba macos: fix the position of curosr of input method for macos.
In the refactoring from GdkWindow to GdkSurface, GtkWidget no longer
corresponds to a GdkSurface. We have to calculate the relative position
from GtkWidget to the GdkSurface.

Closes #4063.
2021-06-22 22:57:34 +08:00
Adrien Plazas
a4d35ace78 gtk: Define the GtkListItem autocleanup func 2021-06-22 09:43:16 +02:00
Carlos Garnacho
981a638b01 Merge branch 'fix-pointer-gestures-kde-plasma' into 'master'
gdk/wayland: Fix pointer-gestures version selection

See merge request GNOME/gtk!3693
2021-06-21 21:35:06 +00:00
Vlad Zahorodnii
3969d8b028 gdk/wayland: Fix pointer-gestures version selection
version == GDK_ZWP_POINTER_GESTURES_V1_VERSION will fail if the
compositor implements version 2 of pointer-gestures-v1.
2021-06-21 09:51:45 +03:00
Emmanuele Bassi
889709213e Never show the Trash in the FileChooserWidget side bar
The Trash is a special location: files cannot be copied or moved, there,
and the file selection dialog is not able to restore files from the
Trash.

Fixes: #674
2021-06-20 15:44:22 +01:00
Emmanuele Bassi
333a92bcff Revert "Never show the Trash in the FileChooserWidget side bar"
This reverts commit cd39e417e1.
2021-06-20 15:41:43 +01:00
Emmanuele Bassi
cd39e417e1 Never show the Trash in the FileChooserWidget side bar
The Trash is a special location: files cannot be copied or moved, there,
and the file selection dialog is not able to restore files from the
Trash.

Fixes: #674
2021-06-20 15:39:41 +01:00
Matthias Clasen
1cebf406aa docs: Fix a typo 2021-06-19 14:14:57 -07:00
Matthias Clasen
d7915fbca8 docs: Add a section about Drag-and-Drop 2021-06-19 14:14:57 -07:00
Matthias Clasen
9169315cc1 Merge branch 'wip/chergert/textview-access-to-contexts' into 'master'
textview: give application developers access to RTL and LTR context

See merge request GNOME/gtk!3690
2021-06-19 20:36:44 +00:00
Matthias Clasen
3b70cd3226 checkbutton: Match GtkButton behavior
When leaving the widget before releasing the button,
we should not activate the checkbutton, to match the
way GtkButton behaves.

Fixes: #4061
2021-06-19 13:30:31 -07:00
Christian Hergert
a6101f0181 textview: give application developers access to RTL and LTR context
This allows developers to modify the pango context that is used when
rendering text within the text view.

Such access can be useful to alter how rounding occurs with API such as
pango_context_set_round_glyph_positions() and is needed by GtkSourceView
for proper placement of glyphs within the overview map.
2021-06-19 12:28:18 -07:00
Matthias Clasen
92c6485adf docs: Tweak wording
Instead of drag'n'drop, say drag-and-drop. That is easier
to read, and less unclear on the markdown syntax implications.
2021-06-19 08:03:47 -07:00
Matthias Clasen
4df9314039 wayland: Fix some dnd corner case
We must call gdk_drag_drop_done() when the drag ends,
successfully or not. Without this, we get an unwarranted
emission of ::cancel after a successful drop.

Since only the first call to gdk_drag_drop_done() is taking
effect, it is safe to call as a fallback, after emitting
::dnd-finished. If the application connects to that signal
and calls gdk_drag_drop_done() itself, its call will take
precedence.

This matches what the X11 implementation does.
2021-06-19 08:03:21 -07:00
Matthias Clasen
c8ad4d5deb dnd: Add another assertion
Assert that gdk_drop_finish() is called after the
drop is performed.
2021-06-19 07:50:41 -07:00
Matthias Clasen
13a2db2238 Merge branch 'fix-3798' into 'master'
GDK-Win32: Fix drag surface positioning (issue #3798)

Closes #3798

See merge request GNOME/gtk!3659
2021-06-18 17:31:51 +00:00
Matthias Clasen
e8f9fb0f86 Merge branch 'gsk-big-batches' into 'master'
ci: Build Broadway on MacOS

See merge request GNOME/gtk!3686
2021-06-18 17:00:58 +00:00
Matthias Clasen
634bd2de48 Merge branch 'matthiasc/for-master' into 'master'
ci: Build Broadway on MacOS

See merge request GNOME/gtk!3685
2021-06-18 14:09:49 +00:00
Matthias Clasen
f58fc6b22e gsk: Respect max element vertices limitation
We are pretty good at batching commands now, and we can easily
produce batches that exceed the maximum number of elements per
draw call that the hw can handle. Query that number, and respect
it when merging batches.

This fixes the rendering of the overview map in GtkSourceView.
2021-06-18 06:50:59 -07:00
Matthias Clasen
fb052c8d25 ci: Build Broadway on MacOS
We've seen a build failure if Broadway is built without
the X11 backend. Lets recreate that configuration in ci
so it doesn't break again.
2021-06-18 06:09:14 -07:00
Chun-wei Fan
e35490ba5b gdkdrag-win32.c: Fix drag surface positioning
Determine the root_x and root_y coordinates of the drag surface by
relying on the coordinates of the surface where the drag is being
carried out, plus the coordinates that we receive from the drag event,
which is in-line with what the X11 backend does.

This will prevent the drag surface from being initially drawn at the
correct position, but jumping towards the top-left corner of the screen
shortly afterwards.

The DnD support will still need some more updates to function correctly
on Windows, but at least this is a small improvement.

Fixes issue #3798.
2021-06-18 18:07:50 +08:00
Matthias Clasen
be1b979e51 Merge branch 'matthiasc/for-master' into 'master'
treeviewcolumn: Clip header buttons

Closes #4045

See merge request GNOME/gtk!3682
2021-06-18 04:37:48 +00:00
Christian Hergert
3fd931d392 macos: implement GdkDrop for macOS
This gets the basic mechanics of the drop portion of DnD working on the
macOS backend. You can drag, for example, from TextEdit into GNOME
Text Editor when using the macOS backend.

Other content formats are supported, and match what is currently
supported by the clipboard backend as the implementation to read
from the pasteboard is shared.

Currently, we look up the GdkDrag for the new GdkDrop. However,
nothing is stashing the drag away for further lookup. More work is
needed on GdkMacosDrag for that to be doable.
2021-06-17 17:26:42 -07:00
Christian Hergert
6c1dce2878 macos: make pasteboard usage reusable
We will want to be able to reuse the pasteboard reading code from
the macOS DnD drop backend. This just removes the pasteboard
bits from the implementation and allows that to be passed in as in
both clipboard and DnD cases we'll have a specific NSPasteboard
to read from.
2021-06-17 17:19:19 -07:00
Christian Hergert
ad1260505d macos: check for GdkMacosBaseView before using as such
We can get events for external windows such as those from native
file chooser dialogs.
2021-06-17 17:18:19 -07:00
Matthias Clasen
d92f8a1b8e treeviewcolumn: Clip header buttons
We don't want to overdraw when dragging a narrow column
around, and we also need the clipping to avoid picking
the wrong column, when a later column button overlaps
an earlier one.

Fixes: #4045
2021-06-17 17:14:14 -07:00
Matthias Clasen
22827f2cc7 macos: Fix a compiler warning 2021-06-17 17:14:14 -07:00
Christian Hergert
b64370cd48 macos: move drag motion to GdkMacosDrag
This doesn't help to be pushed off into the surface, as it makes things
more different than the X11 implementation.
2021-06-17 13:24:39 -07:00
Christian Hergert
6c8e176cc0 macos: fix position of drag surface 2021-06-17 13:23:38 -07:00
Christian Hergert
057bda6cd7 macos: register known clipboard types for drag destination 2021-06-17 13:23:18 -07:00
Matthias Clasen
8df2cce5c1 Merge branch 'wip/chergert/fix-broadway-build' into 'master'
inspector: fix compilation with broadway

See merge request GNOME/gtk!3681
2021-06-17 19:45:16 +00:00
Christian Hergert
352898ae9e inspector: fix compilation with broadway 2021-06-17 11:54:00 -07:00
Matthias Clasen
1bda665662 Merge branch 'matthiasc/for-master' into 'master'
action muxer fixes

See merge request GNOME/gtk!3678
2021-06-17 17:53:16 +00:00
Hugo Carvalho
fad4c60499 Update Portuguese translation
(cherry picked from commit 807537dd5d)
2021-06-17 14:44:54 +00:00
Matthias Clasen
47bb556327 testsuite: Avoid a compiler warning
This was showing up in ci on macos.
2021-06-17 09:37:45 -04:00
Matthias Clasen
4d00f1903a widget-factory: Show Ctrl-? in the menu
We use our own action for showing the shortcuts window,
so we need to associate this shortcut with our action
for it to show up.
2021-06-17 08:59:30 -04:00
Matthias Clasen
7344a03aa3 shortcutcontroller: Don't reinject menu accels
The normal way to associate accels with actions is
to attach a shortcut controller to the widget. The shorcut
controller will inject the accel into the action muxer
tree, so that it can get displayed in widgets that activate
the action (say, in menus.

This approach does not works for generated menus, since the
widgets are not in the hands of the app developer, so attaching
shortcut controllers to them is impractical.

Instead, GtkModelButton has an accel property that gets
bound to the accel coming from the action muxer tree (most
likely put there via gtk_application_set_accel_for_action),
and creates a shortcut controller itself.

The change in this commit is to prevent the shortcut controller
from injecting the accel into the action muxer tree in this case.
Otherwise, the accels get 'stuck' and we won't update them if the
global accels are later changed.

This is a hack, and needs a better solution.
2021-06-17 08:50:26 -04:00
Matthias Clasen
64af90111e window: Propagate accel changes
When the global accels change, tell the
shortcut controller to re-inject them into
the action muxer hierarchy.
2021-06-17 08:50:26 -04:00