Commit graph

476 commits

Author SHA1 Message Date
Chris Mayo
92c4b6a706 Fix panel crashes due to unknown types in UI descriptions
Error building template class 'CcSearchPanel' for an instance of type 'CcSearchPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcDisplayPanel' for an instance of type 'CcDisplayPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcMousePanel' for an instance of type 'CcMousePanel': .:0:0 Invalid object type 'CcIllustratedRow'

Error building template class 'CcKeyboardPanel' for an instance of type 'CcKeyboardPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcRegionPanel' for an instance of type 'CcRegionPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcUaPanel' for an instance of type 'CcUaPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcAvatarChooser'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcTzDialog'
cc_tz_dialog_get_selected_location: assertion 'CC_IS_TZ_DIALOG (self)' failed
dumped core
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcInfoOverviewPanel' for an instance of type 'CcInfoOverviewPanel': .:0:0 Invalid object type 'CcHostnameEntry'
2023-04-17 12:14:58 +00:00
Automeris naranja
fe5257bc9e general: Remove a11y labels when they aren't needed
A11y labels aren't needed when using the "activatable-widget"
property, because the relation is set automatically:

https://gitlab.gnome.org/GNOME/libadwaita/-/blob/main/src/adw-action-row.c#L661
2023-04-12 18:34:20 -03:00
Timotej Šulík
4702757b93 display: Fix display enabled toggle visibility 2023-04-11 12:16:54 +00:00
Emad Saadat
ce9c7c289a
display: Make nightlight widgets clamped to same size as other panels
by using an AdwPreferencesPage instead of a plain GtkBox. And also
move disabled infobar out of night_light_settings.
2023-04-06 00:38:32 -07:00
Jonas Ådahl
e561f32d9c display/night-light: Don't leak config manager proxy 2023-04-04 13:39:36 +00:00
Jonas Ådahl
80af5137c1 display/night-light: Disconnect config manager changed handler
Use g_signal_connect_object() to automatically disconnect the signal
handle when the listener object gets destroyed.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2333
2023-04-04 13:39:36 +00:00
Emilia Daria Majewska
4bfa57887b display: Removed the loop from the snapping function
In all my tests, the snapping algorithm was successful on the first pass.
2023-03-23 15:52:15 +00:00
Emilia Daria Majewska
4218aa6e4b display: Remove the monitor argument for cc_display_config_snap_output
The function tries to snap all the outputs anyway,
so might as well remove the unnecessary argument.
2023-03-23 15:52:15 +00:00
Emilia Daria Majewska
0aede82e58 display: Try snapping all the displays after a config change
This issue was originally addressed in !257 ("display snap after changes").
However it only dealt with a two-monitor setup, so the user is still
unable to rotate the middle display with three or more monitors.

This commit tries to snap the displays until all are adjacent to
another.
2023-03-23 15:52:15 +00:00
Marco Trevisan (Treviño)
852b39cdc6 dispaly: Allow configuring all monitors and apply settings at once
When multiple monitors are available, it's not possible anymore to
configure them all and eventually apply all the changed parameters.

To make this possible again, add a back button in the apply titlebar
that is shown only when we are in the display-settings child.

See: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/2012043
2023-03-21 15:33:16 +00:00
Markus Göllnitz
98f7a40d24 multiple panels: show start title buttons in header bar
The start title buttons of the main window should be displayed if and
only if the end title buttons are. Only the left-most header bar should have
the start title button set and only right-most header bar the end title buttons.

Therefore, the title buttons property should be bound to the leaflet state:
When unfolded the start title buttons of the sidebar's header bar are
the only ones visible then, and not a second pair in the panel's header bar.
Likewise, in a folded state of the leaflet, the panel's header bar displays
all availble title buttons – start and end – as the panel is the only widget
displaying a header bar.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
2023-03-16 13:18:37 +00:00
Jan Pokorný
705ff06d64 display: Add 32:9 to known aspect ratios
Resolution dropdown previously did not show an aspect ratio hint for
32:9 resolutions. This adds the 32:9 aspect ratio to recognized ones.

Fixes #2334
2023-02-09 14:08:46 +00:00
Marco Melorio
acadd521b1 display: Remove deprecated gtk_widget_show/hide usage 2023-01-02 22:10:39 +00:00
TheEvilSkeleton
4ddfecc79d display: Set underscanning_row as activatable widget 2022-12-20 09:24:21 +00:00
Nicolai Syvertsen
5569d40fca Fix monitor order.
Using prepend for optimization but forgot to reverse list.
2022-12-01 01:45:09 +00:00
Felipe Borges
5b3fff1961 display: Show Night Light Unavailable message when running on a VM
See #2020
2022-12-01 01:34:39 +00:00
Felipe Borges
0b6b54a6a4 display: Tweak Night Light unavailable infobar layout
See #2020
2022-12-01 01:34:39 +00:00
Felipe Borges
1abca8dbd0 display: Use heading capitalization for Night Light unvailable infobar
See #2020
2022-12-01 01:34:39 +00:00
Kaustubh Desale
f896693492 display: Update desktop file to include "Night Light"
This makes search results show that the "Display" panel is the place to find the Night Light settings.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1563
2022-11-30 09:51:25 +00:00
Mohammed Sadiq
a850a7260b display: Use CcListRow for rows with go-next icon 2022-11-25 20:59:02 +05:30
Mohammed Sadiq
0d74920072 display: Allow the night-light error label to wrap
So that it will wrap when needed and fits better on smaller screens
2022-11-22 15:31:53 +00:00
Jake Dane
89443fe550 desktop: Remove obsolete Bugzilla entries
The `X-GNOME-Bugzilla-*` entries were for use by bug-buddy, a GNOME 2
technology that's been gone for over a decade. These entries are
obsolete and can be removed from all desktop files.

The `X-GNOME-Settings-Panel` entry is also obsolete as far as I can
tell and only these panels had it in their desktop file: notifications,
sharing, sound and user-accounts. These entries can also be removed.

After removing the `X-GNOME-Bugzilla-*` entries, the desktop files have
no more variables in them. The meson `configure_file` step is therefor
pointless—there are no variables to configure. As such the
`*.desktop.in.in` files are renamed to `*.desktop.in` to reflect this
and `meson.build` files are modified to remove `configure_file` step.
2022-10-20 13:20:09 +00:00
Felipe Borges
37921f8a46 display: Fix primary monitor selection issue with AdwComboRow
We were connecting to the selected-index property when AdwComboRow
actually has a selected-item property. This is the same as
issue #2025

Fixes #2028
2022-08-24 11:18:35 +02:00
Mpho Jele
5782c7312c display: remove unused night light dialog code 2022-08-15 08:14:27 +00:00
Marco Trevisan (Treviño)
2f6d086c6f display-config: Parse privacy screen property and expose it per monitor
Each monitor can have a privacy screen property, so read it and expose
so that it can be at upper levels.
2022-07-28 22:47:14 +00:00
Pablo Correa Gómez
624023d633
display: avoid unnecessary gtk_style_context_get_margin call
The margin went unused after the monitor labels moved to the center
of the displays.

Fixes: e7e80efc ("display: Change appearance and size of monitor labels")
2022-07-18 17:58:46 +02:00
Carlos Garnacho
4eb075e5a5 display: Set a smaller width to display arrangement widget
This default size happens to expand the panel content horizontally,
this is seen as small jumps changing between joined and cloned views.
With this slightly smaller size, no further size jumps happen.
2022-07-08 13:41:30 -03:00
Carlos Garnacho
e8fcfc05a6 display: Make "Mirror" option show a single configuration for all displays
Since all displays are constrained to the same options, promote one so it's
shown in the main panel, the rest does work itself out.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1849
2022-07-08 13:41:30 -03:00
Carlos Garnacho
dc8eb2c22c display: Set "Multiple Displays" option on top
And make the display arrangements widget a row of the displays
preferences group, as per the latest mockups.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1851
2022-07-08 13:41:30 -03:00
Carlos Garnacho
e7e80efcbc display: Change appearance and size of monitor labels
Make these rounded everywhere, and have a lighter background and be
centered as per the latest mockups.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1850
2022-07-08 13:28:44 -03:00
Carlos Garnacho
2f9ec8b0a8 display: Set CSS class on the display arrangement widget
Instead of doing it via push/pop on the style context at draw time.
This way we will be able to specify and propagate some font style
to the monitor label, since style fonts are per-widget.
2022-07-08 13:28:44 -03:00
Jonas Ådahl
9e4f15353c display: Use virtual clone modes when mirroring
These are not real modes, but just as place holders when generating
'mirror' configurations. The clone modes will be just to match the
flag/dimension, while the actual mode applied will be individual for
each monitor.

This allows monitors to have their own refresh rates, which is possible
since a few mutter versions back. This also matches how mutter itself
generates mirror modes when doing so via the key binding.
2022-06-27 14:06:16 +00:00
Jonas Ådahl
6087c0397b display: Add 'is_preferred()' mode getter 2022-06-27 14:06:16 +00:00
Jonas Ådahl
fc984e90a1 display: Show infobar if night light isn't supported
This may be the case on e.g. fully remote / headless sessions, or as of
now, when using the NVIDIA driver to run a Wayland session.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1659
2022-05-17 12:32:48 +02:00
Jonas Ådahl
44293e9db2 display: Add 'NightLightSupported' property support 2022-05-17 12:31:07 +02:00
Robert Ancell
0118598763 display: Fix typo in a11y attribute 2022-05-11 12:07:31 +12:00
Pablo Correa Gómez
92ee00e39b display: Wrap Night Light GtkInfoBar label to fit in narrower screens 2022-05-10 04:37:42 +00:00
Lukáš Tyrychtr
f7d0aa7a12 Add missing labels 2022-05-10 03:40:47 +00:00
Marco Trevisan (Treviño)
f55639cabb display: cleanup monitors list disposition 2022-04-24 12:21:14 +00:00
Marco Trevisan (Treviño)
c6da230052 display: Remove weak references on display disposition
Weak references are added when logical monitors are created, however we
don't remove them when destroying the display.

This means that if a monitor survives to the display finalization
(because may be referenced elsewhere) it will make g-c-c to crash
during its finalization, as that will trigger the weak reference
callback that will try to access to the already-finalized display.
2022-04-24 12:21:14 +00:00
Georges Basile Stavracas Neto
e5a49dcf7b display: Return to main page after applying changes
After applying a change, it is useful to see the new state of the
monitors, so move back to the 'displays' page after applying.
2022-04-16 11:47:11 +00:00
Georges Basile Stavracas Neto
214dc277b5 display: Don't render background on selected monitors
In the previous design of this panel, it made sense to show the
currently selected monitor because all editing widgets were in
the same page. With the new design, however, the monitor options
were moved to a separate page, and that page already shows which
monitor is being edited.

Remove the colored background of selected monitors.
2022-04-16 11:47:11 +00:00
Georges Basile Stavracas Neto
ced1386fcd display: Update header title when setting output
Instead of updating the titlebar of the monitor preferences page in
the row clicked callback, update it in set_current_output(). This
ensures that the title of the page is always in sync with the monitor
it's displaying.
2022-04-16 11:47:11 +00:00
Alberts Muktupāvels
a581395221 display: fix monitor labels
has-toplevel-focus property has been removed from GTK 4:
0ce9f26dc5

https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1697
2022-03-18 22:08:49 +00:00
Yosef Or Boczko
5a7aa11b1e display: Force LTR to the spinbuttons's box 2022-02-28 09:47:53 +00:00
Georges Basile Stavracas Neto
dddd3f62c3 display: Box Night Light temperature vertically
Instead of being in the horizontal end of the row, move
the temperature scale to a second row.

Related: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1587
2022-02-15 19:35:18 +00:00
Georges Basile Stavracas Neto
8b05bc91d3 display: Remove labels from Night Light temperature scale
As per mockups.
2022-02-15 19:35:18 +00:00
Jakub Steiner
13376ecb8b Add individual app icons 2022-01-31 14:08:22 +00:00
Jonas Ådahl
21862c3e48 display: Only display configuration options if apply is allowed
org.gnome.Mutter.DisplayConfig contains a new property that tells
whether apply will be allowed to be called or not. Whether it is true or
not depends on policy stored in any of its monitors.xml configuration
files.

In order to make it clearer that configuration is not possible, except
for night light, make sure to hide the unconfigurable parts, leaving
only night light.
2022-01-25 16:43:26 +00:00
Georges Basile Stavracas Neto
82c87578cd window: Install action to navigate main leaflet
This allows implementing the back button of panel titlebars
trivially, which is also done in this commit.
2022-01-20 02:23:42 +00:00