Commit graph

224 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
acd59aec65 Rename app-id to org.gnome.Settings
Rename the app-id to org.gnome.Settings since this is what
we've been calling it for many years now. Adjust all files
that derive from the app-id, such as the desktop file, D-Bus
service file names, search providers, GSettings schemas, to
match that.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/344
2022-01-21 13:08:50 +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
Georges Basile Stavracas Neto
e38949aeed online-accounts: Adjust style of symbolic provider icons
As per design feedback, make symbolic icons have a rounded
background.
2022-01-17 19:42:10 -03:00
Georges Basile Stavracas Neto
946417990c online-accounts: Port to GTK4
This is a massive rewrite of the panel. Because we can't have
nice things and WebKit2GTK for GTK4 won't be ready in time,
rework the panel to spawn a new subprocess with a dialog that
handles online accounts - both creation and editing.
2022-01-17 19:42:10 -03: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
Felipe Borges
4fa6852cdc online-accounts: Present all supported providers at once
Instead of having the "more" button which reveals more items to the
providers list.

We still list branded providers above non-branded providers in the
list.

Fixes #1072
2021-04-08 12:34:44 +00:00
Robert Ancell
83d3724ff6 online-accounts: Replace g_object_new with gtk widget methods
This improves compile time type checking.
2020-10-19 04:07:53 +00:00
Robert Ancell
3b9954ab37 online-accounts: Use panel cancellable for GOA operations 2020-08-07 02:36:16 +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
Robert Ancell
e32702ee87 online-accounts: Use g_autoptr for GError usage
Fixes a GError leak.
2020-04-17 14:57:40 +12:00
Robert Ancell
ece1911f40 online-accounts: Replace GtkStack child names with widget references
The child names are easier to break if widgets are changed - this can't be
detected by the compiler.
2020-03-30 02:13:43 +00:00
Robert Ancell
97ac89b88f online-accounts: Use GTK widget types 2020-03-30 02:13:43 +00:00
Robert Ancell
d2e96ff90f online-accounts: Remove markup from translatable strings 2020-01-06 16:57:43 +00:00
Robert Ancell
df85304107 online-accounts: Replace ifdefs with #pragma once 2019-11-27 21:56:10 +00:00
Robert Ancell
19ccad96ae Whitespace fixes for g_autoptr coding style 2019-11-08 09:42:10 +13:00
Andrea Azzarone
c6776a7be6 online-accounts: Don't segfault if get_all_providers_cb is called during init
Due to an API bug in GNOME Online Accounts, the asynchronous
goa_provider_get_all method doesn't accept a GCancellable argument. This makes
it difficult to cancel an ongoing call when the CcGoaPanel gets destroyed.

This was hacked around by taking a reference on the panel for the duration of
the call. Instead of cancelling a pending call on destruction, it would keep the
panel alive until the call was over.

The hack does not consider the case get_all_providers_cb is called while the
panel is still being initialized. E.g. this happen when create the panel passing
the paramenters "add <provider>" because the constuct properties are set just
after cc_goa_panel_init returns and because goa_provider_add_account will result
in a call to g_main_context_iterate (caused by gtk_dialog_run).

In order to work around this we can call goa_provider_get_all in _constructed()
after all construct properties have been set.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/401
2019-09-10 10:29:43 +12:00
Robert Ancell
97985a664e Remove unused GNOMELOCALEDIR defines 2019-09-09 21:45:53 +00:00
Robert Ancell
a3b2725dfa online-accounts: Fix widgets added by GOA being invisible
Fixes #362
2019-03-22 16:28:44 +13:00
Felipe Borges
ef73a423d7 online-accounts: Add shadow to providers icon
The new icons are flat and are more legible with a shadow, just
like the new GNOME application icons.

See https://gitlab.gnome.org/GNOME/Initiatives/issues/2
2019-03-13 13:47:34 +01:00
Jeremy Bicha
a9d6ed149b online-accounts: Set label relationship for listboxes
Set the label relationships so that screen readers
read the headers for the listboxes.
2019-01-10 11:53:00 +00:00
Adrien Plazas
e76fca5e6e online-accounts: 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
851cdc8eb3 online-accounts: Wrap the header label
This will help the window to fit narrow screens.
2018-11-29 00:48:16 +00:00
Adrien Plazas
0d901e086d online-accounts: Remove a hardcoded minimum width
This will help the window to fit narrow screens.
2018-11-29 00:48:16 +00:00
Adrien Plazas
8c92368e7c online-accounts: 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
39e0396fd6 online-accounts: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-18 01:18:57 +00:00
Debarshi Ray
5579314a38 online-accounts: Track the lifecycle of CcGoaPanel across async calls
Due to an API bug in GNOME Online Accounts, the asynchronous
goa_provider_get_all method doesn't accept a GCancellable argument.
This makes it difficult to cancel an ongoing call when the CcGoaPanel
gets destroyed.

Prior to commit c26f8ae018, this was hacked around by taking a
reference on the panel for the duration of the call. Instead of
cancelling a pending call on destruction, it would keep the panel alive
until the call was over. However, that was lost during commit
c26f8ae018.

One thing to bear in mind is that GtkWidgets, CcGoaPanel is one, can
be destroyed by a gtk_widget_destroy call, which is subtly different
than a simple sequence of g_object_unref calls. When gtk_widget_destroy
is used, it invokes the GObject::dispose virtual method of the widget.
It is expected this will cause anything holding a reference to this
widget to drop their references, leading to GObject::finalize being
called. However, there is no guarantee that this will happen in the
same iteration of the GMainLoop. Therefore, it is possible that when
the goa_provider_get_all call finishes, the CcGoaPanel might be in a
disposed, but not yet finalized state.

When a GObject is in a disposed-but-not-finalized state, only a very
limited number of operations can be performed on it. Its reference
count can be altered, the memory used by the instance struct can be
accessed, but none of the member GObjects can be assumed to be valid.
eg., it's definitely illegal to add new rows to the member GtkListBox.
Hence a boolean flag is used to mark the destroyed state of the panel.

This second part is a small improvement over the earlier hack.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/208
2018-10-05 11:20:37 +02: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
Andrea Azzarone
d918b02c1f online-accounts: Complete account removal in cc_goa_panel_finalize()
When removing an online account, gnome-control-center gives the user
the possibility to undo the action showing an "undo notification".
Right now if you close the gnome-control-center window, without dismissing
the notification, the online account will not be properly removed.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/25
2018-03-27 21:09:46 +00:00
Georges Basile Stavracas Neto
a1bace4683 build: Drop libgd
Settings does not use libgd.
2018-03-16 15:55:10 -03:00
Andrea Azzarone
3aa89a836a online-accounts: Restore the "add" command
This reverts parts of commit 5a04e40fef
that don't use goa_provider_set_preseed_data.

https://bugzilla.gnome.org/show_bug.cgi?id=794012
2018-03-05 17:48:26 +01: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
Iñigo Martínez
d7012d0337 build: Move libgd and gvc modules to subprojects
In order to share the libgd and gvc modules between autotools and
meson, this patch moves their directories to subprojects
directory and updates autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 19:02:57 -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
Debarshi Ray
5a04e40fef Revert "online-accounts: Accept requests for account creation on ..."
It's been more than four years and nobody ended up using this feature.
However, the extra cookie management that's necessary to implement this
feature has now exposed code, which people actually use, to a
WebKitGTK+ bug that's taking quite some time to be fixed. Therefore,
this is a good an excuse as any to remove this code.

This reverts commit 8762e2f8dc

https://bugzilla.gnome.org/show_bug.cgi?id=789469
2017-10-25 12:34:45 +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
Georges Basile Stavracas Neto
a9bf8b5b04 online-accounts: Fix parameter parsing
The Online Accounts panel supports two commands: 'add'
and 'show-account'. The 'add' command must receive an
additional parameter, the 'provider' name, and an
optional 'preseed' parameter.

In the past, Settings would just push all the parameters
to a GVariant and pass to the panels. Now, however, it
skips the first one, making the parameter parsing code
in Online Accounts panel wrong.

This patch fix that by refactoring add_account() code,
and fixing the GVariant parameter parsing.
2017-08-19 11:31:18 -03:00
Georges Basile Stavracas Neto
7ccfa25b47 online-accounts: Fix crash after aborting web view and changing panels
The panel owns both the GtkDialog, and the GoaProvider that is used
with the dialog during goa_provider_add_account. When the panel is
destroyed, it drops its references to the provider but not the dialog,
which is a separate top-level widget. Therefore, if the panel is
switched while the WebKitWebView inside the dialog was still
navigating across pages, then WebKitWebView::decide-policy will be
called with an invalid provider.

To avoid this, and a memory leak, the panel should also destroy the
dialog when it is itself getting destructed.

Note that since the GtkDialog is a template child, it must be
destroyed in dispose. GtkWidget's (ie. the panel's) default default
destroy signal handler NULLifies all template children pointers, so
finalize is too late.

https://bugzilla.gnome.org/show_bug.cgi?id=782043
2017-08-17 21:29:15 +02:00
Debarshi Ray
115a1323b4 Revert "online-accounts: Fix crash after aborting web view ..."
I pushed it by mistake. The GtkDialog needs to be destroyed in
dispose, not finalize.

This reverts commit 60cf7f6b27.

https://bugzilla.gnome.org/show_bug.cgi?id=782043
2017-08-17 21:28:59 +02:00
Georges Basile Stavracas Neto
60cf7f6b27 online-accounts: Fix crash after aborting web view and changing panels
The panel owns both the GtkDialog, and the GoaProvider that is used
with the dialog during goa_provider_add_account. When the panel is
destroyed, it drops its references to the provider but not the dialog,
which is a separate top-level widget. Therefore, if the panel is
switched while the WebKitWebView inside the dialog was still
navigating across pages, then WebKitWebView::decide-policy will be
called with an invalid provider.

To avoid this, and a memory leak, the panel should also destroy the
dialog when it is itself getting destructed.

https://bugzilla.gnome.org/show_bug.cgi?id=782043
2017-08-17 20:05:16 +02:00
Debarshi Ray
ebdaa85ba4 online-accounts: Increase the spacing above the "Remove Account" button
https://bugzilla.gnome.org/show_bug.cgi?id=779368
2017-05-31 16:38:16 +02:00
Georges Basile Stavracas Neto
e63accbf82 online-accounts: Move the margins and spacing lower down the hierarchy
The expired credentials GtkButton is going to be replaced with a
GtkInfoBar touching the top, start and end edges of the GtkDialog.
Therefore, the margins around the account details and GtkSwitches
cannot be set on the higher level GtkBoxes. Instead, they need to be
set lower down the hierarchy closer to the actual widgets that need
them.

Bump required GOA version for the new goa_provider_show_account
behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=779368
2017-05-30 17:06:44 +02:00
Piotr Drąg
55b31ba967 online-accounts: Fix grammar in a new string
Since there weren’t any translation updates yet, fix grammar
in the newly added string — “setup” is a noun, “set up” is the verb.
2017-02-23 05:36:09 +01:00
Georges Basile Stavracas Neto
bd527d44c1 online-accounts: Improve dialog content margins
More alignment issues.
2017-02-22 23:13:00 -03:00
Allan Day
2e6d07cb01 online-accounts: Fix account dialog layout
More spacing needed everywhere. This is a partial fix - some other
adjustments are necessary.
2017-02-22 23:12:57 -03:00
Allan Day
432d55b30e online-accounts: Improve panel layout
Ensure sufficient spacing within and around rows. Increase panel
height to make it easier to view the list.
2017-02-22 23:12:52 -03:00
Georges Basile Stavracas Neto
4662c5be58 online-accounts: Make the account editor box vertical
When credentials expire, they're being added horizontally since
this is the default value of the GtkOrientable:orientation property.

Fix that by making the account editor box vertical, and adding some
spacing.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-22 23:00:49 -03:00