Commit Graph

39404 Commits

Author SHA1 Message Date
Alexandros Theodotou
738d962aca
gtk: document return value of ShortcutFunc 2022-01-18 10:58:47 +00:00
Philip Zander
52616dee8e GtkIMContextIME: Ignore ASCII control characters
Make GtkIMContextIME ignore ASCII control characters just like other
IMContext implementations (e.G. GtkIMContextSimple). Fixes bogus
characters appearing in text input fields (old bug 676077).
2022-01-17 12:03:01 +01:00
Philip Zander
b9bc7d9166 IMContextSimple/IMContextIME: 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 17:26:59 +01:00
Luca Bacci
5bf5d25bc1 Merge branch 'fix-build-no-pangoft' into 'main'
Improve and fix building font features on Windows (was: Fix builds without PangoFT2)

Closes #4605

See merge request GNOME/gtk!4339
2022-01-12 19:53:39 +00:00
Marek Kasik
915090f118 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:47:28 +01:00
Chun-wei Fan
b666a767e4 language-names: Use Windows APIs to acquire language names
Instead of relying on the iso-codes package, use the native Windows NLS APIs to
acquire the localized (translated) language names so that we do not need to
incur an extra runtime dependency on Windows.  It's not coverering 100% of the
languages that we would like to support through this, but should cover much of
the things that are required.
2022-01-12 17:29:30 +08:00
Chun-wei Fan
ee2dd1acc7 gtk/meson.build: Fix builds without PangoFT2
We aren't really using PangoFT2 for [language|script]-names.c, and are
always using items from them, so make sure they are being built.

Also always include the pangoft2 dependency in gtk_dep if it is found.
2022-01-12 17:29:28 +08:00
Matthias Clasen
21d40fc038 Merge branch 'fix-directory-list' into 'main'
directorylist: Fix several issues

Closes #3784

See merge request GNOME/gtk!4367
2022-01-12 02:58:25 +00:00
Matthias Clasen
b494d94bdb Merge branch 'drop-script-names' into 'main'
Drop the script name data

See merge request GNOME/gtk!4361
2022-01-12 02:43:54 +00:00
Matthias Clasen
dcdcc659ef directorylist: Fix several issues
We were handling events in the wrong order,
by doing async calls for some of them, but not
for all of them.

And we were not taking into account that GFileMonitors
RENAMED events may or may not move a file on top
of an existing file.

Fixes: #3784
2022-01-11 21:35:19 -05:00
Matthias Clasen
70732afb95 Drop the script name data
It is not used in GTK itself, and gtk4-demo
has its own copy.
2022-01-10 10:43:05 -05:00
Sebastian Dröge
1e26c352d6 Fix typo in IconView docs
g_lsit_free_full() -> g_list_free_full()
2022-01-09 13:59:59 +02:00
Emmanuele Bassi
bed67edd2e Merge branch 'ebassi/docs-for-main' into 'main'
Document side effect of GLArea:has-depth-buffer

Closes #838

See merge request GNOME/gtk!4351
2022-01-07 19:14:59 +00:00
Emmanuele Bassi
8a6dd2805f Document side effect of GLArea:has-depth-buffer
We enable depth testing when creating a depth buffer.

Fixes: #838
2022-01-07 18:30:54 +00:00
Matthias Clasen
464219c0fa Merge branch 'wip/baedert/for-master' into 'main'
label: Remove a redundant assignment

See merge request GNOME/gtk!4348
2022-01-07 16:47:07 +00:00
Timm Bäder
262f2a1453 Make some code samples compile 2022-01-07 17:21:37 +01:00
Timm Bäder
b408967278 label: Remove a redundant assignment
clang-tidy says:

gtklabel.c:1188:15: warning: Although the value stored to 'mid' is used in the enclosing expression, the value is never actually read from 'mid'
        min = mid = text_width;
              ^     ~~~~~~~~~~

Which seems right since mid will be assigned to at the beginning of the
next loop iteration anyway.
2022-01-07 17:21:37 +01:00
Emmanuele Bassi
1fd97fed91 docs: Clean up the ToggleButton description
- Use different headings
- Fix the coding style of the example
2022-01-07 15:42:08 +00:00
Matthias Clasen
46a7aaac76 Merge branch 'wip/chergert/fix-textview-dnd-move-same-view' into 'main'
textview: remove drag selection after dnd move action

See merge request GNOME/gtk!4346
2022-01-07 03:15:48 +00:00
Christian Hergert
e14d6fe9d5 textview: remove drag selection after dnd move action
If we have a GDK_ACTION_MOVE, we need to delete the selection. However,
previously this only worked when the drop target and drag source were
different applications, as the selection would get messed up along the
way.

Instead, we stash marks for the duration of the operation so that we can
delete the appropriate selection when completing the move.
2022-01-06 16:30:34 -08:00
Matthias Clasen
9dccdd1008 Merge branch 'docs-improvs-i' into 'main'
docs: Improve docs for four classes

See merge request GNOME/gtk!4337
2022-01-06 19:19:31 +00:00
Maximiliano Sandoval R
1229032b4e
docs: Add misc links 2022-01-05 14:06:43 +01:00
Maximiliano Sandoval R
6d80135342
docs: Improve docs for gtksnapshot.c 2022-01-05 14:06:41 +01:00
Maximiliano Sandoval R
c36a10da83
docs: Improve docs for gtkversion.h 2022-01-05 13:24:32 +01:00
Maximiliano Sandoval R
c30d09cef4
docs: Improve docs for gtkactionable.c 2022-01-05 13:24:30 +01:00
Matthias Clasen
ff862dc926 Merge branch 'wip/smcv/gresource-internal' into 'main'
build: Tell glib-compile-resources to make symbols internal where possible

See merge request GNOME/gtk!4334
2022-01-04 18:58:14 +00:00
Simon McVittie
17c2a1cb4e build: Tell glib-compile-resources to make symbols internal where possible
Partial solution to https://gitlab.gnome.org/GNOME/gtk/-/issues/4598

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-01-04 18:08:22 +00:00
Marco Melorio
5055b41ee7 docs: Fix link to section in GtkLabel 2022-01-04 16:33:00 +01:00
Luca Bacci
063e6baa0a Merge branch 'gtk-grab-file-chooser-native-win32' into 'main'
GTK grab for GtkFileChooserNativeWin32

Closes #4582

See merge request GNOME/gtk!4329
2022-01-04 13:59:08 +00:00
Matthias Clasen
d76379428d Merge branch 'noexecstack' into 'main'
Make our stack noexec

Closes #4598

See merge request GNOME/gtk!4330
2022-01-04 13:09:39 +00:00
Matthias Clasen
46509b6dd2 Make our stack noexec
The change to use ld and objcopy for resources
had some side-effects: it leaked a few symbols
and made our stack executable. We don't want that.

Use -z nonexecstack and --strip-all to avoid this.

Fixes: #4598
2022-01-04 07:51:56 -05:00
Luca Bacci
c138aaabf3
Use a GTK grab when showing a modal GtkFileChooserNativeWin32 2022-01-04 10:46:20 +01:00
Luca Bacci
96c351e792 Merge branch 'for-main' into 'main'
For main

See merge request GNOME/gtk!4322
2022-01-03 09:51:10 +00:00
Matthias Clasen
234d20641c fontbutton: Pass the fontmap to the dialog 2022-01-02 21:37:32 -05:00
Matthias Clasen
dd802f21e7 fontchooser: Cosmetics
Use harfbuzz api to format variations and features.
That matches what pango uses to parse them.
2022-01-02 21:37:32 -05:00
Matthias Clasen
dbbc990c72 fontchooser: Use new hb api
Use hb_font_get_var_coords_design if we have it.
This should fix our handling of fonts with AVAR.
2022-01-02 21:37:32 -05:00
António Fernandes
c9fa16fcfa gtk: Define the GtkExpression autocleanup func 2022-01-02 17:49:48 +00:00
Luca Bacci
0fdf2cc195
Fix compilation with clang
From https://github.com/msys2/MINGW-packages/pull/9509
2022-01-02 18:42:33 +01:00
Matthias Clasen
0e86d2b345 Merge branch 'ebassi/issue-4576' into 'main'
Update the accessible description of MenuButton

Closes #4576

See merge request GNOME/gtk!4317
2022-01-02 01:12:53 +00:00
Emmanuele Bassi
37063e7a05 Update the accessible description of MenuButton
We update the labelled-by relation, but we never update the described-by
one.

Fixes: #4576
2022-01-02 00:35:53 +00:00
Matthias Clasen
791dc7b9be fontchooser: Speed up fature examples
We were doing unnecessary work here, which could
get really slow with some fonts. Just compute
the reverse charmap once and reuse it.
2022-01-01 15:38:04 -05:00
Matthias Clasen
ff24dfb2e7 Revert "fontchooserwidget: Revise handling of named instances"
This reverts commit 2dc56a6e9b.

This wasn't ready yet.
2022-01-01 15:36:29 -05:00
Matthias Clasen
4db60fa5a8 Revert "fontchoserwidget: Do our own face filtering"
This reverts commit b7b6c147f9.

This was premature.
2022-01-01 15:36:27 -05:00
Bilal Elmoussaoui
9409b7ef7d gtk: mark few GtkPrinterSettings as nullable
Everything that makes use of gtk_printer_settings_get should be nullable
Because the hashtable might not contain the key and there's no default value provided
2022-01-01 19:20:29 +01:00
Bilal Elmoussaoui
afeb7f668b gtk: mark few GtkFileChooser functions as nullable
- get_file, if no file is selected returns a NULL
- get_id, if the interface doesn't implement such function returns NULL
2022-01-01 19:11:10 +01:00
Bilal Elmoussaoui
38b8da0f5f gtk: mark gtk_flatten_list_model_get_model_for_item as nullable 2022-01-01 19:07:13 +01:00
Bilal Elmoussaoui
d029b62d23 gtk: mark gtk_mount_operation_get_parent as nullable 2022-01-01 19:05:33 +01:00
Bilal Elmoussaoui
1e9bdb4647 gtk: mark gtk_list_box_get_adjustment as nullable
similar to its setter function
2022-01-01 19:05:06 +01:00
Bilal Elmoussaoui
1d72024605 gtk: mark MenuButton::get_label/get_icon_name as nullable 2022-01-01 18:38:56 +01:00
Bilal Elmoussaoui
06570443b7 gtk: mark gtk_icon_view_create_drag_icon as nullable 2022-01-01 18:33:29 +01:00