Commit graph

794 commits

Author SHA1 Message Date
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
Felipe Borges
6b4b478402 applications: Fix crash when loading as last-used panel
Let's call update_headerbar_buttons only after the panel
has been loaded.

Fixes #2590
2023-08-02 12:51:22 +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
sunflowerskater
266c55715a general: Add tooltips to headerbar controls
Acc. HIG, "controls in the header bars of primary windows should all have tooltips".

https://developer.gnome.org/hig/patterns/feedback/tooltips.html
2023-06-06 13:27: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
Pablo Correa Gómez
7f7b65545c all: meson: do not specify resources from gresource files as dependencies
Meson extracts them by itself and add them as dependencies for the target.
It means one less location to keep track of files, and a lot less boilerplate
around the meson files
2023-05-24 08:34:14 +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
e95669d94d shell: avoid activating panel from an empty search
Avoid activating a panel when doing an empty search
i.e. clicking ENTER without having entered
any text in the search entry.

We should do nothing in this case, we fixed it by
detecting for this case when an activation happens
when there's still no search results view in place.

Closes #2119
2023-05-23 14:29: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
Ondrej Kolin
a0ee96c8ff Set last-panel only for noncrashing panels 2023-05-05 09:32:55 +00:00
sunflowerskater
c95dcf2a9a general: Add placeholder text to various search entries
Acc. HIG, "text fields should have placeholder text or a label".

https://developer.gnome.org/hig/patterns/controls/text-fields.html

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2190
2023-04-21 12:40:42 +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
Marco Trevisan (Treviño)
645b6d1c8a shell/style: Add workaround to make disabled pictures are painted as such
See: https://gitlab.gnome.org/GNOME/libadwaita/-/merge_requests/814
2023-03-28 13:52:12 +00:00
Hari Rana
ff832004a8 search: Add tooltip 2023-03-15 13:28:59 +00: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
Hari Rana
e8afa43dec
primary-menu: Rename to Main Menu
This renames the accessibility label of the primary menu to "Main Menu", and adds a tooltip text under that name, per https://developer.gnome.org/hig/patterns/controls/menus.html#primary-menus
2023-02-14 15:33:32 -05:00
Bastien Nocera
fbf8886b91 shell: Refuse to run under unsupported desktops
Closes: #945
2023-02-10 13:16:19 +00:00
Mohammed Sadiq
717cc3e0fc log: Show logs from Bluetooth panel
Logs from Bluetooth panel have "Bluetooth" as G_LOG_DOMAIN.
Show them by default on -v
2023-01-25 09:55:34 +00:00
Jake Dane
37a579b6b0 Replace "application" with "app"
This is part of an initiative to use "app" instead of "applications",
see: https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/123

Redo of !1539 that was closed by a ghosting user.

Replaces "application" with "app" in user facing strings in these
panels:

- applications
- camera, location, microphone
- default-apps
- multitasking
- notifications
- removable-media
- search
- usage
- user-accounts

Fixes: #2208.
2023-01-23 11:10:28 +00:00
Bastien Nocera
727a88a3bd shell: Let libX11 initialise threads itself
Require a version of libX11 new enough that it will initialise threads
support itself.

See afcdb6fb00
2023-01-23 11:04:36 +00: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
sunflowerskater
0dd780f1b7 cc-window: Don't trigger main search when pressing CTRL+S
CTRL+S is reserved for the "Save" action. HIG recommends to use CTRL+F to trigger search:
https://developer.gnome.org/hig/reference/keyboard.html?highlight=Find

Since CTRL+F already triggers main search, this commit just removes the CTRL+S shortcut.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2280
2023-01-06 21:19:02 -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
Felipe Borges
22b5686943 thunderbolt: Hide panel if there's no thunderbolt hardware
Same logic as the Wacom tablet panel.

Fixes #612
2022-12-15 14:02:02 +01: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
sabriunal
a1192adc9f help-overlay: remove visible property names
Due to widgets are visible by default on GTK4
remove visible property names.

Source: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkwidget.c#L1275
2022-11-30 12:57:29 +00:00
sabriunal
d73ec42d39 help-overlay: Add missing shortcuts
This patch adds two missing shortcuts to help-overlay

- Help (F1)
- Keyboard Shortcuts (CTRL+?)

Fixes: #839
2022-11-29 20:21:29 +00:00
Felipe Borges
142318eede flatpak, shell: Make desktop file honor "Devel" app_id 2022-11-24 14:16:47 +01: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
Barnabás Pőcze
f00fd653cb object-cache: Avoid use after free of task error
The error should not be touched after passing it to
`g_task_return_error()` as noted by its documentation:

  Note that since the task takes ownership of @error, and since the
  task may be completed before returning from g_task_return_error(),
  you cannot assume that @error is still valid after calling this.

However, previously, the code did try to free error since the
`local_error` was defined with `g_autoptr(GError)`.
2022-10-19 19:52:21 +02: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
Mohammed Sadiq
e6aa605bd0 shell: Remove no longer used icon 2022-08-17 08:09:15 +00:00
Marco Trevisan (Treviño)
b327301951 Panels: Rename lock panel into screen panel
This was designed some time ago [1] but never actually implemented, so:
 - Change the screen lock section to "screen"
 - Move the screen section up, so it's next to the other types of
   hardware
 - Added a Screen lock section in there

[1] https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/909#note_737827
2022-07-28 22:47:14 +00:00
Richard Hughes
e11929e0c1 firmware-security: Hide the panel when using a VM
Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1972
2022-07-21 13:21:12 +01: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
Benjamin Berg
cfc5fdb7c6 shell: Deactivate old panel before creating new one
We need to cancel internal operations before starting to create a new
panel, otherwise panels might be creating the same object for the cache
in parallel and this is not supported by the object cache.

The alternative to this would be to handle this inside the object
store to allow parallel creation of the same key.

Fixes: #1685
2022-06-20 03:18:30 +00:00
Lukáš Tyrychtr
ab852ca63c Make the presentation of the main panel list a little bit nicer by adding an a11y label 2022-06-19 23:02:54 +00:00
Adrien Plazas
d548309f34 info-overview-panel: Use the external link icon for the updates link
This makes it explicit it opens another application to perform the
action.
2022-05-12 23:04:51 +00:00
Robert Ancell
7d4c8346ca online-accounts: Rename panel class to match filename 2022-05-11 14:04:18 +12:00
Bastien Nocera
95de2049c7 shell: Initialise locale early
Otherwise glib will make internal calls before setlocale is called:
** (process:1124144): WARNING **: 10:16:58.983: dcgettext("(null)", "", 5) called before setlocale()

 #0  0x00007ffff7c80f77 in g_logv () at /lib64/libglib-2.0.so.0
 #1  0x00007ffff7c81233 in g_log () at /lib64/libglib-2.0.so.0
 #2  0x00007ffff7fbb6c6 in dcgettext (__domainname=<optimized out>, __msgid=0x7ffff7ce6c5a "", __category=<optimized out>) at ../../../../Projects/jhbuild/gettext-pseudolocale/gettext-pseudolocale.c:194
 #3  0x00007ffff7c6478e in _g_dgettext_should_translate () at /lib64/libglib-2.0.so.0
 #4  0x00007ffff7c6484b in g_dgettext () at /lib64/libglib-2.0.so.0
 #5  0x00007ffff7e98974 in g_application_class_intern_init () at /lib64/libgio-2.0.so.0
 #6  0x00007ffff7d9cfb8 in g_type_class_ref () at /lib64/libgobject-2.0.so.0
 #7  0x00007ffff7d9cc95 in g_type_class_ref () at /lib64/libgobject-2.0.so.0
 #8  0x00007ffff7d9cc95 in g_type_class_ref () at /lib64/libgobject-2.0.so.0
 #9  0x00007ffff7d9cc95 in g_type_class_ref () at /lib64/libgobject-2.0.so.0
 #10 0x00007ffff7d8671a in g_object_new_valist () at /lib64/libgobject-2.0.so.0
 #11 0x00007ffff7d867fd in g_object_new () at /lib64/libgobject-2.0.so.0
 #12 0x0000000000449bcc in cc_application_new () at ../../../../Projects/jhbuild/gnome-control-center/shell/cc-application.c:294
 #13 0x0000000000448fa6 in main (argc=1, argv=0x7fffffffd138) at ../../../../Projects/jhbuild/gnome-control-center/shell/main.c:55
2022-05-11 00:36:27 +02:00
Simon McVittie
d27d3df268 appdata: Correct name of launchable
Fixes: acd59aec "Rename app-id to org.gnome.Settings"
Resolves: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1766
Signed-off-by: Simon McVittie <smcv@debian.org>
2022-04-15 10:50:05 +00:00
Sophie Herold
6624179102 appdata: Update screenshots 2022-03-18 10:33:22 +00:00
Felipe Borges
7f8e90a966 user-accounts: Port to gtk4/libadwaita implementing the new design
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/raw/master/users/users.png
2022-02-08 13:29:56 +00: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