Matthias Clasen [Sun, 29 Jan 2023 02:13:10 +0000 (21:13 -0500)]
gsk: Quiet a compiler warning
Jürgen Benvenuti [Sat, 28 Jan 2023 19:59:19 +0000 (19:59 +0000)]
Update German translation
Benjamin Otte [Sat, 28 Jan 2023 18:26:00 +0000 (18:26 +0000)]
Merge branch 'tooltip-size-simplification' into 'main'
tooltip: Don't play games with max-width-chars
Closes #4470 and #5521
See merge request GNOME/gtk!5455
Matthias Clasen [Sat, 28 Jan 2023 15:32:19 +0000 (10:32 -0500)]
tooltip: Prevent too-wide tooltip windows
Set the label to expand, so it actually fills
the width that we allocated for it, instead
of shrinking back to the minimum width for
its height.
Fixes: #5521
Matthias Clasen [Sat, 28 Jan 2023 18:04:01 +0000 (13:04 -0500)]
tooltip: Don't play games with max-width-chars
Setting max-width-chars to the number of characters
in the string works ok only as long as the average
char width we get from Pango matches reality. Sadly
that seems not always the case, and this code was
causing short Chinese tooltips to always be broken
into two lines.
Fixes: #4470
Piotr Drąg [Sat, 28 Jan 2023 13:05:01 +0000 (14:05 +0100)]
Update POTFILES.in
Matthias Clasen [Sat, 28 Jan 2023 03:24:19 +0000 (03:24 +0000)]
Merge branch 'position-as-double' into 'main'
Boyscouting: fix position type in `gtk_drag_source_drag_begin()`
See merge request GNOME/gtk!5437
Carlos Garnacho [Sat, 28 Jan 2023 00:44:25 +0000 (00:44 +0000)]
Merge branch 'work/zzag/activation-token-dbus' into 'main'
wayland: Fix handling of activation-token in org.freedesktop.Application requests
See merge request GNOME/gtk!5151
Yuri Chornoivan [Fri, 27 Jan 2023 19:23:39 +0000 (19:23 +0000)]
Update Ukrainian translation
Vlad Zahorodnii [Thu, 20 Oct 2022 16:33:15 +0000 (19:33 +0300)]
wayland: Fix handling of activation-token in org.freedesktop.Application requests
At the moment, GTK applications search for "desktop-startup-id" in the
platform data on Wayland , but desktop environments such as plasma set
"activation-token" property instead as indicated in the spec:
activation-token: This should be a string of the same value as would
be stored in the XDG_ACTIVATION_TOKEN environment variable, as specified
by the XDG Activation protocol for Wayland.
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus
Carlos Garnacho [Fri, 27 Jan 2023 19:20:28 +0000 (19:20 +0000)]
Merge branch 'wip/carlosg/broadway-fix' into 'main'
gdk/broadway: Add deprecation guards around gdk_display_put_event()
See merge request GNOME/gtk!5450
Carlos Garnacho [Fri, 27 Jan 2023 18:39:53 +0000 (19:39 +0100)]
gdk/broadway: Add deprecation guards around gdk_display_put_event()
This went missing.
Matthias Clasen [Fri, 27 Jan 2023 16:22:17 +0000 (16:22 +0000)]
Merge branch 'fix_5551' into 'main'
object_tree.c: One gtk_list_item_get_child call is redundant
Closes #5551
See merge request GNOME/gtk!5449
Matthias Clasen [Fri, 27 Jan 2023 14:54:33 +0000 (14:54 +0000)]
Merge branch 'wip/sophie-h/scrolled-window-propagate-event' into 'main'
scrolledWindow: Propagate event for no scrolling
See merge request GNOME/gtk!5447
Lukáš Tyrychtr [Fri, 27 Jan 2023 14:43:24 +0000 (15:43 +0100)]
object_tree.c: One gtk_list_item_get_child call is redundant
Fixes #5551
Hugo Carvalho [Fri, 27 Jan 2023 14:26:32 +0000 (14:26 +0000)]
Update Portuguese translation
Sophie Herold [Wed, 25 Jan 2023 21:26:07 +0000 (22:26 +0100)]
scrolledWindow: Propagate event for no scrolling
Matthias Clasen [Thu, 26 Jan 2023 02:44:54 +0000 (02:44 +0000)]
Merge branch 'broadway-modal-hint' into 'main'
[GTK4] gdk/broadway: Implements modal hint for Broadway surface
See merge request GNOME/gtk!4428
Matthias Clasen [Wed, 25 Jan 2023 13:08:07 +0000 (13:08 +0000)]
Merge branch 'fix_5543' into 'main'
GtkCssProvider: fix element type in docs
Closes #5543
See merge request GNOME/gtk!5441
Lukáš Tyrychtr [Wed, 25 Jan 2023 10:46:53 +0000 (11:46 +0100)]
Actually, the annotation is not needed in this case
Yosef Or Boczko [Wed, 25 Jan 2023 08:15:09 +0000 (08:15 +0000)]
Update Hebrew translation
Matthias Clasen [Tue, 24 Jan 2023 16:37:23 +0000 (16:37 +0000)]
Merge branch 'macos-fix-popups' into 'main'
macos: Fix popup event handling
Closes #5528
See merge request GNOME/gtk!5436
Matthias Clasen [Tue, 24 Jan 2023 16:08:57 +0000 (16:08 +0000)]
Merge branch 'wip/abono/gtk-switch-state-off' into 'main'
gtkswitch: Allow to set state FALSE while keeping active TRUE
See merge request GNOME/gtk!5442
Alessandro Bono [Mon, 23 Jan 2023 15:03:45 +0000 (16:03 +0100)]
gtkswitch: Decouple set_state with set_active.
Allow the user to set a state that doesn't reflect the active property.
Arjan Molenaar [Mon, 23 Jan 2023 20:45:59 +0000 (21:45 +0100)]
macos: Propagate events for child surfaces
Before, popup windows did not respond to mouse clicks.
This change fixes that.
Fixes #5528.
Maxim Zakharov [Tue, 24 Jan 2023 00:41:27 +0000 (11:41 +1100)]
remove unused variable
Matthias Clasen [Mon, 23 Jan 2023 22:01:30 +0000 (22:01 +0000)]
Merge branch 'macos-native-dnd' into 'main'
macos: DnD Drag support
Closes #3423
See merge request GNOME/gtk!5416
Emmanuele Bassi [Mon, 23 Jan 2023 11:50:28 +0000 (11:50 +0000)]
Use wording from a suggestion
Lukáš Tyrychtr [Mon, 23 Jan 2023 09:56:57 +0000 (10:56 +0100)]
GtkCssProvider: fix element type in docs
The method takes an array of char, which actually is UTF-8, so make the docs say so.
Fixes #5543
Matthias Clasen [Sun, 22 Jan 2023 18:36:11 +0000 (18:36 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
iconhelper: Handle GtkSymbolicPaintable
See merge request GNOME/gtk!5440
Matthias Clasen [Sun, 22 Jan 2023 18:17:11 +0000 (13:17 -0500)]
iconhelper: Handle GtkSymbolicPaintable
If we are given a GtkSymbolicPaintable,
treat it as symbolic.
Jordi Mas [Sat, 21 Jan 2023 15:58:51 +0000 (16:58 +0100)]
Update Catalan translation
Arjan Molenaar [Sat, 21 Jan 2023 14:22:13 +0000 (15:22 +0100)]
macos: remove dead code
Arjan Molenaar [Sat, 21 Jan 2023 13:54:12 +0000 (14:54 +0100)]
macos: Send dragging events directly to the display
Instead of adding events to the application event queue, dispatch
them directly to the right display. We know this when the event is
to be dispatched.
This is the same as used for the `sendEvent` method in `GdkMacosWindow`.
To achieve this I factored out the generic NSEvent to GdkEvent translation.
We can send an event directly, when we receive it in the GdkMacosWindow
directly from the OS.
Ekaterine Papava [Fri, 20 Jan 2023 16:04:31 +0000 (16:04 +0000)]
Update Georgian translation
Matthias Clasen [Tue, 17 Jan 2023 21:37:39 +0000 (21:37 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Cosmetics
See merge request GNOME/gtk!5434
Matthias Clasen [Tue, 17 Jan 2023 20:19:50 +0000 (15:19 -0500)]
settings: Modernize the code
Drop some things that are no longer relevant,
and make this code look like modern GObject code.
Arjan Molenaar [Tue, 17 Jan 2023 15:24:47 +0000 (16:24 +0100)]
macos: Update event source doc
Update the documentation with the interaction pattern we
need to support DnD.
Arjan Molenaar [Tue, 17 Jan 2023 15:12:57 +0000 (16:12 +0100)]
macos: align functions in gdkmacosdrag-private.h
Matthias Clasen [Tue, 17 Jan 2023 13:30:37 +0000 (08:30 -0500)]
settings: Drop object_list
This code came from a time when we were installing
additional settings at runtime. We no longer do that,
so this code is unnecessary.
Matthias Clasen [Tue, 17 Jan 2023 12:46:57 +0000 (07:46 -0500)]
modules: Cosmetics
Use g_strv_length, instead of open-coding it.
Matthias Clasen [Tue, 17 Jan 2023 12:39:51 +0000 (07:39 -0500)]
stylecascade: Avoid some allocations
Arjan Molenaar [Mon, 16 Jan 2023 22:15:46 +0000 (23:15 +0100)]
macos: Provide the right drag action
We should use the drag action/operation provided by the
drag handlers, not rely on our internal bookkeeping.
Arjan Molenaar [Mon, 16 Jan 2023 19:28:38 +0000 (20:28 +0100)]
macos: Default kCFRunLoopAllActivities
It's actually a mask, but we'll keep it in to
avoid compiler warnings.
Matthias Clasen [Mon, 16 Jan 2023 14:32:01 +0000 (14:32 +0000)]
Merge branch 'fix-hidpi-pictures' into 'main'
picture: Fix hi-dpi image handling
See merge request GNOME/gtk!5430
Matthias Clasen [Sun, 15 Jan 2023 12:59:27 +0000 (07:59 -0500)]
picture: Fix hi-dpi image handling
The idea behind this code was to let scalable
images (i.e. mainly SVGs) provide twice as much
detail when the scale is 2. But we were also
using a scaler for pngs, causing them to be too
small on a hidpi screen. Fix that.
Note that there are cases where you want scaling
for pngs (when you display them scaled down, so
the image has 'hidden' detail). But we are not
attempting to handle that situation automatically.
Arjan Molenaar [Mon, 16 Jan 2023 13:47:49 +0000 (14:47 +0100)]
macos: Queue events during drag
By passing the events during a (midal-ish) drag operation to the main loop,
we're able to keep up with what's happening. This allows the internal
drag state (GtkDragSource) to be updated and be done when the drag is
done.
Emin Tufan Çetin [Sun, 15 Jan 2023 22:47:27 +0000 (22:47 +0000)]
Update Turkish translation
Matthias Clasen [Sun, 15 Jan 2023 18:48:22 +0000 (18:48 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Use GtkUriLauncher where appropriate
See merge request GNOME/gtk!5432
Matthias Clasen [Sun, 15 Jan 2023 18:25:34 +0000 (13:25 -0500)]
Use GtkUriLauncher where appropriate
GtkLabel, GtkLinkButton and GtkAboutDialog
all have a uri, not a file, so it makes more
sense to use a GtkUriLauncher.
Matthias Clasen [Sun, 15 Jan 2023 17:47:18 +0000 (17:47 +0000)]
Merge branch 'uri-launcher-demo' into 'main'
urilauncher: Fix finish function mismatch
See merge request GNOME/gtk!5431
Matthias Clasen [Sun, 15 Jan 2023 16:58:43 +0000 (11:58 -0500)]
gtk-demo: Add a uri launcher demo
Matthias Clasen [Sun, 15 Jan 2023 16:58:09 +0000 (11:58 -0500)]
urilauncher: Fix finish function mismatch
We need to call the finish function that
matches the async function.
Matthias Clasen [Sun, 15 Jan 2023 15:12:28 +0000 (15:12 +0000)]
Merge branch 'docs-escape-xml-tag' into 'main'
Escape GtkBuilder XML tag in comment with backtick
Closes #5312
See merge request GNOME/gtk!5429
Arjan Molenaar [Wed, 11 Jan 2023 22:17:24 +0000 (23:17 +0100)]
macos: Provide fallback pasteboard for gtype Dnd
The Drag data should pass through the macos pasteboard system.
We need to provide some pasteboard type. Let's make it a "URL",
which is a pretty generic type anyway.
Arjan Molenaar [Wed, 11 Jan 2023 18:01:05 +0000 (19:01 +0100)]
macos: No need to drag handle events
This is handled by the DraggingSource object.
Arjan Molenaar [Wed, 11 Jan 2023 17:56:01 +0000 (18:56 +0100)]
macos: No need to grab a seat
The macOS DnD logic will take over anyway.
Arjan Molenaar [Mon, 9 Jan 2023 22:01:12 +0000 (23:01 +0100)]
macos: Support dragging from GdkMacosWindow
The handling is done similar to drag targets.
Note that dragging is a modal action on macos: no events
are sent to the main window. This could cause trouble when
we finish the drag, and not finish the gesture in GTK.
sunce [Sun, 15 Jan 2023 06:17:07 +0000 (14:17 +0800)]
Escape GtkBuilder XML tag in comment with backtick
Escape XML tags in gi-docgen oriented comment e.g. from <child> to
`<child>`, so that they don't become HTML tag on the final webpage.
This fix includes everything from commit
ff46ea64 and #5312.
Fixes #5312
Arjan Molenaar [Sat, 14 Jan 2023 18:54:06 +0000 (19:54 +0100)]
Fix dx, dy position in gtk_drag_source_drag_begin
Coordinates are double. This change avoid an unneeded cast.
Matthias Clasen [Sun, 15 Jan 2023 04:12:47 +0000 (04:12 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
widgetfactory: Load textures in threads
See merge request GNOME/gtk!5428
Matthias Clasen [Sun, 15 Jan 2023 03:48:31 +0000 (22:48 -0500)]
texture: Update docs
Document that we support TIFF as well.
Matthias Clasen [Sun, 15 Jan 2023 03:38:20 +0000 (22:38 -0500)]
widgetfactory: Load textures in threads
It is useful to show how this is done, even
though the images here are not terribly large.
Matthias Clasen [Sun, 15 Jan 2023 00:46:11 +0000 (00:46 +0000)]
Merge branch 'nielsdg/gtkwidgetactionactivatefunc-nullable-variant' into 'main'
Add missing nullable to GtkWidgetActionActivateFunc
See merge request GNOME/gtk!5424
Matthias Clasen [Sat, 14 Jan 2023 22:59:01 +0000 (22:59 +0000)]
Merge branch 'uri-launcher' into 'main'
filelauncher: Plug a memory leak
See merge request GNOME/gtk!5425
Matthias Clasen [Sat, 14 Jan 2023 19:00:56 +0000 (14:00 -0500)]
docs: Update deprecations for gtk_show_uri
We have a better replacement now.
Matthias Clasen [Sat, 14 Jan 2023 19:00:39 +0000 (14:00 -0500)]
urilauncher: Add cross-references to the docs
Matthias Clasen [Sat, 14 Jan 2023 17:22:51 +0000 (12:22 -0500)]
Add GtkUriLauncher
Matthias Clasen [Sat, 14 Jan 2023 17:19:18 +0000 (12:19 -0500)]
Add g_openuri_portal_open_uri_async
This avoids a roundtrip through GFile and
thus works with random uri schemes.
Matthias Clasen [Sat, 14 Jan 2023 17:10:26 +0000 (12:10 -0500)]
openuri: Some reshuffling
This is in preparation of adding a method
that takes a uri instead of a GFile.
Matthias Clasen [Sat, 14 Jan 2023 17:23:12 +0000 (12:23 -0500)]
filelauncher: Plug a memory leak
Oops
Niels De Graef [Sat, 14 Jan 2023 14:30:15 +0000 (15:30 +0100)]
Add missing nullable to GtkWidgetActionActivateFunc
The `GVariant` that is passed on to the `GtkWidgetActionActivateFunc`
can be `NULL` in case the parameter type is also `NULL`, so mark it
nullable.
Matthias Clasen [Sat, 14 Jan 2023 05:30:10 +0000 (05:30 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Fix a compiler warning
See merge request GNOME/gtk!5423
Matthias Clasen [Sat, 14 Jan 2023 02:19:14 +0000 (21:19 -0500)]
icontheme: Streamline the suffix handling code
Matthias Clasen [Sat, 14 Jan 2023 01:54:57 +0000 (20:54 -0500)]
icontheme: Avoid some allocations
When loading icon themes, we can reuse memory
instead of allocating and freeing in a loop.
Matthias Clasen [Sat, 14 Jan 2023 01:52:30 +0000 (20:52 -0500)]
icontheme: Keep a single string set
Instead of keeping a GtkStringSet per IconTheme,
just make one for the whole GtkIconTheme.
This avoids loops of the themes in some places, and
due to the overlap in icon names between the themes,
it reduces the amount of memory we use for the icon
names with Adwaita+hicolor from 5+4 chunks to 6 chunks.
Matthias Clasen [Fri, 13 Jan 2023 18:15:05 +0000 (13:15 -0500)]
testsuite: Fix various compiler warnings
These are mostly dead stores that clang
isn't happy with.
Matthias Clasen [Fri, 13 Jan 2023 16:41:49 +0000 (11:41 -0500)]
Fix a compiler warning
Clang things that timings can be NULL here,
and I think it might be right.
Matthias Clasen [Sat, 14 Jan 2023 04:23:34 +0000 (04:23 +0000)]
Merge branch 'wip/corey/fix-docs' into 'main'
docs: Fix dependency names
See merge request GNOME/gtk!5422
Matthias Clasen [Sat, 14 Jan 2023 00:18:50 +0000 (00:18 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Silence a compiler warning
See merge request GNOME/gtk!5421
Corey Berla [Fri, 13 Jan 2023 22:24:33 +0000 (14:24 -0800)]
docs: Fix dependency names
When gi-docgen added the "related" key, it also began checking
that the dependencies were actually dependencies otherwise they aren't
listed as dependencies. The capitalization needs to match the
namespace.
Matthias Clasen [Fri, 13 Jan 2023 20:14:25 +0000 (20:14 +0000)]
Merge branch 'fix-spinner-stop' into 'main'
gtkcssanimatedstyle: Fix return of new_advance()
Closes #4426
See merge request GNOME/gtk!5420
Arjan Molenaar [Wed, 11 Jan 2023 15:29:24 +0000 (16:29 +0100)]
macos: run glib idle functions when in nested run loop
It looks like DnD starts a nested run loop. We still have to run our
GLib handlers, so animations work.
Christian Hergert [Sat, 19 Jun 2021 02:51:13 +0000 (19:51 -0700)]
macos: abstract pasteboard for use in clipboard and drag
This will allow us to share a single NSPasteboardItem and data provider
implementation for both GdkClipboard and GdkDrag.
Christian Hergert [Fri, 18 Jun 2021 18:27:54 +0000 (11:27 -0700)]
macos: refactor pasteboard components into separate module
This will make it easier to reuse from drag integration so that we don't
require clipboards for everything.
We will need to subclass the pasteboard provider twice, however, both
for clipboard and dragging.
Matteo Percivaldi [Fri, 13 Jan 2023 13:05:10 +0000 (14:05 +0100)]
gtkcssanimatedstyle: Fix return of new_advance()
This was causing animation and transition to stop randomly and reset
their state to initial state.
This issue has existed since commit
7b68bdb8316fc1bb96c4a5ad16c1885506131d22.
Closes #4426
Matthias Clasen [Fri, 13 Jan 2023 16:46:44 +0000 (11:46 -0500)]
Silence compiler warnings
Clang complains that these are dead stores.
They are, indeed.
Matthias Clasen [Fri, 13 Jan 2023 16:42:20 +0000 (11:42 -0500)]
Fix a compiler warning
Clang things that load_error might be NULL here.
It may be right.
Matthias Clasen [Fri, 13 Jan 2023 16:41:49 +0000 (11:41 -0500)]
Fix a compiler warning
Clang things that timings can be NULL here,
and I think it might be right.
Matthias Clasen [Fri, 13 Jan 2023 16:30:13 +0000 (11:30 -0500)]
gridview: Add a few assertions
Just to help static analysis out.
self->n_columns can't ever be 0, since
we clamp it between min_columns and
max_columns, with min_columns always
being at least one.
Matthias Clasen [Fri, 13 Jan 2023 16:08:41 +0000 (11:08 -0500)]
Silence a compiler warning
Clang was complaining that we never use the
value stored in mime_type. Just don't store it,
we are only interested in the side-effect
(interning the string).
Matthias Clasen [Fri, 13 Jan 2023 12:57:15 +0000 (12:57 +0000)]
Merge branch 'faster-ci' into 'main'
Add a build-testsuite option
See merge request GNOME/gtk!5419
Matthias Clasen [Fri, 13 Jan 2023 12:26:41 +0000 (07:26 -0500)]
ci: Try to speed up builds a bit
Don't build demos and tests, and only build
the testsuite where we want to run it.
Matthias Clasen [Fri, 13 Jan 2023 12:15:15 +0000 (07:15 -0500)]
Update the build documentation
Matthias Clasen [Fri, 13 Jan 2023 12:14:33 +0000 (07:14 -0500)]
Add a build-testsuite option
This will let us run the testsuite in ci without
having to build all the manual tests.
Matthias Clasen [Fri, 13 Jan 2023 03:08:36 +0000 (03:08 +0000)]
Merge branch 'macos-werror' into 'main'
CI: turn on -Werror for MacOS build
See merge request GNOME/gtk!5418
Benjamin Otte [Wed, 3 Nov 2021 22:35:03 +0000 (23:35 +0100)]
CI: turn on -Werror for MacOS build
The build is error-free and we want to keep it that way.
We'd also like to make Timm do real work instead of having to fix clang
warnings all the time and this build is a clang build.
Matthias Clasen [Fri, 13 Jan 2023 00:10:48 +0000 (00:10 +0000)]
Merge branch 'wip/chergert/fix-macos-warnings' into 'main'
Fixes a few compilation warnings on macOS
See merge request GNOME/gtk!5415
Matthias Clasen [Thu, 12 Jan 2023 23:35:23 +0000 (23:35 +0000)]
Merge branch 'ebassi/pin-gi' into 'main'
Add gobject-introspection as a subproject
See merge request GNOME/gtk!5414
Christian Hergert [Thu, 12 Jan 2023 21:22:47 +0000 (13:22 -0800)]
gdk/macos: fix warning about _coreCursorType