Merge branch 'master' into datetime
This commit is contained in:
commit
70f50d61e0
@ -909,6 +909,7 @@ PopupSubMenu.prototype = {
|
|||||||
if (this._activeMenuItem)
|
if (this._activeMenuItem)
|
||||||
this._activeMenuItem.setActive(false);
|
this._activeMenuItem.setActive(false);
|
||||||
|
|
||||||
|
this._arrow.rotation_angle_z = 0;
|
||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
|
|
||||||
this.isOpen = false;
|
this.isOpen = false;
|
||||||
|
@ -124,18 +124,20 @@ Indicator.prototype = {
|
|||||||
this._deviceItems = [];
|
this._deviceItems = [];
|
||||||
|
|
||||||
let devices = this._applet.get_devices();
|
let devices = this._applet.get_devices();
|
||||||
if (devices.length == 0)
|
let anydevice = false;
|
||||||
this._deviceSep.actor.hide();
|
|
||||||
else
|
|
||||||
this._deviceSep.actor.show();
|
|
||||||
for (let i = 0; i < devices.length; i++) {
|
for (let i = 0; i < devices.length; i++) {
|
||||||
let d = devices[i];
|
let d = devices[i];
|
||||||
let item = this._createDeviceItem(d);
|
let item = this._createDeviceItem(d);
|
||||||
if (item) {
|
if (item) {
|
||||||
this.menu.addMenuItem(item, this._deviceItemPosition + this._deviceItems.length);
|
this.menu.addMenuItem(item, this._deviceItemPosition + this._deviceItems.length);
|
||||||
this._deviceItems.push(item);
|
this._deviceItems.push(item);
|
||||||
|
anydevice = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (anydevice)
|
||||||
|
this._deviceSep.actor.show();
|
||||||
|
else
|
||||||
|
this._deviceSep.actor.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
_createDeviceItem: function(device) {
|
_createDeviceItem: function(device) {
|
||||||
|
@ -18,7 +18,7 @@ uiFile="$uiDir/clock-preferences.ui"
|
|||||||
export GJS_PATH="$jsDir"
|
export GJS_PATH="$jsDir"
|
||||||
export GSETTINGS_SCHEMA_DIR="$schemaDir"
|
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',
|
ClockPreferences.main({ progName: '$progName',
|
||||||
uiFile: '$uiFile',
|
uiFile: '$uiFile',
|
||||||
localeDir: '$localeDir' });"
|
localeDir: '$localeDir' });"
|
||||||
|
Loading…
Reference in New Issue
Block a user