From 054f49820183befaafc6544ba650b235fb3ed44a Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 20 Dec 2010 17:58:12 +0100 Subject: [PATCH 1/3] BluetoothStatus: hide the additional separator if no devices are shown Sometimes devices are reported by BluetoothApplet, but are not shown, so we should not count them to decide whether to show the device separator. --- js/ui/status/bluetooth.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js index ead3b1f88..bde3f46cf 100644 --- a/js/ui/status/bluetooth.js +++ b/js/ui/status/bluetooth.js @@ -124,18 +124,20 @@ Indicator.prototype = { this._deviceItems = []; let devices = this._applet.get_devices(); - if (devices.length == 0) - this._deviceSep.actor.hide(); - else - this._deviceSep.actor.show(); + let anydevice = false; for (let i = 0; i < devices.length; i++) { let d = devices[i]; let item = this._createDeviceItem(d); if (item) { this.menu.addMenuItem(item, this._deviceItemPosition + this._deviceItems.length); this._deviceItems.push(item); + anydevice = true; } } + if (anydevice) + this._deviceSep.actor.show(); + else + this._deviceSep.actor.hide(); }, _createDeviceItem: function(device) { From bfc7b98e1df800d529975995707919514bb0a45f Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 20 Dec 2010 18:11:53 +0100 Subject: [PATCH 2/3] PopupMenu: restore the arrow when fast closing the menu When closing a submenu because the parent is closing, we skip the animation, but we need to restore the arrow anyway. --- js/ui/popupMenu.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index d493c75b9..190f24a4e 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -909,6 +909,7 @@ PopupSubMenu.prototype = { if (this._activeMenuItem) this._activeMenuItem.setActive(false); + this._arrow.rotation_angle_z = 0; this.actor.hide(); this.isOpen = false; From be96cb929150d3a26f90649b8f20a396c16fc8d9 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Mon, 20 Dec 2010 15:06:16 -0500 Subject: [PATCH 3/3] Make gnome-shell-clock-preferences work again Thanks Owen and Colin for debugging this: does anyone have a clue about this cryptic error message: http://fpaste.org/aWgh/ ? davidz: well, I'd guess some sort of syntax error... hmm possibly but unlikely fallout from my js versioning oh, it's happening here too walters: exactly Adding --js-version=1.8 to the wrapper script fixes walters: I thought you were defaulting to allowing extensions? actually, let's do that now anyways Signed-off-by: David Zeuthen --- src/gnome-shell-clock-preferences.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gnome-shell-clock-preferences.in b/src/gnome-shell-clock-preferences.in index b2f94986c..76391a8e0 100644 --- a/src/gnome-shell-clock-preferences.in +++ b/src/gnome-shell-clock-preferences.in @@ -18,7 +18,7 @@ uiFile="$uiDir/clock-preferences.ui" export GJS_PATH="$jsDir" export GSETTINGS_SCHEMA_DIR="$schemaDir" -@GJS_CONSOLE@ -c "const ClockPreferences = imports.prefs.clockPreferences; +@GJS_CONSOLE@ --js-version 1.8 -c "const ClockPreferences = imports.prefs.clockPreferences; ClockPreferences.main({ progName: '$progName', uiFile: '$uiFile', localeDir: '$localeDir' });"