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
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
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
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
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
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
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
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 8762e2f8dchttps://bugzilla.gnome.org/show_bug.cgi?id=789469
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
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.
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
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
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
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
When the user has no account set, the current implementation of the
Online Accounts panel shows a weird 1px line that is the empty list.
Fix that by only showing the list when there are accounts available.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
We have different variants of the same code that iterates over all the
rows in a GtkListBox to find the one that corresponds to a given
account. Some action is then performed on the row, depending on the use
case at hand. In future we might want to look at the other rows in the
list to decide whether to hide the entire GtkFrame or not.
Let's consolidate this to reduce some duplication.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
This will make the subsequent commits easier to read.
We are going to change get_row_for_account to be more generic. Moving
this code higher up will let us use it from a few more call sites.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
The current implementation of the Online Accounts panel allows
2 states: either the widgets of the panel fill the whole horizontal
space, or they shrink and fill only the absolutely minimum. The
ideal solution, however, is to make them grow with the panel.
Fix that by turn the main box into a GtkGrid, and adding stub widgets
that expand horizontally and pull the main widgets to the middle,
allowing them to cover at most 1/3 of the screen. The widgets themselves
are inside a GtkBox, so that hiding them automatically removes the
spacing in between.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
When offline, we currently block the new accounts listbox
so that users can't add new accounts. There is, however,
no visual indication that we're offline, besides the listbox.
Fix that by adding a descriptive label that's only visible
when offline.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
When adding and editing accounts, the different options that Online
Accounts provides may require different sizes of the dialog. There is,
however, a specific issue where the dialog can't resize because a
provider widget is interefering with the others.
Fix that by making the dialog's stack non-homogeneous, and making sure
to always reset the dialog size before showing it.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
Following the previous commit, this commit effectively brings
back the account removal feature that was temporarily removed
by 4e197b491f.
This is now reimplemented as an in-app notification, and users
now have the option to undo an accidentally removed account.
Some changes by Debarshi Ray.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
After temporarily removing the ability to delete accounts in
4e197b491f, let's start bringing it back again by adding a Remove
Account button to the account editor dialog, as per the recent mockups.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
When adding an account, the old proccess was: use the (removed) toolbar
to open the New Account dialog, select a provider in that dialog, add
the account and see the newly created account in the panel itself.
That approach had issues, e.g. the user would have to close the dialog
if she mistakenly selected a provider. After moving the provider list
to the panel itself, it doesn't make sense anymore to have another
provider list inside the dialog.
Fix this by moving the new account view to the accounts dialog.
https://bugzilla.gnome.org/show_bug.cgi?id=774222