Compare commits

..

2 Commits

Author SHA1 Message Date
Carlos Garnacho
7f66aede01 keyboard: Fix warnings on destroyed actors
Trying to hide a page gets hard when the page was previouly destroyed.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1281
2019-05-10 00:09:23 +02:00
Carlos Garnacho
bd5a1121d6 keyboard: Rename variable to JS style
This variable has been there since the OSK origins, and nothing guaranteed
the need for renaming it. It's enough of an eye sore though.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1281
2019-05-10 00:08:56 +02:00
39 changed files with 1120 additions and 1394 deletions

29
NEWS
View File

@@ -1,32 +1,3 @@
3.33.1
======
* Refine the app menu [Florian; #968]
* Refine window preview style [Feichtmeier; !461]
* Only emit ::style-changed on actual changes [Carlos; #1153]
* Disable emoji on-screen keyboard support on X11 [Florian; #1172]
* Fix tablet button mapping overlay [Carlos; #1220]
* Don't crash for world clock locations with no timezone [Florian; #1062]
* Don't leak old on-screen keyboard layout groups [Carlos; mutter#556]
* Fix ellipsization in dialog subtitles/bodies [Marco; !531]
* Fix glitch of fullscreen window in workspace switch animation [Jonas D.; !322]
* Fix distortion of some image contents [Florian; !525]
* Allow dragging unfocused tiled/maximized windows from top bar [Dylan; #679290]
* Handle network interface name changes [Fabrice; !534]
* Avoid unnecessary style changes when computing :first/:last-child
[Florian; !529]
* Misc. bug fixes and cleanups [Florian, Marco, Robert, Georges, Carlos, Simon,
Jonas D.; !487, !441, !502, !503, !504, !506, #822, !551, !512, !509, !511,
#1054, !524, #1065, !331, !540]
Contributors:
Fabrice Bellet, Jonas Dreßler, Feichtmeier, Carlos Garnacho, Robert Mader,
Dylan McCall, Simon McVittie, Florian Müllner, Georges Basile Stavracas Neto,
Marco Trevisan (Treviño)
Translators:
Daniel Mustieles [es], Kukuh Syafaat [id], Fabio Tomat [fur],
Carmen Bianca BAKKER [eo], Dingzhong Chen [zh_CN], Tim Sabsch [de]
3.32.1
======
* Fix avatar scaling on login screen [Florian; #1024]

View File

@@ -652,7 +652,7 @@ var LoginDialog = GObject.registerClass({
bannerAllocation.x2 = Math.floor(centerX - centerGap / 2);
bannerAllocation.x1 = Math.floor(bannerAllocation.x2 - wideBannerWidth);
// figure out how tall it would like to be and try to accommodate
// figure out how tall it would like to be and try to accomodate
// but don't let it get too close to the logo
let [wideMinHeight, wideBannerHeight] = this._bannerView.get_preferred_height(wideBannerWidth);

View File

@@ -88,42 +88,42 @@ const SystemActions = GObject.registerClass({
name: C_("search-result", "Power Off"),
iconName: 'system-shutdown-symbolic',
// Translators: A list of keywords that match the power-off action, separated by semicolons
keywords: _("power off;shutdown;reboot;restart").split(/[; ]/),
keywords: _("power off;shutdown;reboot;restart").split(';'),
available: false });
this._actions.set(LOCK_SCREEN_ACTION_ID,
{ // Translators: The name of the lock screen action in search
name: C_("search-result", "Lock Screen"),
iconName: 'system-lock-screen-symbolic',
// Translators: A list of keywords that match the lock screen action, separated by semicolons
keywords: _("lock screen").split(/[; ]/),
keywords: _("lock screen").split(';'),
available: false });
this._actions.set(LOGOUT_ACTION_ID,
{ // Translators: The name of the logout action in search
name: C_("search-result", "Log Out"),
iconName: 'application-exit-symbolic',
// Translators: A list of keywords that match the logout action, separated by semicolons
keywords: _("logout;log out;sign off").split(/[; ]/),
keywords: _("logout;sign off").split(';'),
available: false });
this._actions.set(SUSPEND_ACTION_ID,
{ // Translators: The name of the suspend action in search
name: C_("search-result", "Suspend"),
iconName: 'media-playback-pause-symbolic',
// Translators: A list of keywords that match the suspend action, separated by semicolons
keywords: _("suspend;sleep").split(/[; ]/),
keywords: _("suspend;sleep").split(';'),
available: false });
this._actions.set(SWITCH_USER_ACTION_ID,
{ // Translators: The name of the switch user action in search
name: C_("search-result", "Switch User"),
iconName: 'system-switch-user-symbolic',
// Translators: A list of keywords that match the switch user action, separated by semicolons
keywords: _("switch user").split(/[; ]/),
keywords: _("switch user").split(';'),
available: false });
this._actions.set(LOCK_ORIENTATION_ACTION_ID,
{ // Translators: The name of the lock orientation action in search
name: C_("search-result", "Lock Orientation"),
iconName: '',
// Translators: A list of keywords that match the lock orientation action, separated by semicolons
keywords: _("lock orientation;screen;rotation").split(/[; ]/),
keywords: _("lock orientation;screen;rotation").split(';'),
available: false });
this._loginScreenSettings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
@@ -262,7 +262,7 @@ const SystemActions = GObject.registerClass({
let results = [];
for (let [key, {available, keywords}] of this._actions)
if (available && terms.every(t => keywords.some(k => k.startsWith(t))))
if (available && terms.every(t => keywords.some(k => (k.indexOf(t) >= 0))))
results.push(key);
return results;

View File

@@ -474,10 +474,12 @@ var CyclerList = GObject.registerClass({
}
});
var CyclerPopup = GObject.registerClass({
GTypeFlags: GObject.TypeFlags.ABSTRACT
}, class CyclerPopup extends SwitcherPopup.SwitcherPopup {
var CyclerPopup = GObject.registerClass(
class CyclerPopup extends SwitcherPopup.SwitcherPopup {
_init() {
if (this.constructor.name === CyclerPopup.prototype.constructor.name)
throw new TypeError(`Cannot instantiate abstract class ${this.constructor.name}`);
super._init();
this._items = this._getWindows();

View File

@@ -414,7 +414,7 @@ var AllView = class AllView extends BaseAppView {
this._refilterApps();
}
// Overridden from BaseAppView
// Overriden from BaseAppView
animate(animationDirection, onComplete) {
this._scrollView.reactive = false;
let completionFunc = () => {
@@ -1017,7 +1017,7 @@ var FolderView = class FolderView extends BaseAppView {
Util.ensureActorVisibleInScrollView(this.actor, actor);
}
// Overridden from BaseAppView
// Overriden from BaseAppView
animate(animationDirection) {
this._grid.animatePulse(animationDirection);
}
@@ -1081,7 +1081,7 @@ var FolderView = class FolderView extends BaseAppView {
let contentBox = this.actor.get_theme_node().get_content_box(pageBox);
// We only can show icons inside the collection view boxPointer
// so we have to subtract the required padding etc of the boxpointer
// so we have to substract the required padding etc of the boxpointer
return [(contentBox.x2 - contentBox.x1) - 2 * this._offsetForEachSide, (contentBox.y2 - contentBox.y1) - 2 * this._offsetForEachSide];
}

View File

@@ -23,8 +23,20 @@ var KeyringDialog = class extends ModalDialog.ModalDialog {
this._content = new Dialog.MessageDialogContent({ icon });
this.contentLayout.add(this._content);
// FIXME: Why does this break now?
/*
this.prompt.bind_property('message', this._content, 'title', GObject.BindingFlags.SYNC_CREATE);
this.prompt.bind_property('description', this._content, 'body', GObject.BindingFlags.SYNC_CREATE);
*/
this.prompt.connect('notify::message', () => {
this._content.title = this.prompt.message;
});
this._content.title = this.prompt.message;
this.prompt.connect('notify::description', () => {
this._content.body = this.prompt.description;
});
this._content.body = this.prompt.description;
this._workSpinner = null;
this._controlTable = null;

View File

@@ -401,7 +401,7 @@ var ChatSource = class extends MessageTray.Source {
if (this._client.is_handling_channel(this._channel)) {
// We are handling the channel, try to pass it to Empathy or Polari
// (depending on the channel type)
// We don't check if either app is available - mission control will
// We don't check if either app is availble - mission control will
// fallback to something else if activation fails
let target;

View File

@@ -899,7 +899,7 @@ var Dash = class Dash {
favPos++;
}
// No drag placeholder means we don't want to favorite the app
// No drag placeholder means we don't wan't to favorite the app
// and we are dragging it to its original position
if (!this._dragPlaceholder)
return true;

View File

@@ -57,60 +57,6 @@ function _patchLayoutClass(layoutClass, styleProps) {
};
}
function _adjustEasingTime(msecs) {
if (!St.Settings.get().enable_animations)
return 1;
return St.get_slow_down_factor() * msecs;
}
function _easeActor(actor, props, easingParams) {
let { duration, delay, mode,
onStopped, onUpdate, onComplete } = easingParams;
let animatedProps = Object.keys(props).map(p => p.replace('_', '-', 'g'));
actor.save_easing_state();
if (duration)
actor.set_easing_duration(duration);
if (delay)
actor.set_easing_delay(delay);
if (mode)
actor.set_easing_mode(mode);
actor.set(props);
if (onUpdate || onComplete || onStopped) {
let transition = actor.get_transition(animatedProps[0]);
if (transition) {
let updateId = 0;
if (onUpdate)
updateId = transition.connect('new-frame', onUpdate);
let id = transition.connect('stopped', isFinished => {
if (updateId != 0)
transition.disconnect(updateId);
transition.disconnect(id);
if (onComplete)
onComplete();
if (onStopped)
onStopped(isFinished);
});
} else {
if (onComplete)
onComplete();
if (onStopped)
onStopped(true);
}
}
actor.restore_easing_state();
}
function _loggingFunc() {
let fields = {'MESSAGE': [].join.call(arguments, ', ')};
let domain = "GNOME Shell";
@@ -147,19 +93,6 @@ function init() {
column_spacing: 'spacing-columns' });
_patchLayoutClass(Clutter.BoxLayout, { spacing: 'spacing' });
let origSetEasingDuration = Clutter.Actor.prototype.set_easing_duration;
Clutter.Actor.prototype.set_easing_duration = function(msecs) {
origSetEasingDuration.call(this, _adjustEasingTime(msecs));
};
let origSetEasingDelay = Clutter.Actor.prototype.set_easing_delay;
Clutter.Actor.prototype.set_easing_delay = function(msecs) {
origSetEasingDelay.call(this, _adjustEasingTime(msecs));
};
Clutter.Actor.prototype.ease = function(props, easingParams) {
_easeActor(this, props, easingParams);
};
Clutter.Actor.prototype.toString = function() {
return St.describe_actor(this);
};

View File

@@ -840,7 +840,7 @@ var PaginatedIconGrid = GObject.registerClass({
}
}
// Overridden from IconGrid
// Overriden from IconGrid
_getChildrenToAnimate() {
let children = this._getVisibleChildren();
let firstIndex = this._childrenPerPage * this.currentPage;

View File

@@ -1144,7 +1144,6 @@ var Keyboard = class Keyboard {
this._keyboardController.disconnect(this._keypadVisibleId);
if (this._focusNotifyId)
global.stage.disconnect(this._focusNotifyId);
this._clearShowIdle();
this._keyboard = null;
this.actor.destroy();
this.actor = null;
@@ -1230,7 +1229,6 @@ var Keyboard = class Keyboard {
if (!this._showIdleId) {
this._showIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
this.show(Main.layoutManager.focusIndex);
this._showIdleId = 0;
return GLib.SOURCE_REMOVE;
});
GLib.Source.set_name_by_id(this._showIdleId, '[gnome-shell] this.show');
@@ -1479,6 +1477,7 @@ var Keyboard = class Keyboard {
c.destroy();
});
this._currentPage = null;
this._groups = {};
this._onGroupChanged();
}
@@ -1521,24 +1520,13 @@ var Keyboard = class Keyboard {
_setActiveLayer(activeLevel) {
let activeGroupName = this._keyboardController.getCurrentGroup();
let layers = this._groups[activeGroupName];
let currentPage = layers[activeLevel];
if (this._currentPage == currentPage) {
this._updateCurrentPageVisible();
return;
}
if (this._currentPage != null) {
this._setCurrentLevelLatched(this._currentPage, false);
this._currentPage.disconnect(this._currentPage._destroyID);
this._currentPage.hide();
delete this._currentPage._destroyID;
}
this._currentPage = currentPage;
this._currentPage._destroyID = this._currentPage.connect('destroy', () => {
this._currentPage = null;
});
this._currentPage = layers[activeLevel];
this._updateCurrentPageVisible();
}
@@ -1626,6 +1614,18 @@ var Keyboard = class Keyboard {
this.setCursorLocation(null);
}
_hideSubkeys() {
if (this._subkeysBoxPointer) {
this._subkeysBoxPointer.hide(BoxPointer.PopupAnimation.FULL);
this._subkeysBoxPointer = null;
}
if (this._capturedEventId) {
this.actor.disconnect(this._capturedEventId);
this._capturedEventId = 0;
}
this._capturedPress = false;
}
resetSuggestions() {
if (this._suggestions)
this._suggestions.clear();

View File

@@ -1272,7 +1272,7 @@ var ZoomRegion = class ZoomRegion {
/**
* getContrast:
* Retrieve the contrast of the magnified view.
* Retreive the contrast of the magnified view.
* @return Object containing the contrast for the red, green,
* and blue channels.
*/

View File

@@ -636,7 +636,7 @@ function _queueBeforeRedraw(workId) {
* initialization as well, under the assumption that new actors
* will need it.
*
* Returns: A string work identifier
* Returns: A string work identifer
*/
function initializeDeferredWork(actor, callback, props) {
// Turn into a string so we can use as an object property

View File

@@ -224,10 +224,10 @@ var ModalDialog = class {
// can be dismissed by a close call.
//
// The main point of this method is to give some indication to the user
// that the dialog response has been acknowledged but will take a few
// that the dialog reponse has been acknowledged but will take a few
// moments before being processed.
// e.g., if a user clicked "Log Out" then the dialog should go away
// immediately, but the lightbox should remain until the logout is
// imediately, but the lightbox should remain until the logout is
// complete.
_fadeOutDialog(timestamp) {
if (this.state == State.CLOSED || this.state == State.CLOSING)

View File

@@ -122,7 +122,7 @@ class AppMenu extends PopupMenu.PopupMenu {
_updateDetailsVisibility() {
let sw = this._appSystem.lookup_app('org.gnome.Software.desktop');
this._detailsItem.visible = (sw != null);
this._detailsItem.actor.visible = (sw != null);
}
isEmpty() {
@@ -160,7 +160,7 @@ class AppMenu extends PopupMenu.PopupMenu {
});
});
this._newWindowItem.visible =
this._newWindowItem.actor.visible =
app && app.can_open_new_window() && !actions.includes('new-window');
}

View File

@@ -51,64 +51,49 @@ function arrowIcon(side) {
return arrow;
}
var PopupBaseMenuItem = GObject.registerClass({
Properties: {
'active': GObject.ParamSpec.boolean('active', 'active', 'active',
GObject.ParamFlags.READWRITE,
GObject.TYPE_BOOLEAN,
false),
'sensitive': GObject.ParamSpec.boolean('sensitive', 'sensitive', 'sensitive',
GObject.ParamFlags.READWRITE,
GObject.TYPE_BOOLEAN,
true),
},
Signals: {
'activate': { param_types: [Clutter.Event.$gtype] },
}
}, class PopupBaseMenuItem extends St.BoxLayout {
_init(params) {
var PopupBaseMenuItem = class {
constructor(params) {
params = Params.parse (params, { reactive: true,
activate: true,
hover: true,
style_class: null,
can_focus: true
});
super._init({ style_class: 'popup-menu-item',
reactive: params.reactive,
track_hover: params.reactive,
can_focus: params.can_focus,
accessible_role: Atk.Role.MENU_ITEM });
this._delegate = this;
this.actor = new St.BoxLayout({ style_class: 'popup-menu-item',
reactive: params.reactive,
track_hover: params.reactive,
can_focus: params.can_focus,
accessible_role: Atk.Role.MENU_ITEM });
this.actor._delegate = this;
this._ornament = Ornament.NONE;
this._ornamentLabel = new St.Label({ style_class: 'popup-menu-ornament' });
this.add(this._ornamentLabel);
this.actor.add(this._ornamentLabel);
this._parent = null;
this._active = false;
this.active = false;
this._activatable = params.reactive && params.activate;
this._sensitive = true;
if (!this._activatable)
this.add_style_class_name('popup-inactive-menu-item');
this.actor.add_style_class_name('popup-inactive-menu-item');
if (params.style_class)
this.add_style_class_name(params.style_class);
this.actor.add_style_class_name(params.style_class);
if (this._activatable) {
this.connect('button-press-event', this._onButtonPressEvent.bind(this));
this.connect('button-release-event', this._onButtonReleaseEvent.bind(this));
this.connect('touch-event', this._onTouchEvent.bind(this));
this.connect('key-press-event', this._onKeyPressEvent.bind(this));
this.actor.connect('button-press-event', this._onButtonPressEvent.bind(this));
this.actor.connect('button-release-event', this._onButtonReleaseEvent.bind(this));
this.actor.connect('touch-event', this._onTouchEvent.bind(this));
this.actor.connect('key-press-event', this._onKeyPressEvent.bind(this));
}
if (params.reactive && params.hover)
this.bind_property('hover', this, 'active', GObject.BindingFlags.SYNC_CREATE);
}
this.actor.connect('notify::hover', this._onHoverChanged.bind(this));
get actor() {
/* This is kept for compatibility with current implementation, and we
don't want to warn here yet since PopupMenu depends on this */
return this;
this.actor.connect('key-focus-in', this._onKeyFocusIn.bind(this));
this.actor.connect('key-focus-out', this._onKeyFocusOut.bind(this));
this.actor.connect('destroy', this._onDestroy.bind(this));
}
_getTopMenu() {
@@ -124,24 +109,24 @@ var PopupBaseMenuItem = GObject.registerClass({
_onButtonPressEvent(actor, event) {
// This is the CSS active state
this.add_style_pseudo_class('active');
this.actor.add_style_pseudo_class ('active');
return Clutter.EVENT_PROPAGATE;
}
_onButtonReleaseEvent(actor, event) {
this.remove_style_pseudo_class('active');
this.actor.remove_style_pseudo_class ('active');
this.activate(event);
return Clutter.EVENT_STOP;
}
_onTouchEvent(actor, event) {
if (event.type() == Clutter.EventType.TOUCH_END) {
this.remove_style_pseudo_class('active');
this.actor.remove_style_pseudo_class ('active');
this.activate(event);
return Clutter.EVENT_STOP;
} else if (event.type() == Clutter.EventType.TOUCH_BEGIN) {
// This is the CSS active state
this.add_style_pseudo_class('active');
this.actor.add_style_pseudo_class ('active');
}
return Clutter.EVENT_PROPAGATE;
}
@@ -166,56 +151,54 @@ var PopupBaseMenuItem = GObject.registerClass({
return Clutter.EVENT_PROPAGATE;
}
vfunc_key_focus_in() {
super.vfunc_key_focus_in();
this.active = true;
_onKeyFocusIn(actor) {
this.setActive(true);
}
vfunc_key_focus_out() {
super.vfunc_key_focus_out();
this.active = false;
_onKeyFocusOut(actor) {
this.setActive(false);
}
_onHoverChanged(actor) {
this.setActive(actor.hover);
}
activate(event) {
this.emit('activate', event);
}
get active() {
return this._active;
}
set active(active) {
setActive(active) {
let activeChanged = active != this.active;
if (activeChanged) {
this._active = active;
this.active = active;
if (active) {
this.add_style_class_name('selected');
if (this.can_focus)
this.grab_key_focus();
this.actor.add_style_class_name('selected');
if (this.actor.can_focus)
this.actor.grab_key_focus();
} else {
this.remove_style_class_name('selected');
this.actor.remove_style_class_name('selected');
// Remove the CSS active state if the user press the button and
// while holding moves to another menu item, so we don't paint all items.
// The correct behaviour would be to set the new item with the CSS
// active state as well, but button-press-event is not trigered,
// so we should track it in our own, which would involve some work
// in the container
this.remove_style_pseudo_class('active');
this.actor.remove_style_pseudo_class ('active');
}
this.notify('active');
this.emit('active-changed', active);
}
}
syncSensitive() {
let sensitive = this.sensitive;
this.reactive = sensitive;
this.can_focus = sensitive;
this.notify('sensitive');
let sensitive = this.getSensitive();
this.actor.reactive = sensitive;
this.actor.can_focus = sensitive;
this.emit('sensitive-changed');
return sensitive;
}
getSensitive() {
let parentSensitive = this._parent ? this._parent.sensitive : true;
let parentSensitive = this._parent ? this._parent.getSensitive() : true;
return this._activatable && this._sensitive && parentSensitive;
}
@@ -227,12 +210,12 @@ var PopupBaseMenuItem = GObject.registerClass({
this.syncSensitive();
}
get sensitive() {
return this.getSensitive();
destroy() {
this.actor.destroy();
}
set sensitive(sensitive) {
this.setSensitive(sensitive);
_onDestroy() {
this.emit('destroy');
}
setOrnament(ornament) {
@@ -243,38 +226,36 @@ var PopupBaseMenuItem = GObject.registerClass({
if (ornament == Ornament.DOT) {
this._ornamentLabel.text = '\u2022';
this.add_accessible_state(Atk.StateType.CHECKED);
this.actor.add_accessible_state(Atk.StateType.CHECKED);
} else if (ornament == Ornament.CHECK) {
this._ornamentLabel.text = '\u2713';
this.add_accessible_state(Atk.StateType.CHECKED);
this.actor.add_accessible_state(Atk.StateType.CHECKED);
} else if (ornament == Ornament.NONE) {
this._ornamentLabel.text = '';
this.remove_accessible_state(Atk.StateType.CHECKED);
this.actor.remove_accessible_state(Atk.StateType.CHECKED);
}
}
});
};
Signals.addSignalMethods(PopupBaseMenuItem.prototype);
var PopupMenuItem = GObject.registerClass(
class PopupMenuItem extends PopupBaseMenuItem {
_init(text, params) {
super._init(params);
var PopupMenuItem = class extends PopupBaseMenuItem {
constructor(text, params) {
super(params);
this.label = new St.Label({ text: text });
this.add_child(this.label);
this.label_actor = this.label
this.actor.add_child(this.label);
this.actor.label_actor = this.label
}
});
};
var PopupSeparatorMenuItem = GObject.registerClass(
class PopupSeparatorMenuItem extends PopupBaseMenuItem {
_init(text) {
super._init({ reactive: false,
can_focus: false });
var PopupSeparatorMenuItem = class extends PopupBaseMenuItem {
constructor(text) {
super({ reactive: false,
can_focus: false});
this.label = new St.Label({ text: text || '' });
this.add(this.label);
this.label_actor = this.label;
this.actor.add(this.label);
this.actor.label_actor = this.label;
this.label.connect('notify::text',
this._syncVisibility.bind(this));
@@ -283,78 +264,75 @@ class PopupSeparatorMenuItem extends PopupBaseMenuItem {
this._separator = new St.Widget({ style_class: 'popup-separator-menu-item',
y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
this.add(this._separator, { expand: true });
this.actor.add(this._separator, { expand: true });
}
_syncVisibility() {
this.label.visible = this.label.text != '';
}
});
};
var Switch = GObject.registerClass(
class Switch extends St.Bin {
_init(state) {
super._init({ style_class: 'toggle-switch',
accessible_role: Atk.Role.CHECK_BOX,
can_focus: true });
var Switch = class {
constructor(state) {
this.actor = new St.Bin({ style_class: 'toggle-switch',
accessible_role: Atk.Role.CHECK_BOX,
can_focus: true });
this.setToggleState(state);
}
setToggleState(state) {
if (state)
this.add_style_pseudo_class('checked');
this.actor.add_style_pseudo_class('checked');
else
this.remove_style_pseudo_class('checked');
this.actor.remove_style_pseudo_class('checked');
this.state = state;
}
toggle() {
this.setToggleState(!this.state);
}
});
};
var PopupSwitchMenuItem = GObject.registerClass({
Signals: { 'toggled': { param_types: [GObject.TYPE_BOOLEAN] }, },
},
class PopupSwitchMenuItem extends PopupBaseMenuItem {
_init(text, active, params) {
super._init(params);
var PopupSwitchMenuItem = class extends PopupBaseMenuItem {
constructor(text, active, params) {
super(params);
this.label = new St.Label({ text: text });
this._switch = new Switch(active);
this.accessible_role = Atk.Role.CHECK_MENU_ITEM;
this.actor.accessible_role = Atk.Role.CHECK_MENU_ITEM;
this.checkAccessibleState();
this.label_actor = this.label;
this.actor.label_actor = this.label;
this.add_child(this.label);
this.actor.add_child(this.label);
this._statusBin = new St.Bin({ x_align: St.Align.END });
this.add(this._statusBin, { expand: true, x_align: St.Align.END });
this.actor.add(this._statusBin, { expand: true, x_align: St.Align.END });
this._statusLabel = new St.Label({ text: '',
style_class: 'popup-status-menu-item'
});
this._statusBin.child = this._switch;
this._statusBin.child = this._switch.actor;
}
setStatus(text) {
if (text != null) {
this._statusLabel.text = text;
this._statusBin.child = this._statusLabel;
this.reactive = false;
this.accessible_role = Atk.Role.MENU_ITEM;
this.actor.reactive = false;
this.actor.accessible_role = Atk.Role.MENU_ITEM;
} else {
this._statusBin.child = this._switch;
this.reactive = true;
this.accessible_role = Atk.Role.CHECK_MENU_ITEM;
this._statusBin.child = this._switch.actor;
this.actor.reactive = true;
this.actor.accessible_role = Atk.Role.CHECK_MENU_ITEM;
}
this.checkAccessibleState();
}
activate(event) {
if (this._switch.mapped)
if (this._switch.actor.mapped) {
this.toggle();
}
// we allow pressing space to toggle the switch
// without closing the menu
@@ -381,30 +359,29 @@ class PopupSwitchMenuItem extends PopupBaseMenuItem {
}
checkAccessibleState() {
switch (this.accessible_role) {
switch (this.actor.accessible_role) {
case Atk.Role.CHECK_MENU_ITEM:
if (this._switch.state)
this.add_accessible_state(Atk.StateType.CHECKED);
this.actor.add_accessible_state (Atk.StateType.CHECKED);
else
this.remove_accessible_state(Atk.StateType.CHECKED);
this.actor.remove_accessible_state (Atk.StateType.CHECKED);
break;
default:
this.remove_accessible_state(Atk.StateType.CHECKED);
this.actor.remove_accessible_state (Atk.StateType.CHECKED);
}
}
});
};
var PopupImageMenuItem = GObject.registerClass(
class PopupImageMenuItem extends PopupBaseMenuItem {
_init(text, icon, params) {
super._init(params);
var PopupImageMenuItem = class extends PopupBaseMenuItem {
constructor(text, icon, params) {
super(params);
this._icon = new St.Icon({ style_class: 'popup-menu-icon',
x_align: Clutter.ActorAlign.END });
this.add_child(this._icon);
this.actor.add_child(this._icon);
this.label = new St.Label({ text: text });
this.add_child(this.label);
this.label_actor = this.label;
this.actor.add_child(this.label);
this.actor.label_actor = this.label;
this.setIcon(icon);
}
@@ -416,7 +393,7 @@ class PopupImageMenuItem extends PopupBaseMenuItem {
else
this._icon.icon_name = icon;
}
});
};
var PopupMenuBase = class {
constructor(sourceActor, styleClass) {
@@ -460,21 +437,13 @@ var PopupMenuBase = class {
}
getSensitive() {
let parentSensitive = this._parent ? this._parent.sensitive : true;
let parentSensitive = this._parent ? this._parent.getSensitive() : true;
return this._sensitive && parentSensitive;
}
setSensitive(sensitive) {
this._sensitive = sensitive;
this.emit('notify::sensitive');
}
get sensitive() {
return this.getSensitive();
}
set sensitive(sensitive) {
this.setSensitive(sensitive);
this.emit('sensitive-changed');
}
_sessionUpdated() {
@@ -510,7 +479,7 @@ var PopupMenuBase = class {
app.activate();
});
menuItem.visible = Main.sessionMode.allowSettings;
menuItem.actor.visible = Main.sessionMode.allowSettings;
this._settingsActions[desktopFile] = menuItem;
return menuItem;
@@ -519,7 +488,7 @@ var PopupMenuBase = class {
_setSettingsVisibility(visible) {
for (let id in this._settingsActions) {
let item = this._settingsActions[id];
item.visible = visible;
item.actor.visible = visible;
}
}
@@ -542,17 +511,16 @@ var PopupMenuBase = class {
_subMenuActiveChanged(submenu, submenuItem) {
if (this._activeMenuItem && this._activeMenuItem != submenuItem)
this._activeMenuItem.active = false;
this._activeMenuItem.setActive(false);
this._activeMenuItem = submenuItem;
this.emit('active-changed', submenuItem);
}
_connectItemSignals(menuItem) {
menuItem._activeChangeId = menuItem.connect('notify::active', (menuItem) => {
let active = menuItem.active;
menuItem._activeChangeId = menuItem.connect('active-changed', (menuItem, active) => {
if (active && this._activeMenuItem != menuItem) {
if (this._activeMenuItem)
this._activeMenuItem.active = false;
this._activeMenuItem.setActive(false);
this._activeMenuItem = menuItem;
this.emit('active-changed', menuItem);
} else if (!active && this._activeMenuItem == menuItem) {
@@ -560,8 +528,8 @@ var PopupMenuBase = class {
this.emit('active-changed', null);
}
});
menuItem._sensitiveChangeId = menuItem.connect('notify::sensitive', () => {
let sensitive = menuItem.sensitive;
menuItem._sensitiveChangeId = menuItem.connect('sensitive-changed', () => {
let sensitive = menuItem.getSensitive();
if (!sensitive && this._activeMenuItem == menuItem) {
if (!this.actor.navigate_focus(menuItem.actor,
St.DirectionType.TAB_FORWARD,
@@ -577,7 +545,7 @@ var PopupMenuBase = class {
this.itemActivated(BoxPointer.PopupAnimation.FULL);
});
menuItem._parentSensitiveChangeId = this.connect('notify::sensitive', () => {
menuItem._parentSensitiveChangeId = this.connect('sensitive-changed', () => {
menuItem.syncSensitive();
});
@@ -629,7 +597,7 @@ var PopupMenuBase = class {
return;
}
menuItem.show();
menuItem.actor.show();
}
moveMenuItem(menuItem, position) {
@@ -676,8 +644,8 @@ var PopupMenuBase = class {
let parentClosingId = this.connect('menu-closed', () => {
menuItem.emit('menu-closed');
});
let subMenuSensitiveChangedId = this.connect('notify::sensitive', () => {
menuItem.emit('notify::sensitive');
let subMenuSensitiveChangedId = this.connect('sensitive-changed', () => {
menuItem.emit('sensitive-changed');
});
menuItem.connect('destroy', () => {
@@ -883,7 +851,7 @@ var PopupMenu = class extends PopupMenuBase {
close(animate) {
if (this._activeMenuItem)
this._activeMenuItem.active = false;
this._activeMenuItem.setActive(false);
if (this._boxPointer.visible) {
this._boxPointer.close(animate, () => {
@@ -916,10 +884,6 @@ var PopupDummyMenu = class {
return true;
}
get sensitive() {
return this.getSensitive();
}
open() { this.emit('open-state-changed', true); }
close() { this.emit('open-state-changed', false); }
toggle() {}
@@ -959,11 +923,7 @@ var PopupSubMenu = class extends PopupMenuBase {
}
getSensitive() {
return this._sensitive && this.sourceActor.sensitive;
}
get sensitive() {
return this.getSensitive();
return this._sensitive && this.sourceActor._delegate.getSensitive();
}
open(animate) {
@@ -1030,7 +990,7 @@ var PopupSubMenu = class extends PopupMenuBase {
this.emit('open-state-changed', false);
if (this._activeMenuItem)
this._activeMenuItem.active = false;
this._activeMenuItem.setActive(false);
if (animate && this._needsScrollbar())
animate = false;
@@ -1062,7 +1022,7 @@ var PopupSubMenu = class extends PopupMenuBase {
if (this.isOpen && event.get_key_symbol() == Clutter.KEY_Left) {
this.close(BoxPointer.PopupAnimation.FULL);
this.sourceActor._delegate.active = true;
this.sourceActor._delegate.setActive(true);
return Clutter.EVENT_STOP;
}
@@ -1093,26 +1053,25 @@ var PopupMenuSection = class extends PopupMenuBase {
close() { this.emit('open-state-changed', false); }
};
var PopupSubMenuMenuItem = GObject.registerClass(
class PopupSubMenuMenuItem extends PopupBaseMenuItem {
_init(text, wantIcon) {
super._init();
var PopupSubMenuMenuItem = class extends PopupBaseMenuItem {
constructor(text, wantIcon) {
super();
this.add_style_class_name('popup-submenu-menu-item');
this.actor.add_style_class_name('popup-submenu-menu-item');
if (wantIcon) {
this.icon = new St.Icon({ style_class: 'popup-menu-icon' });
this.add_child(this.icon);
this.actor.add_child(this.icon);
}
this.label = new St.Label({ text: text,
y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
this.add_child(this.label);
this.label_actor = this.label;
this.actor.add_child(this.label);
this.actor.label_actor = this.label;
let expander = new St.Bin({ style_class: 'popup-menu-item-expander' });
this.add(expander, { expand: true });
this.actor.add(expander, { expand: true });
this._triangle = arrowIcon(St.Side.RIGHT);
this._triangle.pivot_point = new Clutter.Point({ x: 0.5, y: 0.6 });
@@ -1121,12 +1080,11 @@ class PopupSubMenuMenuItem extends PopupBaseMenuItem {
y_align: Clutter.ActorAlign.CENTER });
this._triangleBin.add_child(this._triangle);
this.add_child(this._triangleBin);
this.add_accessible_state(Atk.StateType.EXPANDABLE);
this.actor.add_child(this._triangleBin);
this.actor.add_accessible_state (Atk.StateType.EXPANDABLE);
this.menu = new PopupSubMenu(this, this._triangle);
this.menu = new PopupSubMenu(this.actor, this._triangle);
this.menu.connect('open-state-changed', this._subMenuOpenStateChanged.bind(this));
this.connect('destroy', () => { this.menu.destroy(); });
}
_setParent(parent) {
@@ -1143,18 +1101,24 @@ class PopupSubMenuMenuItem extends PopupBaseMenuItem {
_subMenuOpenStateChanged(menu, open) {
if (open) {
this.add_style_pseudo_class('open');
this.actor.add_style_pseudo_class('open');
this._getTopMenu()._setOpenedSubMenu(this.menu);
this.add_accessible_state(Atk.StateType.EXPANDED);
this.add_style_pseudo_class('checked');
this.actor.add_accessible_state (Atk.StateType.EXPANDED);
this.actor.add_style_pseudo_class('checked');
} else {
this.remove_style_pseudo_class('open');
this.actor.remove_style_pseudo_class('open');
this._getTopMenu()._setOpenedSubMenu(null);
this.remove_accessible_state (Atk.StateType.EXPANDED);
this.remove_style_pseudo_class('checked');
this.actor.remove_accessible_state (Atk.StateType.EXPANDED);
this.actor.remove_style_pseudo_class('checked');
}
}
destroy() {
this.menu.destroy();
super.destroy();
}
setSubmenuShown(open) {
if (open)
this.menu.open(BoxPointer.PopupAnimation.FULL);
@@ -1192,7 +1156,7 @@ class PopupSubMenuMenuItem extends PopupBaseMenuItem {
_onButtonReleaseEvent(actor) {
// Since we override the parent, we need to manage what the parent does
// with the active style class
this.remove_style_pseudo_class('active');
this.actor.remove_style_pseudo_class ('active');
this._setOpenState(!this._getOpenState());
return Clutter.EVENT_PROPAGATE;
}
@@ -1201,12 +1165,12 @@ class PopupSubMenuMenuItem extends PopupBaseMenuItem {
if (event.type() == Clutter.EventType.TOUCH_END) {
// Since we override the parent, we need to manage what the parent does
// with the active style class
this.remove_style_pseudo_class('active');
this.actor.remove_style_pseudo_class ('active');
this._setOpenState(!this._getOpenState());
}
return Clutter.EVENT_PROPAGATE;
}
});
};
/* Basic implementation of a menu manager.
* Call addMenu to add menus

View File

@@ -118,9 +118,9 @@ var Indicator = class extends PanelMenu.SystemIndicator {
// Remember if there were setup devices and show the menu
// if we've seen setup devices and we're not hard blocked
if (nDevices > 0)
this._item.visible = !this._proxy.BluetoothHardwareAirplaneMode;
this._item.actor.visible = !this._proxy.BluetoothHardwareAirplaneMode;
else
this._item.visible = this._proxy.BluetoothHasAirplaneMode && !this._proxy.BluetoothAirplaneMode;
this._item.actor.visible = this._proxy.BluetoothHasAirplaneMode && !this._proxy.BluetoothAirplaneMode;
if (nConnectedDevices > 0)
/* Translators: this is the number of connected bluetooth devices */

View File

@@ -37,12 +37,12 @@ var Indicator = class extends PanelMenu.SystemIndicator {
let icon = new St.Icon({ icon_name: 'display-brightness-symbolic',
style_class: 'popup-menu-icon' });
this._item.add(icon);
this._item.add(this._slider.actor, { expand: true });
this._item.connect('button-press-event', (actor, event) => {
this._item.actor.add(icon);
this._item.actor.add(this._slider.actor, { expand: true });
this._item.actor.connect('button-press-event', (actor, event) => {
return this._slider.startDragging(event);
});
this._item.connect('key-press-event', (actor, event) => {
this._item.actor.connect('key-press-event', (actor, event) => {
return this._slider.onKeyPressEvent(actor, event);
});
@@ -55,7 +55,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
_sync() {
let visible = this._proxy.Brightness >= 0;
this._item.visible = visible;
this._item.actor.visible = visible;
if (visible)
this._slider.setValue(this._proxy.Brightness / 100.0);
}

View File

@@ -15,18 +15,17 @@ const Util = imports.misc.util;
const INPUT_SOURCE_TYPE_XKB = 'xkb';
const INPUT_SOURCE_TYPE_IBUS = 'ibus';
var LayoutMenuItem = GObject.registerClass(
class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem {
_init(displayName, shortName) {
super._init();
var LayoutMenuItem = class extends PopupMenu.PopupBaseMenuItem {
constructor(displayName, shortName) {
super();
this.label = new St.Label({ text: displayName });
this.indicator = new St.Label({ text: shortName });
this.add(this.label, { expand: true });
this.add(this.indicator);
this.label_actor = this.label;
this.actor.add(this.label, { expand: true });
this.actor.add(this.indicator);
this.actor.label_actor = this.label;
}
});
};
var InputSource = class {
constructor(type, id, displayName, shortName, index) {
@@ -858,7 +857,7 @@ class InputSourceIndicator extends PanelMenu.Button {
// but at least for now it is used as "allow popping up windows
// from shell menus"; we can always add a separate sessionMode
// option if need arises.
this._showLayoutItem.visible = Main.sessionMode.allowSettings;
this._showLayoutItem.actor.visible = Main.sessionMode.allowSettings;
}
_sourcesChanged() {

View File

@@ -101,12 +101,12 @@ var Indicator = class extends PanelMenu.SystemIndicator {
_syncIndicator() {
if (this._managerProxy == null) {
this._indicator.visible = false;
this._item.visible = false;
this._item.actor.visible = false;
return;
}
this._indicator.visible = this._managerProxy.InUse;
this._item.visible = this._indicator.visible;
this._item.actor.visible = this._indicator.visible;
this._updateMenuLabels();
}

View File

@@ -235,14 +235,14 @@ var NMConnectionSection = class NMConnectionSection {
if (!this._connectionValid(connection))
return;
// This function is called every time the connection is added or updated.
// This function is called everytime connection is added or updated
// In the usual case, we already added this connection and UUID
// didn't change. So we need to check if we already have an item,
// and update it for properties in the connection that changed
// (the only one we care about is the name)
// But it's also possible we didn't know about this connection
// (eg, during coldplug, or because it was updated and suddenly
// it's valid for this device), in which case we add a new item.
// it's valid for this device), in which case we add a new item
let item = this._connectionItems.get(connection.get_uuid());
if (item)
@@ -389,8 +389,8 @@ var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection {
_sync() {
let nItems = this._connectionItems.size;
this._autoConnectItem.visible = (nItems == 0);
this._deactivateItem.visible = this._device.state > NM.DeviceState.DISCONNECTED;
this._autoConnectItem.actor.visible = (nItems == 0);
this._deactivateItem.actor.visible = this._device.state > NM.DeviceState.DISCONNECTED;
if (this._activeConnection == null) {
let activeConnection = this._device.active_connection;
@@ -477,7 +477,7 @@ var NMDeviceWired = class extends NMConnectionDevice {
}
_sync() {
this.item.visible = this._hasCarrier();
this.item.actor.visible = this._hasCarrier();
super._sync();
}
@@ -1076,7 +1076,7 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog {
let newPos = Util.insertSorted(this._networks, network, this._networkSortFunction);
this._createNetworkItem(network);
this._itemBox.insert_child_at_index(network.item, newPos);
this._itemBox.insert_child_at_index(network.item.actor, newPos);
}
this._syncView();
@@ -1094,7 +1094,7 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog {
network.accessPoints.splice(res.ap, 1);
if (network.accessPoints.length == 0) {
network.item.destroy();
network.item.actor.destroy();
this._networks.splice(res.network, 1);
} else {
network.item.updateBestAP(network.accessPoints[0]);
@@ -1110,7 +1110,7 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog {
this._itemBox.remove_all_children();
this._networks.forEach(network => {
this._itemBox.add_child(network.item);
this._itemBox.add_child(network.item.actor);
});
adjustment.value = scrollValue;
@@ -1118,25 +1118,25 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog {
_selectNetwork(network) {
if (this._selectedNetwork)
this._selectedNetwork.item.remove_style_pseudo_class('selected');
this._selectedNetwork.item.actor.remove_style_pseudo_class('selected');
this._selectedNetwork = network;
this._updateSensitivity();
if (this._selectedNetwork)
this._selectedNetwork.item.add_style_pseudo_class('selected');
this._selectedNetwork.item.actor.add_style_pseudo_class('selected');
}
_createNetworkItem(network) {
network.item = new NMWirelessDialogItem(network);
network.item.setActive(network == this._selectedNetwork);
network.item.connect('selected', () => {
Util.ensureActorVisibleInScrollView(this._scrollView, network.item);
Util.ensureActorVisibleInScrollView(this._scrollView, network.item.actor);
this._selectNetwork(network);
});
network.item.connect('destroy', () => {
network.item.actor.connect('destroy', () => {
let keyFocus = global.stage.key_focus;
if (keyFocus && keyFocus.contains(network.item))
if (keyFocus && keyFocus.contains(network.item.actor))
this._itemBox.grab_key_focus();
});
}
@@ -1262,7 +1262,7 @@ var NMDeviceWireless = class {
_sync() {
this._toggleItem.label.text = this._client.wireless_enabled ? _("Turn Off") : _("Turn On");
this._toggleItem.visible = this._client.wireless_hardware_enabled;
this._toggleItem.actor.visible = this._client.wireless_hardware_enabled;
this.item.icon.icon_name = this._getMenuIcon();
this.item.label.text = this._getStatus();
@@ -1452,7 +1452,7 @@ var NMVpnSection = class extends NMConnectionSection {
_sync() {
let nItems = this._connectionItems.size;
this.item.visible = (nItems > 0);
this.item.actor.visible = (nItems > 0);
super._sync();
}
@@ -1535,7 +1535,7 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection {
this._summaryItem.menu.addSettingsAction(_('Network Settings'),
'gnome-network-panel.desktop');
this._summaryItem.hide();
this._summaryItem.actor.hide();
}
@@ -1544,7 +1544,7 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection {
(prev, child) => prev + (child.visible ? 1 : 0), 0);
this._summaryItem.label.text = this._getSummaryLabel(nDevices);
let shouldSummarize = nDevices > MAX_DEVICE_ITEMS;
this._summaryItem.visible = shouldSummarize;
this._summaryItem.actor.visible = shouldSummarize;
this.section.actor.visible = !shouldSummarize;
}
@@ -1731,24 +1731,14 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
this._addDeviceWrapper(wrapper);
this._nmDevices.push(device);
this._deviceChanged(device, skipSyncDeviceNames);
if (!skipSyncDeviceNames)
this._syncDeviceNames();
device.connect('notify::interface', () => {
this._deviceChanged(device, false);
});
}
}
_deviceChanged(device, skipSyncDeviceNames) {
let wrapper = device._delegate;
if (!skipSyncDeviceNames)
this._syncDeviceNames();
if (wrapper instanceof NMConnectionSection) {
this._connections.forEach(connection => {
wrapper.checkConnection(connection);
});
if (wrapper instanceof NMConnectionSection) {
this._connections.forEach(connection => {
wrapper.checkConnection(connection);
});
}
}
}

View File

@@ -61,6 +61,6 @@ var Indicator = class extends PanelMenu.SystemIndicator {
: _("Night Light On");
this._disableItem.label.text = disabled ? _("Resume")
: _("Disable Until Tomorrow");
this._item.visible = this._indicator.visible = visible;
this._item.actor.visible = this._indicator.visible = visible;
}
};

View File

@@ -96,11 +96,11 @@ var Indicator = class extends PanelMenu.SystemIndicator {
// Do we have batteries or a UPS?
let visible = this._proxy.IsPresent;
if (visible) {
this._item.show();
this._item.actor.show();
this._percentageLabel.visible = this._desktopSettings.get_boolean(SHOW_BATTERY_PERCENTAGE);
} else {
// If there's no battery, then we use the power icon.
this._item.hide();
this._item.actor.hide();
this._indicator.icon_name = 'system-shutdown-symbolic';
this._percentageLabel.hide();
return;

View File

@@ -53,10 +53,10 @@ var RemoteAccessApplet = class extends PanelMenu.SystemIndicator {
_sync() {
if (this._handles.size == 0) {
this._indicator.visible = false;
this._item.visible = false;
this._item.actor.visible = false;
} else {
this._indicator.visible = true;
this._item.visible = true;
this._item.actor.visible = true;
}
}

View File

@@ -97,7 +97,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
let showAirplaneMode = this._manager.shouldShowAirplaneMode;
this._indicator.visible = (airplaneMode && showAirplaneMode);
this._item.visible = (airplaneMode && showAirplaneMode);
this._item.actor.visible = (airplaneMode && showAirplaneMode);
this._offItem.setSensitive(!hwAirplaneMode);
if (hwAirplaneMode)

View File

@@ -116,10 +116,10 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._createSubMenu();
this._loginScreenItem.connect('notify::visible',
() => { this._updateMultiUser(); });
this._logoutItem.connect('notify::visible',
() => { this._updateMultiUser(); });
this._loginScreenItem.actor.connect('notify::visible',
() => { this._updateMultiUser(); });
this._logoutItem.actor.connect('notify::visible',
() => { this._updateMultiUser(); });
// Whether shutdown is available or not depends on both lockdown
// settings (disable-log-out) and Polkit policy - the latter doesn't
// notify, so we update the menu item each time the menu opens or
@@ -142,7 +142,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._lockScreenAction.visible ||
this._altSwitcher.actor.visible);
this.buttonGroup.visible = visible;
this._actionsItem.actor.visible = visible;
}
_sessionUpdated() {
@@ -150,10 +150,10 @@ var Indicator = class extends PanelMenu.SystemIndicator {
}
_updateMultiUser() {
let hasSwitchUser = this._loginScreenItem.visible;
let hasLogout = this._logoutItem.visible;
let hasSwitchUser = this._loginScreenItem.actor.visible;
let hasLogout = this._logoutItem.actor.visible;
this._switchUserSubMenu.visible = hasSwitchUser || hasLogout;
this._switchUserSubMenu.actor.visible = hasSwitchUser || hasLogout;
}
_updateSwitchUserSubMenu() {
@@ -208,7 +208,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._switchUserSubMenu.menu.addMenuItem(item);
this._loginScreenItem = item;
this._systemActions.bind_property('can-switch-user',
this._loginScreenItem,
this._loginScreenItem.actor,
'visible',
bindFlags);
@@ -220,7 +220,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._switchUserSubMenu.menu.addMenuItem(item);
this._logoutItem = item;
this._systemActions.bind_property('can-logout',
this._logoutItem,
this._logoutItem.actor,
'visible',
bindFlags);
@@ -236,7 +236,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
item = new PopupMenu.PopupBaseMenuItem({ reactive: false,
can_focus: false });
this.buttonGroup = item;
this.buttonGroup = item.actor;
let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app(
'gnome-control-center.desktop'
@@ -251,14 +251,14 @@ var Indicator = class extends PanelMenu.SystemIndicator {
log('Missing required core component Settings, expect trouble…');
this._settingsAction = new St.Widget();
}
item.add(this._settingsAction, { expand: true, x_fill: false });
item.actor.add(this._settingsAction, { expand: true, x_fill: false });
this._orientationLockAction = this._createActionButton('', _("Orientation Lock"));
this._orientationLockAction.connect('clicked', () => {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE),
this._systemActions.activateLockOrientation();
});
item.add(this._orientationLockAction, { expand: true, x_fill: false });
item.actor.add(this._orientationLockAction, { expand: true, x_fill: false });
this._systemActions.bind_property('can-lock-orientation',
this._orientationLockAction,
'visible',
@@ -273,7 +273,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
this._systemActions.activateLockScreen();
});
item.add(this._lockScreenAction, { expand: true, x_fill: false });
item.actor.add(this._lockScreenAction, { expand: true, x_fill: false });
this._systemActions.bind_property('can-lock-screen',
this._lockScreenAction,
'visible',
@@ -300,8 +300,9 @@ var Indicator = class extends PanelMenu.SystemIndicator {
bindFlags);
this._altSwitcher = new AltSwitcher(this._powerOffAction, this._suspendAction);
item.add(this._altSwitcher.actor, { expand: true, x_fill: false });
item.actor.add(this._altSwitcher.actor, { expand: true, x_fill: false });
this._actionsItem = item;
this.menu.addMenuItem(item);

View File

@@ -41,12 +41,12 @@ var StreamSlider = class {
this._slider.connect('drag-end', this._notifyVolumeChange.bind(this));
this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
this.item.add(this._icon);
this.item.add(this._slider.actor, { expand: true });
this.item.connect('button-press-event', (actor, event) => {
this.item.actor.add(this._icon);
this.item.actor.add(this._slider.actor, { expand: true });
this.item.actor.connect('button-press-event', (actor, event) => {
return this._slider.startDragging(event);
});
this.item.connect('key-press-event', (actor, event) => {
this.item.actor.connect('key-press-event', (actor, event) => {
return this._slider.onKeyPressEvent(actor, event);
});
@@ -93,7 +93,7 @@ var StreamSlider = class {
_updateVisibility() {
let visible = this._shouldBeVisible();
this.item.visible = visible;
this.item.actor.visible = visible;
}
scroll(event) {

View File

@@ -30,10 +30,12 @@ function primaryModifier(mask) {
return primary;
}
var SwitcherPopup = GObject.registerClass({
GTypeFlags: GObject.TypeFlags.ABSTRACT
}, class SwitcherPopup extends St.Widget {
var SwitcherPopup = GObject.registerClass(
class SwitcherPopup extends St.Widget {
_init(items) {
if (this.constructor.name === SwitcherPopup.prototype.constructor.name)
throw new TypeError(`Cannot instantiate abstract class ${this.constructor.name}`);
super._init({ style_class: 'switcher-popup',
reactive: true,
visible: false });

View File

@@ -152,7 +152,7 @@ function registerSpecialPropertySplitter(name, splitFunction, parameters) {
// Tweener to a Clutter.TimeLine. Now, Clutter.Timeline itself isn't a
// whole lot more sophisticated than a simple timeout at a fixed frame
// rate, but at least it knows how to drop frames. (See
// HippoAnimationManager for a more sophisticated view of continuous
// HippoAnimationManager for a more sophisticated view of continous
// time updates; even better is to pay attention to the vertical
// vblank and sync to that when possible.)
//

View File

@@ -11,6 +11,7 @@ const WorkspaceSwitcherPopup = imports.ui.workspaceSwitcherPopup;
const InhibitShortcutsDialog = imports.ui.inhibitShortcutsDialog;
const Main = imports.ui.main;
const ModalDialog = imports.ui.modalDialog;
const Tweener = imports.ui.tweener;
const WindowMenu = imports.ui.windowMenu;
const PadOsd = imports.ui.padOsd;
const EdgeDragAction = imports.ui.edgeDragAction;
@@ -20,15 +21,15 @@ const SwitchMonitor = imports.ui.switchMonitor;
const { loadInterfaceXML } = imports.misc.fileUtils;
var SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
var MINIMIZE_WINDOW_ANIMATION_TIME = 200; // ms
var SHOW_WINDOW_ANIMATION_TIME = 150; // ms
var DIALOG_SHOW_WINDOW_ANIMATION_TIME = 100; // ms
var DESTROY_WINDOW_ANIMATION_TIME = 150; // ms
var DIALOG_DESTROY_WINDOW_ANIMATION_TIME = 100; // ms
var WINDOW_ANIMATION_TIME = 250; // ms
var MINIMIZE_WINDOW_ANIMATION_TIME = 0.2;
var SHOW_WINDOW_ANIMATION_TIME = 0.15;
var DIALOG_SHOW_WINDOW_ANIMATION_TIME = 0.1;
var DESTROY_WINDOW_ANIMATION_TIME = 0.15;
var DIALOG_DESTROY_WINDOW_ANIMATION_TIME = 0.1;
var WINDOW_ANIMATION_TIME = 0.25;
var DIM_BRIGHTNESS = -0.3;
var DIM_TIME = 500; // ms
var UNDIM_TIME = 250; // ms
var DIM_TIME = 0.500;
var UNDIM_TIME = 0.250;
var MOTION_THRESHOLD = 100;
var ONE_SECOND = 1000; // in ms
@@ -58,7 +59,7 @@ var DisplayChangeDialog = class extends ModalDialog.ModalDialog {
{ x_fill: true,
y_fill: true });
/* Translators: this and the following message should be limited in length,
/* Translators: this and the following message should be limited in lenght,
to avoid ellipsizing the labels.
*/
this._cancelButton = this.addButton({ label: _("Revert Settings"),
@@ -114,39 +115,16 @@ var DisplayChangeDialog = class extends ModalDialog.ModalDialog {
var WindowDimmer = class {
constructor(actor) {
this._brightnessEffect = new Clutter.BrightnessContrastEffect({
name: 'dim',
enabled: false
});
this._brightnessEffect = new Clutter.BrightnessContrastEffect();
actor.add_effect(this._brightnessEffect);
this.actor = actor;
this._enabled = true;
this._dimmed = false;
this._dimFactor = 0.0;
this._syncEnabled();
}
_syncEnabled() {
this._brightnessEffect.enabled =
(this._enabled && (this._dimmed || this._transition != null));
}
get _transition() {
return this.actor.get_transition('dim');
}
_ensureTransition() {
if (this._transition)
return;
let params = {
propertyName: '@effects.dim.brightness',
progressMode: Clutter.AnimationMode.LINEAR,
duration: (this._dimmed ? DIM_TIME : UNDIM_TIME),
removeOnComplete: true
};
this.actor.add_transition('dim',
new Clutter.PropertyTransition(params));
this._transition.connect('completed', this._syncEnabled.bind(this));
this._brightnessEffect.enabled = (this._enabled && this._dimFactor > 0);
}
setEnabled(enabled) {
@@ -154,21 +132,15 @@ var WindowDimmer = class {
this._syncEnabled();
}
setDimmed(dimmed, animate) {
this._dimmed = dimmed;
let val = 127 * (1 + dimmed * DIM_BRIGHTNESS);
let color = Clutter.Color.new(val, val, val, 255);
if (animate) {
this._ensureTransition();
this._transition.set_to(color);
} else {
this._effect.brightness = color;
}
set dimFactor(factor) {
this._dimFactor = factor;
this._brightnessEffect.set_brightness(factor * DIM_BRIGHTNESS);
this._syncEnabled();
}
get dimFactor() {
return this._dimFactor;
}
};
function getWindowDimmer(actor) {
@@ -440,16 +412,15 @@ var TilePreview = class {
this._showing = true;
this.actor.show();
this.actor.ease({
x: tileRect.x,
y: tileRect.y,
width: tileRect.width,
height: tileRect.height,
opacity: 255
}, {
duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
});
Tweener.addTween(this.actor,
{ x: tileRect.x,
y: tileRect.y,
width: tileRect.width,
height: tileRect.height,
opacity: 255,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad'
});
}
hide() {
@@ -457,13 +428,12 @@ var TilePreview = class {
return;
this._showing = false;
this.actor.ease({
opacity: 0
}, {
duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this._reset()
});
Tweener.addTween(this.actor,
{ opacity: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._reset.bind(this)
});
}
_reset() {
@@ -1165,16 +1135,15 @@ var WindowManager = class {
return;
let switchData = this._switchData;
this._switchData = null;
switchData.container.ease({
x: 0,
y: 0
}, {
time: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._finishWorkspaceSwitch(switchData);
}
});
Tweener.addTween(switchData.container,
{ x: 0,
y: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._finishWorkspaceSwitch,
onCompleteScope: this,
onCompleteParams: [switchData],
});
}
_actionSwitchWorkspace(action, direction) {
@@ -1344,18 +1313,17 @@ var WindowManager = class {
this._minimizing.push(actor);
if (actor.meta_window.is_monitor_sized()) {
actor.ease({
opacity: 0
}, {
duration: MINIMIZE_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: isFinished => {
if (isFinished)
this._minimizeWindowDone(shellwm, actor);
else
this._minimizeWindowOverwritten(shellwm, actor);
},
});
Tweener.addTween(actor,
{ opacity: 0,
time: MINIMIZE_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._minimizeWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor],
onOverwrite: this._minimizeWindowOverwritten,
onOverwriteScope: this,
onOverwriteParams: [shellwm, actor]
});
} else {
let xDest, yDest, xScale, yScale;
let [success, geom] = actor.meta_window.get_icon_geometry();
@@ -1378,27 +1346,26 @@ var WindowManager = class {
yScale = 0;
}
actor.ease({
scale_x: xScale,
scale_y: yScale,
x: xDest,
y: yDest
}, {
duration: MINIMIZE_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_IN_EXPO,
onStopped: isFinished => {
if (isFinished)
this._minimizeWindowDone(shellwm, actor);
else
this._minimizeWindowOverwritten(shellwm, actor);
}
});
Tweener.addTween(actor,
{ scale_x: xScale,
scale_y: yScale,
x: xDest,
y: yDest,
time: MINIMIZE_WINDOW_ANIMATION_TIME,
transition: 'easeInExpo',
onComplete: this._minimizeWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor],
onOverwrite: this._minimizeWindowOverwritten,
onOverwriteScope: this,
onOverwriteParams: [shellwm, actor]
});
}
}
_minimizeWindowDone(shellwm, actor) {
if (this._removeEffect(this._minimizing, actor)) {
actor.remove_all_transitions();
Tweener.removeTweens(actor);
actor.set_scale(1.0, 1.0);
actor.set_opacity(255);
actor.set_pivot_point(0, 0);
@@ -1427,18 +1394,17 @@ var WindowManager = class {
if (actor.meta_window.is_monitor_sized()) {
actor.opacity = 0;
actor.set_scale(1.0, 1.0);
actor.ease({
opacity: 255
}, {
duration: MINIMIZE_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: isFinished => {
if (isFinished)
this._unminimizeWindowDone(shellwm, actor);
else
this._unminimizeWindowOverwritten(shellwm, actor);
}
});
Tweener.addTween(actor,
{ opacity: 255,
time: MINIMIZE_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._unminimizeWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor],
onOverwrite: this._unminimizeWindowOverwritten,
onOverwriteScope: this,
onOverwriteParams: [shellwm, actor]
});
} else {
let [success, geom] = actor.meta_window.get_icon_geometry();
if (success) {
@@ -1462,27 +1428,26 @@ var WindowManager = class {
let [xDest, yDest] = [rect.x, rect.y];
actor.show();
actor.ease({
scale_x: 1,
scale_y: 1,
x: xDest,
y: yDest
}, {
duration: MINIMIZE_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_IN_EXPO,
onStopped: isFinished => {
if (isFinished)
this._unminimizeWindowDone(shellwm, actor);
else
this._unminimizeWindowOverwritten(shellwm, actor);
}
});
Tweener.addTween(actor,
{ scale_x: 1.0,
scale_y: 1.0,
x: xDest,
y: yDest,
time: MINIMIZE_WINDOW_ANIMATION_TIME,
transition: 'easeInExpo',
onComplete: this._unminimizeWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor],
onOverwrite: this._unminimizeWindowOverwritten,
onOverwriteScope: this,
onOverwriteParams: [shellwm, actor]
});
}
}
_unminimizeWindowDone(shellwm, actor) {
if (this._removeEffect(this._unminimizing, actor)) {
actor.remove_all_transitions();
Tweener.removeTweens(actor);
actor.set_scale(1.0, 1.0);
actor.set_opacity(255);
actor.set_pivot_point(0, 0);
@@ -1548,16 +1513,15 @@ var WindowManager = class {
this._resizing.push(actor);
// Now scale and fade out the clone
actorClone.ease({
x: targetRect.x,
y: targetRect.y,
scale_x: scaleX,
scale_y: scaleY,
opacity: 0
}, {
duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
});
Tweener.addTween(actorClone,
{ x: targetRect.x,
y: targetRect.y,
scale_x: scaleX,
scale_y: scaleY,
opacity: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad'
});
actor.translation_x = -targetRect.x + sourceRect.x;
actor.translation_y = -targetRect.y + sourceRect.y;
@@ -1567,21 +1531,20 @@ var WindowManager = class {
actor.scale_y = 1 / scaleY;
// Scale it to its actual new size
actor.ease({
scale_x: 1,
scale_y: 1,
translation_x: 0,
translation_y: 0
}, {
duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: isFinished => {
if (isFinished)
this._sizeChangeWindowDone(shellwm, actor);
else
this._sizeChangeWindowOverwritten(shellwm, actor);
}
});
Tweener.addTween(actor,
{ scale_x: 1.0,
scale_y: 1.0,
translation_x: 0,
translation_y: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._sizeChangeWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor],
onOverwrite: this._sizeChangeWindowOverwritten,
onOverwriteScope: this,
onOverwriteParams: [shellwm, actor]
});
// Now unfreeze actor updates, to get it to the new size.
// It's important that we don't wait until the animation is completed to
@@ -1601,7 +1564,7 @@ var WindowManager = class {
_sizeChangeWindowDone(shellwm, actor) {
if (this._removeEffect(this._resizing, actor)) {
actor.remove_all_transitions();
Tweener.removeTweens(actor);
actor.scale_x = 1.0;
actor.scale_y = 1.0;
actor.translation_x = 0;
@@ -1651,7 +1614,14 @@ var WindowManager = class {
let dimmer = getWindowDimmer(actor);
if (!dimmer)
return;
dimmer.setDimmed(true, this._shouldAnimate());
if (this._shouldAnimate())
Tweener.addTween(dimmer,
{ dimFactor: 1.0,
time: DIM_TIME,
transition: 'linear'
});
else
dimmer.dimFactor = 1.0;
}
_undimWindow(window) {
@@ -1661,7 +1631,13 @@ var WindowManager = class {
let dimmer = getWindowDimmer(actor);
if (!dimmer)
return;
dimmer.setDimmed(false, this._shouldAnimate());
if (this._shouldAnimate())
Tweener.addTween(dimmer,
{ dimFactor: 0.0,
time: UNDIM_TIME,
transition: 'linear' });
else
dimmer.dimFactor = 0.0;
}
_mapWindow(shellwm, actor) {
@@ -1706,20 +1682,19 @@ var WindowManager = class {
actor.show();
this._mapping.push(actor);
actor.ease({
opacity: 255,
scale_x: 1,
scale_y: 1
}, {
duration: SHOW_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_EXPO,
onStopped: isFinished => {
if (isFinished)
this._mapWindowDone(shellwm, actor);
else
this._mapWindowOverwrite(shellwm, actor);
}
});
Tweener.addTween(actor,
{ opacity: 255,
scale_x: 1,
scale_y: 1,
time: SHOW_WINDOW_ANIMATION_TIME,
transition: 'easeOutExpo',
onComplete: this._mapWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor],
onOverwrite: this._mapWindowOverwrite,
onOverwriteScope: this,
onOverwriteParams: [shellwm, actor]
});
break;
case Meta.WindowType.MODAL_DIALOG:
case Meta.WindowType.DIALOG:
@@ -1729,20 +1704,19 @@ var WindowManager = class {
actor.show();
this._mapping.push(actor);
actor.ease({
opacity: 255,
scale_x: 1,
scale_y: 1
}, {
duration: DIALOG_SHOW_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: isFinished => {
if (isFinished)
this._mapWindowDone(shellwm, actor);
else
this._mapWindowOverwrite(shellwm, actor);
}
});
Tweener.addTween(actor,
{ opacity: 255,
scale_x: 1,
scale_y: 1,
time: DIALOG_SHOW_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._mapWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor],
onOverwrite: this._mapWindowOverwrite,
onOverwriteScope: this,
onOverwriteParams: [shellwm, actor]
});
break;
default:
shellwm.completed_map(actor);
@@ -1752,7 +1726,7 @@ var WindowManager = class {
_mapWindowDone(shellwm, actor) {
if (this._removeEffect(this._mapping, actor)) {
actor.remove_all_transitions();
Tweener.removeTweens(actor);
actor.opacity = 255;
actor.set_pivot_point(0, 0);
actor.scale_y = 1;
@@ -1796,17 +1770,19 @@ var WindowManager = class {
actor.set_pivot_point(0.5, 0.5);
this._destroying.push(actor);
actor.ease({
opacity: 0,
scale_x: 0.8,
scale_y: 0.8
}, {
duration: DESTROY_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => {
this._destroyWindowDone(shellwm, actor);
}
});
Tweener.addTween(actor,
{ opacity: 0,
scale_x: 0.8,
scale_y: 0.8,
time: DESTROY_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._destroyWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor],
onOverwrite: this._destroyWindowDone,
onOverwriteScope: this,
onOverwriteParams: [shellwm, actor]
});
break;
case Meta.WindowType.MODAL_DIALOG:
case Meta.WindowType.DIALOG:
@@ -1816,20 +1792,22 @@ var WindowManager = class {
if (window.is_attached_dialog()) {
let parent = window.get_transient_for();
actor._parentDestroyId = parent.connect('unmanaged', () => {
actor.remove_all_transitions();
Tweener.removeTweens(actor);
this._destroyWindowDone(shellwm, actor);
});
}
actor.ease({
scale_y: 0
}, {
duration: DIALOG_DESTROY_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => {
this._destroyWindowDone(shellwm, actor);
}
});
Tweener.addTween(actor,
{ scale_y: 0,
time: DIALOG_DESTROY_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._destroyWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor],
onOverwrite: this._destroyWindowDone,
onOverwriteScope: this,
onOverwriteParams: [shellwm, actor]
});
break;
default:
shellwm.completed_destroy(actor);
@@ -2067,16 +2045,15 @@ var WindowManager = class {
xDest = -xDest;
yDest = -yDest;
this._switchData.container.ease({
x: xDest,
y: yDest
}, {
time: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._switchWorkspaceDone(shellwm);
}
});
Tweener.addTween(this._switchData.container,
{ x: xDest,
y: yDest,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._switchWorkspaceDone,
onCompleteScope: this,
onCompleteParams: [shellwm]
});
}
_switchWorkspaceDone(shellwm) {

View File

@@ -813,7 +813,7 @@ var LayoutStrategy = class {
}
// Computes and returns an individual scaling factor for @window,
// to be applied in addition to the overall layout scale.
// to be applied in addition to the overal layout scale.
_computeWindowScale(window) {
// Since we align windows next to each other, the height of the
// thumbnails is much more important to preserve than the width of
@@ -1266,7 +1266,7 @@ var Workspace = class {
}
// We will reposition windows anyway when enter again overview or when ending the windows
// animations with fade animation.
// animations whith fade animation.
// In this way we avoid unwanted animations of windows repositioning while
// animating overview.
if (this.leavingOverview || this._animatingWindowsFade)
@@ -1886,10 +1886,10 @@ var Workspace = class {
// Win win -- better scale and better space
return true;
} else if (newLayout.scale > oldLayout.scale && newLayout.space <= oldLayout.space) {
// Keep new layout only if scale gain outweighs aspect space loss
// Keep new layout only if scale gain outweights aspect space loss
return scalePower > spacePower;
} else if (newLayout.scale <= oldLayout.scale && newLayout.space > oldLayout.space) {
// Keep new layout only if aspect space gain outweighs scale loss
// Keep new layout only if aspect space gain outweights scale loss
return spacePower > scalePower;
} else {
// Lose -- worse scale and space

View File

@@ -84,7 +84,7 @@ var WorkspacesView = class extends WorkspacesViewBase {
this._animating = false; // tweening
this._scrolling = false; // swipe-scrolling
this._gestureActive = false; // touch(pad) gestures
this._animatingScroll = false; // programmatically updating the adjustment
this._animatingScroll = false; // programatically updating the adjustment
let activeWorkspaceIndex = workspaceManager.get_active_workspace_index();
this.scrollAdjustment = new St.Adjustment({ value: activeWorkspaceIndex,

View File

@@ -1,5 +1,5 @@
project('gnome-shell', 'c',
version: '3.33.1',
version: '3.32.1',
meson_version: '>= 0.47.0',
license: 'GPLv2+'
)
@@ -23,7 +23,7 @@ gi_req = '>= 1.49.1'
gjs_req = '>= 1.54.0'
gtk_req = '>= 3.15.0'
json_glib_req = '>= 0.13.2'
mutter_req = '>= 3.33.1'
mutter_req = '>= 3.32.0'
polkit_req = '>= 0.100'
schemas_req = '>= 3.27.90'
startup_req = '>= 0.11'

128
po/de.po
View File

@@ -16,14 +16,14 @@
# Benjamin Steinwender <b@stbe.at>, 2013-2014.
# Bernd Homuth <dev@hmt.im>, 2014-2015, 2016, 2019.
# Franco Della-Monica <franco.della.monica@gmail.com>, 2016.
# Tim Sabsch <tim@sabsch.com>, 2018-2019.
# Tim Sabsch <tim@sabsch.com>, 2018.
#
msgid ""
msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2019-05-08 10:16+0000\n"
"PO-Revision-Date: 2019-05-12 12:36+0200\n"
"POT-Creation-Date: 2019-03-02 19:56+0000\n"
"PO-Revision-Date: 2019-03-02 21:13+0100\n"
"Last-Translator: Tim Sabsch <tim@sabsch.com>\n"
"Language-Team: Deutsch <gnome-de@gnome.org>\n"
"Language: de\n"
@@ -390,6 +390,11 @@ msgstr ""
msgid "Network Login"
msgstr "Netzwerkanmeldung"
#. Translators: Do NOT translate or transliterate this text (this is an icon file name)!
#: data/org.gnome.Shell.PortalHelper.desktop.in.in:9
msgid "network-workgroup"
msgstr "network-workgroup"
#: js/extensionPrefs/main.js:116
msgid "Somethings gone wrong"
msgstr "Etwas ist schiefgelaufen"
@@ -537,7 +542,7 @@ msgstr "abmelden;verlassen"
#: js/misc/systemActions.js:109
msgctxt "search-result"
msgid "Suspend"
msgstr "Bereitschaft"
msgstr "In Bereitschaft versetzen"
#. Translators: A list of keywords that match the suspend action, separated by semicolons
#: js/misc/systemActions.js:112
@@ -757,12 +762,12 @@ msgstr "Zu Favoriten hinzufügen"
msgid "Show Details"
msgstr "Details anzeigen"
#: js/ui/appFavorites.js:149
#: js/ui/appFavorites.js:141
#, javascript-format
msgid "%s has been added to your favorites."
msgstr "%s wurde zu Ihren Favoriten hinzugefügt"
#: js/ui/appFavorites.js:183
#: js/ui/appFavorites.js:175
#, javascript-format
msgid "%s has been removed from your favorites."
msgstr "%s wurde aus Ihren Favoriten entfernt"
@@ -1048,7 +1053,7 @@ msgstr "Passwort der mobilen Breitbandverbindung"
msgid "A password is required to connect to “%s”."
msgstr "Es wird ein Passwort benötigt, um sich mit »%s« zu verbinden."
#: js/ui/components/networkAgent.js:674 js/ui/status/network.js:1664
#: js/ui/components/networkAgent.js:674 js/ui/status/network.js:1665
msgid "Network Manager"
msgstr "Netzwerk-Verwaltung"
@@ -1120,23 +1125,23 @@ msgstr "Weltuhren hinzufügen …"
msgid "World Clocks"
msgstr "Weltuhren"
#: js/ui/dateMenu.js:228
#: js/ui/dateMenu.js:222
msgid "Weather"
msgstr "Wetter"
#: js/ui/dateMenu.js:311
#: js/ui/dateMenu.js:305
msgid "Select a location…"
msgstr "Ort auswählen …"
#: js/ui/dateMenu.js:319
#: js/ui/dateMenu.js:313
msgid "Loading…"
msgstr "Wird geladen …"
#: js/ui/dateMenu.js:329
#: js/ui/dateMenu.js:323
msgid "Go online for weather information"
msgstr "Gehen Sie Online, um Wetterinformationen beziehen zu können"
#: js/ui/dateMenu.js:331
#: js/ui/dateMenu.js:325
msgid "Weather information is currently unavailable"
msgstr "Wetterinformationen sind momentan nicht verfügbar"
@@ -1299,26 +1304,26 @@ msgid "Download and install “%s” from extensions.gnome.org?"
msgstr "»%s« von extensions.gnome.org herunterladen und installieren?"
#. Translators: %s is an application name like "Settings"
#: js/ui/inhibitShortcutsDialog.js:78
#: js/ui/inhibitShortcutsDialog.js:50
#, javascript-format
msgid "%s wants to inhibit shortcuts"
msgstr "%s möchte Tastenkombinationen sperren"
#: js/ui/inhibitShortcutsDialog.js:79
#: js/ui/inhibitShortcutsDialog.js:51
msgid "Application wants to inhibit shortcuts"
msgstr "Die Anwendung möchte Tastenkombinationen sperren"
#. Translators: %s is a keyboard shortcut like "Super+x"
#: js/ui/inhibitShortcutsDialog.js:88
#: js/ui/inhibitShortcutsDialog.js:60
#, javascript-format
msgid "You can restore shortcuts by pressing %s."
msgstr "Sie können Tastenkombinationen durch Drücken von %s wiederherstellen."
#: js/ui/inhibitShortcutsDialog.js:93
#: js/ui/inhibitShortcutsDialog.js:65
msgid "Deny"
msgstr "Ablehnen"
#: js/ui/inhibitShortcutsDialog.js:100
#: js/ui/inhibitShortcutsDialog.js:71
msgid "Allow"
msgstr "Zulassen"
@@ -1371,13 +1376,13 @@ msgid "Leave On"
msgstr "Eingeschaltet lassen"
#: js/ui/kbdA11yDialog.js:57 js/ui/status/bluetooth.js:133
#: js/ui/status/network.js:1263
#: js/ui/status/network.js:1264
msgid "Turn On"
msgstr "Einschalten"
#: js/ui/kbdA11yDialog.js:65 js/ui/status/bluetooth.js:133
#: js/ui/status/network.js:128 js/ui/status/network.js:310
#: js/ui/status/network.js:1263 js/ui/status/network.js:1375
#: js/ui/status/network.js:1264 js/ui/status/network.js:1376
#: js/ui/status/nightLight.js:39 js/ui/status/rfkill.js:79
#: js/ui/status/rfkill.js:106
msgid "Turn Off"
@@ -1387,7 +1392,7 @@ msgstr "Ausschalten"
msgid "Leave Off"
msgstr "Ausgeschaltet lassen"
#: js/ui/keyboard.js:200
#: js/ui/keyboard.js:203
msgid "Region & Language Settings"
msgstr "Regions- und Spracheinstellungen"
@@ -1439,7 +1444,7 @@ msgstr "Quelle zeigen"
msgid "Web Page"
msgstr "Webseite"
#: js/ui/messageTray.js:1480
#: js/ui/messageTray.js:1474
msgid "System Information"
msgstr "Systeminformationen"
@@ -1523,11 +1528,11 @@ msgstr "Beenden"
#. Translators: If there is no suitable word for "Activities"
#. in your language, you can use the word for "Overview".
#: js/ui/panel.js:470
#: js/ui/panel.js:471
msgid "Activities"
msgstr "Aktivitäten"
#: js/ui/panel.js:745
#: js/ui/panel.js:746
msgctxt "System menu in the top bar"
msgid "System"
msgstr "System"
@@ -1536,6 +1541,15 @@ msgstr "System"
msgid "Top Bar"
msgstr "Oberes Panel"
#. Translators: this MUST be either "toggle-switch-us"
#. (for toggle switches containing the English words
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
#. switches containing "◯" and "|"). Other values will
#. simply result in invisible toggle switches.
#: js/ui/popupMenu.js:285
msgid "toggle-switch-us"
msgstr "toggle-switch-intl"
#: js/ui/runDialog.js:64
msgid "Enter a Command"
msgstr "Bitte geben Sie einen Befehl ein"
@@ -1575,7 +1589,7 @@ msgid_plural "%d new notifications"
msgstr[0] "%d neue Benachrichtigung"
msgstr[1] "%d neue Benachrichtigungen"
#: js/ui/screenShield.js:449 js/ui/status/system.js:271
#: js/ui/screenShield.js:449 js/ui/status/system.js:270
msgid "Lock"
msgstr "Sperren"
@@ -1590,11 +1604,11 @@ msgstr "GNOME muss den Bildschirm sperren"
#.
#. XXX: another option is to kick the user into the gdm login
#. screen, where we're not affected by grabs
#: js/ui/screenShield.js:826 js/ui/screenShield.js:1299
#: js/ui/screenShield.js:834 js/ui/screenShield.js:1307
msgid "Unable to lock"
msgstr "Sperrung fehlgeschlagen"
#: js/ui/screenShield.js:827 js/ui/screenShield.js:1300
#: js/ui/screenShield.js:835 js/ui/screenShield.js:1308
msgid "Lock was blocked by an application"
msgstr "Sperrung wurde von einer Anwendung blockiert"
@@ -1758,7 +1772,7 @@ msgid "<unknown>"
msgstr "<Unbekannt>"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:416 js/ui/status/network.js:1292
#: js/ui/status/network.js:416 js/ui/status/network.js:1293
#, javascript-format
msgid "%s Off"
msgstr "%s ausgeschaltet"
@@ -1784,7 +1798,7 @@ msgid "%s Disconnecting"
msgstr "%s wird getrennt"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:434 js/ui/status/network.js:1284
#: js/ui/status/network.js:434 js/ui/status/network.js:1285
#, javascript-format
msgid "%s Connecting"
msgstr "%s wird verbunden"
@@ -1824,7 +1838,7 @@ msgid "Mobile Broadband Settings"
msgstr "Einstellungen der mobilen Breitbandverbindung"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:553 js/ui/status/network.js:1289
#: js/ui/status/network.js:553 js/ui/status/network.js:1290
#, javascript-format
msgid "%s Hardware Disabled"
msgstr "%s-Hardware ausgeschaltet"
@@ -1896,72 +1910,72 @@ msgid "Wi-Fi Settings"
msgstr "Drahtlosnetzwerk-Einstellungen"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1280
#: js/ui/status/network.js:1281
#, javascript-format
msgid "%s Hotspot Active"
msgstr "Hotspot %s eingeschaltet"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1295
#: js/ui/status/network.js:1296
#, javascript-format
msgid "%s Not Connected"
msgstr "%s nicht verbunden"
#: js/ui/status/network.js:1392
#: js/ui/status/network.js:1393
msgid "connecting…"
msgstr "Verbindungsaufbau …"
#. Translators: this is for network connections that require some kind of key or password
#: js/ui/status/network.js:1395
#: js/ui/status/network.js:1396
msgid "authentication required"
msgstr "Anmeldung erforderlich"
#: js/ui/status/network.js:1397
#: js/ui/status/network.js:1398
msgid "connection failed"
msgstr "Verbindung gescheitert"
#: js/ui/status/network.js:1447
#: js/ui/status/network.js:1448
msgid "VPN Settings"
msgstr "VPN-Einstellungen"
#: js/ui/status/network.js:1464
#: js/ui/status/network.js:1465
msgid "VPN"
msgstr "VPN"
#: js/ui/status/network.js:1474
#: js/ui/status/network.js:1475
msgid "VPN Off"
msgstr "VPN ausgeschaltet"
#: js/ui/status/network.js:1535 js/ui/status/rfkill.js:82
#: js/ui/status/network.js:1536 js/ui/status/rfkill.js:82
msgid "Network Settings"
msgstr "Netzwerkeinstellungen"
#: js/ui/status/network.js:1564
#: js/ui/status/network.js:1565
#, javascript-format
msgid "%s Wired Connection"
msgid_plural "%s Wired Connections"
msgstr[0] "%s Kabelverbindung"
msgstr[1] "%s Kabelverbindungen"
#: js/ui/status/network.js:1568
#: js/ui/status/network.js:1569
#, javascript-format
msgid "%s Wi-Fi Connection"
msgid_plural "%s Wi-Fi Connections"
msgstr[0] "%s Funknetzwerkverbindung"
msgstr[1] "%s Funknetzwerkverbindungen"
#: js/ui/status/network.js:1572
#: js/ui/status/network.js:1573
#, javascript-format
msgid "%s Modem Connection"
msgid_plural "%s Modem Connections"
msgstr[0] "%s Modem-Verbindung"
msgstr[1] "%s Modem-Verbindungen"
#: js/ui/status/network.js:1705
#: js/ui/status/network.js:1702
msgid "Connection failed"
msgstr "Verbindung gescheitert"
#: js/ui/status/network.js:1706
#: js/ui/status/network.js:1703
msgid "Activation of network connection failed"
msgstr "Aktivierung der Netzwerkverbindung ist gescheitert"
@@ -2043,15 +2057,15 @@ msgstr "Abmelden"
msgid "Account Settings"
msgstr "Kontoeinstellungen"
#: js/ui/status/system.js:256
#: js/ui/status/system.js:255
msgid "Orientation Lock"
msgstr "Hoch-/Querformats-Fixierung"
#: js/ui/status/system.js:282
#: js/ui/status/system.js:281
msgid "Suspend"
msgstr "Bereitschaft"
msgstr "In Bereitschaft versetzen"
#: js/ui/status/system.js:292
#: js/ui/status/system.js:291
msgid "Power Off"
msgstr "Ausschalten"
@@ -2169,7 +2183,7 @@ msgstr[1] ""
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#: js/ui/windowManager.js:677
#: js/ui/windowManager.js:662
#, javascript-format
msgid "%d × %d"
msgstr "%d × %d"
@@ -2242,6 +2256,11 @@ msgstr "Auf den Bildschirm nach rechts verschieben"
msgid "Evolution Calendar"
msgstr "Evolution-Kalender"
#. Translators: Do NOT translate or transliterate this text (this is an icon file name)!
#: src/calendar-server/evolution-calendar.desktop.in:6
msgid "evolution"
msgstr "evolution"
#: src/main.c:408
msgid "Print version"
msgstr "Version ausgeben"
@@ -2260,12 +2279,12 @@ msgstr ""
msgid "List possible modes"
msgstr "Die möglichen Modi auflisten"
#: src/shell-app.c:264
#: src/shell-app.c:260
msgctxt "program"
msgid "Unknown"
msgstr "Unbekannt"
#: src/shell-app.c:515
#: src/shell-app.c:511
#, c-format
msgid "Failed to launch “%s”"
msgstr "»%s« konnte nicht gestartet werden"
@@ -2304,15 +2323,6 @@ msgstr[1] "%u Eingänge"
msgid "System Sounds"
msgstr "Systemklänge"
#~ msgid "network-workgroup"
#~ msgstr "network-workgroup"
#~ msgid "toggle-switch-us"
#~ msgstr "toggle-switch-intl"
#~ msgid "evolution"
#~ msgstr "evolution"
#~ msgid "There was an error loading the preferences dialog for %s:"
#~ msgstr ""
#~ "Beim Laden des Einstellungsdialogs für %s ist ein Fehler aufgetreten:"

113
po/eo.po
View File

@@ -12,8 +12,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2019-05-08 17:45+0000\n"
"PO-Revision-Date: 2019-05-09 20:12+0200\n"
"POT-Creation-Date: 2019-04-17 19:29+0000\n"
"PO-Revision-Date: 2019-05-01 16:29+0200\n"
"Last-Translator: Carmen Bianca BAKKER <carmen@carmenbianca.eu>\n"
"Language-Team: Esperanto <gnome-eo-list@gnome.org>\n"
"Language: eo\n"
@@ -383,7 +383,7 @@ msgstr "Foliumi en Programaro"
#: js/gdm/authPrompt.js:140 js/ui/audioDeviceSelection.js:55
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:136
#: js/ui/endSessionDialog.js:430 js/ui/extensionDownloader.js:188
#: js/ui/shellMountOperation.js:325 js/ui/status/network.js:889
#: js/ui/shellMountOperation.js:325 js/ui/status/network.js:888
msgid "Cancel"
msgstr "Nuligi"
@@ -683,6 +683,7 @@ msgstr "Ĉiuj"
#. Translators: This is the heading of a list of open windows
#: js/ui/appDisplay.js:1713 js/ui/panel.js:79
#| msgid "Windows"
msgid "Open Windows"
msgstr "Malfermaj fenestroj"
@@ -919,7 +920,7 @@ msgstr ""
"Alternative vi povas konekti per premi la “WPS”-butonon de via enkursigilo."
#: js/ui/components/networkAgent.js:112 js/ui/status/network.js:219
#: js/ui/status/network.js:310 js/ui/status/network.js:892
#: js/ui/status/network.js:309 js/ui/status/network.js:891
msgid "Connect"
msgstr "Konekti"
@@ -949,7 +950,7 @@ msgstr "Servo: "
#: js/ui/components/networkAgent.js:312 js/ui/components/networkAgent.js:685
msgid "Authentication required by wireless network"
msgstr "Sendrata reto bezonas aŭtentigon"
msgstr "Aŭtentigo estas bezonata de sendrata reto"
#: js/ui/components/networkAgent.js:313 js/ui/components/networkAgent.js:686
#, javascript-format
@@ -977,7 +978,7 @@ msgstr "PIN-kodo bezonata"
#: js/ui/components/networkAgent.js:332 js/ui/components/networkAgent.js:700
msgid "PIN code is needed for the mobile broadband device"
msgstr "PIN-kodo necesas por la portebla larĝkapacita aparato"
msgstr "PIN-kodo estas bezonata por la portebla larĝkapacita aparato"
#: js/ui/components/networkAgent.js:333
msgid "PIN: "
@@ -991,9 +992,9 @@ msgstr "Portebla larĝkapacita retopasvorto"
#: js/ui/components/networkAgent.js:694 js/ui/components/networkAgent.js:707
#, javascript-format
msgid "A password is required to connect to “%s”."
msgstr "Pasvorto necesas por konekti al “%s”."
msgstr "Pasvorto estas bezonata por konekti al “%s”."
#: js/ui/components/networkAgent.js:674 js/ui/status/network.js:1665
#: js/ui/components/networkAgent.js:674 js/ui/status/network.js:1664
msgid "Network Manager"
msgstr "Retadministrilo"
@@ -1310,13 +1311,13 @@ msgid "Leave On"
msgstr "Lasi ŝaltita"
#: js/ui/kbdA11yDialog.js:57 js/ui/status/bluetooth.js:133
#: js/ui/status/network.js:1264
#: js/ui/status/network.js:1263
msgid "Turn On"
msgstr "Ŝalti"
#: js/ui/kbdA11yDialog.js:65 js/ui/status/bluetooth.js:133
#: js/ui/status/network.js:128 js/ui/status/network.js:311
#: js/ui/status/network.js:1264 js/ui/status/network.js:1376
#: js/ui/status/network.js:128 js/ui/status/network.js:310
#: js/ui/status/network.js:1263 js/ui/status/network.js:1375
#: js/ui/status/nightLight.js:39 js/ui/status/rfkill.js:79
#: js/ui/status/rfkill.js:106
msgid "Turn Off"
@@ -1378,7 +1379,7 @@ msgstr "Montri fonton"
msgid "Web Page"
msgstr "Retpaĝo"
#: js/ui/messageTray.js:1479
#: js/ui/messageTray.js:1480
msgid "System Information"
msgstr "Sisteminformoj"
@@ -1472,7 +1473,7 @@ msgctxt "System menu in the top bar"
msgid "System"
msgstr "Sistemo"
#: js/ui/panel.js:861
#: js/ui/panel.js:864
msgid "Top Bar"
msgstr "Supra breto"
@@ -1610,11 +1611,11 @@ msgstr "Saltaj klavoj"
msgid "Mouse Keys"
msgstr "Musklavoj"
#: js/ui/status/accessibility.js:135
#: js/ui/status/accessibility.js:151
msgid "High Contrast"
msgstr "Alta kontrasto"
#: js/ui/status/accessibility.js:177
#: js/ui/status/accessibility.js:182
msgid "Large Text"
msgstr "Granda teksto"
@@ -1622,7 +1623,7 @@ msgstr "Granda teksto"
msgid "Bluetooth"
msgstr "Bludento"
#: js/ui/status/bluetooth.js:47 js/ui/status/network.js:586
#: js/ui/status/bluetooth.js:47 js/ui/status/network.js:585
msgid "Bluetooth Settings"
msgstr "Bludento-agordoj"
@@ -1693,13 +1694,13 @@ msgid "<unknown>"
msgstr "<nekonata>"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:417 js/ui/status/network.js:1293
#: js/ui/status/network.js:416 js/ui/status/network.js:1292
#, javascript-format
msgid "%s Off"
msgstr "%s malŝaltita"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:420
#: js/ui/status/network.js:419
#, javascript-format
msgid "%s Connected"
msgstr "%s konektita"
@@ -1707,189 +1708,189 @@ msgstr "%s konektita"
#. Translators: this is for network devices that are physically present but are not
#. under NetworkManager's control (and thus cannot be used in the menu);
#. %s is a network identifier
#: js/ui/status/network.js:425
#: js/ui/status/network.js:424
#, javascript-format
msgid "%s Unmanaged"
msgstr "%s nemastrumita"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:428
#: js/ui/status/network.js:427
#, javascript-format
msgid "%s Disconnecting"
msgstr "%s malkonektante"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:435 js/ui/status/network.js:1285
#: js/ui/status/network.js:434 js/ui/status/network.js:1284
#, javascript-format
msgid "%s Connecting"
msgstr "%s konektante"
#. Translators: this is for network connections that require some kind of key or password; %s is a network identifier
#: js/ui/status/network.js:438
#: js/ui/status/network.js:437
#, javascript-format
msgid "%s Requires Authentication"
msgstr "%s postulas aŭtentigon"
#. Translators: this is for devices that require some kind of firmware or kernel
#. module, which is missing; %s is a network identifier
#: js/ui/status/network.js:446
#: js/ui/status/network.js:445
#, javascript-format
msgid "Firmware Missing For %s"
msgstr "Mikroprogramo mankas por %s"
#. Translators: this is for a network device that cannot be activated (for example it
#. is disabled by rfkill, or it has no coverage; %s is a network identifier
#: js/ui/status/network.js:450
#: js/ui/status/network.js:449
#, javascript-format
msgid "%s Unavailable"
msgstr "%s nedisponebla"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:453
#: js/ui/status/network.js:452
#, javascript-format
msgid "%s Connection Failed"
msgstr "%s konekto malsukcesis"
#: js/ui/status/network.js:465
#: js/ui/status/network.js:464
msgid "Wired Settings"
msgstr "Drataj agordoj"
#: js/ui/status/network.js:507
#: js/ui/status/network.js:506
msgid "Mobile Broadband Settings"
msgstr "Porteblaj larĝkapacitaj agordoj"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:554 js/ui/status/network.js:1290
#: js/ui/status/network.js:553 js/ui/status/network.js:1289
#, javascript-format
msgid "%s Hardware Disabled"
msgstr "%s aparataro malŝaltita"
#. Translators: this is for a network device that cannot be activated
#. because it's disabled by rfkill (airplane mode); %s is a network identifier
#: js/ui/status/network.js:558
#: js/ui/status/network.js:557
#, javascript-format
msgid "%s Disabled"
msgstr "%s malŝaltita"
#: js/ui/status/network.js:598
#: js/ui/status/network.js:597
msgid "Connect to Internet"
msgstr "Konekti al interreto"
#: js/ui/status/network.js:787
#: js/ui/status/network.js:786
msgid "Airplane Mode is On"
msgstr "Aviadila reĝimo ŝaltita"
#: js/ui/status/network.js:788
#: js/ui/status/network.js:787
msgid "Wi-Fi is disabled when airplane mode is on."
msgstr "Vifio malebliĝas se aviadila reĝimo estas ŝaltita."
#: js/ui/status/network.js:789
#: js/ui/status/network.js:788
msgid "Turn Off Airplane Mode"
msgstr "Malŝalti aviadilan reĝimon"
#: js/ui/status/network.js:798
#: js/ui/status/network.js:797
msgid "Wi-Fi is Off"
msgstr "Vifio malŝaltita"
#: js/ui/status/network.js:799
#: js/ui/status/network.js:798
msgid "Wi-Fi needs to be turned on in order to connect to a network."
msgstr "Necesas ŝalti vifion por konekti al reto."
#: js/ui/status/network.js:800
#: js/ui/status/network.js:799
msgid "Turn On Wi-Fi"
msgstr "Ŝalti vifion"
#: js/ui/status/network.js:825
#: js/ui/status/network.js:824
msgid "Wi-Fi Networks"
msgstr "Vifiaj retoj"
#: js/ui/status/network.js:827
#: js/ui/status/network.js:826
msgid "Select a network"
msgstr "Elekti reton"
#: js/ui/status/network.js:856
#: js/ui/status/network.js:855
msgid "No Networks"
msgstr "Neniu reto"
#: js/ui/status/network.js:877 js/ui/status/rfkill.js:104
#: js/ui/status/network.js:876 js/ui/status/rfkill.js:104
msgid "Use hardware switch to turn off"
msgstr "Uzi aparataran ŝaltilon por malŝalti"
#: js/ui/status/network.js:1153
#: js/ui/status/network.js:1152
msgid "Select Network"
msgstr "Elekti reton"
#: js/ui/status/network.js:1159
#: js/ui/status/network.js:1158
msgid "Wi-Fi Settings"
msgstr "Vifio-agordoj"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1281
#: js/ui/status/network.js:1280
#, javascript-format
msgid "%s Hotspot Active"
msgstr "%s retkaptejo aktiva"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1296
#: js/ui/status/network.js:1295
#, javascript-format
msgid "%s Not Connected"
msgstr "%s ne konektita"
#: js/ui/status/network.js:1393
#: js/ui/status/network.js:1392
msgid "connecting…"
msgstr "konektante…"
#. Translators: this is for network connections that require some kind of key or password
#: js/ui/status/network.js:1396
#: js/ui/status/network.js:1395
msgid "authentication required"
msgstr "aŭtentigo necesas"
#: js/ui/status/network.js:1398
#: js/ui/status/network.js:1397
msgid "connection failed"
msgstr "konekto malsukcesis"
#: js/ui/status/network.js:1448
#: js/ui/status/network.js:1447
msgid "VPN Settings"
msgstr "VPR-agordoj"
#: js/ui/status/network.js:1465
#: js/ui/status/network.js:1464
msgid "VPN"
msgstr "VPR"
#: js/ui/status/network.js:1475
#: js/ui/status/network.js:1474
msgid "VPN Off"
msgstr "VPR malŝaltita"
#: js/ui/status/network.js:1536 js/ui/status/rfkill.js:82
#: js/ui/status/network.js:1535 js/ui/status/rfkill.js:82
msgid "Network Settings"
msgstr "Ret-agordoj"
#: js/ui/status/network.js:1565
#: js/ui/status/network.js:1564
#, javascript-format
msgid "%s Wired Connection"
msgid_plural "%s Wired Connections"
msgstr[0] "%s drata konekto"
msgstr[1] "%s drataj konektoj"
#: js/ui/status/network.js:1569
#: js/ui/status/network.js:1568
#, javascript-format
msgid "%s Wi-Fi Connection"
msgid_plural "%s Wi-Fi Connections"
msgstr[0] "%s vifia konekto"
msgstr[1] "%s vifiaj konektoj"
#: js/ui/status/network.js:1573
#: js/ui/status/network.js:1572
#, javascript-format
msgid "%s Modem Connection"
msgid_plural "%s Modem Connections"
msgstr[0] "%s modema konekto"
msgstr[1] "%s modemaj konektoj"
#: js/ui/status/network.js:1706
#: js/ui/status/network.js:1705
msgid "Connection failed"
msgstr "Konekto malsukcesis"
#: js/ui/status/network.js:1707
#: js/ui/status/network.js:1706
msgid "Activation of network connection failed"
msgstr "Aktivigo de reto-konekto malsukcesis"

File diff suppressed because it is too large Load Diff

View File

@@ -117,7 +117,7 @@ remove_mnemonics (const GValue *value)
label = g_value_get_string (value);
g_return_val_if_fail (label != NULL, NULL);
/* Stripped label will have the original label length at most */
/* Stripped label will have the original label lenght at most */
stripped_label = temp = g_new (gchar, strlen(label) + 1);
g_assert (stripped_label != NULL);

View File

@@ -206,8 +206,8 @@ st_icon_style_changed (StWidget *widget)
}
priv->theme_icon_size = (int)(0.5 + st_theme_node_get_length (theme_node, "icon-size"));
st_icon_update_icon_size (self);
st_icon_update (self);
if (st_icon_update_icon_size (self))
st_icon_update (self);
}
static void

View File

@@ -65,8 +65,6 @@ struct _StWidgetPrivate
StThemeNodeTransition *transition_animation;
guint is_style_dirty : 1;
guint first_child_dirty : 1;
guint last_child_dirty : 1;
guint draw_bg_color : 1;
guint draw_border_internal : 1;
guint track_hover : 1;
@@ -74,7 +72,6 @@ struct _StWidgetPrivate
guint can_focus : 1;
gulong texture_file_changed_id;
guint update_child_styles_id;
AtkObject *accessible;
AtkRole accessible_role;
@@ -326,8 +323,6 @@ st_widget_dispose (GObject *gobject)
g_clear_object (&priv->last_visible_child);
G_OBJECT_CLASS (st_widget_parent_class)->dispose (gobject);
g_clear_handle_id (&priv->update_child_styles_id, g_source_remove);
}
static void
@@ -1613,85 +1608,47 @@ find_nearest_visible_forward (ClutterActor *actor)
return next;
}
static gboolean
st_widget_update_child_styles (StWidget *widget)
{
StWidgetPrivate *priv = st_widget_get_instance_private (widget);
if (priv->first_child_dirty)
{
ClutterActor *first_child;
priv->first_child_dirty = FALSE;
first_child = clutter_actor_get_first_child (CLUTTER_ACTOR (widget));
st_widget_set_first_visible_child (widget,
find_nearest_visible_forward (first_child));
}
if (priv->last_child_dirty)
{
ClutterActor *last_child;
priv->last_child_dirty = FALSE;
last_child = clutter_actor_get_last_child (CLUTTER_ACTOR (widget));
st_widget_set_last_visible_child (widget,
find_nearest_visible_backwards (last_child));
}
priv->update_child_styles_id = 0;
return G_SOURCE_REMOVE;
}
static void
st_widget_queue_child_styles_update (StWidget *widget)
{
StWidgetPrivate *priv = st_widget_get_instance_private (widget);
if (priv->update_child_styles_id != 0)
return;
priv->update_child_styles_id = g_idle_add ((GSourceFunc) st_widget_update_child_styles, widget);
}
static void
st_widget_visible_notify (StWidget *widget,
GParamSpec *pspec,
gpointer data)
{
StWidgetPrivate *parent_priv;
ClutterActor *actor = CLUTTER_ACTOR (widget);
ClutterActor *parent = clutter_actor_get_parent (actor);
if (parent == NULL || !ST_IS_WIDGET (parent))
return;
parent_priv = st_widget_get_instance_private (ST_WIDGET (parent));
if (clutter_actor_is_visible (actor))
{
ClutterActor *before, *after;
before = clutter_actor_get_previous_sibling (actor);
if (find_nearest_visible_backwards (before) == NULL)
parent_priv->first_child_dirty = TRUE;
st_widget_set_first_visible_child (ST_WIDGET (parent), actor);
after = clutter_actor_get_next_sibling (actor);
if (find_nearest_visible_forward (after) == NULL)
parent_priv->last_child_dirty = TRUE;
st_widget_set_last_visible_child (ST_WIDGET (parent), actor);
}
else
{
if (st_widget_has_style_pseudo_class (widget, "first-child"))
parent_priv->first_child_dirty = TRUE;
{
ClutterActor *new_first;
new_first = find_nearest_visible_forward (CLUTTER_ACTOR (widget));
st_widget_set_first_visible_child (ST_WIDGET (parent), new_first);
}
if (st_widget_has_style_pseudo_class (widget, "last-child"))
parent_priv->last_child_dirty = TRUE;
}
{
ClutterActor *new_last;
if (parent_priv->first_child_dirty || parent_priv->last_child_dirty)
st_widget_queue_child_styles_update (ST_WIDGET (parent));
new_last = find_nearest_visible_backwards (CLUTTER_ACTOR (widget));
st_widget_set_last_visible_child (ST_WIDGET (parent), new_last);
}
}
}
static void
@@ -1699,10 +1656,10 @@ st_widget_first_child_notify (StWidget *widget,
GParamSpec *pspec,
gpointer data)
{
StWidgetPrivate *priv = st_widget_get_instance_private (widget);
ClutterActor *first_child;
priv->first_child_dirty = TRUE;
st_widget_queue_child_styles_update (widget);
first_child = clutter_actor_get_first_child (CLUTTER_ACTOR (widget));
st_widget_set_first_visible_child (widget, find_nearest_visible_forward (first_child));
}
static void
@@ -1710,10 +1667,10 @@ st_widget_last_child_notify (StWidget *widget,
GParamSpec *pspec,
gpointer data)
{
StWidgetPrivate *priv = st_widget_get_instance_private (widget);
ClutterActor *last_child;
priv->last_child_dirty = TRUE;
st_widget_queue_child_styles_update (widget);
last_child = clutter_actor_get_last_child (CLUTTER_ACTOR (widget));
st_widget_set_last_visible_child (widget, find_nearest_visible_backwards (last_child));
}
static void