Backport fix for GGO #140 from upstream master

This commit is contained in:
Adam Williamson 2018-09-15 10:24:02 -07:00
parent 07ded10bbb
commit f03be9edd3
2 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,50 @@
From 5d61e2563d183272f604f1a2af635ad5cbdb627e Mon Sep 17 00:00:00 2001
From: Iain Lane <iainl@gnome.org>
Date: Thu, 16 Aug 2018 11:59:36 +0100
Subject: [PATCH] network: Don't assume the active connection has been
processed first
`NMConnectionDevice._sync()` is responsible for setting up the active
connection that we'll end up displaying. It expects the active
connection to already be in a map `_connectionItems`. If it isn't in
there, we get a null dereference and the indicator can get into a weird
state where it doesn't display devices / connections properly.
Let's change this expectation. If there is an active connection,
`_deviceAdded()` will eventually get to it and call `_sync()` to set up
the active connection state. We make `_sync()` tolerate there being no
active connection when it's called.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/140
---
js/ui/status/network.js | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 3e3d0d1d2..d4a09bc32 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -420,12 +420,14 @@ var NMConnectionDevice = new Lang.Class({
this._deactivateItem.actor.visible = this._device.state > NM.DeviceState.DISCONNECTED;
if (this._activeConnection == null) {
- this._activeConnection = this._device.active_connection;
-
- if (this._activeConnection) {
- ensureActiveConnectionProps(this._activeConnection, this._client);
- let item = this._connectionItems.get(this._activeConnection.connection.get_uuid());
- item.setActiveConnection(this._activeConnection);
+ let activeConnection = this._device.active_connection;
+ if (activeConnection && activeConnection.connection) {
+ let item = this._connectionItems.get(activeConnection.connection.get_uuid());
+ if (item) {
+ this._activeConnection = activeConnection;
+ ensureActiveConnectionProps(this._activeConnection, this._client);
+ item.setActiveConnection(this._activeConnection);
+ }
}
}
--
2.19.0

View File

@ -1,6 +1,6 @@
Name: gnome-shell
Version: 3.30.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Window management and application launching for GNOME
Group: User Interface/Desktops
@ -13,6 +13,9 @@ Source0: http://download.gnome.org/sources/gnome-shell/3.30/%{name}-%{ver
# Replace Epiphany with Firefox in the default favourite apps list
Patch1: gnome-shell-favourite-apps-firefox.patch
# Backport fix for https://gitlab.gnome.org/GNOME/gnome-shell/issues/140
Patch2: 0001-network-Don-t-assume-the-active-connection-has-been-.patch
%define libcroco_version 0.6.8
%define eds_version 3.17.2
%define gnome_desktop_version 3.7.90
@ -208,6 +211,9 @@ glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas &> /dev/null
%{_mandir}/man1/%{name}.1.gz
%changelog
* Sat Sep 15 2018 Adam Williamson <awilliam@redhat.com> - 3.30.0-3
- Backport fix for GGO #140 from upstream master
* Thu Sep 13 2018 Kalev Lember <klember@redhat.com> - 3.30.0-2
- Require xdg-desktop-portal-gtk