Commit graph

91 commits

Author SHA1 Message Date
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
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
Piotr Drąg
7265bd53a0 Add translator comments to .desktop files
Icons are confusing translators, and gettext
is unlikely to get fixed any time soon.
2018-02-23 18:49:35 +01:00
Iñigo Martínez
0dd386f405 build: Migrate from Intltool to Gettext
Recent versions of Gettext are able to translate several formats
that are used in GNOME applications. This patch migrates from
Intltool to Gettext by using meson's i18n features.

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-23 10:49:31 +01:00
Iñigo Martínez
dc0988d47c build: Remove autotools
To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-18 12:20:08 +01:00
Piotr Drąg
b65e31323a panels: Remove soft hyphens from .desktop files
With the old shell gone, there is no need to work around cut off panel
names (bug #647087). As it stands now, it only confuses translators
(invisible characters are hard to, well, see).

https://bugzilla.gnome.org/show_bug.cgi?id=792629
2018-01-18 00:12:04 -02:00
Iñigo Martínez
32edd6789e build: Port to meson build system
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:35 -02:00
Georges Basile Stavracas Neto
b23ef59926 shell-model: Remove old categories
Since we don't maintain two different shells anymore, there
is no need to maintain the two different sets of categories
in the desktop files.

This commit also drops the "#ifdef CC_ENABLE_ALT_CATEGORIES"
blocks, since the previous commit removed that define.

https://bugzilla.gnome.org/show_bug.cgi?id=790923
2017-11-28 17:03:51 -02:00
Rui Matos
99f26e4d0b search: Set a minimum height to avoid toplevel being resized too small 2017-08-28 18:58:05 +02:00
Jonathan Kang
a108ee19b9 search: don't allow horizontal scrolling
Set hscrollbar_policy property of GtkScrolledWindow to never to
disable horizontal scrolling.

https://bugzilla.gnome.org/show_bug.cgi?id=785397
2017-08-28 18:58:05 +02:00
Allan Day
8a8e53ab8a Standardize vertical spacing of panels
Ensure that the vertical spacing inside each panel is similar.
This makes the transition between each panel smoother and makes
the control center feel more cohesive.

Settings panels are given 32px above and below their content
and 32px vertical space between major sections. 12px space is
placed below headings.

Bluetooth, displays and printers are not addressed.

https://bugzilla.gnome.org/show_bug.cgi?id=786384
2017-08-20 18:38:42 +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
Georges Basile Stavracas Neto
f7bdd3c969 panels: Minor adjustments for the new shell 2017-08-09 19:31:41 +02:00
Rui Matos
f32b305a1a search: Fix a GFile leak
https://bugzilla.gnome.org/show_bug.cgi?id=783885
2017-06-19 11:31:06 +02:00
Mohammed Sadiq
38ac1d1d76 search: Fix memory leak
The container returned by g_variant_get_strv() should be
freed with g_free().

https://bugzilla.gnome.org/show_bug.cgi?id=783885
2017-06-19 11:23:42 +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