Commit Graph

72268 Commits

Author SHA1 Message Date
Bilal Elmoussaoui
ba266325d0 g-i: Mark FileChooser [s|g]et_current_[folder|name] as nullable
The code seems to already check if folder/name is NULL
Fixes https://github.com/gtk-rs/gtk4-rs/issues/896
2022-02-11 12:21:58 +01:00
Bilal Elmoussaoui
e6322e177e g-i: Mark get_print_settings as nullable
Fixes https://github.com/gtk-rs/gtk4-rs/issues/880
2022-02-11 12:07:54 +01:00
Bilal Elmoussaoui
6b63868641 g-i: mark get_selected_printer as nullable
There is no selected printer if the user closes the dialog
Fixes https://github.com/gtk-rs/gtk4-rs/issues/882
2022-02-11 12:05:42 +01:00
Bilal Elmoussaoui
cb710f1999 g-i: mark EventController::name as nullable
Fixes https://github.com/gtk-rs/gtk4-rs/issues/893
2022-02-11 12:02:07 +01:00
Bilal Elmoussaoui
85bb9aaefc g-i: add nullable annotation to gtk_single_selection_get_model 2022-02-11 11:56:40 +01:00
Matthias Clasen
90bccf4e82 Merge branch 'fix-wayland-subproject-build' into 'main'
NEWS: Updates

See merge request GNOME/gtk!4466
2022-02-10 21:57:27 +00:00
Matthias Clasen
18db7ad470 NEWS: Updates 2022-02-10 15:06:37 -05:00
Matthias Clasen
ff4b5c8996 Merge branch 'fix-wayland-subproject-build' into 'main'
Fix build with wayland-protocols subproject

Closes #4530

See merge request GNOME/gtk!4465
2022-02-10 19:13:33 +00:00
Matthias Clasen
06aa640664 Fix build with wayland-protocols subproject
The missing files() was pointed out in #4530.

Fixes: #4530
2022-02-10 13:21:28 -05:00
Matthias Clasen
9f24229f82 Merge branch 'column-view-column-new-nullable-factory' into 'main'
Allow passing a `NULL` factory to `gtk_column_view_column_new()`

See merge request GNOME/gtk!4454
2022-02-10 11:42:38 +00:00
Matthias Clasen
214370ee23 Merge branch 'icon-view-drag-dest-item-nullable' into 'main'
Mark `path` out parameter of `gtk_icon_view_get_drag_dest_item()` as `(nullable)`

See merge request GNOME/gtk!4451
2022-02-10 11:24:04 +00:00
Matthias Clasen
217d817408 Merge branch 'gwagner/gtkbuilder-rng' into 'main'
tools: updated gtk4builder.rng to current state

See merge request GNOME/gtk!4457
2022-02-09 19:25:32 +00:00
Matthias Clasen
6dfaafc9f2 Merge branch 'update-keysyms' into 'main'
gdk: Update keyboard symbols from libxkbcommon

See merge request GNOME/gtk!4422
2022-02-09 19:23:59 +00:00
Matthias Clasen
287de3844d Merge branch 'gtk_assisten_set_current_page-no-pages-guard' into 'main'
Don't dereference a `NULL` page in `gtk_assistant_set_current_page()` if there are no pages at all

See merge request GNOME/gtk!4464
2022-02-09 19:19:24 +00:00
Sebastian Dröge
878e4a34d3 Don't dereference a NULL page in gtk_assistant_set_current_page() if there are no pages at all 2022-02-09 17:50:55 +02:00
Matthias Clasen
b893dc9552 Merge branch 'bilelmoussaoui/g-i' into 'main'
gdk: mark gdk_device_get_device_tool as nullable

See merge request GNOME/gtk!4463
2022-02-09 13:43:50 +00:00
Matthias Clasen
687b80a037 Merge branch 'revert-misdeprecation' into 'main'
Revert "Deprecate GdkDevice:source"

See merge request GNOME/gtk!4462
2022-02-09 13:13:35 +00:00
Bilal Elmoussaoui
a8a98523db gdk: mark gdk_device_get_device_tool as nullable 2022-02-09 13:09:47 +00:00
Matthias Clasen
0a224964a6 Revert "Deprecate GdkDevice:source"
This reverts commit fd9e0dd13a.
2022-02-09 07:55:28 -05:00
Luca Bacci
0457c37847 Merge branch 'win32-fix-ctrl-shift-gtk4' into 'main'
gdkkeys-win32: Also ignore Ctrl + Shift (etc.)

See merge request GNOME/gtk!4460
2022-02-09 10:08:52 +00:00
Philip Zander
037c0e4005
gdkkeys-win32: Also ignore Ctrl + Shift (etc.)
Some Windows keymaps have bogus mappings for the Ctrl modifier. !4423 attempted
to fix this by ignoring the Ctrl layer, but that was not enough. We also need to
ignore combinations of Ctrl with other modifiers, i.e. Ctrl + Shift. For example,
Ctrl + Shift + 6 is mapped to the character 0x1E on a US keyboard (but it should
be treated as Ctrl + ^). Basically, always ignore Ctrl unless it is used in
conjunction with Alt, i.e. as part of AltGr.

Related issue: #4667
2022-02-09 10:43:07 +01:00
Christian Hergert
b9389d3784 Merge branch 'bilelmoussaoui/macos-gdk-display' into 'main'
macos: Don't set NULL as a display name

See merge request GNOME/gtk!4453
2022-02-09 00:30:04 +00:00
Günther Wagner
86a3400f2e tools: updated gtk4builder.rng to current state 2022-02-08 21:42:41 +01:00
Sebastian Dröge
8245fd4beb Allow passing a NULL factory to gtk_column_view_column_new() 2022-02-08 16:25:28 +02:00
Bilal Elmoussaoui
f41cfd3caa macos: Don't set NULL as a display name
Other GDK backends ensure there is always a default name set.
Fixes https://github.com/gtk-rs/gtk4-rs/issues/868
2022-02-08 13:38:33 +01:00
Sebastian Dröge
07d6ef13c5 Mark path out parameter of gtk_icon_view_get_drag_dest_item() as (nullable)
It can be set to `NULL` and the function body handles `NULL` explictly,
so annotate it accordingly.
2022-02-08 12:50:24 +02:00
Benjamin Otte
c6d5816c95 Merge branch 'wip/otte/for-main' into 'main'
gltexture: Only use glGetFramebufferParameter() when available

Closes #4678

See merge request GNOME/gtk!4449
2022-02-08 02:08:26 +00:00
Benjamin Otte
f37c5ebd26 rgba: Fix GDK_RGBA() macro to work with alpha
Previously we dividied by an integer, so alpha was either 0.0 or 1.0.
2022-02-08 01:34:19 +01:00
Benjamin Otte
2c71825324 gltexture: Only use glGetFramebufferParameter() when available
Fixes #4678
2022-02-08 01:34:19 +01:00
Matthias Clasen
38ad56e6a1 Merge branch 'wip/jimmac/selected_text' into 'main'
style: legible text selections

Closes #4664

See merge request GNOME/gtk!4433
2022-02-08 00:15:45 +00:00
Matthias Clasen
84d698464c Merge branch 'antoniof-main-patch-89408' into 'main'
columnviewcolumn: Define autocleanup function

See merge request GNOME/gtk!4440
2022-02-07 23:57:46 +00:00
Matthias Clasen
9363269ceb Merge branch 'more-noexecstack' into 'main'
demos: Make our stack noexec

See merge request GNOME/gtk!4439
2022-02-07 23:57:26 +00:00
Matthias Clasen
59eb9aeb73 Merge branch 'wip/chergert/macos-fixes' into 'main'
various macOS fixes

See merge request GNOME/gtk!4424
2022-02-07 23:56:40 +00:00
Matthias Clasen
d9109a0e92 Merge branch 'mg/gdk-macos-gdkdisplaylinksource' into 'main'
Include `gdk-private.h` to fix error about `g_source_set_static_name`

See merge request GNOME/gtk!4443
2022-02-07 23:54:55 +00:00
Matthias Clasen
f27c0c65b1 Merge branch 'mg/implicit-declaration-free' into 'main'
gdkjpeg: include `stdlib.h` necessary for `free`

See merge request GNOME/gtk!4445
2022-02-07 23:53:36 +00:00
Matej Urbančič
212f629876 Update Slovenian translation 2022-02-07 19:39:08 +00:00
Matej Urbančič
05f2f3ba8c Update Slovenian translation 2022-02-07 19:30:34 +00:00
Emmanuele Bassi
a66072f312 Merge branch 'drop-target-get-formats-transfer-none' into 'main'
Mark `gtk_drop_target_get_formats()` return value as `transfer none`

See merge request GNOME/gtk!4446
2022-02-07 15:17:39 +00:00
Sebastian Dröge
3ba582375d Mark gtk_drop_target_get_formats() return value as transfer none
It was wrongly inferred as `transfer full` by gobject-introspection.
2022-02-07 16:23:01 +02:00
Mosè Giordano
4c211f1872 gdkjpeg: include stdlib.h necessary for free
`free` is defined in `stdlib.h`, see for example
<https://pubs.opengroup.org/onlinepubs/009604499/functions/free.html>.  Without
this include compilation can fail with the following error:

```
../gdk/loaders/gdkjpeg.c: In function ‘gdk_save_jpeg’:
../gdk/loaders/gdkjpeg.c:264:7: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
       free (data);
       ^
../gdk/loaders/gdkjpeg.c:264:7: warning: incompatible implicit declaration of built-in function ‘free’
../gdk/loaders/gdkjpeg.c:264:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
../gdk/loaders/gdkjpeg.c:302:67: error: ‘free’ undeclared (first use in this function)
   return g_bytes_new_with_free_func (data, size, (GDestroyNotify) free, NULL);
                                                                   ^
../gdk/loaders/gdkjpeg.c:302:67: note: each undeclared identifier is reported only once for each function it appears in
../gdk/loaders/gdkjpeg.c:303:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
```
2022-02-06 15:41:33 +00:00
Mosè Giordano
2ceba0d31c Include gdk-private.h to fix error about g_source_set_static_name
Without this change we get the following error:

```
[1/13] Compiling C object gdk/macos/libgdk-macos.a.p/gdkdisplaylinksource.c.o
ninja: job failed: /opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11/aarch64-apple-darwin20-clang -Igdk/macos/libgdk-macos.a.p -Igdk/macos -I../gdk/macos -I. -I.. -Igdk -I../gdk -Isubprojects/pango/pango -I../subprojects/pango/pango -Isubprojects/pango -I../subprojects/pango -I/workspace/destdir/include/gdk-pixbuf-2.0 -I/workspace/destdir/include -I/workspace/destdir/include/glib-2.0 -I/workspace/destdir/lib/glib-2.0/include -I/workspace/destdir/lib/libffi-3.2.1/include -I/workspace/destdir/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/workspace/destdir/include/cairo -I/workspace/destdir/include/pixman-1 -I/workspace/destdir/include/freetype2 -I/workspace/destdir/include/fribidi -I/workspace/destdir/include/harfbuzz -I/workspace/destdir/include/graphene-1.0 -I/workspace/destdir/lib/graphene-1.0/include -I/workspace/destdir/include/gio-unix-2.0 -fcolor-diagnostics -Wall -Winvalid-pch -std=gnu99 -O2 -g -DG_LOG_USE_STRUCTURED=1 -DGLIB_DISABLE_DEPRECATION_WARNINGS '-DGTK_VERSION="4.6.0"' -D_GNU_SOURCE -DG_ENABLE_DEBUG -DGTK_COMPILATION '-DG_LOG_DOMAIN="Gdk"' -xobjective-c -fno-strict-aliasing -Wno-c++11-extensions -Wno-missing-include-dirs -Wno-typedef-redefinition -Wformat=2 -Wformat-nonliteral -Wformat-security -Wignored-qualifiers -Wimplicit-function-declaration -Wmisleading-indentation -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wshadow -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wuninitialized -Wunused -Werror=address -Werror=array-bounds -Werror=empty-body -Werror=implicit -Werror=implicit-fallthrough -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=missing-declarations -Werror=missing-prototypes -Werror=nonnull -Werror=pointer-to-int-cast -Werror=redundant-decls -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=vla -Werror=write-strings -Wnull-dereference -fvisibility=hidden -MD -MQ gdk/macos/libgdk-macos.a.p/gdkdisplaylinksource.c.o -MF gdk/macos/libgdk-macos.a.p/gdkdisplaylinksource.c.o.d -o gdk/macos/libgdk-macos.a.p/gdkdisplaylinksource.c.o -c ../gdk/macos/gdkdisplaylinksource.c
../gdk/macos/gdkdisplaylinksource.c:201:3: error: implicit declaration of function 'g_source_set_static_name' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  g_source_set_static_name (source, "[gdk] quartz frame clock");
  ^
1 error generated.
ninja: subcommand failed
```
2022-02-05 21:51:40 +00:00
Christian Hergert
95168e179c macos: fallback to conversion on WCG colorspace
We don't want to risk having something really weird come out if we have a
WCG colorspace, so instead only do the performance hack on systems where
the output is likely reasonable.

We will want to eventually just be drawing in the appropriate colorspace,
but that is not available yet.
2022-02-05 12:42:57 -08:00
Asier Sarasua Garmendia
34959b58f4 Update Basque translation 2022-02-05 11:21:02 +00:00
Christian Hergert
2be51dc3b1 macos: handle sizing changes when switching monitors
This should make sure that our scales are updated as well as
ensuring we repaint the whole surface.
2022-02-04 12:29:57 -08:00
Benjamin Otte
14bdf82e33 Merge branch 'wip/hadess/inspector-search-by-pointer-gtk4' into 'main'
inspector: Search by pointer address

See merge request GNOME/gtk!4442
2022-02-04 18:07:28 +00:00
Christian Hergert
6b85d501f0 macos: assume monitor colorspace when drawing
When using software rendering w/ cairo, assume we're drawing in
the best-monitor's colorspace rather than RGB to avoid colorspace
conversions on every frame.
2022-02-04 09:46:10 -08:00
Christian Hergert
473aceea68 macos: add API to get monitor colorspace 2022-02-04 09:45:55 -08:00
Bastien Nocera
0621dbc745 inspector: Search by pointer address
Useful to find a widget that corresponds to a pointer address in gdb.
2022-02-04 18:39:56 +01:00
Christian Hergert
8ea0a4fc50 macos: precalculate clip regions as CGRect
We can make our drawRect do less work if we precalculate the clip
and damage regions upfront by intersecting them with the bounds.
2022-02-04 09:31:37 -08:00
António Fernandes
94ef818c9a columnviewcolumn: Define autocleanup function 2022-02-04 11:13:46 +00:00