Commit graph

127 commits

Author SHA1 Message Date
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
Christopher Davis
0e2531f500 search: Activate results row switch on click 2022-02-09 13:53:17 +00:00
Christopher Davis
e14847b73f search: Search group fixups
* Set the right accessibility relations, as
AdwPreferencesGroup does not manage it
for custom listboxes

* Handle `keynav-failed` for proper behavior with arrow keys

* Set `selection-mode` to none
2022-02-09 13:53:17 +00:00
Christopher Davis
b4e74d58be search: Use AdwActionRow for locations dialog rows
Gives us consistent styling without needing to set
margins, as well as simple row activation.
2022-02-09 13:53:17 +00:00
Christopher Davis
ddb979abfd search: Use AdwPreferences{Window,Page,Group} for location dialog
Gives us more modern styling for the search locations
window.
2022-02-09 13:53:17 +00:00
Jakub Steiner
13376ecb8b Add individual app icons 2022-01-31 14:08:22 +00:00
Christopher Davis
25b71f6101 search: Adjust row and search group text
Changes the copy of the panel to match the latest mockups.

See d08607e03b/search/search.png
2022-01-26 19:26:49 -08:00
Christopher Davis
b1a17ad10e search: Use GMenuModel and GActions for row menu
GtkModelButton is an implementation detail of GTK.
It should not be used by applications. Instead, we
should use menu models to create menus, which are
consistently styled by libadwaita.
2022-01-26 19:26:49 -08:00
Christopher Davis
41c9d956ae search: Subclass AdwActionRow for CcSearchPanelRow
Also set the `icon-size` to large
2022-01-26 19:26:45 -08:00
Christopher Davis
95c5d443ae search: Move header controls to action rows
Inspired by the bluetooth mockups. According to the
designers, we should move away from switches in header
bars.
2022-01-26 19:02:56 -08:00
Christopher Davis
e5a2281dbe search: Use AdwPreferences{Page,Group} 2022-01-26 19:02:56 -08:00
Georges Basile Stavracas Neto
4300a4a290 panels: Use new CcPanel helpers for title widgets
This should significantly simplify these panels, by not forcing
them to override GObject.constructed all the time. Most panels
were quite straightfoward.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
0ab20af9ba panels: Switch to CcPanel content
Start porting panels to the new panel format. This commit
temporarily makes panels have two titlebar, which will be
fixed soon.
2022-01-20 02:23:42 +00:00
Jan Beich
37b29c32cb meson: drop unused argument for i18n.merge_file()
Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0.

panels/applications/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/background/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/camera/meson.build:10:5: ERROR: Function does not take positional arguments.
[...]
2022-01-07 17:22:43 +00:00
Christopher Davis
981a8cea7b panels: Use .boxed-list instead of .content
The `.content` style class is deprecated in favor
of the `.boxed-list` style class, which is named
after the design pattern it's used for.
2021-12-16 12:52:44 -08:00
Georges Basile Stavracas Neto
26630338ba search: Port to GTK4
This one was the first panel ported that used Drag n' Drop, and
we can see how much of an improvement GTK4 is compared to GTK3
when handling DnD.
2021-12-14 22:34:21 -03:00
Mohammed Sadiq
453eb3adaf search: Use content style for listboxes 2021-05-19 03:25:47 +00:00
Carlos Garnacho
27e1140c9d search: Check for either tracker 2.x or 3.x schemas
The Tracker3 schema points to the same dconf path and is backwards
compatible with Tracker 2.x settings. Check for either here, with a
preference to Tracker 3.x.

Eventually, Tracker 2.x will be fully phased out, and this will not
be necessary.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1173
2020-11-02 21:47:22 +00:00
Adrien Plazas
f06379e30c Replace HdyColumn by HdyClamp
In libhandy 1, HdyClamp replaces HdyColumn. This stops setting values
when they match HdyClamp's defaults.
2020-07-20 08:04:28 +02:00
Adrien Plazas
9e2a2836d9 Use GtkDialog instead of HdyDialog
HdyDialog has been dropped in libhandy 1.
2020-07-20 08:04:28 +02:00
Robert Ancell
93b14a4339 panel: Move shared GCancellable code into panel class
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
2020-02-03 09:36:24 +13:00
Felipe Borges
5c679301ec search: Invalidate "Search Locations" list when folders can't be found
We store the list of "Search Locations" in a gsetting. When a location
gets added and then removed, the gsetting still stores its path.

These changes verify the existance of a file before loading it in the UI,
and also removes the path from the gsetting when the location can't
be found.

Fixes #812
2019-12-17 22:16:08 +00:00
Felipe Borges
dadc7cb252 search: Preserve row switch state while dragging
While dragging a row in order to reoder the search list, we create
a fake copy of the row that gets dragged into the position where
the user wants the row to be in. This fake row should have its
switch matching the state of its master copy.

Fixes #810
2019-12-15 21:31:46 +00:00
Felipe Borges
8438d1582c search: Make rows and its elements reachable via keyboard
Fixes #329
2019-11-17 22:51:56 +00:00
Iain Lane
b5ff6d1b21
cc-search-locations: Use g_new0 instead of the slice allocator 2019-10-30 16:07:18 +00:00
Iain Lane
2c8cce0dcc
search: Factor out creation of Place objects.
If we always construct these objects via a constructor, then we can help
to avoid bugs like that fixed by
2fb0ff250b.
2019-10-30 16:07:14 +00:00
Mohammed Sadiq
2fb0ff250b search: Fix crash on clicking 'Search Locations'
When creating a Page, the dialog variable wasn't set and thus
dereferencing a NULL in a later code resulting a crash.

This was introduced in 14b9f65ba4
2019-09-19 22:45:23 +05:30
Robert Ancell
8855254486 search: Make .ui filename match the .c filename 2019-09-09 21:58:00 +00:00
Robert Ancell
97985a664e Remove unused GNOMELOCALEDIR defines 2019-09-09 21:45:53 +00:00
Robert Ancell
14b9f65ba4 search: Remove global variable that could get leaked
Tracker GSettings were previously stored in a global variable. This
seems to have been done to avoid difficulty passing the settings via
callbacks. Global variables are easy to leak and make mistakes with.

Update the code to have better callback handling so the variable can
be stored inside the object.
2019-08-26 11:57:53 +00:00
Felipe Borges
31e34cfe2e search: Add description label to Search Locations Dialog 2019-08-06 11:59:41 +00:00