[gnome-shell] Do not launch power statistics app from battery items
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Do not launch power statistics app from battery items
- Date: Thu, 3 Mar 2011 21:19:26 +0000 (UTC)
commit 440b2226642bdc7e67cd40a264c8ec9b0846e3e8
Author: William Jon McCann <jmccann redhat com>
Date: Tue Mar 1 20:03:25 2011 -0500
Do not launch power statistics app from battery items
https://bugzilla.gnome.org/show_bug.cgi?id=640768
js/ui/status/power.js | 18 ++----------------
1 files changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/js/ui/status/power.js b/js/ui/status/power.js
index f3625cc..fabb181 100644
--- a/js/ui/status/power.js
+++ b/js/ui/status/power.js
@@ -72,7 +72,7 @@ Indicator.prototype = {
this._hasPrimary = false;
this._primaryDeviceId = null;
- this._batteryItem = new PopupMenu.PopupMenuItem('');
+ this._batteryItem = new PopupMenu.PopupMenuItem('', { reactive: false });
this._primaryPercentage = new St.Label();
this._batteryItem.addActor(this._primaryPercentage, { align: St.Align.END });
this.menu.addMenuItem(this._batteryItem);
@@ -136,17 +136,6 @@ Indicator.prototype = {
}
this._primaryDeviceId = device_id;
- if (this._primaryDeviceId) {
- this._batteryItem.actor.reactive = true;
- this._batteryItem.actor.can_focus = true;
- this._batteryItem.connect('activate', function(item) {
- Util.spawn(['gnome-power-statistics', '--device', device_id]);
- });
- } else {
- // virtual device
- this._batteryItem.actor.reactive = false;
- this._batteryItem.actor.can_focus = false;
- }
}));
},
@@ -168,9 +157,6 @@ Indicator.prototype = {
continue;
let item = new DeviceItem (devices[i]);
- item.connect('activate', function() {
- Util.spawn(['gnome-power-statistics', '--device', device_id]);
- });
this._deviceItems.push(item);
this.menu.addMenuItem(item, this._otherDevicePosition + position);
position++;
@@ -216,7 +202,7 @@ DeviceItem.prototype = {
__proto__: PopupMenu.PopupBaseMenuItem.prototype,
_init: function(device) {
- PopupMenu.PopupBaseMenuItem.prototype._init.call(this);
+ PopupMenu.PopupBaseMenuItem.prototype._init.call(this, { reactive: false });
let [device_id, device_type, icon, percentage, state, time] = device;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]