Update to 3.30.2

This commit is contained in:
Kalev Lember 2018-11-01 07:51:46 +01:00
parent 97db40cf73
commit 9f84668846
4 changed files with 8 additions and 99 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/gnome-control-center-3.29.90.tar.xz
/gnome-control-center-3.30.0.tar.xz
/gnome-control-center-3.30.1.tar.xz
/gnome-control-center-3.30.2.tar.xz

View File

@ -1,94 +0,0 @@
From 10b064844855a3d0ce4cefb5c8d02eab7e0d2d6a Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 4 Oct 2018 11:28:15 +0200
Subject: [PATCH] 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 c26f8ae018900a55, 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
c26f8ae018900a55.
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
---
panels/online-accounts/cc-online-accounts-panel.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/panels/online-accounts/cc-online-accounts-panel.c b/panels/online-accounts/cc-online-accounts-panel.c
index a89d249c0..747381bef 100644
--- a/panels/online-accounts/cc-online-accounts-panel.c
+++ b/panels/online-accounts/cc-online-accounts-panel.c
@@ -56,6 +56,7 @@ struct _CcGoaPanel
GtkWidget *stack;
GtkWidget *accounts_vbox;
+ gboolean destroyed;
guint remove_account_timeout_id;
};
@@ -394,6 +395,8 @@ cc_goa_panel_dispose (GObject *object)
/* Must be destroyed in dispose, not finalize. */
g_clear_pointer (&panel->edit_account_dialog, gtk_widget_destroy);
+ panel->destroyed = TRUE;
+
G_OBJECT_CLASS (cc_goa_panel_parent_class)->dispose (object);
}
@@ -489,7 +492,7 @@ cc_goa_panel_init (CcGoaPanel *panel)
panel);
fill_accounts_listbox (panel);
- goa_provider_get_all (get_all_providers_cb, panel);
+ goa_provider_get_all (get_all_providers_cb, g_object_ref_sink (panel));
gtk_widget_show (GTK_WIDGET (panel));
}
@@ -852,7 +855,7 @@ get_all_providers_cb (GObject *source,
GAsyncResult *res,
gpointer user_data)
{
- CcGoaPanel *self = user_data;
+ g_autoptr (CcGoaPanel) self = user_data;
GList *providers;
GList *l;
@@ -860,6 +863,9 @@ get_all_providers_cb (GObject *source,
if (!goa_provider_get_all_finish (&providers, res, NULL))
return;
+ if (self->destroyed)
+ return;
+
for (l = providers; l != NULL; l = l->next)
{
GoaProvider *provider;
--
2.19.0

View File

@ -9,8 +9,8 @@
%define gnome_bluetooth_version 3.18.2
Name: gnome-control-center
Version: 3.30.1
Release: 4%{?dist}
Version: 3.30.2
Release: 1%{?dist}
Summary: Utilities to configure the GNOME desktop
License: GPLv2+ and CC-BY-SA
@ -19,8 +19,7 @@ Source0: https://download.gnome.org/sources/gnome-control-center/3.30/gno
# https://bugzilla.gnome.org/show_bug.cgi?id=695691
Patch0: distro-logo.patch
# Backported from upstream
Patch1: 0001-online-accounts-Track-the-lifecycle-of-CcGoaPanel-ac.patch
# https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/214
Patch2: 0002-background-Add-queue-to-load-4-pictures-at-a-time.patch
BuildRequires: chrpath
@ -192,6 +191,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center
%dir %{_datadir}/gnome/wm-properties
%changelog
* Thu Nov 01 2018 Kalev Lember <klember@redhat.com> - 3.30.2-1
- Update to 3.30.2
* Thu Oct 11 2018 David Herrmann <dh.herrmann@gmail.com> - 3.30.1-4
- Reduce 'dbus-x11' dependency to 'dbus'. The xinit scripts are no longer the
canonical way to start dbus, but the 'dbus' package is nowadays required to

View File

@ -1 +1 @@
SHA512 (gnome-control-center-3.30.1.tar.xz) = ae218f2fb72a3c4e19a3cffdf5941b4c18e603b989eba2bfc7b15d67f5c193f753f380459c71818b36390a03d6e4ff7a7a4e61b28faa26fe311935241d1c7101
SHA512 (gnome-control-center-3.30.2.tar.xz) = b7a8bbbbbadf33cf4ba6e2513ff94e07bb0efd5ac1c45846fe3ae480d5e7f030ed6d1ccb1be5a16395083862fa1181f65e252e892abd5a21efd84dc3ddbfbd99