Commit Graph

40468 Commits

Author SHA1 Message Date
Matthias Clasen
e7bd691532 inspector: Show monitor descriptions 2023-02-02 12:32:28 +01:00
Matthias Clasen
26650787e1 main: Compiler warnin gfixes 2023-02-02 08:44:53 +01:00
Matthias Clasen
b4ef072188 icontheme: Compiler warning fixes 2023-02-02 08:44:28 +01:00
Matthias Clasen
3858c5282c Deprecate GtkAssistant
It is a dialog-like toplevel, and libadwaita has
replacement parts (like AdwCarousel).
2023-02-02 08:39:25 +01:00
Matthias Clasen
1ff8dad8ec Deprecate GtkLockButton
This is a very specialized widget, and should really just
live with the applications where it is used.
2023-02-02 08:39:25 +01:00
Matthias Clasen
d8cb11ec4a Deprecate GtkStatusbar
The design patterns using statusbar are no longer popular,
and it is pretty easy to make a statusbar yourself with boxes
and labels, if you need one. The only thing special about
GtkStatusbar was its window resize handle, but that has
been gone for a long time.
2023-02-02 08:39:24 +01:00
Matthias Clasen
8796950651 Deprecate more startup-notification API 2023-02-02 08:30:32 +01:00
Fina Wilke
35e3c22832 filechooserwidget: Fix file chooser crash when dropping empty file list 2023-01-30 19:28:24 +00:00
Matthias Clasen
53af41e2fa passwordentry: Fix an asymmetry
When connecting a signal in realize,
we should disconnect in unrealize.

Fixes: #5285
2023-01-29 22:39:28 -05:00
Matthias Clasen
1e9dbf2df0 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
2023-01-28 13:07:26 -05:00
Matthias Clasen
dce21f06dd 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
2023-01-28 13:06:30 -05:00
Matthias Clasen
a9d2fa296e Merge branch 'position-as-double' into 'main'
Boyscouting: fix position type in `gtk_drag_source_drag_begin()`

See merge request GNOME/gtk!5437
2023-01-28 03:24:19 +00:00
Vlad Zahorodnii
65f03121a4 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
2023-01-27 19:20:53 +00:00
Matthias Clasen
ee0e026237 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
2023-01-27 16:22:17 +00:00
Lukáš Tyrychtr
7b6f254e64 object_tree.c: One gtk_list_item_get_child call is redundant
Fixes #5551
2023-01-27 15:43:33 +01:00
Sophie Herold
e62ca17f88 scrolledWindow: Propagate event for no scrolling 2023-01-26 20:12:10 +01:00
Matthias Clasen
30987168fb Merge branch 'fix_5543' into 'main'
GtkCssProvider: fix element type in docs

Closes #5543

See merge request GNOME/gtk!5441
2023-01-25 13:08:07 +00:00
Lukáš Tyrychtr
93a875bf20 Actually, the annotation is not needed in this case 2023-01-25 11:46:53 +01: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
Emmanuele Bassi
7df73c4fd2 Use wording from a suggestion 2023-01-23 11:50:28 +00:00
Lukáš Tyrychtr
1ea5a08c8f 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
2023-01-23 12:12:00 +01: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
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
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
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
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
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
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
Arjan Molenaar
757d1916ae Fix dx, dy position in gtk_drag_source_drag_begin
Coordinates are double. This change avoid an unneeded cast.
2023-01-15 09:52:43 +01: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
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
cefdfbd894 icontheme: Streamline the suffix handling code 2023-01-14 00:14:43 -05:00
Matthias Clasen
3676ddbdff icontheme: Avoid some allocations
When loading icon themes, we can reuse memory
instead of allocating and freeing in a loop.
2023-01-14 00:14:43 -05:00
Matthias Clasen
7c1a0e0c15 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.
2023-01-14 00:14:43 -05:00
Matthias Clasen
a27a2cbf40 Merge branch 'matthiasc/for-main' into 'main'
Silence a compiler warning

See merge request GNOME/gtk!5421
2023-01-14 00:18:50 +00:00
Matteo Percivaldi
374d97008b 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
7b68bdb831.

Closes #4426
2023-01-13 18:08:56 +01:00
Matthias Clasen
fecc923c2c Silence compiler warnings
Clang complains that these are dead stores.
They are, indeed.
2023-01-13 12:07:40 -05:00
Matthias Clasen
703ed608c0 Fix a compiler warning
Clang things that load_error might be NULL here.
It may be right.
2023-01-13 12:07:40 -05:00
Matthias Clasen
51b4d70b8f 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.
2023-01-13 12:07:40 -05:00
Matthias Clasen
d226dc3812 iconcache: Be a bit less wasteful 2023-01-12 00:36:18 -05:00
Matthias Clasen
46e0fde606 css: Avoid more allocations for tokens
Make short string tokens static.
2023-01-12 00:12:09 -05:00
Matthias Clasen
1e7f525e0e css: Avoid some allocations
Avoid duplicating the function name just
for an error message.
2023-01-12 00:12:09 -05:00