r31617 - in /packages/experimental/gnome-shell/debian: ./ patches/

sjoerd at users.alioth.debian.org sjoerd at users.alioth.debian.org
Sat Nov 19 15:24:26 UTC 2011


Author: sjoerd
Date: Sat Nov 19 15:24:22 2011
New Revision: 31617

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=31617
Log:
* 05-NetworkMenu-don-t-query-DBus-properties-of-removed-o.patch:
  + Added. Don't (potentially) ask NM over D-Bus about an access point that
    was just removed. (From upstream git). As a side-effect this fixes
    gnome-shell freezing a while after unblacking.
* 06-NetworkMenu-fix-regression-in-access-point-removed.patch
  + Added. Fix a regression in above patch (from upstream git)
* 07-NetworkMenu-fix-logic-for-updating-wifi-icon.patch
  + Added. Fix the logic for connecting to the current wifi strength,
    prevents the network icon fro mbecoming stale (from upstream git)

Added:
    packages/experimental/gnome-shell/debian/patches/05-NetworkMenu-don-t-query-DBus-properties-of-removed-o.patch
    packages/experimental/gnome-shell/debian/patches/06-NetworkMenu-fix-regression-in-access-point-removed.patch
    packages/experimental/gnome-shell/debian/patches/07-NetworkMenu-fix-logic-for-updating-wifi-icon.patch
Modified:
    packages/experimental/gnome-shell/debian/changelog
    packages/experimental/gnome-shell/debian/patches/series

Modified: packages/experimental/gnome-shell/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gnome-shell/debian/changelog?rev=31617&op=diff
==============================================================================
--- packages/experimental/gnome-shell/debian/changelog [utf-8] (original)
+++ packages/experimental/gnome-shell/debian/changelog [utf-8] Sat Nov 19 15:24:22 2011
@@ -1,3 +1,17 @@
+gnome-shell (3.2.1-4) UNRELEASED; urgency=low
+
+  * 05-NetworkMenu-don-t-query-DBus-properties-of-removed-o.patch:
+    + Added. Don't (potentially) ask NM over D-Bus about an access point that
+      was just removed. (From upstream git). As a side-effect this fixes
+      gnome-shell freezing a while after unblacking.
+  * 06-NetworkMenu-fix-regression-in-access-point-removed.patch
+    + Added. Fix a regression in above patch (from upstream git)
+  * 07-NetworkMenu-fix-logic-for-updating-wifi-icon.patch
+    + Added. Fix the logic for connecting to the current wifi strength,
+      prevents the network icon fro mbecoming stale (from upstream git)
+
+ -- Sjoerd Simons <sjoerd at debian.org>  Sat, 19 Nov 2011 14:47:15 +0000
+
 gnome-shell (3.2.1-3) experimental; urgency=low
 
   [ Josselin Mouette ]

Added: packages/experimental/gnome-shell/debian/patches/05-NetworkMenu-don-t-query-DBus-properties-of-removed-o.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gnome-shell/debian/patches/05-NetworkMenu-don-t-query-DBus-properties-of-removed-o.patch?rev=31617&op=file
==============================================================================
--- packages/experimental/gnome-shell/debian/patches/05-NetworkMenu-don-t-query-DBus-properties-of-removed-o.patch (added)
+++ packages/experimental/gnome-shell/debian/patches/05-NetworkMenu-don-t-query-DBus-properties-of-removed-o.patch [utf-8] Sat Nov 19 15:24:22 2011
@@ -1,0 +1,84 @@
+From 2300bc30b0437efc34d1ed66e7ec3ac5fa80419a Mon Sep 17 00:00:00 2001
+From: Giovanni Campagna <gcampagna at src.gnome.org>
+Date: Fri, 14 Oct 2011 16:46:52 +0200
+Subject: [PATCH 1/3] NetworkMenu: don't query DBus properties of removed
+ objects
+
+Calling nm_access_point_get_ssid() in the handler of the
+access-point-removed signal can result in DBus request, which will
+then fail because the object was already removed at the server side.
+Instead, use a difference function to retrieve the access point
+object (the network), that compares directly by object identity.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=651378
+---
+ js/ui/status/network.js |   33 +++++++++++++++++++--------------
+ 1 files changed, 19 insertions(+), 14 deletions(-)
+
+diff --git a/js/ui/status/network.js b/js/ui/status/network.js
+index 4f368e3..966e872 100644
+--- a/js/ui/status/network.js
++++ b/js/ui/status/network.js
+@@ -1104,10 +1104,10 @@ NMDeviceWireless.prototype = {
+         let activeAp = this.device.active_access_point;
+ 
+         if (activeAp) {
+-            let pos = this._findNetwork(activeAp);
++            let res = this._findExistingNetwork(activeAp);
+ 
+-            if (pos != -1)
+-                this._activeNetwork = this._networks[pos];
++            if (res != null)
++                this._activeNetwork = this._networks[res.network];
+         }
+ 
+         // we don't refresh the view here, setActiveConnection will
+@@ -1181,6 +1181,18 @@ NMDeviceWireless.prototype = {
+         return true;
+     },
+ 
++    _findExistingNetwork: function(accessPoint) {
++        for (let i = 0; i < this._networks.length; i++) {
++            let apObj = this._networks[i];
++            for (let j = 0; j < apObj.accessPoints.length; j++) {
++                if (apObj.accessPoints[j] == accessPoint)
++                    return { network: i, ap: j };
++            }
++        }
++
++        return null;
++    },
++
+     _findNetwork: function(accessPoint) {
+         if (accessPoint.get_ssid() == null)
+             return -1;
+@@ -1273,22 +1285,15 @@ NMDeviceWireless.prototype = {
+     },
+ 
+     _accessPointRemoved: function(device, accessPoint) {
+-        let pos = this._findNetwork(accessPoint);
+-
+-        if (pos == -1) {
+-            log('Removing an access point that was never added');
+-            return;
+-        }
+-
+-        let apObj = this._networks[pos];
+-        let i = apObj.accessPoints.indexOf(accessPoint);
++        let res = this._findExistingNetwork(accessPoint);
+ 
+-        if (i == -1) {
++        if (res == null) {
+             log('Removing an access point that was never added');
+             return;
+         }
+ 
+-        apObj.accessPoints.splice(i, 1);
++        let apObj = this._networks[res.network];
++        apObj.accessPoints.splice(res.ap, 1);
+ 
+         if (apObj.accessPoints.length == 0) {
+             if (this._activeNetwork == apObj)
+-- 
+1.7.7.3
+

Added: packages/experimental/gnome-shell/debian/patches/06-NetworkMenu-fix-regression-in-access-point-removed.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gnome-shell/debian/patches/06-NetworkMenu-fix-regression-in-access-point-removed.patch?rev=31617&op=file
==============================================================================
--- packages/experimental/gnome-shell/debian/patches/06-NetworkMenu-fix-regression-in-access-point-removed.patch (added)
+++ packages/experimental/gnome-shell/debian/patches/06-NetworkMenu-fix-regression-in-access-point-removed.patch [utf-8] Sat Nov 19 15:24:22 2011
@@ -1,0 +1,31 @@
+From 8474ba255573bc57d62eaa887f1079e214dbec18 Mon Sep 17 00:00:00 2001
+From: Giovanni Campagna <gcampagna at src.gnome.org>
+Date: Thu, 3 Nov 2011 10:02:03 +0100
+Subject: [PATCH 2/3] NetworkMenu: fix regression in access-point-removed
+
+When changing _findNetwork with _findExistingNetwork, I changed
+the return value to avoid searching twice for the access point,
+and changed some names. I forgot to update all points where those
+names were used.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=663278
+---
+ js/ui/status/network.js |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/js/ui/status/network.js b/js/ui/status/network.js
+index 966e872..aa9b277 100644
+--- a/js/ui/status/network.js
++++ b/js/ui/status/network.js
+@@ -1322,7 +1322,7 @@ NMDeviceWireless.prototype = {
+                     this._overflowItem = null;
+                 }
+             }
+-            this._networks.splice(pos, 1);
++            this._networks.splice(res.network, 1);
+ 
+         } else if (apObj.item)
+             apObj.item.updateAccessPoints(apObj.accessPoints);
+-- 
+1.7.7.3
+

Added: packages/experimental/gnome-shell/debian/patches/07-NetworkMenu-fix-logic-for-updating-wifi-icon.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gnome-shell/debian/patches/07-NetworkMenu-fix-logic-for-updating-wifi-icon.patch?rev=31617&op=file
==============================================================================
--- packages/experimental/gnome-shell/debian/patches/07-NetworkMenu-fix-logic-for-updating-wifi-icon.patch (added)
+++ packages/experimental/gnome-shell/debian/patches/07-NetworkMenu-fix-logic-for-updating-wifi-icon.patch [utf-8] Sat Nov 19 15:24:22 2011
@@ -1,0 +1,49 @@
+From 9aae5cf478fe3c04cb956b23b166fd49261b8d61 Mon Sep 17 00:00:00 2001
+From: Giovanni Campagna <gcampagna at src.gnome.org>
+Date: Sat, 29 Oct 2011 14:35:09 +0200
+Subject: [PATCH 3/3] NetworkMenu: fix logic for updating wifi icon
+
+Previously, we connected to notify::strength only if there was
+already a signal connected, and the AP changed (thus, by induction,
+we never connected). As a result, the icon became stale and different
+from that shown inside the menu (which is correctly updated).
+
+https://bugzilla.gnome.org/show_bug.cgi?id=650007
+---
+ js/ui/status/network.js |   12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/js/ui/status/network.js b/js/ui/status/network.js
+index aa9b277..d40f7a6 100644
+--- a/js/ui/status/network.js
++++ b/js/ui/status/network.js
+@@ -2061,10 +2061,11 @@ NMApplet.prototype = {
+                         }
+                         this.setIcon('network-wireless-connected');
+                     } else {
+-                        if (this._accessPointUpdateId && this._activeAccessPoint != ap) {
+-                            this._activeAccessPoint.disconnect(this._accessPointUpdateId);
++                        if (this._activeAccessPoint != ap) {
++                            if (this._accessPointUpdateId)
++                                this._activeAccessPoint.disconnect(this._accessPointUpdateId);
+                             this._activeAccessPoint = ap;
+-                            this._activeAccessPointUpdateId = ap.connect('notify::strength', Lang.bind(function() {
++                            this._activeAccessPointUpdateId = ap.connect('notify::strength', Lang.bind(this, function() {
+                                 this.setIcon('network-wireless-signal-' + signalToIcon(ap.strength));
+                             }));
+                         }
+@@ -2091,8 +2092,9 @@ NMApplet.prototype = {
+                     break;
+                 }
+ 
+-                if (this._mobileUpdateId && this._mobileUpdateDevice != dev) {
+-                    this._mobileUpdateDevice.disconnect(this._mobileUpdateId);
++                if (dev.mobileDevice != this._mobileUpdateDevice) {
++                    if (this._mobileUpdateId)
++                        this._mobileUpdateDevice.disconnect(this._mobileUpdateId);
+                     this._mobileUpdateDevice = dev.mobileDevice;
+                     this._mobileUpdateId = dev.mobileDevice.connect('notify::signal-quality', Lang.bind(this, function() {
+                         this.setIcon('network-cellular-signal-' + signalToIcon(dev.mobileDevice.signal_quality));
+-- 
+1.7.7.3
+

Modified: packages/experimental/gnome-shell/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gnome-shell/debian/patches/series?rev=31617&op=diff
==============================================================================
--- packages/experimental/gnome-shell/debian/patches/series [utf-8] (original)
+++ packages/experimental/gnome-shell/debian/patches/series [utf-8] Sat Nov 19 15:24:22 2011
@@ -1,2 +1,5 @@
 02_rpath-bluetooth-applet.patch
 04_remove-glx-dependency-on-armel.patch
+05-NetworkMenu-don-t-query-DBus-properties-of-removed-o.patch
+06-NetworkMenu-fix-regression-in-access-point-removed.patch
+07-NetworkMenu-fix-logic-for-updating-wifi-icon.patch




More information about the pkg-gnome-commits mailing list