Commit Graph

28619 Commits

Author SHA1 Message Date
Jakub Steiner
5a0ffbbb45 icons: add legacy icons
- add legacy hicolor icons relied on in testsuite

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4754
2022-03-11 19:16:28 +01:00
Melroy van den Berg
d13e05be93 Fix dllMain win32 2022-03-01 06:03:36 +00:00
Emmanuele Bassi
887c9dea94 Merge branch 'meson-use-gnome-post-install' into 'gtk-3-24'
Meson: Use gnome.post_install

See merge request GNOME/gtk!4379
2022-02-22 10:08:16 +00:00
Bastien Nocera
5c92e6ddc6 inspector: Show app ID and resource path in the General tab
This makes it easier to figure out those values (which are mentioned in
the GtkApplication documentation) rather than working that out from the
way they're generated (or documented as being generated).
2022-02-17 12:27:19 +01:00
Emmanuele Bassi
160ef56de4 Merge branch 'fix-cell-accessible-leak' into 'gtk-3-24'
Fix a leak of cell accessibles

See merge request GNOME/gtk!4471
2022-02-12 00:56:20 +00:00
Matthias Clasen
cc977be580 Fix a leak of cell accessibles
gtk_container_cell_accessible_add_child is transfer none,
so we need to drop the reference we hold, otherwise it
leaks.
2022-02-11 18:39:55 -05:00
Matthias Clasen
38a1a23a53 Merge branch '3-24-30-api-additions-since-marker' into 'gtk-3-24'
Add `Since` markers for new API between 3.24.11 and 3.24.30

See merge request GNOME/gtk!4425
2022-02-08 00:15:10 +00:00
Matthias Clasen
5cdb9548d9 Merge branch 'tiled-border-fix-3-24' into 'gtk-3-24'
theme: Fix incorrect border color for tiled windows for 3.24

See merge request GNOME/gtk!4437
2022-02-08 00:13:27 +00:00
Matthias Clasen
08f47e0b01 Merge branch 'gtkcellrendererprogress-tabular' into 'gtk-3-24'
GtkCellRendererProgress: use tabular figures

See merge request GNOME/gtk!4444
2022-02-07 23:53:50 +00:00
Bastien Nocera
95e9d85716 inspector: Search by pointer address
Useful to find a widget that corresponds to a pointer address in gdb.
2022-02-04 18:16:50 +01:00
Joonas Henriksson
1b78ed4488
theme: Fix incorrect border color for tiled windows 2022-02-02 06:50:52 +02:00
Sebastian Dröge
133ff7687a Add Since marker for GtkHeaderBarAccessible
It was added in 3.24.11.
2022-01-30 19:09:50 +02:00
Sebastian Dröge
990d298720 Add Since marker to new accessibility API from 3.24.30
- GtkFileChooserWidgetAccessible
 - GtkPlugAccessible
 - GtkSocketAccessible
2022-01-30 18:56:55 +02:00
Lukas K
503e8f40b9 GtkCellRendererProgress: use tabular figures
yields more visually stable appearance
2022-01-28 19:52:47 +01:00
Matthias Clasen
248783c202 Merge branch 'fix-places-crash' into 'gtk-3-24'
gtkplacessidebar.c: add bookmark null checking

See merge request GNOME/gtk!4399
2022-01-18 23:50:47 +00:00
Geyslan G. Bem
c7f9c80eb5 gtkplacessidebar.c: add bookmark null checking
This fixes nautilus crash and perhaps other callers issues.
Nautilus (and sometimes glib) crashes with malformed URI inside of the
bookmarks file .config/gtk-3.0/bookmarks when it has no LABEL.

This is result from the closed glib MR #2065 analysis and agreement.
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2065#note_1091979

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>

Fixes: #4643
2022-01-18 18:21:22 -05:00
Luca Bacci
b5d0c44a87
Meson: Use gnome.post_install
Only available on Meson 0.57.0 and later
2022-01-14 17:30:35 +01:00
Luca Bacci
8252f99e08 Merge branch 'win32-fix-altgr-gtk3' into 'gtk-3-24'
IMContextSimple: Fix AltGr not working on Win32 [GTK3]

See merge request GNOME/gtk!4374
2022-01-13 19:46:26 +00:00
Philip Zander
f03bf55688 IMContextSimple: Fix AltGr not working on Win32
The old code assumed that any key press containing Ctrl or Alt cannot be
regular text input. This is not correct on Win32 as AltGr = Ctrl + Alt.
2022-01-13 13:43:23 +01:00
Marek Kasik
0387486407 printing: Unref old spool_io before setting new one
Unref private spool_io of GtkPrintJob before setting it to a new one
in gtk_print_job_set_source_file() and gtk_print_job_set_source_fd()
to prevent a leak.

Fixes: #4627
2022-01-12 12:46:27 +01:00
Matthias Clasen
8fc2af7bb3 Merge branch 'fontchooser-fix-3' into 'gtk-3-24'
docs: Fix gtk_tree_selection_get_selected_rows()

See merge request GNOME/gtk!4354
2022-01-12 02:49:27 +00:00
Luca Bacci
0b26e8b8a3
GtkFileChooserNativeWin32: add GTK grab only when modal 2022-01-11 14:23:10 +01:00
Matthias Clasen
b4eeada025 fontchooser: Fix axis name handling
This code was just broken.

Fixes: #4603
2022-01-07 14:27:17 -05:00
KrIr17
e9370d1dc8 make flat buttons look flat (and allow non-flat button in toolbars) 2022-01-07 16:59:24 +00:00
Chun-wei Fan
cef3293184 Visual Studio projects: Generate versioned sources
Instead of relying on the ones that are currently shipped with the tarballs,
generate them from their .in counterparts prior to the build.  This includes
the Resource Scripts (.rc) for libgdk/libgtk, as well as gtkversion.h, in
addition to gdkversionmacros.h which can now be generated during prebuild.
2022-01-04 14:17:38 +08:00
Chun-wei Fan
6789ff7443 Visual Studio projects: Improve generating libgtk sources
This improves the source generating process by:

*  Generating the sources in the libgtk build directory, so that we do not
   pollute the source tree.
*  Support generating gtk[private]typebuiltins.[c|h] in the Visual Studio
   projects by using NMake internally.
*  Update the projects and the introspection build files so that the generated
   sources and headers can be found.
2022-01-04 11:14:41 +08:00
Chun-wei Fan
8eaddde310 gtk/build: Split out part of headers listings
This will enable us to share this list with the NMake Makefiles that will be
used to generate the gtk[private]typebuiltins.[c|h] in the Visual Studio
projects.
2022-01-04 11:07:28 +08:00
Chun-wei Fan
334333f779 Visual Studio projects: Improve generating GDK sources
This makes the rest of the sources that are generated being put in GDK's build
directory for the Visual Studio projects, instead of being placed in GDK's
source subdir, so that:

*  We can avoid polluting GDK's source tree.
*  The Visual Studio builds won't interfere with the Meson builds.

Update the project files to look for the generated sources and headers in the
right places, as well as making the introspection builds look for the generated
sources as well.

Also remove the gtk3-gen-srcs property sheets and put the relevant parts in the
corresponding gtk3-build-defines property sheets, to clean things up a bit.
2022-01-04 11:07:28 +08:00
Luca Bacci
d3f46bcb16
Add GTK grab when opening GtkFileChooserNativeWin32
Implementation copied from gtkfilechoosernativeportal.c

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4582
2022-01-03 14:51:57 +01:00
Chun-wei Fan
b0e3d03831 gtkfontchooserwidget.c: Fix build with pre-1.44.x Pango
Pango headers after 1.44.0 include hb.h automatically, but not before, so
re-structure the #if/#elif/#else checks for the availability of HarfBuzz 2.2.0
or later.

Pointed out in issue #4565.
2021-12-30 15:26:44 +08:00
Thomas Holder
cbd9715c3c macOS: Dock "Quit" invokes "app.quit" action
Allows the application to handle "Dock icon > Quit" the same as
"Application menu > Quit".

Requires GtkApplication's `register-session` property.

Suitable replacement for gtk-mac-integration's
`NSApplicationBlockTermination` signal.
2021-12-29 13:51:01 +01:00
Melroy van den Berg
1ce49e48b2 Fix: GTK Switch crash under Windows, on exit. 2021-12-27 20:39:04 +00:00
David King
208e115368 Revert "meson: simplify builtin_immodules build option"
This reverts commit 749a58ab26.

This maintains feature parity with the autotools build. To achieve the
equivalent of --with-included-immodules=wayland,
-Dbuiltin_immodules=wayland,waylandgtk can be used instead.
2021-12-21 14:36:16 +00:00
Melroy van den Berg
70ef77a4c2
Add CSS letter spacing to textview 2021-12-14 17:04:38 +01:00
Matthias Clasen
1b789197e5 fontchooser: Avoid setting variations needlessly
Setting variations to their default value causes
them to show up in the serialization of the font
description - a font description has no idea about
the default values, so can't filter them out.

Avoid that.
2021-11-29 13:05:02 +08:00
Chun-wei Fan
e1422d73b1 gtkfontchooserwidget.c: Always enable font features with later Pango
This is a backport of the code in GTK4 where we can use the font
features that is given to us via HarfBuzz if we have Pango 1.44.x and
HarfBuzz 2.2.0 or later installed, even if we do not have PangoFT2
aavilable.

Since Pango 1.44.x depends on HarfBuzz for all platforms after 1.44.0,
we could take advantage of that and build the support in
GtkFontChooserWidget.

Add a directive that is to be used by Visual Studio compilers via the
Visual Studio projects to link to harfbuzz.lib automatically, so that
this support can be linked properly if we have the required Pango and
HarfBuzz headers and lib's installed.  Meson builds via Visual Studio
should handle this automatically, since pkg-config is being used there.

Since HAVE_PANGOFT2 and HAVE_HARFBUZZ is not defined by default in the
Visaul Studio projects, we will leave it up to the user to enable them
themselves and put in pangoft2-1.0.lib and harfbuzz.lib in the project
settings by themselves, or they could use Meson, as we did before.
2021-11-29 12:25:52 +08:00
Chun-wei Fan
dfbcc0849b gtkprintoperation-win32.c: Fix build on Visual Studio
Cast the result of GetWindowLongPtrW() to void * so that we won't get
the C4047 warnings, which are considered an error in building the GTK
stack.
2021-11-25 19:00:22 +08:00
Jaime Velasco Juan
466619f7c1
win32 theme: Draw expander arrow
Better than nothing.
2021-11-23 12:42:41 +01:00
Jaime Velasco Juan
2f30e12de7
win32 theme: Fix unfocused window buttons 2021-11-23 12:35:39 +01:00
Jaime Velasco Juan
bfe7a57b76
win32 theme: fix disabled GtkEntry style 2021-11-23 12:27:47 +01:00
Jaime Velasco Juan
f9d82e965e
win32 theme: Fix levelbar and tweak progressbar
Both have a similar look now
2021-11-23 12:05:51 +01:00
Luca Bacci
661f23d337 Merge branch 'gdk-win32-custom-print-dialog-widget-measurement' into 'gtk-3-24'
Fix measurement of custom widget in win32 print dialog

See merge request GNOME/gtk!4159
2021-11-18 19:02:58 +00:00
Luca Bacci
1650b4b205
Win32: Fix print dialog custom widget measurement 2021-11-17 15:41:13 +01:00
Matthias Clasen
7f8efb6b8d Merge branch 'gtk-3-24_inkscape2932' into 'gtk-3-24'
Backport css: Avoid a crash while parsing radial gradients

See merge request GNOME/gtk!4161
2021-11-16 21:30:10 +00:00
Naïm Favier
1284a804f1
composetable: invalidate cache based on symlink mtime too
When the compose file is a symbolic link, take the link itself's
modification time into account (in addition to its target's) in
determining whether to invalidate the compose cache.

This is useful e.g. on NixOS systems where the compose file might point
to a store path with an irrelevant modification time, and we want the
cache to expire when the symlink itself changes.

(cherry picked from commit 22f523694393f2e4c5d26cdce6bcc1ee15c4185a)
2021-11-16 18:30:02 +01:00
Matthias Clasen
60ec8dbd69 css: Avoid a crash while parsing radial gradients
has_size does not imply that sizes[0] is != NULL.

(cherry picked from commit aceba7484faf4932442d92d0b2dd0f0466e0afed)
2021-11-16 12:04:54 +11:00
Matthias Clasen
660cbee51e Merge branch 'fix-win11-sdk-3' into 'gtk-3-24'
Fix building against the Windows 11 SDK (GTK+-3.x)

See merge request GNOME/gtk!4062
2021-10-28 16:47:15 +00:00
Gaël Bonithon
90ca7fb3c9 GtkRecentFilter: Do not unset the uri if it is needed 2021-10-19 20:28:06 +02:00
Chun-wei Fan
c4d8575c30 gtk: Fix building version resource on Windows 11 SDK
The rc.exe that comes with the Windows 11 SDK does not allow one to include
winuser.h directly in the .rc scripts, so make sure that we do not try to
generate the final gtk.rc with it, but instead include windows.h with
WIN32_LEAN_AND_MEAN defined.
2021-10-14 10:30:58 +08:00
Chun-wei Fan
dceed915e8 gtk/generate-uac-manifest.py: Fix UAC manifest .rc
The resource compiler in the Windows 11 SDK does not allow one to include
winuser.h directly in resource scripts (.rc) with a rather cryptic error
message, so fix generating the .rc file to embed the UAC manifest by including
windows.h with WIN32_LEAN_AND_MEAN instead.
2021-10-13 11:38:26 +08:00