Commit Graph

74674 Commits

Author SHA1 Message Date
Matthias Clasen
542d766469 builder: Accept standard C type names
We are much more likely to use standard C types
in our code nowadays, and it is a bit of a
dissonance to have to use the g-names when
referring to the same types in ui files.

This adds code to our type name resolver
to map the standard C numeric type names
to their glib equivalents.

Tests included.
2023-01-25 23:49:22 -05:00
Yosef Or Boczko
aac3bf581a Update Hebrew translation 2023-01-25 08:15:09 +00:00
Matthias Clasen
869f07521c Merge branch 'macos-fix-popups' into 'main'
macos: Fix popup event handling

Closes #5528

See merge request GNOME/gtk!5436
2023-01-24 16:37:23 +00:00
Matthias Clasen
7e392a1186 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
2023-01-24 16:08:57 +00:00
Alessandro Bono
53d87e42a5 gtkswitch: Decouple set_state with set_active.
Allow the user to set a state that doesn't reflect the active property.
2023-01-24 14:55:16 +01:00
Arjan Molenaar
6757a1b409 macos: Propagate events for child surfaces
Before, popup windows did not respond to mouse clicks.
This change fixes that.

Fixes #5528.
2023-01-24 09:07:33 +01:00
Matthias Clasen
5caa66ffb7 Merge branch 'macos-native-dnd' into 'main'
macos: DnD Drag support

Closes #3423

See merge request GNOME/gtk!5416
2023-01-23 22:01:30 +00:00
Matthias Clasen
9c669cbe90 Merge branch 'matthiasc/for-main' into 'main'
iconhelper: Handle GtkSymbolicPaintable

See merge request GNOME/gtk!5440
2023-01-22 18:36:11 +00:00
Matthias Clasen
1a5184bc85 iconhelper: Handle GtkSymbolicPaintable
If we are given a GtkSymbolicPaintable,
treat it as symbolic.
2023-01-22 13:18:18 -05:00
Jordi Mas
8f2ad8f154 Update Catalan translation 2023-01-21 16:58:51 +01:00
Arjan Molenaar
d6ef39b9a2 macos: remove dead code 2023-01-21 15:22:13 +01:00
Arjan Molenaar
52f6acd398 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.
2023-01-21 14:54:12 +01:00
Ekaterine Papava
2f894bb4ef Update Georgian translation 2023-01-20 16:04:31 +00:00
Matthias Clasen
2509fe0d17 Merge branch 'matthiasc/for-main' into 'main'
Cosmetics

See merge request GNOME/gtk!5434
2023-01-17 21:37:39 +00:00
Matthias Clasen
83a5611ce8 settings: Modernize the code
Drop some things that are no longer relevant,
and make this code look like modern GObject code.
2023-01-17 15:19:50 -05:00
Arjan Molenaar
136c1ccd2c macos: Update event source doc
Update the documentation with the interaction pattern we
need to support DnD.
2023-01-17 16:37:21 +01:00
Arjan Molenaar
16e23b3f9e macos: align functions in gdkmacosdrag-private.h 2023-01-17 16:12:57 +01:00
Matthias Clasen
af088d5e11 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.
2023-01-17 08:30:37 -05:00
Matthias Clasen
a6e1c5c96a modules: Cosmetics
Use g_strv_length, instead of open-coding it.
2023-01-17 07:47:28 -05:00
Matthias Clasen
3c8c54ed15 stylecascade: Avoid some allocations 2023-01-17 07:39:51 -05:00
Arjan Molenaar
628aeda7ee macos: Provide the right drag action
We should use the drag action/operation provided by the
drag handlers, not rely on our internal bookkeeping.
2023-01-16 23:21:35 +01:00
Arjan Molenaar
2669dc269b macos: Default kCFRunLoopAllActivities
It's actually a mask, but we'll keep it in to
avoid compiler warnings.
2023-01-16 20:28:38 +01:00
Matthias Clasen
c4d3d72c57 Merge branch 'fix-hidpi-pictures' into 'main'
picture: Fix hi-dpi image handling

See merge request GNOME/gtk!5430
2023-01-16 14:32:01 +00:00
Matthias Clasen
cd79159420 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.
2023-01-16 08:48:37 -05:00
Arjan Molenaar
1bc63eeadb 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.
2023-01-16 14:47:49 +01:00
Emin Tufan Çetin
071c6c60c0 Update Turkish translation 2023-01-15 22:47:27 +00:00
Matthias Clasen
fc24f401b7 Merge branch 'matthiasc/for-main' into 'main'
Use GtkUriLauncher where appropriate

See merge request GNOME/gtk!5432
2023-01-15 18:48:22 +00:00
Matthias Clasen
6c96e51b07 Use GtkUriLauncher where appropriate
GtkLabel, GtkLinkButton and GtkAboutDialog
all have a uri, not a file, so it makes more
sense to use a GtkUriLauncher.
2023-01-15 13:26:53 -05:00
Matthias Clasen
e703163bc4 Merge branch 'uri-launcher-demo' into 'main'
urilauncher: Fix finish function mismatch

See merge request GNOME/gtk!5431
2023-01-15 17:47:18 +00:00
Matthias Clasen
ad549cbded gtk-demo: Add a uri launcher demo 2023-01-15 11:58:43 -05:00
Matthias Clasen
673beef210 urilauncher: Fix finish function mismatch
We need to call the finish function that
matches the async function.
2023-01-15 11:58:09 -05:00
Matthias Clasen
55baa1f2e1 Merge branch 'docs-escape-xml-tag' into 'main'
Escape GtkBuilder XML tag in comment with backtick

Closes #5312

See merge request GNOME/gtk!5429
2023-01-15 15:12:28 +00:00
Arjan Molenaar
1d8a23e97b 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.
2023-01-15 10:03:47 +01:00
Arjan Molenaar
422b4b6561 macos: No need to drag handle events
This is handled by the DraggingSource object.
2023-01-15 10:03:47 +01:00
Arjan Molenaar
27ee8b23fd macos: No need to grab a seat
The macOS DnD logic will take over anyway.
2023-01-15 10:03:47 +01:00
Arjan Molenaar
b9847795a7 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.
2023-01-15 10:01:56 +01:00
sunce
b13f05537b 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
2023-01-15 16:55:18 +08:00
Matthias Clasen
0834dac6ee Merge branch 'matthiasc/for-main' into 'main'
widgetfactory: Load textures in threads

See merge request GNOME/gtk!5428
2023-01-15 04:12:47 +00:00
Matthias Clasen
3c31f72219 texture: Update docs
Document that we support TIFF as well.
2023-01-14 22:48:57 -05:00
Matthias Clasen
a0f63160d6 widgetfactory: Load textures in threads
It is useful to show how this is done, even
though the images here are not terribly large.
2023-01-14 22:38:20 -05:00
Matthias Clasen
c99d85954a Merge branch 'nielsdg/gtkwidgetactionactivatefunc-nullable-variant' into 'main'
Add missing nullable to GtkWidgetActionActivateFunc

See merge request GNOME/gtk!5424
2023-01-15 00:46:11 +00:00
Matthias Clasen
33f31d06f9 Merge branch 'uri-launcher' into 'main'
filelauncher: Plug a memory leak

See merge request GNOME/gtk!5425
2023-01-14 22:59:01 +00:00
Matthias Clasen
bf4b40f17e docs: Update deprecations for gtk_show_uri
We have a better replacement now.
2023-01-14 17:39:28 -05:00
Matthias Clasen
7aba9e3295 urilauncher: Add cross-references to the docs 2023-01-14 17:39:28 -05:00
Matthias Clasen
3080cb7acd Add GtkUriLauncher 2023-01-14 17:39:28 -05:00
Matthias Clasen
4b404f0dea Add g_openuri_portal_open_uri_async
This avoids a roundtrip through GFile and
thus works with random uri schemes.
2023-01-14 14:32:51 -05:00
Matthias Clasen
0c1c0524c7 openuri: Some reshuffling
This is in preparation of adding a method
that takes a uri instead of a GFile.
2023-01-14 14:32:51 -05:00
Matthias Clasen
b58ef290dc filelauncher: Plug a memory leak
Oops
2023-01-14 14:32:51 -05:00
Niels De Graef
1387fba7f8 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.
2023-01-14 15:30:15 +01:00
Matthias Clasen
34b9ec5be2 Merge branch 'matthiasc/for-main' into 'main'
Fix a compiler warning

See merge request GNOME/gtk!5423
2023-01-14 05:30:10 +00:00