Commit graph

45 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
880ac4a89d search: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-29 21:42:32 +00:00
Benjamin Berg
c2f601a9d4 Move common panel code from shell/ to panel/common
This creates a new static library called libwidget which the shell links
against.
2018-04-17 15:26:59 +02:00
Allan Day
c7fea8894f Give search and notifications consistent row layouts
The search and notification panels have similar list rows,
as they both list applications. This gives the list rows more
consistent layouts - application icons are made to be 32px
throughout and row heights are made to be the same.

Note that the row widths are unfortunately still different.

https://bugzilla.gnome.org/show_bug.cgi?id=786384
2017-08-20 18:38:23 +02:00
Mohammed Sadiq
a09a5d7e9e search: Fix memory leak
g_variant_get_strv() returns newly allocated memory.
This should be freed when no longer required.

https://bugzilla.gnome.org/show_bug.cgi?id=782048
2017-05-02 12:54:37 +02:00
Felipe Borges
f14829c38c search: Use list box separators between entries
https://bugzilla.gnome.org/show_bug.cgi?id=775958
2017-04-29 13:39:22 +02:00
Felipe Borges
a0dccafaa2 search: Place the whole content in a scrolled window
A step towards the new panel design is to place all
the panel content inside of a scrolled window, instead
of just the list box.

The new panel mockups are available at
https://wiki.gnome.org/Design/SystemSettings/Search

https://bugzilla.gnome.org/show_bug.cgi?id=775958
2017-04-29 13:39:22 +02:00
Bastien Nocera
8a4cf8345a search: Better debug output when ignoring search providers
So that running with debug is enough to know why a search provider was
ignored.
2016-11-24 16:56:20 +01:00
Felipe Borges
f473ec45c7 search: introduce the new Search Locations dialog
https://wiki.gnome.org/Design/SystemSettings/Search

https://bugzilla.gnome.org/show_bug.cgi?id=766513
2016-05-30 15:22:44 +02:00
Cosimo Cecchi
3432b5b8c4 search: force GTK_ICON_SIZE_DIALOG icon size
Force a pizel size too, so that we can work around applications not
shipping icons at all sizes.

https://bugzilla.gnome.org/show_bug.cgi?id=764297
2016-04-21 12:34:50 +05:30
Cosimo Cecchi
0a7b552d93 search: use g_get_system_data_dirs() to discover providers
Currently, the search panel looks for search providers in
DATADIR/gnome-shell/search-providers. This won't work when providers are
located in a different directory which is still part of XDG_DATA_DIRS,
which is a valid use case and supported by gnome-shell.

This commit refactors the loader code to scan all the directories
upfront in a separate thread.

https://bugzilla.gnome.org/show_bug.cgi?id=739148
2014-10-27 09:44:51 -07:00
Giovanni Campagna
9b364dfdfc search: add support for default disabled search providers
Search providers that should be disabled by default come with
a DefaultDisabled=true key in their keyfile, and are enabled
with the "enabled" whitelist, not with the "disabled" blacklist.

https://bugzilla.gnome.org/show_bug.cgi?id=734109
2014-08-15 14:46:47 +02:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Rui Matos
96b9111865 search: Remove unused toplevel window from .ui file
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:03 +02:00
Yosef Or Boczko
2ebf5e7dd3 search: Fix stretched header bar switch
and add padding of 4px

https://bugzilla.gnome.org/show_bug.cgi?id=703974
2013-07-19 16:29:45 +03:00
Alexander Larsson
a46a652093 search: Convert to GtkListBox
https://bugzilla.gnome.org/show_bug.cgi?id=702164
2013-07-02 16:19:09 +01:00
Giovanni Campagna
1627fddb18 search: fix moving unsorted applications
Search providers can either have an explicitly configured sort order,
or be in the default alphabetical order based on their name.
Previously, when moving we would always assume that all providers had
a sort order, so moving an unsorted provider would put at the top.
The right thing to do, instead, is to walk the list in visual order
and assign an appropriate sort order, that is then flushed to gsettings.

https://bugzilla.gnome.org/show_bug.cgi?id=694975
2013-04-02 21:45:47 +02:00
Giovanni Campagna
3969c81c24 search: don't keep the last panel last in the sort order
Previously, we kept the last panel in the configured order last,
after non configured ones.This would assign a sort order to the last
panle that would place it in the middle, but visually sort it last,
and that caused problems when moving it (it would jump into an apparently
random position in the middle, according to the sort ID, and would
move the nearby provider too).

https://bugzilla.gnome.org/show_bug.cgi?id=694975
2013-04-02 21:45:47 +02:00
Giovanni Campagna
48553a06f3 search: special case gnome-control-center
Settings search is special in the shell, because it's not configurable
and it is always at the top, so hide it from the search panel.

https://bugzilla.gnome.org/show_bug.cgi?id=694101
2013-02-18 16:48:01 +01:00
William Jon McCann
c398090414 search: Don't use a label for the enabled switch
https://bugzilla.gnome.org/show_bug.cgi?id=689611
2013-02-18 16:40:45 +01:00
Cosimo Cecchi
28b6974b83 search: use a GResource for GtkBuilder UI definition
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:16 +01:00
Bastien Nocera
3686cf7eb8 shell: Make all control-center plugins static
This makes loading faster, with less I/O, avoids unnecessary
code duplication (around 1k lines shaved), and ensures that
all the panels link and work appropriately.

By the same token, it will stop external panels from being
created, and loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=690036
2012-12-11 17:07:39 +01:00
Cosimo Cecchi
2ad13d89f3 search: make options insensitive if tracker is not available
Instead of either hard-depending on Tracker being installed, or crashing
when the Tracker GSettings schema is not found, make the configuration
insensitive if the schema is not available.

https://bugzilla.gnome.org/show_bug.cgi?id=687490
2012-11-27 12:33:00 +01:00
Cosimo Cecchi
defe92ec34 search: add a dialog to configure Tracker search locations
Ideally applications could configure Tracker independent from each
other, but we don't have such a feature currently.
In the meanwhile, bring up a settings dialog that can allow
configuration of the locations indexed by the Tracker files miner, as
suggested by the current design.

https://live.gnome.org/Design/SystemSettings/Search

https://bugzilla.gnome.org/show_bug.cgi?id=687490
2012-11-27 12:33:00 +01:00
Cosimo Cecchi
7ab2d5073d search: add a panel to configure search providers
The panel lists all the search providers registered on the system, and
allows to reoder or disable them, or disable the search providers
feature entirely.

The panel will also allow configuration, for which a first
implementation will be added in a separate commit.

https://live.gnome.org/Design/SystemSettings/Search

https://bugzilla.gnome.org/show_bug.cgi?id=687490
2012-11-27 12:33:00 +01:00