Commit Graph

28356 Commits

Author SHA1 Message Date
Florian Müllner
f28c6d34a7 appchooserdialog: Don't show broken subtitles
Commit 07beb6dba2 made GtkAppChooserWidget useful with no content-type,
however when used in a GtkAppChooserDialog, this will lead to a confusing
"Opening (null) files" subtitle.

Fix this by omitting the subtitle altogether in that case.
2020-05-01 18:22:39 +02:00
Matthias Clasen
521a382d79 HighContrast: regenerate css 2020-04-27 08:47:35 -04:00
Peter Bloomfield
3b5e10ef4d file-system-model: Refactor a helper
Push more common code into the helper for
gtk_file_system_model_query_done() and
gtk_file_system_model_one_query_done().
2020-04-27 08:21:45 -04:00
Peter Bloomfield
326077d2ed file-system-model: Avoid use-after free
This is a possible fix for https://gitlab.gnome.org/GNOME/gtk/-/issues/2657

Use a NULL return from g_file_query_info_finish() to detect cancellation
of the query, and avoid derferencing a stale pointer.
2020-04-27 08:18:48 -04:00
Jakub Steiner
be159ab93c Merge branch 'wip/exalm/solid-csd' into 'gtk-3-24'
theme: Fix decoration background

See merge request GNOME/gtk!1742
2020-04-23 14:26:32 +00:00
Alexander Mikhaylenko
d46aa9f49e theme: Fix decoration background
'window' is not the only toplevel css name, there are also 'dialog' etc.

Move it before .solid-csd style so that .solid-csd background takes
precedence.
2020-04-23 19:06:33 +05:00
Jakub Steiner
16b4ae8486 HC: export public colors
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2641 and
https://gitlab.gnome.org/GNOME/gtk/-/issues/2650
2020-04-23 14:24:46 +02:00
Jakub Steiner
30906f3240 Adwaita: lower glyph contrast for checkboxes
- stylistic choice didn't sit well with majority of the design team
2020-04-23 13:57:58 +02:00
Nelson Benítez León
7c343a87d1 GtkPlacesSidebar: avoid location clicks to grab focus
Sibebar location rows should not grab focus on click.

Fixes filechooser issue #1469
2020-04-18 14:38:47 -04:00
Emmanuele Bassi
633f0fa52a Merge branch 'jjardon/3_24_more_licenses' into 'gtk-3-24'
3.24: gtk/gtkaboutdialog: Add some more very common licenses:

See merge request GNOME/gtk!1672
2020-04-17 21:50:45 +00:00
Matthias Clasen
3483a3e134 Merge branch 'BUG_filechooser_async_data_loss_GTK3' into 'gtk-3-24'
GtkFilechooserWidget: prevent oblivious selection of file

See merge request GNOME/gtk!1682
2020-04-17 20:30:07 +00:00
Matthias Clasen
0459569b49 Avoid a critical in the Emoji chooser
If event_widget is NULL, just dismiss the popover.

https://gitlab.gnome.org/GNOME/gtk/-/issues/2199
2020-04-14 15:37:59 -04:00
Nelson Benítez León
e6ff990145 GtkFilechooserWidget: prevent oblivious selection of file
which could happen after confirming the "file overwrite"
dialog and may result in a different file being overwritten
causing data loss.

The oblivious file selection can be done by a mouse
click or keyboard press sent inadvertently just after
confirming the "file overwrite" dialog.

Fixed by adding a flag to ignore any button/key press
events sent to the file list. We set this flag just
after the user accepts the "file overwrite" dialog,
which means the enclosing GtkfilechooserDialog is about
to get closed. And we restablish the flag when the dialog
is shown again (in its map() handler).

Fixes data loss issue #2288
2020-04-13 16:33:10 -04:00
Mathieu H
73737bcc4f Remove the blacklist list in convert-emoji.c since now it is supported 2020-04-13 15:27:40 +00:00
Matthias Clasen
e51cfe2349 Merge branch 'window-set-focus-docstring-fix' into 'gtk-3-24'
window: Fix docstring formatting on 'set-focus' signal

See merge request GNOME/gtk!1677
2020-04-12 22:50:07 +00:00
Collin May
d536fa5aa4 window: Fix docstring formatting on 'set-focus' signal
This comment was added in 93bcca7f02 but missed a
colon so it never actually generated documentation and the nullable annotation
never made it into GObject-introspection language bindings.

This crude regex does not catch any other instances of this mistake. The @
symbol is used to disambiguate signal doc comments from property doc comments,
since property docs usually don't have parameters.

$ pcre2grep -rM '\\* [A-Z][A-Za-z]*:([a-z\-]*):\n +\* @' gtk/
2020-04-12 15:09:54 -07:00
Luca Bacci
0352d88b8a
Fix message dialog not shown when the user tries to create a folder but a file with the same name exists
Fixes issue #2604
2020-04-12 15:05:18 +02:00
Javier Jardón
adc2f4ad9e 3.24: gtk/gtkaboutdialog: Add some more very common licenses:
- BSD 3-Clause "New" or "Revised" license
- Apache License 2.0
- Mozilla Public License 2.0
2020-04-12 13:11:22 +01:00
Simon McVittie
c37bbb2641 Add miscellaneous unpackaged files to dist tarball
Various files are in git but not in dist tarballs. Some of them look
like potentially useful references for downstream distributors.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-04-08 13:43:28 +01:00
Matthias Clasen
5a0891c69d Merge branch 'gtk-3-24' into 'gtk-3-24'
docs: Do not call GTK APIs if gtk_init_check returns FALSE

See merge request GNOME/gtk!1617
2020-04-04 03:18:01 +00:00
Nicola Fontana
392d4de8a9 docs: Do not call GTK APIs if gtk_init_check returns FALSE
See issue #994.
2020-04-03 22:59:59 +02:00
Matthias Clasen
da1686eb47 Fix build issues with HighContrast theme 2020-04-03 12:54:32 -04:00
Matthias Clasen
58cfd44307 Merge branch 'BUG_filechooser_new_folder_focus_GTK3' into 'gtk-3-24'
gtkfilechooserwidget: set 'New folder' button focus-on-click

See merge request GNOME/gtk!1595
2020-04-01 04:28:22 +00:00
Nelson Benítez León
527a99e598 GtkMenuButton: disable focus-on-click
As general rule, all buttons that launch a menu should
not grab focus on click, because otherwise when the menu
is closed the focus goes back to the button instead of
the previously focused widget, which is the one the user
was interacting with.

GtkScaleButton and GtkVolumeButton set focus-on-click
to FALSE for this same reason.

Fixes #2557
2020-03-31 21:00:32 -04:00
Nelson Benítez León
3997cdf2f4 gtkfilechooserwidget: set 'New folder' button focus-on-click
As general rule, all buttons that launch a menu should
not grab focus on click, because otherwise when the menu
is closed the focus goes back to the button instead of
the previously focused widget, which is the one the user
was interacting with.

So this is also the case for the 'New Folder' button on
the filechooser.

Fixes #2557
2020-03-31 20:15:34 -04:00
Matthias Clasen
21e0e3f863 Merge branch 'wip/jimmac/HC-redesign-gtk3' into 'gtk-3-24'
HC: derive from Adwaita

See merge request GNOME/gtk!1587
2020-03-30 17:48:22 +00:00
Bastien Nocera
8dfb1d197a gtkprivate: Remove g_auto usage
Fixes: 93ab478af1
2020-03-30 17:50:50 +02:00
Bastien Nocera
fa16b682ef colorpickerportal: Remove g_auto usage
Fixes: 7b1b3fa0cb
2020-03-30 17:50:09 +02:00
Jakub Steiner
98148d9d60 HC: derive from Adwaita
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1450
2020-03-30 16:49:44 +02:00
Matthias Clasen
a923ee9b87 Don't forget to dist gtktexttagprivate.h 2020-03-27 16:50:15 -04:00
Matthias Clasen
5e7650729b Merge branch 'wip/hadess/portal-select-folders' into 'gtk-3-24'
filechoosernativeportal: Allowing selecting folder(s)

See merge request GNOME/gtk!1523
2020-03-27 18:34:02 +00:00
Jakub Steiner
f4c705b404 Adwaita: work around holes in unfocused windows
- works around holes in rounded corners of backdrop windows

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2537
2020-03-26 19:09:57 +01:00
Bastien Nocera
35fec1c6b2 filechoosernativeportal: Allowing selecting folder(s)
Use the "directory" portal option when asked to select folders.
2020-03-23 15:41:10 +01:00
Bastien Nocera
93ab478af1 Add portal version checking helper
Add gtk_get_portal_interface_version() to check the version of a portal.
2020-03-23 15:05:40 +01:00
Bastien Nocera
f70f2d7cae colorpickerportal: Don't throw warnings on missing version
If the version can't be fetched, don't throw a warning.
2020-03-23 14:59:51 +01:00
Bastien Nocera
4c71bf74f1 colorpickerportal: Simplify portal version fetching 2020-03-23 14:59:51 +01:00
Bastien Nocera
7b1b3fa0cb colorpickerportal: Use convenience function to fetch uint
Rather than open coding it.
2020-03-23 14:59:51 +01:00
Matthias Clasen
72689c52a5 Merge branch 'adwaita-tnum' into 'gtk-3-24'
theme: use tabular figures where appropriate

See merge request GNOME/gtk!1493
2020-03-20 20:35:57 +00:00
Carlos Garnacho
2647dc1d98 Merge branch 'imm-context-use-after-free' into 'gtk-3-24'
Fix crash with certain IME

See merge request GNOME/gtk!1290
2020-03-20 15:05:43 +00:00
Christian Hergert
9fc7c3b1b3 textbtree: short-circuit visibility check when possible
If we have never seen a GtkTextTag in the GtkTextTagTable with the
invisible bit set, then we do not need to go through the process of
checking the accumulated tags.

Not using invisible tags is overwhelmingly the common case.
2020-03-18 12:56:19 -07:00
Christian Hergert
2aba6f0ba4 texttag: avoid use of g_signal_emit_by_name()
This avoids looking up the signal by name and instead uses the saved
signal identifier from gtktexttagtable.c
2020-03-18 12:50:32 -07:00
Christian Hergert
4f0842c713 texttagtable: move private functions to gtktexttagtableprivate.h
This makes backporting changes from 4.x a bit easier.
2020-03-18 12:42:40 -07:00
Jakub Steiner
5be08a4d09 Adwaita: dark switches/check/radios
- unescape variables (gtk3 didn't raise warnings like gtk4, but it was broken)
2020-03-18 13:07:05 +01:00
Jakub Steiner
71bdf20cff Adwaita: dark switches/check/radios
- lighten up radios, switches and checkboxes

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2461
2020-03-17 11:19:50 +01:00
Emmanuele Bassi
b4808c187f Silence a compiler warning
GCC complains with boxed out arguments that may be unset.
2020-03-13 16:05:13 +00:00
Emmanuele Bassi
c08908b488 Fix build when G_ENABLE_DEBUG is undefined 2020-03-13 15:51:57 +00:00
Emmanuele Bassi
7c23119e8f Use ifdef when checking G_ENABLE_DEBUG
Don't use `if`, as we don't unconditionally define the symbol.
2020-03-13 15:51:57 +00:00
Eivind Naess
2c85be990d Fix for issue #2497, see https://gitlab.gnome.org/GNOME/gtk/issues/2497
The 'selection-changed' signal is emitted unconditionally, even in the case
when there is no selection to be cleared. As a result, the subscriber receives
the initial signal and if he calls gtk_file_chooser_get_uri(), no value is
currently selected.
2020-03-08 18:54:10 -07:00
Lukas K
82b9be3297 theme: use tabular figures where appropriate
Set font-feature-settings: "tnum" on spinbuttons, progress bars and
scales

fixes #1478
2020-02-29 14:33:49 +01:00
Bastien Nocera
53b0c5fd88 filechooser: Fallback if content-type unavailable
Fallback to fast-content-type if the content-type attribute isn't
available, as is the case for most remote filesystems.

Closes: #2482
2020-02-28 16:59:19 +01:00