Commit graph

157 commits

Author SHA1 Message Date
Felipe Borges
0787182dd0 search: Prevent listbox placeholder from being treated like a row
The Search panel providers listbox has a placeholder label that is
visible when there are no listbox items.

The placeholder label is being considered in the list of children
of the listbox while estimating whether "Moving down" is allowed for
the listbox reorder feature.
2024-03-22 12:43:24 +00:00
Automeris naranja
1d00a94009 search: Tweak "No Apps Found" placeholder
The current placeholder that appears when no
providers are available has some problems:

- The row is activatable, but this is unnecessary
- The row has no padding
- The "No Apps Found" string doesn't use header
capitalization

Fix this by using a GtkListBox placeholder widget, with
margins and with header capitalization in the string.
2024-03-22 12:43:24 +00:00
Automeris naranja
0aeb0b55a7 general: Add translator comments about the "Search" term
Clarify in which occasions this term should be
phrased as a verb or as a noun.

Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2903
2024-02-29 13:48:20 +00:00
Automeris naranja
bd93cd2292 search: Port "App Search" row to AdwSwitchRow 2024-02-29 10:18:47 +00:00
Automeris naranja
d997c6e0fa general: Remove "activatable" property from some CcListRows
The CcListRow template already sets the row
as activatable[1].

[1] https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/gnome-45/panels/common/cc-list-row.ui?ref_type=heads#L4
2024-02-20 07:32:37 +00:00
Sam Hewitt
a5f6efaddb Update and clean up symbolic icon assets
- refresh the symbolic icons to sync some style changes and update the source sheet
- rename assets for the privacy subpanel's symbolic icons
- delete deprecated/unused symbolic icons
- add new icon for system panel
- add new icon for remote desktop so it isn't using displays icons
2024-02-10 16:17:35 +00:00
velsinki
ce584b3b67 search-locations-dialog: Add placeholder for custom locations
If there are no Other Locations added, the list shows empty which looks
odd.

Fix this by adding a simple placeholder to the GtkListBox.

Fixes #2869
2024-02-09 15:43:43 +00:00
Corey Berla
42920853c0 search-locations-dialog: Stop removing non-existent folders from tracker
This change effectively reverts commit 5c679301ec ("search: Invalidate
"Search Locations" list when folders can't be found").  The crash
that commits intends to fix does not occur on main anymore, and there's
no real difference between an existing and non existing file from this
interface's perspective.

Removing a folder automatically is dangerous because it may be on
an unmounted external hard drive or another location that is not
currently available.  This also removes some blocking i/o on the main
thread.

Instead replace with a subtitle message to notify the user that the
folder is inaccessible.
2024-02-09 15:43:43 +00:00
Corey Berla
aae5cd27bd search-locations-dialog: Expose single directory setting
We handle index-single-directories and index-recursive-directories
different, but the user has no idea.  Add a subtitle to clarify
the difference in behavior.
2024-02-09 15:43:43 +00:00
Corey Berla
0268ad08cd search-locations-dialog: Reuse new function 2024-02-09 15:43:43 +00:00
Corey Berla
56d6fd7c2f search-locations-dialog: Correctly handle single directory setting
We wrongly assume that the only directory set to index-single-directories
is the home directory.  Now adays [1] tracker miners defaults home
and downloads to index-single-directories.  This leads to a behavior
where downloads appears to be unindexed (the switch is set to inactive),
but if you set the switch to active you will end up with downloads
in index-single-directories and index-recursive-directories.

Check the index-single-directories (as well as its default value)
to consistently handle this setting correctly.

[1] d97cf22273
2024-02-09 15:43:43 +00:00
Corey Berla
127bd170c2 search-locations-dialog: Set title for non-existent bookmarks
Show the bookmark name, but keep the switch invisible.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1916
2024-02-09 15:43:43 +00:00
Corey Berla
8baa4b159b search-locations-dialog: Stop leaking GError 2024-02-09 15:43:43 +00:00
Matthijs Velsink
8f541d0cff search-locations-dialog: Always show switch for default/bookmarks
However, for Default or Bookmarked locations, the switch is not shown if
the location is not found, but there is no reason to now allow the user
to switch that location of, even if not found.

We therefore now show the switch unconditionally for the Default and
Bookmarked locations. This allows a great deal of code simplification
too, as the file info query is now only used to place a subtitle if it
is not found.
2024-02-09 15:43:43 +00:00
Corey Berla
8568e45d9e search-locations-dialog: Sort entries
A regression from commit f473ec45c7 ("search: introduce the new Search
Locations dialog") causes the entries to be in a random order (as
determined by g_hash_table_get_values()). Previous to this commit,
there was a single listbox sorted by a custom sort func which grouped
XDG folders, bookmarks, and others. Now there's a listbox for each of
those groupings, but only others_list gets the sort func.  Sort each
of the lists, and remove unnecessary code.
2024-02-09 15:43:43 +00:00
Peter Eisenmann
2275ef3be0 search-locations-dialog: ignore on dismissed folder selection 2024-02-09 15:43:43 +00:00
Peter Eisenmann
fda78fa577 search-locations-dialog: handle unset XDG dirs
The user can disable XDG dirs by setting them to the home directory. In
this case `path_from_tracker_dir`returns NULL. Handle this case by
continuing.
2024-02-09 15:43:43 +00:00
Peter Eisenmann
03c1c72c52 search-locations-dialog: remove new()'s parent parameter
The dialog doesn't need to know where it will be shown.
2024-02-09 15:43:43 +00:00
Allan Day
68213ade9f search: Tweak search locations labels
Make it clearer that the search locations are parts of the filesystem.

Fixes #2885
2024-02-08 17:07:58 +00:00
Peter Eisenmann
1b5c556740 search-panel: open dialog with string parameter
Settings is the central place to change search locations. Nautilus wants
to link to it, but since it's a dialog and not a panel, use a parameter
to enable opening search locations directly.
2024-02-07 19:24:17 +01:00
Peter Eisenmann
9c6b5a0b36 search-panel: use clearer dialog function name 2024-02-07 18:19:39 +00:00
Monster
1d13e5852f search: Remove periods in subtitles 2024-02-05 10:58:08 +00:00
Automeris naranja
a3681a50fd search-locations-dialog: Add tooltip to the remove button 2024-01-30 13:44:07 +00:00
Automeris naranja
b1d1302053 general: Remove a11y labels from buttons that have tooltips
Orca also reads tooltips, so having both a11y labels
and tooltips is redundant.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2023#note_1915854
2024-01-30 13:28:48 +00:00
Automeris naranja
50c413e6bb general: Use proper icon in remove buttons of some list rows
window-close-symbolic shouldn't be used in this case.
Use edit-delete-symbolic instead.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2842
2024-01-18 12:08:42 +00:00
Bart Gravendeel
cacc2b5bef Remove use-underline property from all CCListRows 2024-01-04 10:11:35 +00:00
Automeris naranja
7094bf5b13 search-panel-row: Add tooltip to the ellipsis button 2023-11-29 10:12:30 +00:00
Automeris naranja
07d117c789 search-locations-dialog: Add missing mnemonic to the "Add Location" button
Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2541
2023-11-05 17:39:30 -03:00
Automeris naranja
4471d4cec1 search: Add missing mnemonics
Add mnemonics to the following rows:
- App Search
- Search Locations

Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2541
2023-11-05 17:38:22 -03:00
Automeris naranja
4b1147add9 search-locations-dialog: Add ellipsis to the "Add Location" button
"Use an ellipsis (…) at the end of a label if further input or confirmation
is required from the user before the action can be carried out"

https://developer.gnome.org/hig/guidelines/writing-style.html
2023-10-03 14:26:26 +00:00
Felipe Borges
d0d5606e46 search: Fix crash when selecting fodler with a File dialog
Fixes #2645
2023-09-15 08:55:58 +00:00
Alice Mikhaylenko
4680f362f3 Port to AdwNavigationSplitView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
0da63843c9 search: Port to AdwToolbarView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
ee4c5f8115 search: Stop using AdwPreferencesWindow for search locations window
That's not what it's for.
2023-08-02 12:51:48 +00:00
Eric Daigle
a85bc780dc search: fix search panel row movement options
As described in	#2565, the "Move Up" and "Move Down" popover menu options
are currently displayed	for all	search panel rows in the list, doing nothing
if clicked when a row is at the top or bottom of the list respectively.
This commit adds checks when creating and moving the search panel rows
and disables these options at the top and bottom of the list respectively,
removing a useless menu option.

Fixes #2565
2023-07-17 09:19:09 +00:00
Mohammed Sadiq
c22f03e2a6 search: Fix a memory leak 2023-07-03 01:56:24 +00:00
Robert Ancell
bea170c0cd search: Connect signal handlers in swapped form 2023-06-07 09:12:54 +12:00
Maksym Hazevych
05e556077d Use page for description instead of empty group
Use the "description" property of AdwPreferencesPage instead of an empty
AdwPreferencesGroup.
2023-06-06 13:40:33 +00:00
Christopher Davis
d7307b4c7e search: Use GtkFileDialog
The GtkFileChooser interface is deprecaed in favor of GtkFileDialog.
2023-06-06 13:33:29 +00:00
Robert Ancell
ae93ded618 search: Do signal handlers in swapped form 2023-05-30 08:36:22 +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
Automeris naranja
13e4e0c242 general: Set a minimum size for various dialogs
This change prevents some dialogs from being shrunk
to a really small size by setting a minimum size for them.
2023-05-04 09:54:07 +00:00
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
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
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
2f3a0ff306 search: Let users toggle GNOME Settings search provider
This was actually deadcode since commit acd59aec6 aka "The Great
Renaming".

Fixes #1282
2022-12-15 15:57:17 +00:00
Mohammed Sadiq
b2db83b058 search: Use CcListRow for rows with go-next icon 2022-11-25 20:59:14 +05:30
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
32f73d9045 search: Use "action" to connect to Move up/down actions for rows
Using "action-name" wasn't triggering the callback.

Fixes #2013
2022-08-17 09:41:54 +00:00
Lukáš Tyrychtr
9c54390320 Add missing a11y labels and fix accessibility related markup in UI files in the search panel 2022-05-19 12:05:01 +00:00