Commit graph

574 commits

Author SHA1 Message Date
Carlos Garnacho
d51336c2c2 wacom: Port calibrator UI to GTK+
Same dog, different collar. The UI has been ported 1:1 to GTK+, using
GtkBuilder, CSS and event controllers fairly reduced the amount of code
needed for this.

It also allows us to stop initializing clutter-gtk across the several
executables.
2018-11-07 23:02:10 +00:00
Robert Ancell
c0f41daff0 shell: Remove the lock button from the shell
Only the date time panel used it, all other panels add their own shell using
cc_shell_embed_widget_in_header which was added after the date time panel was
written. Update the date time panel to use this method.
2018-10-18 00:25:40 +00:00
Robert Ancell
58d5c9411d shell: Remove AppMenu
https://wiki.gnome.org/Initiatives/GnomeGoals/AppMenuRetirement
2018-10-17 22:14:27 +00:00
Robert Ancell
f3e642da56 shell: Drop unused no-show-all properties 2018-10-11 22:21:34 +00:00
Corentin Noël
a6acc98371 common: fix some wrong autofree uses
g_autofree an array only g_free the first element, GStrv is the string array type.
2018-10-11 14:50:38 +13:00
Georges Basile Stavracas Neto
94f00aecf9 object-cache: Fix function documentation name 2018-09-25 21:02:11 -03:00
Georges Basile Stavracas Neto
2987b7bf5e object-cache: Add more debug messages
Enough to ask users to run Settings with "G_MESSAGES_DEBUG=all"
and get some meaningful output.
2018-09-25 21:01:14 -03:00
Georges Basile Stavracas Neto
3668140dd3 object-cache: Assert task_data before using it
It is not useful to assert that task_data != NULL after
using it to build the D-Bus key.

Move the assertion to before it is first used and get
rid of this inconsistency.
2018-09-25 20:46:22 -03:00
Georges Basile Stavracas Neto
7f5b5d6060 object-cache: Declare singleton instance as static
Otherwise, it is visible for other compile units. This
is a theoretical problem though, there's nothing wrong
happening right now.
2018-09-25 20:45:12 -03:00
Andrea Azzarone
d7857c113a object-storage: Check for cancellation before resulting in assert failure
As per doumentation: "It is a programming error to create an identical proxy
while asynchronously creating one. Not cancelling this operation will result in
an assertion failure when calling cc_object_storage_create_dbus_proxy_finish()."
In order to fullfill the second part we need to check for errors (including
cancellation ones) before we generate an assertion failure.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/158
2018-09-25 17:12:18 +02:00
Sam Hewitt
e6efc207e6 project: update desktop.in to reference new icon name 2018-09-12 21:30:52 +00:00
Florian Müllner
d5de9d86c9 model: Convert panel icons to symbolic variants if possible
Panel icons should be consistent between the app and corresponding
search results in GNOME Shell, but currently the former uses the
symbolic variant while the latter uses the colored version.

Address this by converting icons to their symbolic variants when
building the model rather than later when consuming them.

https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/151
2018-07-29 21:45:38 +00:00
Georges Basile Stavracas Neto
a8673b06c7 shell: Rename .ui files to match .c files
To keep it clean and well organized, rename the .ui files
(window.ui and panel-list.ui) to have the 'cc-' prefix and
match their .c counterparts.
2018-07-18 21:34:09 +00:00
Georges Basile Stavracas Neto
72924c6aba project: Remove unused files
The CcShellCategoryView and CcShellItemView were
residuals from the old shell there managed to stay
around unoticed.

Remove them from the project.
2018-07-15 10:59:27 -03:00
Sam Hewitt
b5f14731ba shell: update pixel_size of empty_search_placeholder icon to avoid aliasing 2018-07-10 18:02:18 -04:00
Bastien Nocera
0e2a4aa2d6 wacom: Hide Wacom panel when there are no tablets
Use GsdDeviceManager to monitor libwacom-supported tablets coming and
going. Hide the Wacom panel from the list when there's no supported
tablets plugged in.
2018-06-20 12:53:11 +00:00
Georges Basile Stavracas Neto
c89a919536 window: Remove unused panel box
Whenever a panel is activated, there is a GtkBox that
is added between the window and the panel itself.

Investigating the history of this field, it originally
appeared at ec7f8c9b when the window started using
widgets rather than page numbers. Apparently, it was a
GtkBox to help dealing with the GtkNotebook (which was
later changed to the current GtkStack).

The field was renamed from 'current_panel' to 'current_panel_box'
at ab435aa9. But since the transition to GtkStack, there
is no real need to use the GtkBox anymore.

This patch removes this GtkBox, and as a consequence, the
code is slightly simplified.
2018-06-18 11:33:02 -03:00
Georges Basile Stavracas Neto
6d3ed43e74 window: Remove custom widgets at the correct time
The correct time to remove custom widgets is precisely
after we checked if the panel can be activated, and before
creating the panel. We were not following that, and it was
causing the panels with header widgets to never actually
show their custom widgets.

Fix that by calling remove_all_custom_widgets() at the
correct point in panel creation.
2018-05-29 20:46:03 -03:00
Georges Basile Stavracas Neto
1d8faa2a73 window: Instrument some functions
This will help in debugging.
2018-05-29 20:44:21 -03:00
Georges Basile Stavracas Neto
f4b630030c panel-list: Properly select panels when changing views
When moving from and to different views, the first row
might be activated due to focus going to the listbox. This
wasn't a problem before because we couldn't hit that code
path, but now we can.

Fix that by always selecting the first visible row.
2018-05-29 19:20:44 -03:00
Georges Basile Stavracas Neto
62cfe91689 panel-list: Improve search behavior
There are a couple of small problems with the search
behavior here. First, if we select a panel from search
and leave it, it will continue to stay there forever.
Second, if panels change their visibility status during
runtime, the panel list wouldn't respond accordingly.
2018-05-29 18:03:05 -03:00
Georges Basile Stavracas Neto
a461045f37 window: Don't remove header widgets before changing panels
When changing panels, CcWindow can only remove the previous
panel's header widgets after making sure the new panel was
successfully set.

However, this is not the case, and when the current panel
fails to be set, the previous panel's header widget is
removed.

Fix that by waiting to remove the header widgets until the
panel is successfully set.
2018-05-29 16:09:51 -03:00
Georges Basile Stavracas Neto
4151af5ea2 wifi: Hide when no Wi-Fi adapter is available
It's WIP.
2018-05-29 16:09:51 -03:00
Georges Basile Stavracas Neto
10cf920fef panel-loader: Add support for static init functions
Static init functions are functions that initialize resources
or monitor daemons without needing any contextual information,
such as a CcPanel instance or access to a CcShell implementation.

These functions are meant to be used for monitoring a panel's
visibility, when it makes sense. Usually, panels that represent
hardware that potentially is not available or is not supported
should hide itself.

Following this commit, the Wi-Fi panel panel will be adapted as
the first user of this new API. Other panels that require this
functionality will be adapted later.
2018-05-29 16:09:51 -03:00
Georges Basile Stavracas Neto
a78cbe3963 model: Add visibility field
This field can be used to communicate the visibility of the
panel from a static context (i.e. without any instances of
a CcPanel nor any access to CcShell).
2018-05-29 16:09:51 -03:00
Georges Basile Stavracas Neto
489a7ae5dd window: Delegate model creation to CcApplication
In order be able to modify panel information statically,
we need to have access to the CcShellModel from static
functions. CcApplication, thus, is a better place for the
model to live, since we can access it outside any scope
using g_application_get_default().

It also makes sense from the modeling point of view, since
the model is not tied to the shell anymore.
2018-05-29 16:09:49 -03:00
Georges Basile Stavracas Neto
b261bcaf99 panel: Update code style
This is just an almost-trivial commit that ports
CcPanel to use the latest code practices around.
2018-05-29 16:07:04 -03:00
Georges Basile Stavracas Neto
6b334a8a00 window: Fix going back to previous panels
This never really worked on the new Setting layout
because it was historically implemented as "Back to
Overview", and we don't have an overview anymore.

This is fixed by morphing the implementation to be
"Back to previous panel", which forces us to actually
store the previous panel.
2018-05-28 22:23:35 -03:00
Georges Basile Stavracas Neto
52469cec7c window: Remove remaining overview mentions
There is no overview anymore -- Settings is always
visualizing a panel at any given time.

I just noticed that the Alt+Left shortcut was always
broken too. This will be fixed in a following commit.
2018-05-28 22:07:49 -03:00
Jeremy Bicha
f109289538 Revert "shell: make the .desktop file pass "--overview""
This reverts commit 94aeba51e3.

We actually do want to see the last panel opened
2018-05-29 00:46:01 +00:00
Georges Basile Stavracas Neto
50094b45a6 window: Warn about development builds
With this commit, a message dialog pops up whenever a
development build runs. This is meant to actually annoy,
so that we're always reminded that things may not work
as expected.

Since the dialog can be dismissed with a single button
press, it is not the end of the world. But people still
should be aware that Settings is ~not~ meant to run with
Flatpak, and that this is a development tool only.
2018-05-14 18:24:03 -03:00
Andrea Azzarone
6ec0bcde15 object-storage: Avoid double free when propagating error
In cc_object_storage_create_dbus_proxy_sync and
cc_object_storage_create_dbus_proxy_finish we need to use g_steal_pointer to
make sure local_error is not double freed.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/86
2018-05-10 00:56:19 +02:00
Georges Basile Stavracas Neto
af0186aaf9 project: Update meson files
I probably have OCD. Seeing these files
with this poor alignment gives me physical
pain.
2018-05-03 00:45:29 -03:00
Georges Basile Stavracas Neto
36af5e51d1 shell-model: Remove boilerplate and update code style 2018-05-02 23:11:48 -03:00
Georges Basile Stavracas Neto
16f06665dd window, shell-model: Silence warnings
A fallback from the previous commit.
2018-05-02 22:34:23 -03:00
Benjamin Berg
aec8c911bb shell: Add static shell library for testing purposes
Export shell functionality which panels may require for testing purposes
into a static library.
2018-05-02 22:29:31 +00:00
Benjamin Berg
f547d9129d shell: Only try to select an existing panel on startup
When selecting the panel on startup based on the "last-panel" settings,
we need to make sure that the panel exists.

Note that this is a special case which does not use the internal
set_active_panel_from_id API. Using it is currently not possible because
the API does not report back the error and we would end up not selecting
any panel.
2018-04-30 14:02:25 +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
Benjamin Berg
e1593b3c02 shell: Remove CcEditableEntry, it is not used anywhere 2018-04-17 14:59:31 +02:00
Christian Kellner
25a302ae98 thunderbolt: move to the 'Devices' page
The 'Devices' page is a fitting place for the thunderbolt, being
an IO technology. It is expected that people that need to go to
that page will be sent there via a gnome-shell notification, so
there is no need for it to be on the main page.
Ok'ed by the design team (jimmac).
2018-04-13 16:03:21 +02:00
Christian Kellner
47f241b10c thunderbolt: new panel for device management
Thunderbolt devices need to be approved before they can be used.
This is done via the boltd system daemon and gnome-shell. The new
panel enables the user to manage thunderbolt devices, i.e.:

 - forget devices that have previously been authorized
 - authorize currently unauthorize devices

Additionally authorization of devices an be temporarily disabled
to ensure no evil device will gain access to the computers
resources.

File starting with "bolt-" are copied from bolt's source tree
and currently correspond to the bolt upstream commit with the id
f22b1cd6104bdc2b33a95d9896b50f29a141b8d8
They can be updated from bolt via the update-from-bolt.sh script.
2018-04-13 15:08:16 +02:00
Christian Kellner
2889ab03b2 shell: Icon name helper returns symbolic name
The helper function to get the icon name from a GIcon directly
returns the symbolic icon now. This makes it in turn possible
to also directly check if the theme has the icon with the symbolic
name instead of checking of for the full colored one and then
deriving the symbolic name from that. The latter (old) practice
will fail if there is a symbolic icon in the theme that has no
full color icon (like e.g. thunderbolt).
2018-04-10 09:47:48 +02:00
Christian Kellner
51a1229111 shell: Don't set per-panel icon
The control center app is considered one single application with
a single icon to represent it. Therefore get rid of per-panel
icons.
2018-04-10 09:43:22 +02:00
Georges Basile Stavracas Neto
02b0d5931c debug: Fix copy-pasta mistake
Now people now where did I copied it from!
2018-04-07 18:49:39 -03:00
Georges Basile Stavracas Neto
1187f147af log: Reimplement logging and debugging
This commit replaces the old rudimentary log handler
by a shinier version of it. It also introduces the
debugging macros that I usually add to the apps,
including the CC_TRACE_MSG() macro for tracing.
2018-04-06 23:18:26 -03:00
Georges Basile Stavracas Neto
85296f1eba trivial: Code style improvements 2018-04-06 22:23:39 -03:00
Georges Basile Stavracas Neto
083e7bdae6 object-storage: Introduce CcObjectStorage
CcObjectStorage is a cache for GObjects. It is meant to
store objects that are too expensive to be often created,
such as NMClient, GoaClient or D-Bus proxies.

CcObjectStorage has a very strict usage pattern. It is a
programming error to add an object that is already stored,
and so it is to retrieve an object that was not stored.
Stored objects are meant to be kept alive during the whole
lifetime of GNOME Settings, and CcObjectStorage takes a
reference on every stored object to achieve that.

If objects are destroyed while they are cached, it means
we have a reference mismanagement somewhere. In this sense,
CcObjectStorage will act Sam Sheepdog taking care of sneaky
wolves trying to steal their sheep-references.

Next patches will make various panels and objects around
GNOME Settings adopt this new API, and make sure they always
disconnect when destroyed.
2018-04-06 22:23:38 -03:00
Georges Basile Stavracas Neto
1367a8c083 window: Profile panel creation times 2018-04-06 22:23:38 -03:00
Jeremy Bicha
5ac87d3f18 appdata: Add UserDocs & HighContrast kudos
https://github.com/GNOME/gnome-software/blob/master/doc/kudos.md

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/14
2018-03-24 20:17:16 +00:00
Georges Basile Stavracas Neto
a1bace4683 build: Drop libgd
Settings does not use libgd.
2018-03-16 15:55:10 -03:00