Commit graph

73 commits

Author SHA1 Message Date
Gotam Gorabh
3bb233b50a system: Add 'Date Time' panel to system panel
Adds Date Time panel to the system panel as a page.

https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/system/system-panel.png

See #2241
2023-11-02 12:15:11 +00:00
Felipe Borges
fb13e45aba system: Add "About" page 2023-11-02 12:15:11 +00:00
Gotam Gorabh
72973b9a8a system: Add 'Region Language' panel to system panel
Adding Region & Language page to the system panel.

https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/system/system-panel.png

See #2241
2023-11-02 12:15:11 +00:00
Gotam Gorabh
5a92981056 system: Add new Sytem panel
This is the basic panel structure which will contain the
pages for the "System" panel, per mockups in
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/system/system-panel.png

See #2241
2023-11-02 12:15:11 +00:00
Marco Melorio
46021b152d shell: Remove sidebar subpages support from panels
They are now unused and they should not be used anymore in new panels.
2023-09-22 11:45:02 +00:00
Nishal Kulkarni
20eda27bb9 applications: Move default app and removable media
Currently setting's panel list is over-populated. We can fix this by
moving some of the settings inside other panels as sub-panels.

Created a new row in applications panel for removable media and
default apps. On selecting the row we show the respective settings
which is same as before.

Removed default app and removable media from sidebar

Closes: #1092 #1096
Related to: #1090
2023-09-19 11:13:41 +00:00
Felipe Borges
21dfe16df6 shell: Drop two leftover/unused variables
These were made useless by commit 754536cc97
2023-08-30 10:52:37 +02:00
Nelson Benítez León
2b3c157c07 shell: fix panel centering on CcPanelList
the calculation to center the panel row
was failing when the panel list was not
scrolled to the top.

Fix it by taking the distance from the
row to the CcPanelList, instead of the
GtkScrolledWindow that contains it.

Part of issue #2506
2023-08-30 08:49:12 +00:00
Nelson Benítez León
3f3409cbc1 shell: restrict panel centering to specific cases
commit 02302c9b08 implemented vertical centering of
the panel being activated, but we should restrict
that to only happen when the activation is from the
Search view or from the set_active_panel_from_id()
CcShell iface, which covers the case of panel activated
from commandline parameter or from other panels, but
does not include activating panels manually by mouse
or keyboard which is the problematic case explained
in issue #2506

Closes #2506
2023-08-30 08:49:12 +00:00
Alice Mikhaylenko
4e75534b2e Port sidebar widget to AdwNavigationView 2023-08-25 08:00:43 +00:00
Marco Melorio
81dd3de928 panels: Add empty Privacy panel with navigation
It will be filled in later commits.
2023-08-03 08:42:10 +00:00
Marco Melorio
31a91a221c shell: Disable privacy panels temporarely
It will be reimplemented in a single panel in later commits.
2023-08-03 08:42:10 +00:00
Nelson Benítez León
c2ef0f6e5e shell: prevent loading last-panel unconditionally on startup
We currently load the last-panel every time gnome-control-center
is launched, we do it from the CcWindow contructor method.

But we shouldn't do it when we are explicitly opening a different
panel by eg. using commandline parameter (gnome-control-center keyboard)
or from a DBus method, because otherwise we slow things down by
unnecesarily start launching last-panel just to be cancelled
moments later when the code starts processing the other panel.

We fix it by moving the code that loads last-panel to an idle
handler, so by the time it gets executed the other panel has
already started loading, and we can check for that with the
cc_panel_list_get_current_panel() function we add in this patch.

With this patch, I can feel that panels opened from a
gnome-shell search are presented faster.

Fixes issue #2569
2023-07-18 09:28:29 +00:00
Lukáš Tyrychtr
7cee2a8ec1 panel-list: Set labelled by/described by relations for the panel list explicitly
After GTK changed how it computes nmes, we need an explicit relations to keep
the panel list accessible. And, as a bonus, we now expose the descriptions as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1834>
2023-06-28 02:02:00 +00:00
Nelson Benítez León
68227b0dab shell: improve key nav between search entry and results list
Improve keyboard navigation with Up/Down arrow keys between
Search entry and the search results list.

Pressing Arrow Down in search entry will now move focus
to search list, and when pressing Arrow Up on the first
list result will move back focus to Search entry.
2023-06-06 13:01:23 +00:00
Nelson Benítez León
ce42d320b5 shell: fix visibility check for rows and avoid empty searches
When pressing ENTER (i.e. activating) a search with no
results ("No results found") the first Wifi panel was
being activating, that's wrong because cc_panel_list_activate()
should activate the first visible panel, but there are
no visible panels at the moment (No results found page is shown)

The problem was the visibility check in cc_panel_list_activate()
was incomplete and so it wrongly thought panels were app visible.

Part of #2119 (comments 4th and 5th)
2023-05-23 14:30:49 +01:00
Nelson Benítez León
02302c9b08 CcPanelList: center sidebar row when activating a panel
When activating a panel from Search or from commandline
let's scroll the sidebar so the row for that panel is
revealed and vertically centered on the list.

Closes #2098
2023-05-16 08:24:52 +00:00
Nelson Benítez León
754536cc97 CcPanelList: don't activate first row panel unnecesarily
Don't activate first row panel (i.e. 'Wifi') when:
 - Canceling search view (pressing ESC or deleting all query text).
 - Activating a search result from search view.

Closes #2472
2023-05-11 14:45:10 +00:00
Maksym Hazevych
08c2e69851 Resolving suggestions 2023-03-29 14:26:55 +13:00
Maksym Hazevych
5b988a6943 Replace all occurrences of 'gtk_widget_hide'
Replace all occurrences of 'gtk_widget_hide(smth)' with
'gtk_widget_set_visible(smth, FALSE)'.
2023-03-29 14:26:55 +13:00
Maksym Hazevych
d831e5cb48 Replace all occurrences of 'gtk_widget_show'
Replace all occurrences of 'gtk_widget_show(smth)' with
'gtk_widget_set_visible(smth, TRUE)'.
2023-03-29 14:26:55 +13:00
Mohammed Sadiq
2fb74f2a40 panel-list: Switch to main list if custom sidebar is not set
If the previously shown panel had a custom sidebar, we were not
switching back to the main list if the currently shown panel
doesn't have one.

This will result in the sidebar having empty content.

Fix it by always switching to main sidebar view if no custom
sidebar widget is set.

Closes #2261
Closes #2292
2023-03-03 10:38:31 -03:00
Georges Basile Stavracas Neto
20a010d0f6 Revert "panel-list: Switch to main list if custom sidebar is not set"
This reverts commit bc919b82c0.
2023-01-09 16:40:55 -03:00
Mohammed Sadiq
bc919b82c0 panel-list: Switch to main list if custom sidebar is not set
If the previously shown panel had a custom sidebar, we were not switching
back to the main list if the currently shown panel doesn't have one.

This will result in the sidebar having empty content.

Fix it by always switching to main sidebar view if no custom sidebar widget
is set.

Fixes #2261
2023-01-06 12:37:45 +00:00
Felipe Borges
294156c0f9 Drop most uses of deprecated gtk_style_context_add/remove_class
GtkStyleContext will be deprecated in gtk 4.10.
https://docs.gtk.org/gtk4/class.StyleContext.html

This preserves code blocks where additional GtkStyleContext operations
were used, such as gtk_style_context_save/restore.
2023-01-05 18:55:51 +00:00
Mohammed Sadiq
3b121805ed log: Improve logging
The 'tracing' build option is no longer needed.  And the verbosity
of logs can be set by providing '-v' multiple times.
2022-12-01 11:44:17 +00:00
Mohammed Sadiq
2dbc195d77 panel-list: Select panel iff non-folded when search is cancelled
If the window is folded, the previous panel shouldn’t be shown when search
is cancelled. The panel selection list should be shown instead.
2022-08-17 09:34:16 +00:00
Kate Hsuan
69598b9e08 Add Firmware Security panel
The Firmware Security panel exposes the host security levels
and details. The information is generated by fwupd. The panel
also exposes hardware configuration changes to pinpoint the
configuration changing time.

Currently this panel shows:

 - HSI and secure boot status
 - Details of HSI and secure boot
 - Configuration changelog
 - Digested security level
 - Extended protection
2022-06-27 13:53:30 -03:00
Georges Basile Stavracas Neto
acd59aec65 Rename app-id to org.gnome.Settings
Rename the app-id to org.gnome.Settings since this is what
we've been calling it for many years now. Adjust all files
that derive from the app-id, such as the desktop file, D-Bus
service file names, search providers, GSettings schemas, to
match that.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/344
2022-01-21 13:08:50 +00:00
Christopher Davis
58e3d7873a cc-panel-list: Adjust margins for sidebar rows
This matches the mockups and Patterns.
2021-12-17 21:36:54 +00:00
Christopher Davis
d72d23a1cd cc-panel-list: Remove use of sidebar-icon style
Generally sidebar icons aren't dimmed anymore.
2021-12-17 21:36:54 +00:00
Georges Basile Stavracas Neto
521ea3a635 panel-list: Port to GTK4
- Inherit AdwBin since GtkStack is a final class now
 - Replace GtkContainer APIs by their widget-specific ones
2021-12-14 22:34:21 -03:00
Mohammed Sadiq
dc840f0aec wwan: Add new panel for modem management
The panel supports 2G/3G/4G GSM/LTE modems. CDMA2000 Modems are not supported.
If a supported modem is present, the panel will be shown and the modem will be
handled, else, network-panel shall manage the modem as it did in the past.

If more than one modem with data enabled is present, the user is allowed to set
priority of one SIM over the other (the priority is for SIM, not modem).

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/132
2021-08-13 19:25:41 +00:00
Georges Basile Stavracas Neto
0f0845172f Introduce the Multitasking panel
The Multitasking panel brings some additional settings
from Tweaks that are relevant to the general platform.

Related: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/558
2021-08-13 18:17:36 +00:00
Ian Douglas Scott
b804fdb01a shell: Fix bug when multiple panels use custom sidebar widget
This is not currently a problem because the feature is only used in the
Applications panel, but this fixes the behavior if a custom sidebar is used
in more than one panel.
2021-04-19 14:31:44 +00:00
Ian Douglas Scott
f4f44f511e shell: Do not show panel description by default
01874f7 added this `gtk_widget_show (label)` call, which seems to be
erroneous. The previous `g_object_new()` call had `"visible", FALSE,`.

It should only be shown when searching panels. This fixes that,
restoring the older behavior.
2020-10-29 20:22:58 +00:00
Robert Ancell
01874f7650 shell: Replace g_object_new with gtk widget methods
This improves compile time type checking.
2020-10-19 04:07:53 +00:00
Yuri Chornoivan
e7050ab6f4 Fix minor typos 2020-07-20 10:38:09 +03:00
Georges Basile Stavracas Neto
86a8ecb705 panel-list: Temporarily move the Network panel to below Wi-Fi
This is until we merge the Network, Wi-Fi, and Mobile Broadband
panels.
2020-01-06 15:15:30 +00:00
Georges Basile Stavracas Neto
aa98bf47da panel-list: Move Thunderbolt to the Privacy section 2020-01-06 15:15:30 +00:00
Georges Basile Stavracas Neto
5f640b9903 panel-list: Reorganize Devices section
Move the Power and Sound panel to there.
2020-01-06 15:15:30 +00:00
Georges Basile Stavracas Neto
a99ad542ae panel-list: Remove the Devices subsection
Same case of the Details subsection, it's now part of the
main list.
2020-01-06 15:15:30 +00:00
Georges Basile Stavracas Neto
e7f221e1b9 panel-list: Reorganize panel order 2020-01-06 15:15:30 +00:00
Georges Basile Stavracas Neto
64756d6b08 region, universal-access: Move to the Details section
They need to have their desktop files updated too.
2020-01-06 15:15:30 +00:00
Georges Basile Stavracas Neto
f0d246a8b0 panel-list: Remove Details subsection
As per the latest mockups, the Details section is a toplevel
section, and not an actual subsection.

Remove all the code that implemented Details as a subsection,
and simply treat these panels as toplevel ones.
2020-01-06 15:15:30 +00:00
Robert Ancell
5dbbc20918 shell: Show the submenu icon hint for the applications panel
The panel swarms details/devices/privacy show this icon. Since the applications
panel is not made from sub-panels, this doesn't show. For consistency this shows
the icon so the transition isn't as jarring for the user.

Add a flat into the panel .desktop file to enable this - other panels might
require this in the future
2019-11-28 11:20:41 +13:00
Georges Basile Stavracas Neto
aed05547f3 panel-list: Reorganize panel order
This does not currently implements all the changes
in panel order defined by the latest mockups [1],
but only moves Privacy and Applications to their
appropriate places.

[1] https://gitlab.gnome.org/Teams/Design/settings-mockups/blob/master/shell/settings-cleanup.png
2019-11-07 14:40:07 +13:00
Georges Basile Stavracas Neto
e677539b28 panel-list: Only use panel id to sort
Right now, the sort function checks for two different
fields when comparing panel rows: the category of the
row, and the id of the panel. When comparing using the
category, it relies on the order of the enum values of
CcPanelCategory. When comparing by panel ids, it uses
the hardcoded positions defined in the 'panel_order'
array.

Using categories, however, is unecessary for our case,
and makes sorting a tad more complicated than it should
be.

Remove the category comparison of the sort function, and
rely only on the positions defined in 'panel_order'.
2019-11-07 14:40:07 +13:00
Matthias Clasen
a4bdc37760 Remove the privacy panel
It has been turned into a herd of panels.
2019-11-07 14:40:07 +13:00
Matthias Clasen
3860a2e2af shell: Add a new privacy section
This will be filled out in the next commits.

Probably doesn't build because it includes all the type funcs.
2019-11-07 14:19:23 +13:00