Commit Graph

28422 Commits

Author SHA1 Message Date
Jakub Steiner
22af449b46 Adwaita: error labels and entries
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3063
2020-08-14 14:17:59 +02:00
Jakub Steiner
c09b9904c8 Adwaita: add public color for text views
- define @text_view_bg to complement @theme_text_color for high
  contrast legible text views.

Fixes https://gitlab.gnome.org/GNOME/vte/-/issues/226
2020-08-07 18:55:04 +02:00
Jakub Steiner
2427ebf9ba Adwaita: sass wasn't re-rendered
- particularly the typographic fix c80ac1c05d
2020-08-07 18:53:15 +02:00
Matthias Clasen
ccc30804d2 Merge branch 'wip/oholy/gtkmountoperation-newline-gtk-3-24' into 'gtk-3-24'
gtkmountoperation: Drop the new line character when splitting a message

See merge request GNOME/gtk!2400
2020-08-07 13:31:29 +00:00
Matthias Clasen
a0e7a231a8 Merge branch 'cherry-pick-267ea755' into 'gtk-3-24'
placesview: Always open default location after mounting

See merge request GNOME/gtk!1288
2020-08-07 13:08:03 +00:00
Ondrej Holy
ec1e2fac95 gtkmountoperation: Drop the new line character when splitting a message
When asking for a password, the message string is split on primary
and secondary if it contains a newline character. However, the newline
character is currently part of both strings, which creates weird
spacing between the GtkLabels. I suppose this is bug, which was not
visible as in most cases (if not all) the message string hasn't
contained the new line characters so far. But we are going to change
that now, see GNOME/gvfs!82. Let's drop the new line character similarly
as it is done when asking for a question, or showing processes in order
to fix the weird spacing.
2020-08-07 10:30:13 +02:00
Chun-wei Fan
1feb169bfa Visual Studio projects: move projects to win32/
This will simplify our source tree a bit
2020-07-16 18:57:03 +08:00
Chun-wei Fan
dd5fd12343 gtk/gtkfilechoosernativeportal.c: Fix on C89 compilers
Make sure we declare variables at the top of the block-we can't declare
variables in a for loop initilization in this case.
2020-07-16 18:31:37 +08:00
Chun-wei Fan
6f54881851 gtkcssshadowvalue.c: Fix build on older Visual Studio
This code made use of isnan(), which is not provided by pre-2013 Visual
Studio, so fix the build by including fallback-c89.c in place of math.h,
and update fallback-c89.c to include the implementation of isnan() for
Visual Studio, which is copied from the fallback-c89.c in gdk/.
2020-07-16 18:28:06 +08:00
Jakub Steiner
c80ac1c05d Adwaita: revert letter-spacing for large-title
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2932
2020-07-14 12:26:45 +02:00
Matthias Clasen
b1fe8b5ab4 Merge branch 'wip/sadiq/fix-entry-magnifier' into 'gtk-3-24'
entry: Restrict magnifier popover within the entry size

See merge request GNOME/gtk!2228
2020-07-13 12:15:29 +00:00
Mohammed Sadiq
c5fe16caa6 text-view: Fix select-all from touch bubble
The 'select-all' signal requires a boolean argument to specify
whether to select all or none.  So explicitly pass TRUE to select
all text instead of letting the demons choose one for us.
2020-07-13 16:27:50 +05:30
Mohammed Sadiq
cadd794d2c entry: Restrict magnifier popover within the entry size
The magnifier shown with touch input should not go beyond the widget
limits.
2020-07-12 06:37:09 +05:30
Matthias Clasen
b5f73f1426 Merge branch 'wip/smcv/gtk3-gresource-internal' into 'gtk-3-24'
build: Don't export GResource-related symbols with newer GLib

See merge request GNOME/gtk!2218
2020-07-09 16:26:43 +00:00
Simon McVittie
b4d120fcb4 build: Don't export GResource-related symbols with newer GLib
This makes the desired behaviour explicit, and matches the behaviour
seen with Meson, where "external : false" is the default.

Before GNOME/glib!1468, not passing --internal to the resource compiler
meant "no special export attribute, do what you would normally do",
so these symbols were not exported due to our global use of
-fvisibility=hidden.

However, since GNOME/glib!1468, not passing --internal to the resource
compiler results in the symbols being decorated with G_MODULE_EXPORT,
which overrides -fvisibility=hidden. This was necessary because Windows
DLLs normally behave a bit like the equivalent of ELF libraries with
-fvisibility=hidden.

Signed-off-by: Simon McVittie <smcv@debian.org>
Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/2919
2020-07-09 16:57:42 +01:00
Carlos Garnacho
b999c8d826 autotools: Teach about tracker3 search engine
Add --enable-tracker3 option (off by default, like in meson) and
hook the tracker3 search engine to build. Also, make sure it's part
of dist.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2912
2020-07-09 17:05:57 +02:00
Matthias Clasen
3dd3695ac4 Merge branch 'printing-portal-fix' into 'gtk-3-24'
Printing portal fix

See merge request GNOME/gtk!2210
2020-07-09 03:27:41 +00:00
Casey Jao
6c911248c9 Remember to call print_cb even if print operation is cancelled.
Closes #2917.
2020-07-08 21:51:16 -04:00
Emmanuele Bassi
faa748d4c9 Merge branch 'gtk3-fix-menu-touch' into 'gtk-3-24'
menu: Fix touch support by using pointer emulation under X11

See merge request GNOME/gtk!1794
2020-07-07 15:20:03 +00:00
Christian Hergert
30b2e1e7a3 textview: invalidate pixelcache for some invisible changes
When making changes above the current visible region, we might need to
invalidate the pixelcache as the Y positions will no longer match. This
usually is not needed because changes are made interactively and are made
onscreen.

Other cases, though, can include an application changing the first line
of the buffer automatically. We lose the ability to pixelcache well in
this scenario, but that is unlikely an issue since rapid Y geometry resize
or scrolling is less likely to be occuring. For situations where this is
an issue, you can avoid removing the \n from the buffer so line heights
are uneffected.

Fixes #2882
2020-06-29 15:07:59 -07:00
Matthias Clasen
8b5bddcecc Merge branch 'quantize-corner-mask-cache' into 'gtk-3-24'
CSS: Quantization for corner mask cache

See merge request GNOME/gtk!2103
2020-06-29 16:11:34 +00:00
Luca Bacci
18f56ddf53
Limit corner mask cache
Fixes issue #2853
2020-06-29 17:06:28 +02:00
Luca Bacci
8d21c14592
Quantization for corner mask cache
Fixes issue #2853
2020-06-29 17:06:22 +02:00
Jakub Steiner
1118708976 Merge branch 'adwaita-fix-gtk-3-24' into 'gtk-3-24'
Remove .tile from checkbox style selector

See merge request GNOME/gtk!2018
2020-06-24 12:40:01 +00:00
Matthias Clasen
40bbcfebcb Merge branch 'cursor-aspect-ratio-for-3' into 'gtk-3-24'
Add a gtk-cursor-aspect-ratio setting

See merge request GNOME/gtk!2144
2020-06-23 21:14:58 +00:00
Matthias Clasen
804ae299a7 Add a gtk-cursor-aspect-ratio setting
Add a setting that controls how thick the text caret is drawn.
This setting replaces a style property that we used to have.
The default value is 0.04.
2020-06-23 16:51:09 -04:00
Jakub Steiner
de348ba984 Adwaita: notebook legibility fixes
- make inactive tabs more legible

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2652
2020-06-23 22:24:57 +02:00
John Ralls
c6036592c9 [Quartz]Silence type mismatch warning. 2020-06-20 10:20:20 -07:00
Friedrich Beckmann
7d9a939f99 quartz: gtk-application - inhibit openFiles events from cmdline
When an application is started via cmdline, then openFiles events
from MacOS are generated although gtkapplication already interprets
the cmdline arguments and opens suitable arguments as files. So they
would be opened twice. Depending on the exact situation the
openFiles event can also be issued before the startup signal
is given. Depending on the application this can result in a crash
due to unexpected behaviour. I took this idea from the
gedit-app-osx.m file. Also from Jesse van den Kieboom.

See:
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2098#note_842975
https://gitlab.gnome.org/GNOME/gtk/-/commit/a3ad7fa80f764fb7bcbe
https://gitlab.gnome.org/GNOME/gedit/-/blob/master/gedit/gedit-app-osx.m#L592
2020-06-18 21:08:28 +02:00
Matthias Clasen
a3ad7fa80f Merge branch 'gtk-application-quartz' into 'gtk-3-24'
quartz: Bugfix - Add openFiles delegate to gtk_application (#463)

See merge request GNOME/gtk!2098
2020-06-16 16:41:27 +00:00
Friedrich Beckmann
665f8b6b87 quartz: added open capability to gtk_application
This patch implements the openFiles delegate which is required
to open files which are associated with an application via the
Finder or via open on the command line. The patch has been
proposed by jessevdk@gmail.com.

See: https://gitlab.gnome.org/GNOME/gtk/-/issues/463

I tested the patch with the GNU pspp application on MacOS with
the quartz backend.
2020-06-16 16:59:06 +02:00
Benjamin Otte
947c3e9f72 Merge branch 'benzea/fix-css-update' into 'gtk-3-24'
Fix CSS update loop

See merge request GNOME/gtk!2093
2020-06-15 20:13:56 +00:00
Benjamin Berg
7a5caf1bc0 cssnode: Don't queue_validate/deque_validate invisible nodes
Otherwise setting/unsetting the parrent may cause on an invisible widget
may cause the style to be continuously updated.

Fixes: #2849
2020-06-15 21:31:16 +02:00
Matthias Clasen
3065f47ab5 Merge branch 'michaelweghorn/issue1820_gtkfilechoosernativeportal_get_filter' into 'gtk-3-24'
Make gtk_file_chooser_get_filter work for the portal GtkFileChooserNative (issue #1820)

See merge request GNOME/gtk!1960
2020-06-15 17:52:58 +00:00
Matthias Clasen
46a7ffc336 Merge branch 'michaelweghorn/issue1820_gtkfilechoosernative_get_filter' into 'gtk-3-24'
gtk_file_chooser_get_filter Make gtk_file_chooser_get_filter work for the non-portal GtkFileChooserNative (issue #1820)

See merge request GNOME/gtk!1959
2020-06-15 17:51:36 +00:00
Philip Withnall
fb998ff52d gtkbuilder: Eliminate array reallocations in get_parameters()
`gtk_builder_get_parameters()` is a hot path, being called twice for
each object in each UI file in an application. The majority of objects
have ≤ 8 properties, which are each filtered into either `parameters` or
`filtered_parameters`.

Unfortunately, both of those arrays are created as empty `GArray`s, and
adding 8 elements to an empty `GArray` hits the worst possible case of
reallocating and `memcpy()`ing the array 3 times. As the array size is
doubled with each reallocation, the cost is not particularly well
amortised when the array size is small.

From the `ObjectInfo`, we actually know how many properties there are in
total, so just allocate the arrays at the right size to begin with.

This saves 7% of the instruction cycles needed to start up
gnome-software to the point where it’s showing its main window,
according to callgrind. gnome-software is making around 5500 calls to
`gtk_builder_get_parameters()`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-06-10 19:59:03 +01:00
Michael Weghorn
d59b28d5f4 Make gtk_file_chooser_get_filter work for portal case
This makes 'gtk_file_chooser_get_filter' work for the
portal native file chooser by handling the corresponding
'current_filter' argument in the response retrieved via
D-Bus.

In order to try to map the retrieved 'current_filter' to one
of the existing list of filters, use the retrieved filter's name,
similar to how xdg-desktop-portal-gtk does it when evaluating the
'current_filter' input parameter in 'options'.)

Note: This depends on the following merge/pull requests
which fix the filter handling in gtk for native file choosers
and introduce the 'current_filter' handling for FileChooser portal.

* https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1959
* https://github.com/flatpak/xdg-desktop-portal/pull/493
* https://github.com/flatpak/xdg-desktop-portal-gtk/pull/311

This fixes #1820 for desktop portal case.

Fixes: #1820
2020-06-09 22:52:11 +02:00
Thomas Holder
1573ff6803 gtk_file_chooser_set_current_name: fix type of name argument
The description says UTF-8 string, but the annotation said filename.
2020-06-05 12:43:49 +02:00
Emmanuele Bassi
d60746ae6c Merge branch 'issue-2820' into 'gtk-3-24'
docs: Update the link to the GtkBuilder schema

See merge request GNOME/gtk!2042
2020-06-05 09:46:56 +00:00
Emmanuele Bassi
e9c4c80102 docs: Update the link to the GtkBuilder schema
The link to the file is still using the old cgit format, which redirects
to master, where the RNC file is gone.

Fixes: #2820
2020-06-05 10:16:19 +01:00
Kjell Ahlstedt
52d944ec44 flowbox: Don't use a removed child after it has been unparented
In gtk_flow_box_remove(), call g_sequence_remove() before the child is unparented.

See MR !2029
2020-06-04 08:24:08 -04:00
Neville
7fd126e2af Adwaita: Remove .tile from checkbox style selector
Currently .tile style is required for the larger blue checkboxes.
The .tile style is removed since it adds unwanted style to elements.
Also the selector to ignore list elements has been modified since
it currently checks for checkboxes that are not lists.
2020-06-03 20:56:39 +05:30
Matthias Clasen
92f11144f3 Merge branch 'gtk-3-24' into 'gtk-3-24'
Fix GPtrArray sorting function

See merge request GNOME/gtk!1984
2020-06-01 14:46:14 +00:00
Alexander Mikhaylenko
60f69462fc Adwaita: Revert black decoration background
Before I tried this change, I thought it might break apps that do
transparent window background. So I checked a few that did this:
gnome-terminal, tilix, kgx. It worked, so it must work everywhere, right?

However, it just so happens that vte is drawn using CAIRO_OPERATOR_SOURCE
operator rather than CAIRO_OPERATOR_OVER like everything else. This means
that if vte widget is transparent, anything below it, like a black
decoration background, won't be shown.

So really it is still broken, so reverting it.
2020-05-30 15:22:40 +05:00
Tristan Partin
6a507c0b63
Fix GPtrArray sorting function
GPtrArray's GCompareFunc passes a double pointer that needs to be
dereferenced in order to use the data you are actually wanting to
compare.

See: https://developer.gnome.org/glib/stable/glib-Pointer-Arrays.html#g-ptr-array-sort
2020-05-29 15:24:09 -05:00
Michael Weghorn
baddc90c26 filechoosernative: Make get_filter work for (non-portal) native chooser
'gtk_file_chooser_get_filter' did not work for GtkFileChooserNative,
since the previous way did not properly handle the delegate dialog,
s.a. commit a136cbae8f
("filechoosernative: forward current_filter to delegate dialog",
2018-11-29) for details, wich basiscally fixed the same thing for
the 'gtk_file_chooser_set_filter' case.

This fixes #1820 for the fallback dialog. A solution for the portal
one (which also requires changes to xdg-desktop-portal and
xdg-desktop-portal-gtk as well) will be suggested in a subsequent step.

Bug: #1820
2020-05-23 14:02:34 +02:00
Jakub Steiner
1f8c019d1e Merge branch 'theme-linked-button-fixes-gtk3' into 'gtk-3-24'
Adwaita: Fix and simplify the linked buttons styling (GTK3)

See merge request GNOME/gtk!1948
2020-05-22 09:30:16 +00:00
Ondrej Holy
cb9b7278d6 trash-monitor: Rate limit updates
Trash monitor queries info from gvfsd-trash after each file monitor
change which can be problematic when too many changes happen in
a short time. Let's rate limit the number of queries...

Fixes: #1010
2020-05-21 21:16:20 -04:00
nana-4
34d85329a9 Adwaita: Fix and simplify the linked buttons styling
- Remove various unnecessary overrides for linked buttons.
- Add missing outline styles to the %linked_vertical ones.
- Consistently use :not(.vertical) instead of :dir(ltr|rtl) for linked
  combo buttons.
- Remove :only-child styling from the messagedialog button. The
  :only-child is equivalent to :first-child:last-child, so we don't need
  the styling there specially.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2752
Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/2549
2020-05-21 00:51:54 +09:00
Matthias Clasen
88fc1640ed Merge branch 'BUG_double_popover_focus_filechooser_GTK3' into 'gtk-3-24'
filechooser: set default widget early for 'Rename' popover

See merge request GNOME/gtk!1592
2020-05-19 23:26:56 +00:00