Commit Graph

82416 Commits

Author SHA1 Message Date
Florian "sp1rit"​
4b619930f2 demo: Fix drag and drop demo critical
Right now, child is NULL when starting a drag in the main area and
moving the pointer onto the colors, there releasing it.
To avoid gtk_widget_get_ancestor thowing a critical, early exit if child
is NULL.
2024-11-02 19:25:01 +01:00
Matthias Clasen
ac37d66bd5 Merge branch 'wip/alice/default-icon' into 'main'
application: Set default window icon to appid by default

Closes #7120

See merge request GNOME/gtk!7885
2024-10-31 00:46:01 +00:00
Aurimas Černius
dee4182dc9 Update Lithuanian translation
(cherry picked from commit d09597af8c)
2024-10-30 20:22:20 +00:00
Alice Mikhaylenko
3274a286cc application: Set default window icon to appid by default
Lots of newer apps that use their appid as their icon name don't set
window icons, since they aren't used in GNOME. Instead of setting it
manually in every app, just default to it.

Only set the icon if it exists in the icon theme.

Remove manually set default icons in the demo.

No tests as GtkApplication doesn't have any in the first place.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/7120
2024-10-30 23:39:23 +04:00
Benjamin Otte
20b50c80d3 Merge branch 'for-main' into 'main'
docs: Fix a few copy-paste errors

See merge request GNOME/gtk!7884
2024-10-30 14:39:35 +00:00
Benjamin Otte
8b9ab19f15 docs: Fix various issues in texture builder docs 2024-10-30 09:37:06 -04:00
Matthias Clasen
926e969abb docs: Fix a few copy-paste errors 2024-10-30 09:18:17 -04:00
Matthias Clasen
c8cc8c4842 Merge branch 'amolenaar/color-picker-min-version' into 'main'
macos: Check for minimal macOS SDK version (>= 10.15)

See merge request GNOME/gtk!7881
2024-10-30 11:26:35 +00:00
Arjan Molenaar
0b9d1fc27c meson: Cleanup darwin system check
'ios' is not a meson host manchine system type.
2024-10-30 11:26:00 +01:00
Arjan Molenaar
5b78ee2227 macos: Remove obsolete version check blocks.
All code works on macOS 10.15+.
2024-10-30 11:04:15 +01:00
Arjan Molenaar
64dd9b4bdd macos: use SDK 10.15.6 for macos/intel testing 2024-10-30 10:45:56 +01:00
Arjan Molenaar
6fc6de6123 List available SDKs 2024-10-30 10:39:19 +01:00
Arjan Molenaar
f9cc88aece macos: Assert minmal macOS SDK version in meson file 2024-10-30 10:16:28 +01:00
Matthias Clasen
eea3e8f395 Merge branch 'wip/chergert/quanitize-textview' into 'main'
GtkTextView: allow scrolling in quantized device pixels

See merge request GNOME/gtk!7853
2024-10-30 00:22:20 +00:00
Christian Hergert
462920ea21 gtk/textview: quanitize X/Y by device pixels
This attempts to improve the somewhat "erratic" feeling of scrolling a
GtkTextView with fractional scaling. However, it also improves the
situation where you have a natural integer scaling factor such as 2x.

To do so, it quantizes the X/Y origin of the visible rect to something that
naturally alignes with device pixels. By doing so this aims to get
consistent pixel alignment when hinting so that you no longer see jumps
as the Y position of the buffer changes. X is also done for symmetry.

The buffer itself is left in integer coordinates to avoid any sort
of ABI breakage with existing applications. Only the origin x/y of the
drawing area is affected and thus should only affect the ABI of
gtk_text_view_get_visible_rect() by < 1 device pixel.

Applications which require precision in the visible rect origin may use
the new API introduced here as gtk_text_view_get_visible_offset(). This
provides the X,Y point as doubles. graphene_point_t was not used here
beacuse that appeared to cause aliasing due to float usage.

GNOME/GtkSourceView!375 provides an example of consuming this new API to
keep line numbers aligned in the same fashion as the textview contents.
2024-10-29 14:46:21 -07:00
Emmanuele Bassi
b9fa5abff0 Merge branch 'fix_6663' into 'main'
a11y: When setting the selected state for list items, don't try to be smart and let the a11y layer handle deduplication.

Closes #6663

See merge request GNOME/gtk!7258
2024-10-29 10:51:46 +00:00
Benjamin Otte
9890e0d6db Merge branch 'wip/corey/print-crash' into 'main'
printunixdialog: Set selection after list view item created

Closes #7109

See merge request GNOME/gtk!7880
2024-10-29 10:12:22 +00:00
Emmanuele Bassi
dbf34f1dd8 Merge branch 'active_state_for_all' into 'main'
gtkatspicontext: Allow all widgets to have the active platform state

See merge request GNOME/gtk!7765
2024-10-29 09:41:56 +00:00
Corey Berla
9e1016a581 printunixdialog: Set selection after list view item created
Commit b807b84e16 ("print dialog: Fix initial selection") made a
change where we connect to items-changed before the list item manager.
That leads to us attempting to set a selection for a tile that does
not yet exist.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/7109
2024-10-28 22:25:37 -07:00
Matthias Clasen
3c68746f41 Merge branch 'for-main' into 'main'
Tweak init requirement for displays

See merge request GNOME/gtk!7879
2024-10-29 04:15:05 +00:00
Matthias Clasen
64d56746e8 Tweak init requirement for displays
gdk_display_get_default is nullable, so it is less painful
and more practical to simply return NULL if GDK hasn't been
initialized yet.
2024-10-28 23:45:55 -04:00
Matthias Clasen
6722e3307e Merge branch 'textbuffer-clipboard-charset' into 'main'
textbuffer: Handle charsets in serialization

Closes #7123

See merge request GNOME/gtk!7878
2024-10-29 01:22:02 +00:00
Matthias Clasen
d6d600cac4 textbuffer: Handle charsets in serialization
Offer and accept text/plain and other charset variations.

Fixes: #7123
2024-10-28 20:39:19 -04:00
Benjamin Otte
1449e11033 Merge branch 'wip/otte/win32-fixes' into 'main'
testsuite/win32: Various fixes

See merge request GNOME/gtk!7877
2024-10-29 00:26:58 +00:00
Benjamin Otte
d2930695ca testsuite: Allow renderers in misc test to fail
When GL or Vulkan is not supported, the test should not fail.

It would be nicer if we could detect GL/Vulkan not being available
otherwise, but I'm not aware of a better solution, in particular because
rendeers might have stricter requirements than GTK itself.

So this is the next best fix.
2024-10-29 00:46:54 +01:00
Benjamin Otte
1b33e2c3b2 Revert "testsuite: Fix introspection test on Windows"
This change is no longer necessary now that we properly set the right
directory for the needed DLLs.

This reverts commit 3471c22f52.
2024-10-29 00:46:54 +01:00
Benjamin Otte
dfb075699c testsuite: Set $PATH for introspection tests
This is necessary because Windows uses $PATH to search for DLLs and
meson isn't smart enough to figure out that this test needs access
to the DLL.
2024-10-29 00:46:54 +01:00
Benjamin Otte
3ca5a75ab0 testsuite: depend on gir and libgtk in introspection test
We also don't need to LD_PRELOAD anymore if we do that.
2024-10-29 00:46:54 +01:00
Benjamin Otte
7d87118151 testsuite: Handle gdk_display_open() returning NULL
It turns out the Windows backend does that.
2024-10-29 00:46:54 +01:00
Benjamin Otte
f4bcb80ab8 Merge branch 'wip/otte/most-important-source-ever' into 'main'
Rework the Wayland source again

Closes #7091

See merge request GNOME/gtk!7865
2024-10-28 21:54:26 +00:00
Benjamin Otte
239f45ce8e wayland: Split event source into two
We need to guarantee that we call wayland_display_read_events() after a
poll() and before any other source runs, including any source with
higher priority.

As GSourceFuncs doesn't have a after_poll() vfunc and check() is not
guaranteed to be called for anything but the highest priority, we only
have once chance:
Run with the highest priority

But because we don't want event delivery with ultrahigh priority, we
split the source into two:
 * a poll source that polls while blocking wayland reading and
   then immediately calls read_events() with priority G_MININT
 * our old trusty event source with PRIORITY_EVENTS that dispatches
   events

Fixes !7859
Fixes #7091
2024-10-28 13:34:09 +01:00
Matthias Clasen
e37f9ba213 Merge branch 'demo-inscriptions' into 'main'
demo: Use GtkInscription more

See merge request GNOME/gtk!7874
2024-10-26 19:55:56 +00:00
Matthias Clasen
277f445970 Merge branch 'css-classes-notify' into 'main'
css: Avoid redundant change notification

Closes #7111

See merge request GNOME/gtk!7871
2024-10-26 02:23:17 +00:00
Matthias Clasen
4bf6668906 demo: Use GtkInscription more
Port the columnview Unicode demo to GtkInscription.
2024-10-25 22:14:45 -04:00
Matthias Clasen
abfad75182 css: Avoid redundant change notification
When adding or removing css class doesn't change anything, we
should not notify the css-classes property. This is more efficient
and avoids some suboptimal behavior in the inspector.

Fixes: #7111
2024-10-25 21:43:55 -04:00
Matthias Clasen
23d855d799 Merge branch 'for-main' into 'main'
docs: Drop mention of X from general docs

See merge request GNOME/gtk!7868
2024-10-25 21:02:31 +00:00
Matthias Clasen
9d94ecad64 Merge branch 'application-display' into 'main'
application: Don't use a display needlessly

Closes #7119

See merge request GNOME/gtk!7870
2024-10-25 21:02:12 +00:00
Matthias Clasen
332abfb011 application: Don't use a display needlessly
We are potentially before gtk_init, so we can't get a default display.
Thankfully, we don't need it anyway.

Fixes: #7119
2024-10-25 15:59:28 -04:00
Emmanuele Bassi
5a2d55c4d3 docs: Add some markup
Use <kbd> for keys, to improve the consistency of our docs.
2024-10-25 16:49:58 +00:00
Matthias Clasen
c1e5609565 docs: Drop mention of X from general docs
Our docs should not allude to specifics of X11, unless they are
about the X11 backend.
2024-10-25 12:45:33 -04:00
Matthias Clasen
3885f75bc6 Merge branch 'application-portal-use' into 'main'
application: Respect GDK_DEBUG=no-portals

Closes #7116

See merge request GNOME/gtk!7867
2024-10-25 16:40:40 +00:00
Martin
1a068bf76b Update Slovenian translation 2024-10-25 16:20:18 +00:00
Matthias Clasen
f14c05dbb0 application: Respect GDK_DEBUG=no-portals
If that debug flag is set, don't activate portals by talking to
the Inhibit portal.

Fixes: #7116
2024-10-25 11:23:03 -04:00
Matthias Clasen
aef6b1b932 Merge branch 'inspector/extensions' into 'main'
inspector: List all extensions

See merge request GNOME/gtk!7866
2024-10-25 11:40:12 +00:00
Matthias Clasen
508d91d182 inspector: Show GL and Vulkan features
This information can to some degree inform about the extensions
that GTK is using.
2024-10-24 23:18:42 -04:00
Matthias Clasen
06ef33271f gdk: Export feature keys privately
Export these. They will be used in the inspector in later commits.
2024-10-24 23:04:37 -04:00
Matthias Clasen
58ef21514e inspector: Make GL and Vulkan more similar
When Vulkan initialization fails, show the error message, as we
do for GL. Also reorder items to be in similar order, and tweak
labels.
2024-10-24 23:04:08 -04:00
Matthias Clasen
d40be28ff4 inspector: List all Vulkan extensions and layers
Same as for GL.
2024-10-24 22:20:26 -04:00
Matthias Clasen
9adc09bc0b inspector: Make extensions non-activatable
There's nothing to activate here.
2024-10-24 22:20:26 -04:00
Matthias Clasen
78262ecd51 inspector: Cosmetics 2024-10-24 22:20:26 -04:00