Commit graph

157 commits

Author SHA1 Message Date
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
Felipe Borges
041a3e92f1 search: Do not allow selecting rows
There is no functionality involving selecting a row here.
2019-08-06 11:59:41 +00:00
Felipe Borges
3f4f43f020 search: Add instructions label
Fixes #454
2019-08-06 11:59:41 +00:00
Felipe Borges
c38d0ed4a0 search: Place "Move" button in each row
This is based on the mockups available at
https://gitlab.gnome.org/Teams/Design/settings-mockups/raw/master/search/search.png

Fixes #591
2019-08-06 11:59:41 +00:00
Felipe Borges
c173424c11 search: Move "Search Locations" button to top bar
Fixes #591
2019-08-06 11:59:41 +00:00
Felipe Borges
db39bd159f search: Make rows reordable with drag and drop
Fixes #589
2019-08-06 11:59:41 +00:00
Felipe Borges
d39cf39fd4 search: Move row into its own object (CcSearchPanelRow)
This decouples the user interface parts from the control logic,
making it easy for designers to tweak the look & feel of the rows.
Besides, it makes it easier to introduce Drag & Drop capabilities.
2019-08-06 11:59:41 +00:00
Felipe Borges
14b9289791 search: Move GtkListBox to .ui file 2019-08-06 11:59:41 +00:00
Mohammed Sadiq
53ba6dcd2e search: Make search locations dialog adaptive 2019-07-26 01:21:27 +00:00
Georges Basile Stavracas Neto
75f150d5a2 shell: Add position to cc_shell_embed_widget_in_header()
So we can control where the widget should be added to. The
main window only supports left and right positions.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/528
2019-05-21 12:59:36 -03:00
Felipe Borges
46ad696890 search: Add shadow to application icons
The new GNOME application icons need a shadow when placed on top
of a light background.

See https://gitlab.gnome.org/GNOME/Initiatives/issues/2
2019-03-13 13:45:59 +01:00
Adrien Plazas
60973f3a82 search: Ellipsize the labels
This will help the window to fit narrow screens even with long
application names.
2018-11-29 00:48:16 +00:00
Adrien Plazas
7679f29a7a search: Use a HdyColumn
This better adapts the panel's size to the window's size, allowing it to
look good on both large and narrow windows.
2018-11-29 00:48:16 +00:00
Robert Ancell
c4a6f7bd54 search: Make .ui filename match the .c filename 2018-11-12 16:41:01 +00:00
Robert Ancell
6e3adb6568 search: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +00:00
Robert Ancell
a64ef75ad7 Simplify use of GCancellable
g_cancellable_cancell can be called without checking for a NULL value.
Use g_clear_object instead of g_object_unref
2018-06-01 21:03:19 +00:00
Robert Ancell
59e420b774 search: Fix crash introduced in 58a6432 2018-05-31 12:16:04 +12:00
Robert Ancell
233111b264 search: Use GtkTemplate 2018-05-30 23:40:00 +00:00
Robert Ancell
58a64323c4 search: Use g_auto for variables 2018-05-30 23:24:21 +00:00
Robert Ancell
17945caef6 search: Replace ifdefs with #pragma once 2018-05-29 21:42:33 +00:00
Robert Ancell
880ac4a89d search: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-29 21:42:32 +00:00