cleanup: Use Function.prototype.bind()
When not using arrow notation with anonymous functions, we use Lang.bind() to bind `this` to named callbacks. However since ES5, this functionality is already provided by Function.prototype.bind() - in fact, Lang.bind() itself uses it when no extra arguments are specified. Just use the built-in function directly where possible, and use arrow notation in the few places where we pass additional arguments. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
This commit is contained in:
parent
213e38c2ef
commit
3b1330880f
10
HACKING
10
HACKING
@ -222,7 +222,7 @@ the actor itself:
|
|||||||
this.actor = new St.Button({ text: "This is a button" });
|
this.actor = new St.Button({ text: "This is a button" });
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
|
|
||||||
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
|
this.actor.connect('clicked', this._onClicked.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onClicked(actor) {
|
_onClicked(actor) {
|
||||||
@ -252,11 +252,13 @@ invoked, not to the value of this where the closure is created, because "this"
|
|||||||
is a keyword with a value passed in at function invocation time, it is not a
|
is a keyword with a value passed in at function invocation time, it is not a
|
||||||
variable that can be captured in closures.
|
variable that can be captured in closures.
|
||||||
|
|
||||||
All closures should be wrapped with a Lang.bind.
|
All closures should be wrapped with Function.prototype.bind or use arrow
|
||||||
|
notation.
|
||||||
|
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
|
||||||
let closure = Lang.bind(this, function() { this._fnorbate(); });
|
let closure1 = () => { this._fnorbate(); };
|
||||||
|
let closure2 = this._fnorbate.bind(this);
|
||||||
|
|
||||||
A more realistic example would be connecting to a signal on a method of a
|
A more realistic example would be connecting to a signal on a method of a
|
||||||
prototype:
|
prototype:
|
||||||
@ -267,7 +269,7 @@ prototype:
|
|||||||
var MyClass = new Lang.Class({
|
var MyClass = new Lang.Class({
|
||||||
_init() {
|
_init() {
|
||||||
let fnorb = new FnorbLib.Fnorb();
|
let fnorb = new FnorbLib.Fnorb();
|
||||||
fnorb.connect('frobate', Lang.bind(this, this._onFnorbFrobate));
|
fnorb.connect('frobate', this._onFnorbFrobate.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onFnorbFrobate(fnorb) {
|
_onFnorbFrobate(fnorb) {
|
||||||
|
@ -41,9 +41,9 @@ var Application = new Lang.Class({
|
|||||||
flags: Gio.ApplicationFlags.HANDLES_COMMAND_LINE
|
flags: Gio.ApplicationFlags.HANDLES_COMMAND_LINE
|
||||||
});
|
});
|
||||||
|
|
||||||
this.application.connect('activate', Lang.bind(this, this._onActivate));
|
this.application.connect('activate', this._onActivate.bind(this));
|
||||||
this.application.connect('command-line', Lang.bind(this, this._onCommandLine));
|
this.application.connect('command-line', this._onCommandLine.bind(this));
|
||||||
this.application.connect('startup', Lang.bind(this, this._onStartup));
|
this.application.connect('startup', this._onStartup.bind(this));
|
||||||
|
|
||||||
this._extensionPrefsModules = {};
|
this._extensionPrefsModules = {};
|
||||||
|
|
||||||
@ -162,8 +162,8 @@ var Application = new Lang.Class({
|
|||||||
this._window.add(scroll);
|
this._window.add(scroll);
|
||||||
|
|
||||||
this._extensionSelector = new Gtk.ListBox({ selection_mode: Gtk.SelectionMode.NONE });
|
this._extensionSelector = new Gtk.ListBox({ selection_mode: Gtk.SelectionMode.NONE });
|
||||||
this._extensionSelector.set_sort_func(Lang.bind(this, this._sortList));
|
this._extensionSelector.set_sort_func(this._sortList.bind(this));
|
||||||
this._extensionSelector.set_header_func(Lang.bind(this, this._updateHeader));
|
this._extensionSelector.set_header_func(this._updateHeader.bind(this));
|
||||||
|
|
||||||
scroll.add(this._extensionSelector);
|
scroll.add(this._extensionSelector);
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ var Application = new Lang.Class({
|
|||||||
|
|
||||||
_scanExtensions() {
|
_scanExtensions() {
|
||||||
let finder = new ExtensionUtils.ExtensionFinder();
|
let finder = new ExtensionUtils.ExtensionFinder();
|
||||||
finder.connect('extension-found', Lang.bind(this, this._extensionFound));
|
finder.connect('extension-found', this._extensionFound.bind(this));
|
||||||
finder.scanExtensions();
|
finder.scanExtensions();
|
||||||
this._extensionsLoaded();
|
this._extensionsLoaded();
|
||||||
},
|
},
|
||||||
|
@ -55,13 +55,13 @@ var AuthPrompt = new Lang.Class({
|
|||||||
|
|
||||||
this._userVerifier = new GdmUtil.ShellUserVerifier(this._gdmClient, { reauthenticationOnly: reauthenticationOnly });
|
this._userVerifier = new GdmUtil.ShellUserVerifier(this._gdmClient, { reauthenticationOnly: reauthenticationOnly });
|
||||||
|
|
||||||
this._userVerifier.connect('ask-question', Lang.bind(this, this._onAskQuestion));
|
this._userVerifier.connect('ask-question', this._onAskQuestion.bind(this));
|
||||||
this._userVerifier.connect('show-message', Lang.bind(this, this._onShowMessage));
|
this._userVerifier.connect('show-message', this._onShowMessage.bind(this));
|
||||||
this._userVerifier.connect('verification-failed', Lang.bind(this, this._onVerificationFailed));
|
this._userVerifier.connect('verification-failed', this._onVerificationFailed.bind(this));
|
||||||
this._userVerifier.connect('verification-complete', Lang.bind(this, this._onVerificationComplete));
|
this._userVerifier.connect('verification-complete', this._onVerificationComplete.bind(this));
|
||||||
this._userVerifier.connect('reset', Lang.bind(this, this._onReset));
|
this._userVerifier.connect('reset', this._onReset.bind(this));
|
||||||
this._userVerifier.connect('smartcard-status-changed', Lang.bind(this, this._onSmartcardStatusChanged));
|
this._userVerifier.connect('smartcard-status-changed', this._onSmartcardStatusChanged.bind(this));
|
||||||
this._userVerifier.connect('ovirt-user-authenticated', Lang.bind(this, this._onOVirtUserAuthenticated));
|
this._userVerifier.connect('ovirt-user-authenticated', this._onOVirtUserAuthenticated.bind(this));
|
||||||
this.smartcardDetected = this._userVerifier.smartcardDetected;
|
this.smartcardDetected = this._userVerifier.smartcardDetected;
|
||||||
|
|
||||||
this.connect('next', () => {
|
this.connect('next', () => {
|
||||||
@ -76,7 +76,7 @@ var AuthPrompt = new Lang.Class({
|
|||||||
|
|
||||||
this.actor = new St.BoxLayout({ style_class: 'login-dialog-prompt-layout',
|
this.actor = new St.BoxLayout({ style_class: 'login-dialog-prompt-layout',
|
||||||
vertical: true });
|
vertical: true });
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
this.actor.connect('key-press-event', (actor, event) => {
|
this.actor.connect('key-press-event', (actor, event) => {
|
||||||
if (event.get_key_symbol() == Clutter.KEY_Escape)
|
if (event.get_key_symbol() == Clutter.KEY_Escape)
|
||||||
this.cancel();
|
this.cancel();
|
||||||
|
@ -57,7 +57,7 @@ var UserListItem = new Lang.Class({
|
|||||||
_init(user) {
|
_init(user) {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
this._userChangedId = this.user.connect('changed',
|
this._userChangedId = this.user.connect('changed',
|
||||||
Lang.bind(this, this._onUserChanged));
|
this._onUserChanged.bind(this));
|
||||||
|
|
||||||
let layout = new St.BoxLayout({ vertical: true });
|
let layout = new St.BoxLayout({ vertical: true });
|
||||||
this.actor = new St.Button({ style_class: 'login-dialog-user-list-item',
|
this.actor = new St.Button({ style_class: 'login-dialog-user-list-item',
|
||||||
@ -67,8 +67,7 @@ var UserListItem = new Lang.Class({
|
|||||||
reactive: true,
|
reactive: true,
|
||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
x_fill: true });
|
x_fill: true });
|
||||||
this.actor.connect('destroy',
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
Lang.bind(this, this._onDestroy));
|
|
||||||
|
|
||||||
this.actor.connect('key-focus-in', () => {
|
this.actor.connect('key-focus-in', () => {
|
||||||
this._setSelected(true);
|
this._setSelected(true);
|
||||||
@ -90,7 +89,7 @@ var UserListItem = new Lang.Class({
|
|||||||
scale_x: 0 });
|
scale_x: 0 });
|
||||||
layout.add(this._timedLoginIndicator);
|
layout.add(this._timedLoginIndicator);
|
||||||
|
|
||||||
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
|
this.actor.connect('clicked', this._onClicked.bind(this));
|
||||||
this._onUserChanged();
|
this._onUserChanged();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -173,7 +172,7 @@ var UserList = new Lang.Class({
|
|||||||
this.actor.add_actor(this._box);
|
this.actor.add_actor(this._box);
|
||||||
this._items = {};
|
this._items = {};
|
||||||
|
|
||||||
this.actor.connect('key-focus-in', Lang.bind(this, this._moveFocusToItems));
|
this.actor.connect('key-focus-in', this._moveFocusToItems.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_moveFocusToItems() {
|
_moveFocusToItems() {
|
||||||
@ -270,8 +269,7 @@ var UserList = new Lang.Class({
|
|||||||
|
|
||||||
this._items[userName] = item;
|
this._items[userName] = item;
|
||||||
|
|
||||||
item.connect('activate',
|
item.connect('activate', this._onItemActivated.bind(this));
|
||||||
Lang.bind(this, this._onItemActivated));
|
|
||||||
|
|
||||||
// Try to keep the focused item front-and-center
|
// Try to keep the focused item front-and-center
|
||||||
item.actor.connect('key-focus-in', () => { this.scrollToItem(item); });
|
item.actor.connect('key-focus-in', () => { this.scrollToItem(item); });
|
||||||
@ -413,8 +411,8 @@ var LoginDialog = new Lang.Class({
|
|||||||
this.actor.get_accessible().set_role(Atk.Role.WINDOW);
|
this.actor.get_accessible().set_role(Atk.Role.WINDOW);
|
||||||
|
|
||||||
this.actor.add_constraint(new Layout.MonitorConstraint({ primary: true }));
|
this.actor.add_constraint(new Layout.MonitorConstraint({ primary: true }));
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._onAllocate));
|
this.actor.connect('allocate', this._onAllocate.bind(this));
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
parentActor.add_child(this.actor);
|
parentActor.add_child(this.actor);
|
||||||
|
|
||||||
this._userManager = AccountsService.UserManager.get_default()
|
this._userManager = AccountsService.UserManager.get_default()
|
||||||
@ -423,17 +421,17 @@ var LoginDialog = new Lang.Class({
|
|||||||
this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
||||||
|
|
||||||
this._settings.connect('changed::' + GdmUtil.BANNER_MESSAGE_KEY,
|
this._settings.connect('changed::' + GdmUtil.BANNER_MESSAGE_KEY,
|
||||||
Lang.bind(this, this._updateBanner));
|
this._updateBanner.bind(this));
|
||||||
this._settings.connect('changed::' + GdmUtil.BANNER_MESSAGE_TEXT_KEY,
|
this._settings.connect('changed::' + GdmUtil.BANNER_MESSAGE_TEXT_KEY,
|
||||||
Lang.bind(this, this._updateBanner));
|
this._updateBanner.bind(this));
|
||||||
this._settings.connect('changed::' + GdmUtil.DISABLE_USER_LIST_KEY,
|
this._settings.connect('changed::' + GdmUtil.DISABLE_USER_LIST_KEY,
|
||||||
Lang.bind(this, this._updateDisableUserList));
|
this._updateDisableUserList.bind(this));
|
||||||
this._settings.connect('changed::' + GdmUtil.LOGO_KEY,
|
this._settings.connect('changed::' + GdmUtil.LOGO_KEY,
|
||||||
Lang.bind(this, this._updateLogo));
|
this._updateLogo.bind(this));
|
||||||
|
|
||||||
this._textureCache = St.TextureCache.get_default();
|
this._textureCache = St.TextureCache.get_default();
|
||||||
this._updateLogoTextureId = this._textureCache.connect('texture-file-changed',
|
this._updateLogoTextureId = this._textureCache.connect('texture-file-changed',
|
||||||
Lang.bind(this, this._updateLogoTexture));
|
this._updateLogoTexture.bind(this));
|
||||||
|
|
||||||
this._userSelectionBox = new St.BoxLayout({ style_class: 'login-dialog-user-selection-box',
|
this._userSelectionBox = new St.BoxLayout({ style_class: 'login-dialog-user-selection-box',
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
@ -449,8 +447,8 @@ var LoginDialog = new Lang.Class({
|
|||||||
y_fill: true });
|
y_fill: true });
|
||||||
|
|
||||||
this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient, AuthPrompt.AuthPromptMode.UNLOCK_OR_LOG_IN);
|
this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient, AuthPrompt.AuthPromptMode.UNLOCK_OR_LOG_IN);
|
||||||
this._authPrompt.connect('prompted', Lang.bind(this, this._onPrompted));
|
this._authPrompt.connect('prompted', this._onPrompted.bind(this));
|
||||||
this._authPrompt.connect('reset', Lang.bind(this, this._onReset));
|
this._authPrompt.connect('reset', this._onReset.bind(this));
|
||||||
this._authPrompt.hide();
|
this._authPrompt.hide();
|
||||||
this.actor.add_child(this._authPrompt.actor);
|
this.actor.add_child(this._authPrompt.actor);
|
||||||
|
|
||||||
@ -467,7 +465,7 @@ var LoginDialog = new Lang.Class({
|
|||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
x_fill: true });
|
x_fill: true });
|
||||||
|
|
||||||
this._notListedButton.connect('clicked', Lang.bind(this, this._hideUserListAskForUsernameAndBeginVerification));
|
this._notListedButton.connect('clicked', this._hideUserListAskForUsernameAndBeginVerification.bind(this));
|
||||||
|
|
||||||
this._notListedButton.hide();
|
this._notListedButton.hide();
|
||||||
|
|
||||||
@ -517,15 +515,15 @@ var LoginDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._realmManager = new Realmd.Manager();
|
this._realmManager = new Realmd.Manager();
|
||||||
this._realmSignalId = this._realmManager.connect('login-format-changed',
|
this._realmSignalId = this._realmManager.connect('login-format-changed',
|
||||||
Lang.bind(this, this._showRealmLoginHint));
|
this._showRealmLoginHint.bind(this));
|
||||||
|
|
||||||
LoginManager.getLoginManager().getCurrentSessionProxy(Lang.bind(this, this._gotGreeterSessionProxy));
|
LoginManager.getLoginManager().getCurrentSessionProxy(this._gotGreeterSessionProxy.bind(this));
|
||||||
|
|
||||||
// If the user list is enabled, it should take key focus; make sure the
|
// If the user list is enabled, it should take key focus; make sure the
|
||||||
// screen shield is initialized first to prevent it from stealing the
|
// screen shield is initialized first to prevent it from stealing the
|
||||||
// focus later
|
// focus later
|
||||||
this._startupCompleteId = Main.layoutManager.connect('startup-complete',
|
this._startupCompleteId = Main.layoutManager.connect('startup-complete',
|
||||||
Lang.bind(this, this._updateDisableUserList));
|
this._updateDisableUserList.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getBannerAllocation(dialogBox) {
|
_getBannerAllocation(dialogBox) {
|
||||||
@ -723,7 +721,7 @@ var LoginDialog = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, this._loadUserList));
|
let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, this._loadUserList.bind(this));
|
||||||
GLib.Source.set_name_by_id(id, '[gnome-shell] _loadUserList');
|
GLib.Source.set_name_by_id(id, '[gnome-shell] _loadUserList');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -820,11 +818,11 @@ var LoginDialog = new Lang.Class({
|
|||||||
this._greeter = this._gdmClient.get_greeter_sync(null);
|
this._greeter = this._gdmClient.get_greeter_sync(null);
|
||||||
|
|
||||||
this._defaultSessionChangedId = this._greeter.connect('default-session-name-changed',
|
this._defaultSessionChangedId = this._greeter.connect('default-session-name-changed',
|
||||||
Lang.bind(this, this._onDefaultSessionChanged));
|
this._onDefaultSessionChanged.bind(this));
|
||||||
this._sessionOpenedId = this._greeter.connect('session-opened',
|
this._sessionOpenedId = this._greeter.connect('session-opened',
|
||||||
Lang.bind(this, this._onSessionOpened));
|
this._onSessionOpened.bind(this));
|
||||||
this._timedLoginRequestedId = this._greeter.connect('timed-login-requested',
|
this._timedLoginRequestedId = this._greeter.connect('timed-login-requested',
|
||||||
Lang.bind(this, this._onTimedLoginRequested));
|
this._onTimedLoginRequested.bind(this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ var OVirtCredentialsManager = new Lang.Class({
|
|||||||
|
|
||||||
this._credentials = new OVirtCredentials();
|
this._credentials = new OVirtCredentials();
|
||||||
this._credentials.connectSignal('UserAuthenticated',
|
this._credentials.connectSignal('UserAuthenticated',
|
||||||
Lang.bind(this, this._onUserAuthenticated));
|
this._onUserAuthenticated.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onUserAuthenticated(proxy, sender, [token]) {
|
_onUserAuthenticated(proxy, sender, [token]) {
|
||||||
|
@ -66,7 +66,7 @@ var Manager = new Lang.Class({
|
|||||||
this._aggregateProvider = Provider(Gio.DBus.system,
|
this._aggregateProvider = Provider(Gio.DBus.system,
|
||||||
'org.freedesktop.realmd',
|
'org.freedesktop.realmd',
|
||||||
'/org/freedesktop/realmd',
|
'/org/freedesktop/realmd',
|
||||||
Lang.bind(this, this._reloadRealms))
|
this._reloadRealms.bind(this))
|
||||||
this._realms = {};
|
this._realms = {};
|
||||||
|
|
||||||
this._signalId = this._aggregateProvider.connect('g-properties-changed',
|
this._signalId = this._aggregateProvider.connect('g-properties-changed',
|
||||||
@ -86,7 +86,7 @@ var Manager = new Lang.Class({
|
|||||||
let realm = Realm(Gio.DBus.system,
|
let realm = Realm(Gio.DBus.system,
|
||||||
'org.freedesktop.realmd',
|
'org.freedesktop.realmd',
|
||||||
realmPaths[i],
|
realmPaths[i],
|
||||||
Lang.bind(this, this._onRealmLoaded));
|
this._onRealmLoaded.bind(this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ var ShellUserVerifier = new Lang.Class({
|
|||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
|
this._settings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
|
||||||
this._settings.connect('changed',
|
this._settings.connect('changed',
|
||||||
Lang.bind(this, this._updateDefaultService));
|
this._updateDefaultService.bind(this));
|
||||||
this._updateDefaultService();
|
this._updateDefaultService();
|
||||||
|
|
||||||
this._fprintManager = Fprint.FprintManager();
|
this._fprintManager = Fprint.FprintManager();
|
||||||
@ -147,9 +147,9 @@ var ShellUserVerifier = new Lang.Class({
|
|||||||
this._checkForSmartcard();
|
this._checkForSmartcard();
|
||||||
|
|
||||||
this._smartcardInsertedId = this._smartcardManager.connect('smartcard-inserted',
|
this._smartcardInsertedId = this._smartcardManager.connect('smartcard-inserted',
|
||||||
Lang.bind(this, this._checkForSmartcard));
|
this._checkForSmartcard.bind(this));
|
||||||
this._smartcardRemovedId = this._smartcardManager.connect('smartcard-removed',
|
this._smartcardRemovedId = this._smartcardManager.connect('smartcard-removed',
|
||||||
Lang.bind(this, this._checkForSmartcard));
|
this._checkForSmartcard.bind(this));
|
||||||
|
|
||||||
this._messageQueue = [];
|
this._messageQueue = [];
|
||||||
this._messageQueueTimeoutId = 0;
|
this._messageQueueTimeoutId = 0;
|
||||||
@ -164,7 +164,7 @@ var ShellUserVerifier = new Lang.Class({
|
|||||||
this._oVirtUserAuthenticated(this._oVirtCredentialsManager.getToken());
|
this._oVirtUserAuthenticated(this._oVirtCredentialsManager.getToken());
|
||||||
|
|
||||||
this._oVirtUserAuthenticatedId = this._oVirtCredentialsManager.connect('user-authenticated',
|
this._oVirtUserAuthenticatedId = this._oVirtCredentialsManager.connect('user-authenticated',
|
||||||
Lang.bind(this, this._oVirtUserAuthenticated));
|
this._oVirtUserAuthenticated.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
begin(userName, hold) {
|
begin(userName, hold) {
|
||||||
@ -179,9 +179,9 @@ var ShellUserVerifier = new Lang.Class({
|
|||||||
// If possible, reauthenticate an already running session,
|
// If possible, reauthenticate an already running session,
|
||||||
// so any session specific credentials get updated appropriately
|
// so any session specific credentials get updated appropriately
|
||||||
this._client.open_reauthentication_channel(userName, this._cancellable,
|
this._client.open_reauthentication_channel(userName, this._cancellable,
|
||||||
Lang.bind(this, this._reauthenticationChannelOpened));
|
this._reauthenticationChannelOpened.bind(this));
|
||||||
} else {
|
} else {
|
||||||
this._client.get_user_verifier(this._cancellable, Lang.bind(this, this._userVerifierGot));
|
this._client.get_user_verifier(this._cancellable, this._userVerifierGot.bind(this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -357,7 +357,7 @@ var ShellUserVerifier = new Lang.Class({
|
|||||||
// Gdm emits org.freedesktop.DBus.Error.AccessDenied when there is
|
// Gdm emits org.freedesktop.DBus.Error.AccessDenied when there is
|
||||||
// no session to reauthenticate. Fall back to performing verification
|
// no session to reauthenticate. Fall back to performing verification
|
||||||
// from this login session
|
// from this login session
|
||||||
client.get_user_verifier(this._cancellable, Lang.bind(this, this._userVerifierGot));
|
client.get_user_verifier(this._cancellable, this._userVerifierGot.bind(this));
|
||||||
return;
|
return;
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
this._reportInitError('Failed to open reauthentication channel', e);
|
this._reportInitError('Failed to open reauthentication channel', e);
|
||||||
@ -387,13 +387,13 @@ var ShellUserVerifier = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_connectSignals() {
|
_connectSignals() {
|
||||||
this._userVerifier.connect('info', Lang.bind(this, this._onInfo));
|
this._userVerifier.connect('info', this._onInfo.bind(this));
|
||||||
this._userVerifier.connect('problem', Lang.bind(this, this._onProblem));
|
this._userVerifier.connect('problem', this._onProblem.bind(this));
|
||||||
this._userVerifier.connect('info-query', Lang.bind(this, this._onInfoQuery));
|
this._userVerifier.connect('info-query', this._onInfoQuery.bind(this));
|
||||||
this._userVerifier.connect('secret-info-query', Lang.bind(this, this._onSecretInfoQuery));
|
this._userVerifier.connect('secret-info-query', this._onSecretInfoQuery.bind(this));
|
||||||
this._userVerifier.connect('conversation-stopped', Lang.bind(this, this._onConversationStopped));
|
this._userVerifier.connect('conversation-stopped', this._onConversationStopped.bind(this));
|
||||||
this._userVerifier.connect('reset', Lang.bind(this, this._onReset));
|
this._userVerifier.connect('reset', this._onReset.bind(this));
|
||||||
this._userVerifier.connect('verification-complete', Lang.bind(this, this._onVerificationComplete));
|
this._userVerifier.connect('verification-complete', this._onVerificationComplete.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getForegroundService() {
|
_getForegroundService() {
|
||||||
|
@ -186,7 +186,9 @@ var ExtensionFinder = new Lang.Class({
|
|||||||
|
|
||||||
scanExtensions() {
|
scanExtensions() {
|
||||||
let perUserDir = Gio.File.new_for_path(global.userdatadir);
|
let perUserDir = Gio.File.new_for_path(global.userdatadir);
|
||||||
FileUtils.collectFromDatadirs('extensions', true, Lang.bind(this, this._loadExtension, perUserDir));
|
FileUtils.collectFromDatadirs('extensions', true, (dir, info) => {
|
||||||
|
this._loadExtension(dir, info, perUserDir);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(ExtensionFinder.prototype);
|
Signals.addSignalMethods(ExtensionFinder.prototype);
|
||||||
|
@ -22,7 +22,7 @@ var HistoryManager = new Lang.Class({
|
|||||||
if (this._key) {
|
if (this._key) {
|
||||||
this._history = global.settings.get_strv(this._key);
|
this._history = global.settings.get_strv(this._key);
|
||||||
global.settings.connect('changed::' + this._key,
|
global.settings.connect('changed::' + this._key,
|
||||||
Lang.bind(this, this._historyChanged));
|
this._historyChanged.bind(this));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this._history = [];
|
this._history = [];
|
||||||
@ -32,7 +32,7 @@ var HistoryManager = new Lang.Class({
|
|||||||
|
|
||||||
if (this._entry) {
|
if (this._entry) {
|
||||||
this._entry.connect('key-press-event',
|
this._entry.connect('key-press-event',
|
||||||
Lang.bind(this, this._onEntryKeyPress));
|
this._onEntryKeyPress.bind(this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -53,11 +53,11 @@ var IBusManager = new Lang.Class({
|
|||||||
this._preloadEnginesId = 0;
|
this._preloadEnginesId = 0;
|
||||||
|
|
||||||
this._ibus = IBus.Bus.new_async();
|
this._ibus = IBus.Bus.new_async();
|
||||||
this._ibus.connect('connected', Lang.bind(this, this._onConnected));
|
this._ibus.connect('connected', this._onConnected.bind(this));
|
||||||
this._ibus.connect('disconnected', Lang.bind(this, this._clear));
|
this._ibus.connect('disconnected', this._clear.bind(this));
|
||||||
// Need to set this to get 'global-engine-changed' emitions
|
// Need to set this to get 'global-engine-changed' emitions
|
||||||
this._ibus.set_watch_ibus_signal(true);
|
this._ibus.set_watch_ibus_signal(true);
|
||||||
this._ibus.connect('global-engine-changed', Lang.bind(this, this._engineChanged));
|
this._ibus.connect('global-engine-changed', this._engineChanged.bind(this));
|
||||||
|
|
||||||
this._spawn();
|
this._spawn();
|
||||||
},
|
},
|
||||||
@ -88,11 +88,11 @@ var IBusManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onConnected() {
|
_onConnected() {
|
||||||
this._ibus.list_engines_async(-1, null, Lang.bind(this, this._initEngines));
|
this._ibus.list_engines_async(-1, null, this._initEngines.bind(this));
|
||||||
this._ibus.request_name_async(IBus.SERVICE_PANEL,
|
this._ibus.request_name_async(IBus.SERVICE_PANEL,
|
||||||
IBus.BusNameFlag.REPLACE_EXISTING,
|
IBus.BusNameFlag.REPLACE_EXISTING,
|
||||||
-1, null,
|
-1, null,
|
||||||
Lang.bind(this, this._initPanelService));
|
this._initPanelService.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_initEngines(ibus, result) {
|
_initEngines(ibus, result) {
|
||||||
@ -114,7 +114,7 @@ var IBusManager = new Lang.Class({
|
|||||||
this._panelService = new IBus.PanelService({ connection: this._ibus.get_connection(),
|
this._panelService = new IBus.PanelService({ connection: this._ibus.get_connection(),
|
||||||
object_path: IBus.PATH_PANEL });
|
object_path: IBus.PATH_PANEL });
|
||||||
this._candidatePopup.setPanelService(this._panelService);
|
this._candidatePopup.setPanelService(this._panelService);
|
||||||
this._panelService.connect('update-property', Lang.bind(this, this._updateProperty));
|
this._panelService.connect('update-property', this._updateProperty.bind(this));
|
||||||
try {
|
try {
|
||||||
// IBus versions older than 1.5.10 have a bug which
|
// IBus versions older than 1.5.10 have a bug which
|
||||||
// causes spurious set-content-type emissions when
|
// causes spurious set-content-type emissions when
|
||||||
@ -122,7 +122,7 @@ var IBusManager = new Lang.Class({
|
|||||||
// and hints defeating its intended semantics and
|
// and hints defeating its intended semantics and
|
||||||
// confusing users. We thus don't use it in that case.
|
// confusing users. We thus don't use it in that case.
|
||||||
_checkIBusVersion(1, 5, 10);
|
_checkIBusVersion(1, 5, 10);
|
||||||
this._panelService.connect('set-content-type', Lang.bind(this, this._setContentType));
|
this._panelService.connect('set-content-type', this._setContentType.bind(this));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
// If an engine is already active we need to get its properties
|
// If an engine is already active we need to get its properties
|
||||||
|
@ -16,13 +16,13 @@ var InputMethod = new Lang.Class({
|
|||||||
this._enabled = true;
|
this._enabled = true;
|
||||||
this._currentFocus = null;
|
this._currentFocus = null;
|
||||||
this._ibus = IBus.Bus.new_async();
|
this._ibus = IBus.Bus.new_async();
|
||||||
this._ibus.connect('connected', Lang.bind(this, this._onConnected));
|
this._ibus.connect('connected', this._onConnected.bind(this));
|
||||||
this._ibus.connect('disconnected', Lang.bind(this, this._clear));
|
this._ibus.connect('disconnected', this._clear.bind(this));
|
||||||
this.connect('notify::can-show-preedit', Lang.bind(this, this._updateCapabilities));
|
this.connect('notify::can-show-preedit', this._updateCapabilities.bind(this));
|
||||||
|
|
||||||
this._inputSourceManager = Keyboard.getInputSourceManager();
|
this._inputSourceManager = Keyboard.getInputSourceManager();
|
||||||
this._sourceChangedId = this._inputSourceManager.connect('current-source-changed',
|
this._sourceChangedId = this._inputSourceManager.connect('current-source-changed',
|
||||||
Lang.bind(this, this._onSourceChanged));
|
this._onSourceChanged.bind(this));
|
||||||
this._currentSource = this._inputSourceManager.currentSource;
|
this._currentSource = this._inputSourceManager.currentSource;
|
||||||
|
|
||||||
if (this._ibus.is_connected())
|
if (this._ibus.is_connected())
|
||||||
@ -54,16 +54,16 @@ var InputMethod = new Lang.Class({
|
|||||||
|
|
||||||
_onConnected() {
|
_onConnected() {
|
||||||
this._ibus.create_input_context_async ('gnome-shell', -1, null,
|
this._ibus.create_input_context_async ('gnome-shell', -1, null,
|
||||||
Lang.bind(this, this._setContext));
|
this._setContext.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_setContext(bus, res) {
|
_setContext(bus, res) {
|
||||||
this._context = this._ibus.create_input_context_async_finish(res);
|
this._context = this._ibus.create_input_context_async_finish(res);
|
||||||
this._context.connect('enabled', () => { this._enabled = true });
|
this._context.connect('enabled', () => { this._enabled = true });
|
||||||
this._context.connect('disabled', () => { this._enabled = false });
|
this._context.connect('disabled', () => { this._enabled = false });
|
||||||
this._context.connect('commit-text', Lang.bind(this, this._onCommitText));
|
this._context.connect('commit-text', this._onCommitText.bind(this));
|
||||||
this._context.connect('delete-surrounding-text', Lang.bind(this, this._onDeleteSurroundingText));
|
this._context.connect('delete-surrounding-text', this._onDeleteSurroundingText.bind(this));
|
||||||
this._context.connect('update-preedit-text', Lang.bind(this, this._onUpdatePreeditText));
|
this._context.connect('update-preedit-text', this._onUpdatePreeditText.bind(this));
|
||||||
|
|
||||||
this._updateCapabilities();
|
this._updateCapabilities();
|
||||||
},
|
},
|
||||||
|
@ -110,7 +110,7 @@ var LoginManagerSystemd = new Lang.Class({
|
|||||||
'org.freedesktop.login1',
|
'org.freedesktop.login1',
|
||||||
'/org/freedesktop/login1');
|
'/org/freedesktop/login1');
|
||||||
this._proxy.connectSignal('PrepareForSleep',
|
this._proxy.connectSignal('PrepareForSleep',
|
||||||
Lang.bind(this, this._prepareForSleep));
|
this._prepareForSleep.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
getCurrentSessionProxy(callback) {
|
getCurrentSessionProxy(callback) {
|
||||||
|
@ -61,7 +61,7 @@ var ObjectManager = new Lang.Class({
|
|||||||
this._numLoadInhibitors = 1;
|
this._numLoadInhibitors = 1;
|
||||||
this._managerProxy.init_async(GLib.PRIORITY_DEFAULT,
|
this._managerProxy.init_async(GLib.PRIORITY_DEFAULT,
|
||||||
this._cancellable,
|
this._cancellable,
|
||||||
Lang.bind(this, this._onManagerProxyLoaded));
|
this._onManagerProxyLoaded.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_tryToCompleteLoad() {
|
_tryToCompleteLoad() {
|
||||||
@ -226,7 +226,7 @@ var ObjectManager = new Lang.Class({
|
|||||||
this._numLoadInhibitors++;
|
this._numLoadInhibitors++;
|
||||||
this._addInterface(objectPath,
|
this._addInterface(objectPath,
|
||||||
interfaceName,
|
interfaceName,
|
||||||
Lang.bind(this, this._tryToCompleteLoad));
|
this._tryToCompleteLoad.bind(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._tryToCompleteLoad();
|
this._tryToCompleteLoad();
|
||||||
|
@ -32,7 +32,7 @@ var SmartcardManager = new Lang.Class({
|
|||||||
name: "org.gnome.SettingsDaemon.Smartcard",
|
name: "org.gnome.SettingsDaemon.Smartcard",
|
||||||
objectPath: '/org/gnome/SettingsDaemon/Smartcard',
|
objectPath: '/org/gnome/SettingsDaemon/Smartcard',
|
||||||
knownInterfaces: [ SmartcardTokenIface ],
|
knownInterfaces: [ SmartcardTokenIface ],
|
||||||
onLoaded: Lang.bind(this, this._onLoaded) });
|
onLoaded: this._onLoaded.bind(this) });
|
||||||
this._insertedTokens = {};
|
this._insertedTokens = {};
|
||||||
this._loginToken = null;
|
this._loginToken = null;
|
||||||
},
|
},
|
||||||
|
@ -369,7 +369,7 @@ var CloseButton = new Lang.Class({
|
|||||||
|
|
||||||
this._boxPointer = boxpointer;
|
this._boxPointer = boxpointer;
|
||||||
if (boxpointer)
|
if (boxpointer)
|
||||||
this._boxPointer.connect('arrow-side-changed', Lang.bind(this, this._sync));
|
this._boxPointer.connect('arrow-side-changed', this._sync.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_computeBoxPointerOffset() {
|
_computeBoxPointerOffset() {
|
||||||
@ -452,7 +452,7 @@ var AppSettingsMonitor = new Lang.Class({
|
|||||||
|
|
||||||
this._appSystem = Shell.AppSystem.get_default();
|
this._appSystem = Shell.AppSystem.get_default();
|
||||||
this._appSystem.connect('installed-changed',
|
this._appSystem.connect('installed-changed',
|
||||||
Lang.bind(this, this._onInstalledChanged));
|
this._onInstalledChanged.bind(this));
|
||||||
this._onInstalledChanged();
|
this._onInstalledChanged();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -46,11 +46,11 @@ var WeatherClient = new Lang.Class({
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
this._permStore.connectSignal('Changed',
|
this._permStore.connectSignal('Changed',
|
||||||
Lang.bind(this, this._onPermStoreChanged));
|
this._onPermStoreChanged.bind(this));
|
||||||
|
|
||||||
this._locationSettings = new Gio.Settings({ schema_id: 'org.gnome.system.location' });
|
this._locationSettings = new Gio.Settings({ schema_id: 'org.gnome.system.location' });
|
||||||
this._locationSettings.connect('changed::enabled',
|
this._locationSettings.connect('changed::enabled',
|
||||||
Lang.bind(this, this._updateAutoLocation));
|
this._updateAutoLocation.bind(this));
|
||||||
|
|
||||||
this._world = GWeather.Location.get_world();
|
this._world = GWeather.Location.get_world();
|
||||||
|
|
||||||
@ -68,9 +68,9 @@ var WeatherClient = new Lang.Class({
|
|||||||
'org.gnome.Weather.Application');
|
'org.gnome.Weather.Application');
|
||||||
this._weatherAppMon.connect('available-changed', () => { this.emit('changed'); });
|
this._weatherAppMon.connect('available-changed', () => { this.emit('changed'); });
|
||||||
this._weatherAppMon.watchSetting('automatic-location',
|
this._weatherAppMon.watchSetting('automatic-location',
|
||||||
Lang.bind(this, this._onAutomaticLocationChanged));
|
this._onAutomaticLocationChanged.bind(this));
|
||||||
this._weatherAppMon.watchSetting('locations',
|
this._weatherAppMon.watchSetting('locations',
|
||||||
Lang.bind(this, this._onLocationsChanged));
|
this._onLocationsChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
get available() {
|
get available() {
|
||||||
@ -157,7 +157,7 @@ var WeatherClient = new Lang.Class({
|
|||||||
|
|
||||||
this._gclueLocationChangedId =
|
this._gclueLocationChangedId =
|
||||||
this._gclueService.connect('notify::location',
|
this._gclueService.connect('notify::location',
|
||||||
Lang.bind(this, this._onGClueLocationChanged));
|
this._onGClueLocationChanged.bind(this));
|
||||||
this._onGClueLocationChanged();
|
this._onGClueLocationChanged();
|
||||||
} else {
|
} else {
|
||||||
if (this._gclueLocationChangedId)
|
if (this._gclueLocationChangedId)
|
||||||
|
@ -122,7 +122,7 @@ var PortalWindow = new Lang.Class({
|
|||||||
_init(application, url, timestamp, doneCallback) {
|
_init(application, url, timestamp, doneCallback) {
|
||||||
this.parent({ application: application });
|
this.parent({ application: application });
|
||||||
|
|
||||||
this.connect('delete-event', Lang.bind(this, this.destroyWindow));
|
this.connect('delete-event', this.destroyWindow.bind(this));
|
||||||
this._headerBar = new PortalHeaderBar();
|
this._headerBar = new PortalHeaderBar();
|
||||||
this._headerBar.setSecurityIcon(PortalHelperSecurityLevel.NOT_YET_DETERMINED);
|
this._headerBar.setSecurityIcon(PortalHelperSecurityLevel.NOT_YET_DETERMINED);
|
||||||
this.set_titlebar(this._headerBar);
|
this.set_titlebar(this._headerBar);
|
||||||
@ -146,12 +146,12 @@ var PortalWindow = new Lang.Class({
|
|||||||
this._webContext.set_network_proxy_settings(WebKit.NetworkProxyMode.NO_PROXY, null);
|
this._webContext.set_network_proxy_settings(WebKit.NetworkProxyMode.NO_PROXY, null);
|
||||||
|
|
||||||
this._webView = WebKit.WebView.new_with_context(this._webContext);
|
this._webView = WebKit.WebView.new_with_context(this._webContext);
|
||||||
this._webView.connect('decide-policy', Lang.bind(this, this._onDecidePolicy));
|
this._webView.connect('decide-policy', this._onDecidePolicy.bind(this));
|
||||||
this._webView.connect('load-changed', Lang.bind(this, this._onLoadChanged));
|
this._webView.connect('load-changed', this._onLoadChanged.bind(this));
|
||||||
this._webView.connect('insecure-content-detected', Lang.bind(this, this._onInsecureContentDetected));
|
this._webView.connect('insecure-content-detected', this._onInsecureContentDetected.bind(this));
|
||||||
this._webView.connect('load-failed-with-tls-errors', Lang.bind(this, this._onLoadFailedWithTlsErrors));
|
this._webView.connect('load-failed-with-tls-errors', this._onLoadFailedWithTlsErrors.bind(this));
|
||||||
this._webView.load_uri(url);
|
this._webView.load_uri(url);
|
||||||
this._webView.connect('notify::uri', Lang.bind(this, this._syncUri));
|
this._webView.connect('notify::uri', this._syncUri.bind(this));
|
||||||
this._syncUri();
|
this._syncUri();
|
||||||
|
|
||||||
this.add(this._webView);
|
this.add(this._webView);
|
||||||
|
@ -353,7 +353,7 @@ var AppSwitcherPopup = new Lang.Class({
|
|||||||
!forceAppFocus) {
|
!forceAppFocus) {
|
||||||
this._thumbnailTimeoutId = Mainloop.timeout_add (
|
this._thumbnailTimeoutId = Mainloop.timeout_add (
|
||||||
THUMBNAIL_POPUP_TIME,
|
THUMBNAIL_POPUP_TIME,
|
||||||
Lang.bind(this, this._timeoutPopupThumbnails));
|
this._timeoutPopupThumbnails.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._thumbnailTimeoutId, '[gnome-shell] this._timeoutPopupThumbnails');
|
GLib.Source.set_name_by_id(this._thumbnailTimeoutId, '[gnome-shell] this._timeoutPopupThumbnails');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -384,9 +384,9 @@ var AppSwitcherPopup = new Lang.Class({
|
|||||||
|
|
||||||
_createThumbnails() {
|
_createThumbnails() {
|
||||||
this._thumbnails = new ThumbnailList (this._items[this._selectedIndex].cachedWindows);
|
this._thumbnails = new ThumbnailList (this._items[this._selectedIndex].cachedWindows);
|
||||||
this._thumbnails.connect('item-activated', Lang.bind(this, this._windowActivated));
|
this._thumbnails.connect('item-activated', this._windowActivated.bind(this));
|
||||||
this._thumbnails.connect('item-entered', Lang.bind(this, this._windowEntered));
|
this._thumbnails.connect('item-entered', this._windowEntered.bind(this));
|
||||||
this._thumbnails.connect('item-removed', Lang.bind(this, this._windowRemoved));
|
this._thumbnails.connect('item-removed', this._windowRemoved.bind(this));
|
||||||
this._thumbnails.actor.connect('destroy', () => {
|
this._thumbnails.actor.connect('destroy', () => {
|
||||||
this._thumbnails = null;
|
this._thumbnails = null;
|
||||||
this._thumbnailsFocused = false;
|
this._thumbnailsFocused = false;
|
||||||
@ -431,8 +431,8 @@ var CyclerHighlight = new Lang.Class({
|
|||||||
this.actor.add_constraint(constraint);
|
this.actor.add_constraint(constraint);
|
||||||
|
|
||||||
this.actor.connect('notify::allocation',
|
this.actor.connect('notify::allocation',
|
||||||
Lang.bind(this, this._onAllocationChanged));
|
this._onAllocationChanged.bind(this));
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
set window(w) {
|
set window(w) {
|
||||||
@ -490,7 +490,7 @@ var CyclerPopup = new Lang.Class({
|
|||||||
// We don't show an actual popup, so just provide what SwitcherPopup
|
// We don't show an actual popup, so just provide what SwitcherPopup
|
||||||
// expects instead of inheriting from SwitcherList
|
// expects instead of inheriting from SwitcherList
|
||||||
this._switcherList = { actor: new St.Widget(),
|
this._switcherList = { actor: new St.Widget(),
|
||||||
highlight: Lang.bind(this, this._highlightItem),
|
highlight: this._highlightItem.bind(this),
|
||||||
connect() {} };
|
connect() {} };
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -690,7 +690,7 @@ var AppSwitcher = new Lang.Class({
|
|||||||
this._altTabPopup = altTabPopup;
|
this._altTabPopup = altTabPopup;
|
||||||
this._mouseTimeOutId = 0;
|
this._mouseTimeOutId = 0;
|
||||||
|
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
@ -912,7 +912,9 @@ var ThumbnailList = new Lang.Class({
|
|||||||
this._thumbnailBins[i].set_height(binHeight);
|
this._thumbnailBins[i].set_height(binHeight);
|
||||||
this._thumbnailBins[i].add_actor(clone);
|
this._thumbnailBins[i].add_actor(clone);
|
||||||
|
|
||||||
clone._destroyId = mutterWindow.connect('destroy', Lang.bind(this, this._removeThumbnail, clone));
|
clone._destroyId = mutterWindow.connect('destroy', source => {
|
||||||
|
this._removeThumbnail(source, clone);
|
||||||
|
});
|
||||||
this._clones.push(clone);
|
this._clones.push(clone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ var Animation = new Lang.Class({
|
|||||||
|
|
||||||
_init(file, width, height, speed) {
|
_init(file, width, height, speed) {
|
||||||
this.actor = new St.Bin();
|
this.actor = new St.Bin();
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
this._speed = speed;
|
this._speed = speed;
|
||||||
|
|
||||||
this._isLoaded = false;
|
this._isLoaded = false;
|
||||||
@ -24,7 +24,7 @@ var Animation = new Lang.Class({
|
|||||||
|
|
||||||
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||||
this._animations = St.TextureCache.get_default().load_sliced_image (file, width, height, scaleFactor,
|
this._animations = St.TextureCache.get_default().load_sliced_image (file, width, height, scaleFactor,
|
||||||
Lang.bind(this, this._animationsLoaded));
|
this._animationsLoaded.bind(this));
|
||||||
this.actor.set_child(this._animations);
|
this.actor.set_child(this._animations);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ var Animation = new Lang.Class({
|
|||||||
if (this._frame == 0)
|
if (this._frame == 0)
|
||||||
this._showFrame(0);
|
this._showFrame(0);
|
||||||
|
|
||||||
this._timeoutId = GLib.timeout_add(GLib.PRIORITY_LOW, this._speed, Lang.bind(this, this._update));
|
this._timeoutId = GLib.timeout_add(GLib.PRIORITY_LOW, this._speed, this._update.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._update');
|
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._update');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ var AllView = new Lang.Class({
|
|||||||
(indicators, pageIndex) => {
|
(indicators, pageIndex) => {
|
||||||
this.goToPage(pageIndex);
|
this.goToPage(pageIndex);
|
||||||
});
|
});
|
||||||
this._pageIndicators.actor.connect('scroll-event', Lang.bind(this, this._onScroll));
|
this._pageIndicators.actor.connect('scroll-event', this._onScroll.bind(this));
|
||||||
this.actor.add_actor(this._pageIndicators.actor);
|
this.actor.add_actor(this._pageIndicators.actor);
|
||||||
|
|
||||||
this.folderIcons = [];
|
this.folderIcons = [];
|
||||||
@ -406,12 +406,12 @@ var AllView = new Lang.Class({
|
|||||||
box.add_actor(this._stack);
|
box.add_actor(this._stack);
|
||||||
this._scrollView.add_actor(box);
|
this._scrollView.add_actor(box);
|
||||||
|
|
||||||
this._scrollView.connect('scroll-event', Lang.bind(this, this._onScroll));
|
this._scrollView.connect('scroll-event', this._onScroll.bind(this));
|
||||||
|
|
||||||
let panAction = new Clutter.PanAction({ interpolate: false });
|
let panAction = new Clutter.PanAction({ interpolate: false });
|
||||||
panAction.connect('pan', Lang.bind(this, this._onPan));
|
panAction.connect('pan', this._onPan.bind(this));
|
||||||
panAction.connect('gesture-cancel', Lang.bind(this, this._onPanEnd));
|
panAction.connect('gesture-cancel', this._onPanEnd.bind(this));
|
||||||
panAction.connect('gesture-end', Lang.bind(this, this._onPanEnd));
|
panAction.connect('gesture-end', this._onPanEnd.bind(this));
|
||||||
this._panAction = panAction;
|
this._panAction = panAction;
|
||||||
this._scrollView.add_action(panAction);
|
this._scrollView.add_action(panAction);
|
||||||
this._panning = false;
|
this._panning = false;
|
||||||
@ -448,7 +448,7 @@ var AllView = new Lang.Class({
|
|||||||
if (this.actor.mapped) {
|
if (this.actor.mapped) {
|
||||||
this._keyPressEventId =
|
this._keyPressEventId =
|
||||||
global.stage.connect('key-press-event',
|
global.stage.connect('key-press-event',
|
||||||
Lang.bind(this, this._onKeyPressEvent));
|
this._onKeyPressEvent.bind(this));
|
||||||
} else {
|
} else {
|
||||||
if (this._keyPressEventId)
|
if (this._keyPressEventId)
|
||||||
global.stage.disconnect(this._keyPressEventId);
|
global.stage.disconnect(this._keyPressEventId);
|
||||||
@ -456,7 +456,7 @@ var AllView = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this._redisplayWorkId = Main.initializeDeferredWork(this.actor, Lang.bind(this, this._redisplay));
|
this._redisplayWorkId = Main.initializeDeferredWork(this.actor, this._redisplay.bind(this));
|
||||||
|
|
||||||
Shell.AppSystem.get_default().connect('installed-changed', () => {
|
Shell.AppSystem.get_default().connect('installed-changed', () => {
|
||||||
Main.queueDeferredWork(this._redisplayWorkId);
|
Main.queueDeferredWork(this._redisplayWorkId);
|
||||||
@ -514,8 +514,8 @@ var AllView = new Lang.Class({
|
|||||||
folders.forEach(id => {
|
folders.forEach(id => {
|
||||||
let path = this._folderSettings.path + 'folders/' + id + '/';
|
let path = this._folderSettings.path + 'folders/' + id + '/';
|
||||||
let icon = new FolderIcon(id, path, this);
|
let icon = new FolderIcon(id, path, this);
|
||||||
icon.connect('name-changed', Lang.bind(this, this._itemNameChanged));
|
icon.connect('name-changed', this._itemNameChanged.bind(this));
|
||||||
icon.connect('apps-changed', Lang.bind(this, this._refilterApps));
|
icon.connect('apps-changed', this._refilterApps.bind(this));
|
||||||
this.addItem(icon);
|
this.addItem(icon);
|
||||||
this.folderIcons.push(icon);
|
this.folderIcons.push(icon);
|
||||||
});
|
});
|
||||||
@ -905,7 +905,7 @@ var AppDisplay = new Lang.Class({
|
|||||||
_init() {
|
_init() {
|
||||||
this._privacySettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.privacy' });
|
this._privacySettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.privacy' });
|
||||||
this._privacySettings.connect('changed::remember-app-usage',
|
this._privacySettings.connect('changed::remember-app-usage',
|
||||||
Lang.bind(this, this._updateFrequentVisibility));
|
this._updateFrequentVisibility.bind(this));
|
||||||
|
|
||||||
this._views = [];
|
this._views = [];
|
||||||
|
|
||||||
@ -930,7 +930,7 @@ var AppDisplay = new Lang.Class({
|
|||||||
this._viewStackLayout = new ViewStackLayout();
|
this._viewStackLayout = new ViewStackLayout();
|
||||||
this._viewStack = new St.Widget({ x_expand: true, y_expand: true,
|
this._viewStack = new St.Widget({ x_expand: true, y_expand: true,
|
||||||
layout_manager: this._viewStackLayout });
|
layout_manager: this._viewStackLayout });
|
||||||
this._viewStackLayout.connect('allocated-size-changed', Lang.bind(this, this._onAllocatedSizeChanged));
|
this._viewStackLayout.connect('allocated-size-changed', this._onAllocatedSizeChanged.bind(this));
|
||||||
this.actor.add_actor(this._viewStack);
|
this.actor.add_actor(this._viewStack);
|
||||||
let layout = new ControlsBoxLayout({ homogeneous: true });
|
let layout = new ControlsBoxLayout({ homogeneous: true });
|
||||||
this._controls = new St.Widget({ style_class: 'app-view-controls',
|
this._controls = new St.Widget({ style_class: 'app-view-controls',
|
||||||
@ -970,7 +970,7 @@ var AppDisplay = new Lang.Class({
|
|||||||
|
|
||||||
Gio.DBus.system.watch_name(SWITCHEROO_BUS_NAME,
|
Gio.DBus.system.watch_name(SWITCHEROO_BUS_NAME,
|
||||||
Gio.BusNameWatcherFlags.NONE,
|
Gio.BusNameWatcherFlags.NONE,
|
||||||
Lang.bind(this, this._switcherooProxyAppeared),
|
this._switcherooProxyAppeared.bind(this),
|
||||||
() => {
|
() => {
|
||||||
this._switcherooProxy = null;
|
this._switcherooProxy = null;
|
||||||
this._updateDiscreteGpuAvailable();
|
this._updateDiscreteGpuAvailable();
|
||||||
@ -1153,7 +1153,7 @@ var FolderView = new Lang.Class({
|
|||||||
this.actor.add_actor(scrollableContainer);
|
this.actor.add_actor(scrollableContainer);
|
||||||
|
|
||||||
let action = new Clutter.PanAction({ interpolate: true });
|
let action = new Clutter.PanAction({ interpolate: true });
|
||||||
action.connect('pan', Lang.bind(this, this._onPan));
|
action.connect('pan', this._onPan.bind(this));
|
||||||
this.actor.add_action(action);
|
this.actor.add_action(action);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1269,7 +1269,7 @@ var FolderIcon = new Lang.Class({
|
|||||||
// whether we need to update arrow side, position etc.
|
// whether we need to update arrow side, position etc.
|
||||||
this._popupInvalidated = false;
|
this._popupInvalidated = false;
|
||||||
|
|
||||||
this.icon = new IconGrid.BaseIcon('', { createIcon: Lang.bind(this, this._createIcon), setSizeManually: true });
|
this.icon = new IconGrid.BaseIcon('', { createIcon: this._createIcon.bind(this), setSizeManually: true });
|
||||||
this.actor.set_child(this.icon.actor);
|
this.actor.set_child(this.icon.actor);
|
||||||
this.actor.label_actor = this.icon.label;
|
this.actor.label_actor = this.icon.label;
|
||||||
|
|
||||||
@ -1285,7 +1285,7 @@ var FolderIcon = new Lang.Class({
|
|||||||
this._popup.popdown();
|
this._popup.popdown();
|
||||||
});
|
});
|
||||||
|
|
||||||
this._folder.connect('changed', Lang.bind(this, this._redisplay));
|
this._folder.connect('changed', this._redisplay.bind(this));
|
||||||
this._redisplay();
|
this._redisplay();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1456,7 +1456,7 @@ var AppFolderPopup = new Lang.Class({
|
|||||||
this._boxPointer.bin.set_child(this._view.actor);
|
this._boxPointer.bin.set_child(this._view.actor);
|
||||||
|
|
||||||
this.closeButton = Util.makeCloseButton(this._boxPointer);
|
this.closeButton = Util.makeCloseButton(this._boxPointer);
|
||||||
this.closeButton.connect('clicked', Lang.bind(this, this.popdown));
|
this.closeButton.connect('clicked', this.popdown.bind(this));
|
||||||
this.actor.add_actor(this.closeButton);
|
this.actor.add_actor(this.closeButton);
|
||||||
|
|
||||||
this._boxPointer.actor.bind_property('opacity', this.closeButton, 'opacity',
|
this._boxPointer.actor.bind_property('opacity', this.closeButton, 'opacity',
|
||||||
@ -1467,7 +1467,7 @@ var AppFolderPopup = new Lang.Class({
|
|||||||
source.actor.connect('destroy', () => { this.actor.destroy(); });
|
source.actor.connect('destroy', () => { this.actor.destroy(); });
|
||||||
this._grabHelper = new GrabHelper.GrabHelper(this.actor);
|
this._grabHelper = new GrabHelper.GrabHelper(this.actor);
|
||||||
this._grabHelper.addActor(Main.layoutManager.overviewGroup);
|
this._grabHelper.addActor(Main.layoutManager.overviewGroup);
|
||||||
this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPress));
|
this.actor.connect('key-press-event', this._onKeyPress.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeyPress(actor, event) {
|
_onKeyPress(actor, event) {
|
||||||
@ -1526,7 +1526,7 @@ var AppFolderPopup = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this._isOpen = this._grabHelper.grab({ actor: this.actor,
|
this._isOpen = this._grabHelper.grab({ actor: this.actor,
|
||||||
onUngrab: Lang.bind(this, this.popdown) });
|
onUngrab: this.popdown.bind(this) });
|
||||||
|
|
||||||
if (!this._isOpen)
|
if (!this._isOpen)
|
||||||
return;
|
return;
|
||||||
@ -1615,18 +1615,18 @@ var AppIcon = new Lang.Class({
|
|||||||
let isDraggable = appIconParams['isDraggable'];
|
let isDraggable = appIconParams['isDraggable'];
|
||||||
delete iconParams['isDraggable'];
|
delete iconParams['isDraggable'];
|
||||||
|
|
||||||
iconParams['createIcon'] = Lang.bind(this, this._createIcon);
|
iconParams['createIcon'] = this._createIcon.bind(this);
|
||||||
iconParams['setSizeManually'] = true;
|
iconParams['setSizeManually'] = true;
|
||||||
this.icon = new IconGrid.BaseIcon(app.get_name(), iconParams);
|
this.icon = new IconGrid.BaseIcon(app.get_name(), iconParams);
|
||||||
this._iconContainer.add_child(this.icon.actor);
|
this._iconContainer.add_child(this.icon.actor);
|
||||||
|
|
||||||
this.actor.label_actor = this.icon.label;
|
this.actor.label_actor = this.icon.label;
|
||||||
|
|
||||||
this.actor.connect('leave-event', Lang.bind(this, this._onLeaveEvent));
|
this.actor.connect('leave-event', this._onLeaveEvent.bind(this));
|
||||||
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
|
this.actor.connect('button-press-event', this._onButtonPress.bind(this));
|
||||||
this.actor.connect('touch-event', Lang.bind(this, this._onTouchEvent));
|
this.actor.connect('touch-event', this._onTouchEvent.bind(this));
|
||||||
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
|
this.actor.connect('clicked', this._onClicked.bind(this));
|
||||||
this.actor.connect('popup-menu', Lang.bind(this, this._onKeyboardPopupMenu));
|
this.actor.connect('popup-menu', this._onKeyboardPopupMenu.bind(this));
|
||||||
|
|
||||||
this._menu = null;
|
this._menu = null;
|
||||||
this._menuManager = new PopupMenu.PopupMenuManager(this);
|
this._menuManager = new PopupMenu.PopupMenuManager(this);
|
||||||
@ -1645,7 +1645,7 @@ var AppIcon = new Lang.Class({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
this._menuTimeoutId = 0;
|
this._menuTimeoutId = 0;
|
||||||
this._stateChangedId = this.app.connect('notify::state', () => {
|
this._stateChangedId = this.app.connect('notify::state', () => {
|
||||||
|
@ -51,7 +51,7 @@ var AppFavorites = new Lang.Class({
|
|||||||
|
|
||||||
_init() {
|
_init() {
|
||||||
this._favorites = {};
|
this._favorites = {};
|
||||||
global.settings.connect('changed::' + this.FAVORITE_APPS_KEY, Lang.bind(this, this._onFavsChanged));
|
global.settings.connect('changed::' + this.FAVORITE_APPS_KEY, this._onFavsChanged.bind(this));
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -65,9 +65,9 @@ var AudioDeviceSelectionDialog = new Lang.Class({
|
|||||||
this._selectionBox = new St.BoxLayout({ style_class: 'audio-selection-box' });
|
this._selectionBox = new St.BoxLayout({ style_class: 'audio-selection-box' });
|
||||||
this.contentLayout.add(this._selectionBox, { expand: true });
|
this.contentLayout.add(this._selectionBox, { expand: true });
|
||||||
|
|
||||||
this.addButton({ action: Lang.bind(this, this._openSettings),
|
this.addButton({ action: this._openSettings.bind(this),
|
||||||
label: _("Sound Settings") });
|
label: _("Sound Settings") });
|
||||||
this.addButton({ action: Lang.bind(this, this.close),
|
this.addButton({ action: this.close.bind(this),
|
||||||
label: _("Cancel"),
|
label: _("Cancel"),
|
||||||
key: Clutter.Escape });
|
key: Clutter.Escape });
|
||||||
},
|
},
|
||||||
@ -191,9 +191,9 @@ var AudioDeviceSelectionDBus = new Lang.Class({
|
|||||||
}
|
}
|
||||||
dialog._sender = invocation.get_sender();
|
dialog._sender = invocation.get_sender();
|
||||||
|
|
||||||
dialog.connect('closed', Lang.bind(this, this._onDialogClosed));
|
dialog.connect('closed', this._onDialogClosed.bind(this));
|
||||||
dialog.connect('device-selected',
|
dialog.connect('device-selected',
|
||||||
Lang.bind(this, this._onDeviceSelected));
|
this._onDeviceSelected.bind(this));
|
||||||
dialog.open();
|
dialog.open();
|
||||||
|
|
||||||
this._audioSelectionDialog = dialog;
|
this._audioSelectionDialog = dialog;
|
||||||
|
@ -539,7 +539,7 @@ var BackgroundSource = new Lang.Class({
|
|||||||
this._backgrounds = [];
|
this._backgrounds = [];
|
||||||
|
|
||||||
this._monitorsChangedId = global.screen.connect('monitors-changed',
|
this._monitorsChangedId = global.screen.connect('monitors-changed',
|
||||||
Lang.bind(this, this._onMonitorsChanged));
|
this._onMonitorsChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onMonitorsChanged() {
|
_onMonitorsChanged() {
|
||||||
|
@ -44,13 +44,13 @@ var BoxPointer = new Lang.Class({
|
|||||||
y_fill: true });
|
y_fill: true });
|
||||||
this._container = new Shell.GenericContainer();
|
this._container = new Shell.GenericContainer();
|
||||||
this.actor.set_child(this._container);
|
this.actor.set_child(this._container);
|
||||||
this._container.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this._container.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this._container.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this._container.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this._container.connect('allocate', Lang.bind(this, this._allocate));
|
this._container.connect('allocate', this._allocate.bind(this));
|
||||||
this.bin = new St.Bin(binProperties);
|
this.bin = new St.Bin(binProperties);
|
||||||
this._container.add_actor(this.bin);
|
this._container.add_actor(this.bin);
|
||||||
this._border = new St.DrawingArea();
|
this._border = new St.DrawingArea();
|
||||||
this._border.connect('repaint', Lang.bind(this, this._drawBorder));
|
this._border.connect('repaint', this._drawBorder.bind(this));
|
||||||
this._container.add_actor(this._border);
|
this._container.add_actor(this._border);
|
||||||
this.bin.raise(this._border);
|
this.bin.raise(this._border);
|
||||||
this._xOffset = 0;
|
this._xOffset = 0;
|
||||||
|
@ -215,7 +215,7 @@ var DBusEventSource = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._dbusProxy.connectSignal('Changed', Lang.bind(this, this._onChanged));
|
this._dbusProxy.connectSignal('Changed', this._onChanged.bind(this));
|
||||||
|
|
||||||
this._dbusProxy.connect('notify::g-name-owner', () => {
|
this._dbusProxy.connect('notify::g-name-owner', () => {
|
||||||
if (this._dbusProxy.g_name_owner)
|
if (this._dbusProxy.g_name_owner)
|
||||||
@ -299,7 +299,7 @@ var DBusEventSource = new Lang.Class({
|
|||||||
this._dbusProxy.GetEventsRemote(this._curRequestBegin.getTime() / 1000,
|
this._dbusProxy.GetEventsRemote(this._curRequestBegin.getTime() / 1000,
|
||||||
this._curRequestEnd.getTime() / 1000,
|
this._curRequestEnd.getTime() / 1000,
|
||||||
forceReload,
|
forceReload,
|
||||||
Lang.bind(this, this._onEventsReceived),
|
this._onEventsReceived.bind(this),
|
||||||
Gio.DBusCallFlags.NONE);
|
Gio.DBusCallFlags.NONE);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -367,7 +367,7 @@ var Calendar = new Lang.Class({
|
|||||||
this._weekStart = Shell.util_get_week_start();
|
this._weekStart = Shell.util_get_week_start();
|
||||||
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.calendar' });
|
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.calendar' });
|
||||||
|
|
||||||
this._settings.connect('changed::' + SHOW_WEEKDATE_KEY, Lang.bind(this, this._onSettingsChange));
|
this._settings.connect('changed::' + SHOW_WEEKDATE_KEY, this._onSettingsChange.bind(this));
|
||||||
this._useWeekdate = this._settings.get_boolean(SHOW_WEEKDATE_KEY);
|
this._useWeekdate = this._settings.get_boolean(SHOW_WEEKDATE_KEY);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -398,7 +398,7 @@ var Calendar = new Lang.Class({
|
|||||||
reactive: true });
|
reactive: true });
|
||||||
|
|
||||||
this.actor.connect('scroll-event',
|
this.actor.connect('scroll-event',
|
||||||
Lang.bind(this, this._onScroll));
|
this._onScroll.bind(this));
|
||||||
|
|
||||||
this._buildHeader ();
|
this._buildHeader ();
|
||||||
},
|
},
|
||||||
@ -446,7 +446,7 @@ var Calendar = new Lang.Class({
|
|||||||
accessible_name: _("Previous month"),
|
accessible_name: _("Previous month"),
|
||||||
can_focus: true });
|
can_focus: true });
|
||||||
this._topBox.add(this._backButton);
|
this._topBox.add(this._backButton);
|
||||||
this._backButton.connect('clicked', Lang.bind(this, this._onPrevMonthButtonClicked));
|
this._backButton.connect('clicked', this._onPrevMonthButtonClicked.bind(this));
|
||||||
|
|
||||||
this._monthLabel = new St.Label({style_class: 'calendar-month-label',
|
this._monthLabel = new St.Label({style_class: 'calendar-month-label',
|
||||||
can_focus: true });
|
can_focus: true });
|
||||||
@ -456,7 +456,7 @@ var Calendar = new Lang.Class({
|
|||||||
accessible_name: _("Next month"),
|
accessible_name: _("Next month"),
|
||||||
can_focus: true });
|
can_focus: true });
|
||||||
this._topBox.add(this._forwardButton);
|
this._topBox.add(this._forwardButton);
|
||||||
this._forwardButton.connect('clicked', Lang.bind(this, this._onNextMonthButtonClicked));
|
this._forwardButton.connect('clicked', this._onNextMonthButtonClicked.bind(this));
|
||||||
|
|
||||||
// Add weekday labels...
|
// Add weekday labels...
|
||||||
//
|
//
|
||||||
@ -779,7 +779,7 @@ var NotificationMessage = new Lang.Class({
|
|||||||
this.close();
|
this.close();
|
||||||
});
|
});
|
||||||
this._updatedId = notification.connect('updated',
|
this._updatedId = notification.connect('updated',
|
||||||
Lang.bind(this, this._onUpdated));
|
this._onUpdated.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getIcon() {
|
_getIcon() {
|
||||||
@ -818,7 +818,7 @@ var EventsSection = new Lang.Class({
|
|||||||
|
|
||||||
_init() {
|
_init() {
|
||||||
this._desktopSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
|
this._desktopSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
|
||||||
this._desktopSettings.connect('changed', Lang.bind(this, this._reloadEvents));
|
this._desktopSettings.connect('changed', this._reloadEvents.bind(this));
|
||||||
this._eventSource = new EmptyEventSource();
|
this._eventSource = new EmptyEventSource();
|
||||||
|
|
||||||
this.parent();
|
this.parent();
|
||||||
@ -829,11 +829,11 @@ var EventsSection = new Lang.Class({
|
|||||||
can_focus: true });
|
can_focus: true });
|
||||||
this.actor.insert_child_below(this._title, null);
|
this.actor.insert_child_below(this._title, null);
|
||||||
|
|
||||||
this._title.connect('clicked', Lang.bind(this, this._onTitleClicked));
|
this._title.connect('clicked', this._onTitleClicked.bind(this));
|
||||||
this._title.connect('key-focus-in', Lang.bind(this, this._onKeyFocusIn));
|
this._title.connect('key-focus-in', this._onKeyFocusIn.bind(this));
|
||||||
|
|
||||||
Shell.AppSystem.get_default().connect('installed-changed',
|
Shell.AppSystem.get_default().connect('installed-changed',
|
||||||
Lang.bind(this, this._appInstalledChanged));
|
this._appInstalledChanged.bind(this));
|
||||||
this._appInstalledChanged();
|
this._appInstalledChanged();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -843,7 +843,7 @@ var EventsSection = new Lang.Class({
|
|||||||
|
|
||||||
setEventSource(eventSource) {
|
setEventSource(eventSource) {
|
||||||
this._eventSource = eventSource;
|
this._eventSource = eventSource;
|
||||||
this._eventSource.connect('changed', Lang.bind(this, this._reloadEvents));
|
this._eventSource.connect('changed', this._reloadEvents.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
get allowed() {
|
get allowed() {
|
||||||
@ -953,12 +953,12 @@ var NotificationSection = new Lang.Class({
|
|||||||
this._sources = new Map();
|
this._sources = new Map();
|
||||||
this._nUrgent = 0;
|
this._nUrgent = 0;
|
||||||
|
|
||||||
Main.messageTray.connect('source-added', Lang.bind(this, this._sourceAdded));
|
Main.messageTray.connect('source-added', this._sourceAdded.bind(this));
|
||||||
Main.messageTray.getSources().forEach(source => {
|
Main.messageTray.getSources().forEach(source => {
|
||||||
this._sourceAdded(Main.messageTray, source);
|
this._sourceAdded(Main.messageTray, source);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.actor.connect('notify::mapped', Lang.bind(this, this._onMapped));
|
this.actor.connect('notify::mapped', this._onMapped.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
get allowed() {
|
get allowed() {
|
||||||
@ -987,7 +987,7 @@ var NotificationSection = new Lang.Class({
|
|||||||
this._onSourceDestroy(source, obj);
|
this._onSourceDestroy(source, obj);
|
||||||
});
|
});
|
||||||
obj.notificationAddedId = source.connect('notification-added',
|
obj.notificationAddedId = source.connect('notification-added',
|
||||||
Lang.bind(this, this._onNotificationAdded));
|
this._onNotificationAdded.bind(this));
|
||||||
|
|
||||||
this._sources.set(source, obj);
|
this._sources.set(source, obj);
|
||||||
},
|
},
|
||||||
@ -1139,7 +1139,7 @@ var CalendarMessageList = new Lang.Class({
|
|||||||
this._eventsSection = new EventsSection();
|
this._eventsSection = new EventsSection();
|
||||||
this._addSection(this._eventsSection);
|
this._addSection(this._eventsSection);
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sync));
|
Main.sessionMode.connect('updated', this._sync.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_addSection(section) {
|
_addSection(section) {
|
||||||
@ -1154,13 +1154,13 @@ var CalendarMessageList = new Lang.Class({
|
|||||||
this._removeSection(section);
|
this._removeSection(section);
|
||||||
});
|
});
|
||||||
obj.visibleId = section.actor.connect('notify::visible',
|
obj.visibleId = section.actor.connect('notify::visible',
|
||||||
Lang.bind(this, this._sync));
|
this._sync.bind(this));
|
||||||
obj.emptyChangedId = section.connect('empty-changed',
|
obj.emptyChangedId = section.connect('empty-changed',
|
||||||
Lang.bind(this, this._sync));
|
this._sync.bind(this));
|
||||||
obj.canClearChangedId = section.connect('can-clear-changed',
|
obj.canClearChangedId = section.connect('can-clear-changed',
|
||||||
Lang.bind(this, this._sync));
|
this._sync.bind(this));
|
||||||
obj.keyFocusId = section.connect('key-focus-in',
|
obj.keyFocusId = section.connect('key-focus-in',
|
||||||
Lang.bind(this, this._onKeyFocusIn));
|
this._onKeyFocusIn.bind(this));
|
||||||
|
|
||||||
this._sections.set(section, obj);
|
this._sections.set(section, obj);
|
||||||
this._sectionList.add_actor(section.actor);
|
this._sectionList.add_actor(section.actor);
|
||||||
|
@ -59,10 +59,10 @@ var CloseDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._dialog.addContent(this._createDialogContent());
|
this._dialog.addContent(this._createDialogContent());
|
||||||
this._dialog.addButton({ label: _('Force Quit'),
|
this._dialog.addButton({ label: _('Force Quit'),
|
||||||
action: Lang.bind(this, this._onClose),
|
action: this._onClose.bind(this),
|
||||||
default: true });
|
default: true });
|
||||||
this._dialog.addButton({ label: _('Wait'),
|
this._dialog.addButton({ label: _('Wait'),
|
||||||
action: Lang.bind(this, this._onWait),
|
action: this._onWait.bind(this),
|
||||||
key: Clutter.Escape });
|
key: Clutter.Escape });
|
||||||
|
|
||||||
global.focus_manager.add_group(this._dialog);
|
global.focus_manager.add_group(this._dialog);
|
||||||
|
@ -9,7 +9,7 @@ var ComponentManager = new Lang.Class({
|
|||||||
this._allComponents = {};
|
this._allComponents = {};
|
||||||
this._enabledComponents = [];
|
this._enabledComponents = [];
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -27,22 +27,22 @@ var AutomountManager = new Lang.Class({
|
|||||||
this._volumeQueue = [];
|
this._volumeQueue = [];
|
||||||
this._session = new GnomeSession.SessionManager();
|
this._session = new GnomeSession.SessionManager();
|
||||||
this._session.connectSignal('InhibitorAdded',
|
this._session.connectSignal('InhibitorAdded',
|
||||||
Lang.bind(this, this._InhibitorsChanged));
|
this._InhibitorsChanged.bind(this));
|
||||||
this._session.connectSignal('InhibitorRemoved',
|
this._session.connectSignal('InhibitorRemoved',
|
||||||
Lang.bind(this, this._InhibitorsChanged));
|
this._InhibitorsChanged.bind(this));
|
||||||
this._inhibited = false;
|
this._inhibited = false;
|
||||||
|
|
||||||
this._volumeMonitor = Gio.VolumeMonitor.get();
|
this._volumeMonitor = Gio.VolumeMonitor.get();
|
||||||
},
|
},
|
||||||
|
|
||||||
enable() {
|
enable() {
|
||||||
this._volumeAddedId = this._volumeMonitor.connect('volume-added', Lang.bind(this, this._onVolumeAdded));
|
this._volumeAddedId = this._volumeMonitor.connect('volume-added', this._onVolumeAdded.bind(this));
|
||||||
this._volumeRemovedId = this._volumeMonitor.connect('volume-removed', Lang.bind(this, this._onVolumeRemoved));
|
this._volumeRemovedId = this._volumeMonitor.connect('volume-removed', this._onVolumeRemoved.bind(this));
|
||||||
this._driveConnectedId = this._volumeMonitor.connect('drive-connected', Lang.bind(this, this._onDriveConnected));
|
this._driveConnectedId = this._volumeMonitor.connect('drive-connected', this._onDriveConnected.bind(this));
|
||||||
this._driveDisconnectedId = this._volumeMonitor.connect('drive-disconnected', Lang.bind(this, this._onDriveDisconnected));
|
this._driveDisconnectedId = this._volumeMonitor.connect('drive-disconnected', this._onDriveDisconnected.bind(this));
|
||||||
this._driveEjectButtonId = this._volumeMonitor.connect('drive-eject-button', Lang.bind(this, this._onDriveEjectButton));
|
this._driveEjectButtonId = this._volumeMonitor.connect('drive-eject-button', this._onDriveEjectButton.bind(this));
|
||||||
|
|
||||||
this._mountAllId = Mainloop.idle_add(Lang.bind(this, this._startupMountAll));
|
this._mountAllId = Mainloop.idle_add(this._startupMountAll.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._mountAllId, '[gnome-shell] this._startupMountAll');
|
GLib.Source.set_name_by_id(this._mountAllId, '[gnome-shell] this._startupMountAll');
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ var AutomountManager = new Lang.Class({
|
|||||||
volume._operation = operation;
|
volume._operation = operation;
|
||||||
|
|
||||||
volume.mount(0, mountOp, null,
|
volume.mount(0, mountOp, null,
|
||||||
Lang.bind(this, this._onVolumeMounted));
|
this._onVolumeMounted.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onVolumeMounted(volume, res) {
|
_onVolumeMounted(volume, res) {
|
||||||
|
@ -105,8 +105,7 @@ var ContentTypeDiscoverer = new Lang.Class({
|
|||||||
if (shouldScan) {
|
if (shouldScan) {
|
||||||
// guess mount's content types using GIO
|
// guess mount's content types using GIO
|
||||||
mount.guess_content_type(false, null,
|
mount.guess_content_type(false, null,
|
||||||
Lang.bind(this,
|
this._onContentTypeGuessed.bind(this));
|
||||||
this._onContentTypeGuessed));
|
|
||||||
} else {
|
} else {
|
||||||
this._emitCallback(mount, []);
|
this._emitCallback(mount, []);
|
||||||
}
|
}
|
||||||
@ -170,8 +169,8 @@ var AutorunManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
enable() {
|
enable() {
|
||||||
this._mountAddedId = this._volumeMonitor.connect('mount-added', Lang.bind(this, this._onMountAdded));
|
this._mountAddedId = this._volumeMonitor.connect('mount-added', this._onMountAdded.bind(this));
|
||||||
this._mountRemovedId = this._volumeMonitor.connect('mount-removed', Lang.bind(this, this._onMountRemoved));
|
this._mountRemovedId = this._volumeMonitor.connect('mount-removed', this._onMountRemoved.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
disable() {
|
disable() {
|
||||||
|
@ -28,9 +28,9 @@ var KeyringDialog = new Lang.Class({
|
|||||||
this.parent({ styleClass: 'prompt-dialog' });
|
this.parent({ styleClass: 'prompt-dialog' });
|
||||||
|
|
||||||
this.prompt = new Shell.KeyringPrompt();
|
this.prompt = new Shell.KeyringPrompt();
|
||||||
this.prompt.connect('show-password', Lang.bind(this, this._onShowPassword));
|
this.prompt.connect('show-password', this._onShowPassword.bind(this));
|
||||||
this.prompt.connect('show-confirm', Lang.bind(this, this._onShowConfirm));
|
this.prompt.connect('show-confirm', this._onShowConfirm.bind(this));
|
||||||
this.prompt.connect('prompt-close', Lang.bind(this, this._onHidePrompt));
|
this.prompt.connect('prompt-close', this._onHidePrompt.bind(this));
|
||||||
|
|
||||||
let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' });
|
let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' });
|
||||||
this._content = new Dialog.MessageDialogContent({ icon });
|
this._content = new Dialog.MessageDialogContent({ icon });
|
||||||
@ -55,10 +55,10 @@ var KeyringDialog = new Lang.Class({
|
|||||||
this._controlTable = null;
|
this._controlTable = null;
|
||||||
|
|
||||||
this._cancelButton = this.addButton({ label: '',
|
this._cancelButton = this.addButton({ label: '',
|
||||||
action: Lang.bind(this, this._onCancelButton),
|
action: this._onCancelButton.bind(this),
|
||||||
key: Clutter.Escape });
|
key: Clutter.Escape });
|
||||||
this._continueButton = this.addButton({ label: '',
|
this._continueButton = this.addButton({ label: '',
|
||||||
action: Lang.bind(this, this._onContinueButton),
|
action: this._onContinueButton.bind(this),
|
||||||
default: true });
|
default: true });
|
||||||
|
|
||||||
this.prompt.bind_property('cancel-label', this._cancelButton, 'label', GObject.BindingFlags.SYNC_CREATE);
|
this.prompt.bind_property('cancel-label', this._cancelButton, 'label', GObject.BindingFlags.SYNC_CREATE);
|
||||||
@ -112,7 +112,7 @@ var KeyringDialog = new Lang.Class({
|
|||||||
x_expand: true });
|
x_expand: true });
|
||||||
this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
|
this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
|
||||||
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
|
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
|
||||||
this._passwordEntry.clutter_text.connect('activate', Lang.bind(this, this._onPasswordActivate));
|
this._passwordEntry.clutter_text.connect('activate', this._onPasswordActivate.bind(this));
|
||||||
|
|
||||||
let spinnerIcon = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
|
let spinnerIcon = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
|
||||||
this._workSpinner = new Animation.AnimatedIcon(spinnerIcon, WORK_SPINNER_ICON_SIZE);
|
this._workSpinner = new Animation.AnimatedIcon(spinnerIcon, WORK_SPINNER_ICON_SIZE);
|
||||||
@ -144,7 +144,7 @@ var KeyringDialog = new Lang.Class({
|
|||||||
x_expand: true });
|
x_expand: true });
|
||||||
this._confirmEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
|
this._confirmEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
|
||||||
ShellEntry.addContextMenu(this._confirmEntry, { isPassword: true });
|
ShellEntry.addContextMenu(this._confirmEntry, { isPassword: true });
|
||||||
this._confirmEntry.clutter_text.connect('activate', Lang.bind(this, this._onConfirmActivate));
|
this._confirmEntry.clutter_text.connect('activate', this._onConfirmActivate.bind(this));
|
||||||
if (rtl) {
|
if (rtl) {
|
||||||
layout.attach(this._confirmEntry, 0, row, 1, 1);
|
layout.attach(this._confirmEntry, 0, row, 1, 1);
|
||||||
layout.attach(label, 1, row, 1, 1);
|
layout.attach(label, 1, row, 1, 1);
|
||||||
@ -263,10 +263,8 @@ var KeyringDummyDialog = new Lang.Class({
|
|||||||
|
|
||||||
_init() {
|
_init() {
|
||||||
this.prompt = new Shell.KeyringPrompt();
|
this.prompt = new Shell.KeyringPrompt();
|
||||||
this.prompt.connect('show-password',
|
this.prompt.connect('show-password', this._cancelPrompt.bind(this));
|
||||||
Lang.bind(this, this._cancelPrompt));
|
this.prompt.connect('show-confirm', this._cancelPrompt.bind(this));
|
||||||
this.prompt.connect('show-confirm', Lang.bind(this,
|
|
||||||
this._cancelPrompt));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_cancelPrompt() {
|
_cancelPrompt() {
|
||||||
|
@ -82,7 +82,7 @@ var NetworkSecretDialog = new Lang.Class({
|
|||||||
initialFocusSet = true;
|
initialFocusSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
secret.entry.clutter_text.connect('activate', Lang.bind(this, this._onOk));
|
secret.entry.clutter_text.connect('activate', this._onOk.bind(this));
|
||||||
secret.entry.clutter_text.connect('text-changed', () => {
|
secret.entry.clutter_text.connect('text-changed', () => {
|
||||||
secret.value = secret.entry.get_text();
|
secret.value = secret.entry.get_text();
|
||||||
if (secret.validate)
|
if (secret.validate)
|
||||||
@ -110,12 +110,12 @@ var NetworkSecretDialog = new Lang.Class({
|
|||||||
contentBox.messageBox.add(secretTable);
|
contentBox.messageBox.add(secretTable);
|
||||||
|
|
||||||
this._okButton = { label: _("Connect"),
|
this._okButton = { label: _("Connect"),
|
||||||
action: Lang.bind(this, this._onOk),
|
action: this._onOk.bind(this),
|
||||||
default: true
|
default: true
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setButtons([{ label: _("Cancel"),
|
this.setButtons([{ label: _("Cancel"),
|
||||||
action: Lang.bind(this, this.cancel),
|
action: this.cancel.bind(this),
|
||||||
key: Clutter.KEY_Escape,
|
key: Clutter.KEY_Escape,
|
||||||
},
|
},
|
||||||
this._okButton]);
|
this._okButton]);
|
||||||
@ -384,7 +384,7 @@ var VPNRequestHandler = new Lang.Class({
|
|||||||
this._readStdoutOldStyle();
|
this._readStdoutOldStyle();
|
||||||
|
|
||||||
this._childWatch = GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid,
|
this._childWatch = GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid,
|
||||||
Lang.bind(this, this._vpnChildFinished));
|
this._vpnChildFinished.bind(this));
|
||||||
|
|
||||||
this._writeConnection();
|
this._writeConnection();
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
@ -602,8 +602,8 @@ var NetworkAgent = new Lang.Class({
|
|||||||
log('Failed to create monitor for VPN plugin dir: ' + e.message);
|
log('Failed to create monitor for VPN plugin dir: ' + e.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._native.connect('new-request', Lang.bind(this, this._newRequest));
|
this._native.connect('new-request', this._newRequest.bind(this));
|
||||||
this._native.connect('cancel-request', Lang.bind(this, this._cancelRequest));
|
this._native.connect('cancel-request', this._cancelRequest.bind(this));
|
||||||
try {
|
try {
|
||||||
this._native.init(null);
|
this._native.init(null);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
@ -60,9 +60,9 @@ var AuthenticationDialog = new Lang.Class({
|
|||||||
this._user = AccountsService.UserManager.get_default().get_user(userName);
|
this._user = AccountsService.UserManager.get_default().get_user(userName);
|
||||||
let userRealName = this._user.get_real_name()
|
let userRealName = this._user.get_real_name()
|
||||||
this._userLoadedId = this._user.connect('notify::is_loaded',
|
this._userLoadedId = this._user.connect('notify::is_loaded',
|
||||||
Lang.bind(this, this._onUserChanged));
|
this._onUserChanged.bind(this));
|
||||||
this._userChangedId = this._user.connect('changed',
|
this._userChangedId = this._user.connect('changed',
|
||||||
Lang.bind(this, this._onUserChanged));
|
this._onUserChanged.bind(this));
|
||||||
|
|
||||||
// Special case 'root'
|
// Special case 'root'
|
||||||
let userIsRoot = false;
|
let userIsRoot = false;
|
||||||
@ -108,7 +108,7 @@ var AuthenticationDialog = new Lang.Class({
|
|||||||
text: "",
|
text: "",
|
||||||
can_focus: true});
|
can_focus: true});
|
||||||
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
|
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
|
||||||
this._passwordEntry.clutter_text.connect('activate', Lang.bind(this, this._onEntryActivate));
|
this._passwordEntry.clutter_text.connect('activate', this._onEntryActivate.bind(this));
|
||||||
this._passwordBox.add(this._passwordEntry,
|
this._passwordBox.add(this._passwordEntry,
|
||||||
{ expand: true });
|
{ expand: true });
|
||||||
|
|
||||||
@ -146,10 +146,10 @@ var AuthenticationDialog = new Lang.Class({
|
|||||||
this._nullMessageLabel.show();
|
this._nullMessageLabel.show();
|
||||||
|
|
||||||
this._cancelButton = this.addButton({ label: _("Cancel"),
|
this._cancelButton = this.addButton({ label: _("Cancel"),
|
||||||
action: Lang.bind(this, this.cancel),
|
action: this.cancel.bind(this),
|
||||||
key: Clutter.Escape });
|
key: Clutter.Escape });
|
||||||
this._okButton = this.addButton({ label: _("Authenticate"),
|
this._okButton = this.addButton({ label: _("Authenticate"),
|
||||||
action: Lang.bind(this, this._onAuthenticateButtonPressed),
|
action: this._onAuthenticateButtonPressed.bind(this),
|
||||||
default: true });
|
default: true });
|
||||||
|
|
||||||
this._doneEmitted = false;
|
this._doneEmitted = false;
|
||||||
@ -186,10 +186,10 @@ var AuthenticationDialog = new Lang.Class({
|
|||||||
this.destroySession();
|
this.destroySession();
|
||||||
this._session = new PolkitAgent.Session({ identity: this._identityToAuth,
|
this._session = new PolkitAgent.Session({ identity: this._identityToAuth,
|
||||||
cookie: this._cookie });
|
cookie: this._cookie });
|
||||||
this._session.connect('completed', Lang.bind(this, this._onSessionCompleted));
|
this._session.connect('completed', this._onSessionCompleted.bind(this));
|
||||||
this._session.connect('request', Lang.bind(this, this._onSessionRequest));
|
this._session.connect('request', this._onSessionRequest.bind(this));
|
||||||
this._session.connect('show-error', Lang.bind(this, this._onSessionShowError));
|
this._session.connect('show-error', this._onSessionShowError.bind(this));
|
||||||
this._session.connect('show-info', Lang.bind(this, this._onSessionShowInfo));
|
this._session.connect('show-info', this._onSessionShowInfo.bind(this));
|
||||||
this._session.initiate();
|
this._session.initiate();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -346,8 +346,8 @@ var AuthenticationAgent = new Lang.Class({
|
|||||||
this._currentDialog = null;
|
this._currentDialog = null;
|
||||||
this._handle = null;
|
this._handle = null;
|
||||||
this._native = new Shell.PolkitAuthenticationAgent();
|
this._native = new Shell.PolkitAuthenticationAgent();
|
||||||
this._native.connect('initiate', Lang.bind(this, this._onInitiate));
|
this._native.connect('initiate', this._onInitiate.bind(this));
|
||||||
this._native.connect('cancel', Lang.bind(this, this._onCancel));
|
this._native.connect('cancel', this._onCancel.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
enable() {
|
enable() {
|
||||||
@ -379,7 +379,7 @@ var AuthenticationAgent = new Lang.Class({
|
|||||||
// See https://bugzilla.gnome.org/show_bug.cgi?id=643062 for more
|
// See https://bugzilla.gnome.org/show_bug.cgi?id=643062 for more
|
||||||
// discussion.
|
// discussion.
|
||||||
|
|
||||||
this._currentDialog.connect('done', Lang.bind(this, this._onDialogDone));
|
this._currentDialog.connect('done', this._onDialogDone.bind(this));
|
||||||
this._currentDialog.performAuthentication();
|
this._currentDialog.performAuthentication();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ var TelepathyClient = HAVE_TP ? new Lang.Class({
|
|||||||
// Allow other clients (such as Empathy) to pre-empt our channels if
|
// Allow other clients (such as Empathy) to pre-empt our channels if
|
||||||
// needed
|
// needed
|
||||||
this.set_delegated_channels_callback(
|
this.set_delegated_channels_callback(
|
||||||
Lang.bind(this, this._delegatedChannelsCb));
|
this._delegatedChannelsCb.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
vfunc_observe_channels(account, conn, channels,
|
vfunc_observe_channels(account, conn, channels,
|
||||||
@ -295,19 +295,19 @@ var ChatSource = new Lang.Class({
|
|||||||
|
|
||||||
this._conn = conn;
|
this._conn = conn;
|
||||||
this._channel = channel;
|
this._channel = channel;
|
||||||
this._closedId = this._channel.connect('invalidated', Lang.bind(this, this._channelClosed));
|
this._closedId = this._channel.connect('invalidated', this._channelClosed.bind(this));
|
||||||
|
|
||||||
this._notifyTimeoutId = 0;
|
this._notifyTimeoutId = 0;
|
||||||
|
|
||||||
this._presence = contact.get_presence_type();
|
this._presence = contact.get_presence_type();
|
||||||
|
|
||||||
this._sentId = this._channel.connect('message-sent', Lang.bind(this, this._messageSent));
|
this._sentId = this._channel.connect('message-sent', this._messageSent.bind(this));
|
||||||
this._receivedId = this._channel.connect('message-received', Lang.bind(this, this._messageReceived));
|
this._receivedId = this._channel.connect('message-received', this._messageReceived.bind(this));
|
||||||
this._pendingId = this._channel.connect('pending-message-removed', Lang.bind(this, this._pendingRemoved));
|
this._pendingId = this._channel.connect('pending-message-removed', this._pendingRemoved.bind(this));
|
||||||
|
|
||||||
this._notifyAliasId = this._contact.connect('notify::alias', Lang.bind(this, this._updateAlias));
|
this._notifyAliasId = this._contact.connect('notify::alias', this._updateAlias.bind(this));
|
||||||
this._notifyAvatarId = this._contact.connect('notify::avatar-file', Lang.bind(this, this._updateAvatarIcon));
|
this._notifyAvatarId = this._contact.connect('notify::avatar-file', this._updateAvatarIcon.bind(this));
|
||||||
this._presenceChangedId = this._contact.connect('presence-changed', Lang.bind(this, this._presenceChanged));
|
this._presenceChangedId = this._contact.connect('presence-changed', this._presenceChanged.bind(this));
|
||||||
|
|
||||||
// Add ourselves as a source.
|
// Add ourselves as a source.
|
||||||
Main.messageTray.add(this);
|
Main.messageTray.add(this);
|
||||||
@ -320,7 +320,7 @@ var ChatSource = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this._notification = new ChatNotification(this);
|
this._notification = new ChatNotification(this);
|
||||||
this._notification.connect('activated', Lang.bind(this, this.open));
|
this._notification.connect('activated', this.open.bind(this));
|
||||||
this._notification.connect('updated', () => {
|
this._notification.connect('updated', () => {
|
||||||
if (this._banner && this._banner.expanded)
|
if (this._banner && this._banner.expanded)
|
||||||
this._ackMessages();
|
this._ackMessages();
|
||||||
@ -341,7 +341,7 @@ var ChatSource = new Lang.Class({
|
|||||||
this._banner = new ChatNotificationBanner(this._notification);
|
this._banner = new ChatNotificationBanner(this._notification);
|
||||||
|
|
||||||
// We ack messages when the user expands the new notification
|
// We ack messages when the user expands the new notification
|
||||||
let id = this._banner.connect('expanded', Lang.bind(this, this._ackMessages));
|
let id = this._banner.connect('expanded', this._ackMessages.bind(this));
|
||||||
this._banner.actor.connect('destroy', () => {
|
this._banner.actor.connect('destroy', () => {
|
||||||
this._banner.disconnect(id);
|
this._banner.disconnect(id);
|
||||||
this._banner = null;
|
this._banner = null;
|
||||||
@ -439,7 +439,7 @@ var ChatSource = new Lang.Class({
|
|||||||
|
|
||||||
logManager.get_filtered_events_async(this._account, entity,
|
logManager.get_filtered_events_async(this._account, entity,
|
||||||
Tpl.EventTypeMask.TEXT, SCROLLBACK_HISTORY_LINES,
|
Tpl.EventTypeMask.TEXT, SCROLLBACK_HISTORY_LINES,
|
||||||
null, Lang.bind(this, this._displayPendingMessages));
|
null, this._displayPendingMessages.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_displayPendingMessages(logManager, result) {
|
_displayPendingMessages(logManager, result) {
|
||||||
@ -563,7 +563,7 @@ var ChatSource = new Lang.Class({
|
|||||||
if (this._notifyTimeoutId != 0)
|
if (this._notifyTimeoutId != 0)
|
||||||
Mainloop.source_remove(this._notifyTimeoutId);
|
Mainloop.source_remove(this._notifyTimeoutId);
|
||||||
this._notifyTimeoutId = Mainloop.timeout_add(500,
|
this._notifyTimeoutId = Mainloop.timeout_add(500,
|
||||||
Lang.bind(this, this._notifyTimeout));
|
this._notifyTimeout.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._notifyTimeoutId, '[gnome-shell] this._notifyTimeout');
|
GLib.Source.set_name_by_id(this._notifyTimeoutId, '[gnome-shell] this._notifyTimeout');
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -767,7 +767,7 @@ var ChatNotification = new Lang.Class({
|
|||||||
// from the timestamp of the message.
|
// from the timestamp of the message.
|
||||||
this._timestampTimeoutId = Mainloop.timeout_add_seconds(
|
this._timestampTimeoutId = Mainloop.timeout_add_seconds(
|
||||||
SCROLLBACK_IMMEDIATE_TIME - (currentTime - timestamp),
|
SCROLLBACK_IMMEDIATE_TIME - (currentTime - timestamp),
|
||||||
Lang.bind(this, this.appendTimestamp));
|
this.appendTimestamp.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._timestampTimeoutId, '[gnome-shell] this.appendTimestamp');
|
GLib.Source.set_name_by_id(this._timestampTimeoutId, '[gnome-shell] this.appendTimestamp');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -822,8 +822,8 @@ var ChatNotificationBanner = new Lang.Class({
|
|||||||
this._responseEntry = new St.Entry({ style_class: 'chat-response',
|
this._responseEntry = new St.Entry({ style_class: 'chat-response',
|
||||||
x_expand: true,
|
x_expand: true,
|
||||||
can_focus: true });
|
can_focus: true });
|
||||||
this._responseEntry.clutter_text.connect('activate', Lang.bind(this, this._onEntryActivated));
|
this._responseEntry.clutter_text.connect('activate', this._onEntryActivated.bind(this));
|
||||||
this._responseEntry.clutter_text.connect('text-changed', Lang.bind(this, this._onEntryChanged));
|
this._responseEntry.clutter_text.connect('text-changed', this._onEntryChanged.bind(this));
|
||||||
this.setActionArea(this._responseEntry);
|
this.setActionArea(this._responseEntry);
|
||||||
|
|
||||||
this._responseEntry.clutter_text.connect('key-focus-in', () => {
|
this._responseEntry.clutter_text.connect('key-focus-in', () => {
|
||||||
@ -984,7 +984,7 @@ var ChatNotificationBanner = new Lang.Class({
|
|||||||
|
|
||||||
this._composingTimeoutId = Mainloop.timeout_add_seconds(
|
this._composingTimeoutId = Mainloop.timeout_add_seconds(
|
||||||
COMPOSING_STOP_TIMEOUT,
|
COMPOSING_STOP_TIMEOUT,
|
||||||
Lang.bind(this, this._composingStopTimeout));
|
this._composingStopTimeout.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._composingTimeoutId, '[gnome-shell] this._composingStopTimeout');
|
GLib.Source.set_name_by_id(this._composingTimeoutId, '[gnome-shell] this._composingStopTimeout');
|
||||||
} else {
|
} else {
|
||||||
this.notification.source.setChatState(Tp.ChannelChatState.ACTIVE);
|
this.notification.source.setChatState(Tp.ChannelChatState.ACTIVE);
|
||||||
|
@ -28,7 +28,7 @@ var CtrlAltTabManager = new Lang.Class({
|
|||||||
this._items = [];
|
this._items = [];
|
||||||
this.addGroup(global.window_group, _("Windows"),
|
this.addGroup(global.window_group, _("Windows"),
|
||||||
'focus-windows-symbolic', { sortGroup: SortGroup.TOP,
|
'focus-windows-symbolic', { sortGroup: SortGroup.TOP,
|
||||||
focusCallback: Lang.bind(this, this._focusWindows) });
|
focusCallback: this._focusWindows.bind(this) });
|
||||||
},
|
},
|
||||||
|
|
||||||
addGroup(root, name, icon, params) {
|
addGroup(root, name, icon, params) {
|
||||||
@ -105,10 +105,9 @@ var CtrlAltTabManager = new Lang.Class({
|
|||||||
|
|
||||||
items.push({ name: windows[i].title,
|
items.push({ name: windows[i].title,
|
||||||
proxy: windows[i].get_compositor_private(),
|
proxy: windows[i].get_compositor_private(),
|
||||||
focusCallback: Lang.bind(windows[i],
|
focusCallback: function(timestamp) {
|
||||||
function(timestamp) {
|
Main.activateWindow(this, timestamp);
|
||||||
Main.activateWindow(this, timestamp);
|
}.bind(windows[i]),
|
||||||
}),
|
|
||||||
iconActor: icon,
|
iconActor: icon,
|
||||||
iconName: iconName,
|
iconName: iconName,
|
||||||
sortGroup: SortGroup.MIDDLE });
|
sortGroup: SortGroup.MIDDLE });
|
||||||
@ -118,7 +117,7 @@ var CtrlAltTabManager = new Lang.Class({
|
|||||||
if (!items.length)
|
if (!items.length)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
items.sort(Lang.bind(this, this._sortItems));
|
items.sort(this._sortItems.bind(this));
|
||||||
|
|
||||||
if (!this._popup) {
|
if (!this._popup) {
|
||||||
this._popup = new CtrlAltTabPopup(items);
|
this._popup = new CtrlAltTabPopup(items);
|
||||||
|
@ -246,7 +246,7 @@ var ShowAppsIcon = new Lang.Class({
|
|||||||
this.icon = new IconGrid.BaseIcon(_("Show Applications"),
|
this.icon = new IconGrid.BaseIcon(_("Show Applications"),
|
||||||
{ setSizeManually: true,
|
{ setSizeManually: true,
|
||||||
showLabel: false,
|
showLabel: false,
|
||||||
createIcon: Lang.bind(this, this._createIcon) });
|
createIcon: this._createIcon.bind(this) });
|
||||||
this.toggleButton.add_actor(this.icon.actor);
|
this.toggleButton.add_actor(this.icon.actor);
|
||||||
this.toggleButton._delegate = this;
|
this.toggleButton._delegate = this;
|
||||||
|
|
||||||
@ -420,7 +420,7 @@ var Dash = new Lang.Class({
|
|||||||
this._maxHeight = this.actor.height;
|
this._maxHeight = this.actor.height;
|
||||||
});
|
});
|
||||||
|
|
||||||
this._workId = Main.initializeDeferredWork(this._box, Lang.bind(this, this._redisplay));
|
this._workId = Main.initializeDeferredWork(this._box, this._redisplay.bind(this));
|
||||||
|
|
||||||
this._appSystem = Shell.AppSystem.get_default();
|
this._appSystem = Shell.AppSystem.get_default();
|
||||||
|
|
||||||
@ -428,15 +428,15 @@ var Dash = new Lang.Class({
|
|||||||
AppFavorites.getAppFavorites().reload();
|
AppFavorites.getAppFavorites().reload();
|
||||||
this._queueRedisplay();
|
this._queueRedisplay();
|
||||||
});
|
});
|
||||||
AppFavorites.getAppFavorites().connect('changed', Lang.bind(this, this._queueRedisplay));
|
AppFavorites.getAppFavorites().connect('changed', this._queueRedisplay.bind(this));
|
||||||
this._appSystem.connect('app-state-changed', Lang.bind(this, this._queueRedisplay));
|
this._appSystem.connect('app-state-changed', this._queueRedisplay.bind(this));
|
||||||
|
|
||||||
Main.overview.connect('item-drag-begin',
|
Main.overview.connect('item-drag-begin',
|
||||||
Lang.bind(this, this._onDragBegin));
|
this._onDragBegin.bind(this));
|
||||||
Main.overview.connect('item-drag-end',
|
Main.overview.connect('item-drag-end',
|
||||||
Lang.bind(this, this._onDragEnd));
|
this._onDragEnd.bind(this));
|
||||||
Main.overview.connect('item-drag-cancelled',
|
Main.overview.connect('item-drag-cancelled',
|
||||||
Lang.bind(this, this._onDragCancelled));
|
this._onDragCancelled.bind(this));
|
||||||
|
|
||||||
// Translators: this is the name of the dock/favorites area on
|
// Translators: this is the name of the dock/favorites area on
|
||||||
// the left of the overview
|
// the left of the overview
|
||||||
@ -446,7 +446,7 @@ var Dash = new Lang.Class({
|
|||||||
_onDragBegin() {
|
_onDragBegin() {
|
||||||
this._dragCancelled = false;
|
this._dragCancelled = false;
|
||||||
this._dragMonitor = {
|
this._dragMonitor = {
|
||||||
dragMotion: Lang.bind(this, this._onDragMotion)
|
dragMotion: this._onDragMotion.bind(this)
|
||||||
};
|
};
|
||||||
DND.addDragMonitor(this._dragMonitor);
|
DND.addDragMonitor(this._dragMonitor);
|
||||||
|
|
||||||
|
@ -112,9 +112,9 @@ var WorldClocksSection = new Lang.Class({
|
|||||||
this._clockAppMon = new Util.AppSettingsMonitor('org.gnome.clocks.desktop',
|
this._clockAppMon = new Util.AppSettingsMonitor('org.gnome.clocks.desktop',
|
||||||
'org.gnome.clocks');
|
'org.gnome.clocks');
|
||||||
this._clockAppMon.connect('available-changed',
|
this._clockAppMon.connect('available-changed',
|
||||||
Lang.bind(this, this._sync));
|
this._sync.bind(this));
|
||||||
this._clockAppMon.watchSetting('world-clocks',
|
this._clockAppMon.watchSetting('world-clocks',
|
||||||
Lang.bind(this, this._clocksChanged));
|
this._clocksChanged.bind(this));
|
||||||
this._sync();
|
this._sync();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ var WorldClocksSection = new Lang.Class({
|
|||||||
if (this._grid.get_n_children() > 1) {
|
if (this._grid.get_n_children() > 1) {
|
||||||
if (!this._clockNotifyId)
|
if (!this._clockNotifyId)
|
||||||
this._clockNotifyId =
|
this._clockNotifyId =
|
||||||
this._clock.connect('notify::clock', Lang.bind(this, this._updateLabels));
|
this._clock.connect('notify::clock', this._updateLabels.bind(this));
|
||||||
this._updateLabels();
|
this._updateLabels();
|
||||||
} else {
|
} else {
|
||||||
if (this._clockNotifyId)
|
if (this._clockNotifyId)
|
||||||
@ -230,7 +230,7 @@ var WeatherSection = new Lang.Class({
|
|||||||
this._conditionsLabel.clutter_text.line_wrap = true;
|
this._conditionsLabel.clutter_text.line_wrap = true;
|
||||||
box.add_child(this._conditionsLabel);
|
box.add_child(this._conditionsLabel);
|
||||||
|
|
||||||
this._weatherClient.connect('changed', Lang.bind(this, this._sync));
|
this._weatherClient.connect('changed', this._sync.bind(this));
|
||||||
this._sync();
|
this._sync();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -347,16 +347,16 @@ var MessagesIndicator = new Lang.Class({
|
|||||||
|
|
||||||
this._sources = [];
|
this._sources = [];
|
||||||
|
|
||||||
Main.messageTray.connect('source-added', Lang.bind(this, this._onSourceAdded));
|
Main.messageTray.connect('source-added', this._onSourceAdded.bind(this));
|
||||||
Main.messageTray.connect('source-removed', Lang.bind(this, this._onSourceRemoved));
|
Main.messageTray.connect('source-removed', this._onSourceRemoved.bind(this));
|
||||||
Main.messageTray.connect('queue-changed', Lang.bind(this, this._updateCount));
|
Main.messageTray.connect('queue-changed', this._updateCount.bind(this));
|
||||||
|
|
||||||
let sources = Main.messageTray.getSources();
|
let sources = Main.messageTray.getSources();
|
||||||
sources.forEach(source => { this._onSourceAdded(null, source); });
|
sources.forEach(source => { this._onSourceAdded(null, source); });
|
||||||
},
|
},
|
||||||
|
|
||||||
_onSourceAdded(tray, source) {
|
_onSourceAdded(tray, source) {
|
||||||
source.connect('count-updated', Lang.bind(this, this._updateCount));
|
source.connect('count-updated', this._updateCount.bind(this));
|
||||||
this._sources.push(source);
|
this._sources.push(source);
|
||||||
this._updateCount();
|
this._updateCount();
|
||||||
},
|
},
|
||||||
@ -545,9 +545,9 @@ var DateMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
this._clock = new GnomeDesktop.WallClock();
|
this._clock = new GnomeDesktop.WallClock();
|
||||||
this._clock.bind_property('clock', this._clockDisplay, 'text', GObject.BindingFlags.SYNC_CREATE);
|
this._clock.bind_property('clock', this._clockDisplay, 'text', GObject.BindingFlags.SYNC_CREATE);
|
||||||
this._clock.connect('notify::timezone', Lang.bind(this, this._updateTimeZone));
|
this._clock.connect('notify::timezone', this._updateTimeZone.bind(this));
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ var Dialog = new Lang.Class({
|
|||||||
|
|
||||||
_init(parentActor, styleClass) {
|
_init(parentActor, styleClass) {
|
||||||
this.parent({ layout_manager: new Clutter.BinLayout() });
|
this.parent({ layout_manager: new Clutter.BinLayout() });
|
||||||
this.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
this._initialKeyFocus = null;
|
this._initialKeyFocus = null;
|
||||||
this._initialKeyFocusDestroyId = 0;
|
this._initialKeyFocusDestroyId = 0;
|
||||||
@ -26,7 +26,7 @@ var Dialog = new Lang.Class({
|
|||||||
this._dialog.add_style_class_name(styleClass);
|
this._dialog.add_style_class_name(styleClass);
|
||||||
|
|
||||||
this._parentActor = parentActor;
|
this._parentActor = parentActor;
|
||||||
this._eventId = this._parentActor.connect('event', Lang.bind(this, this._modalEventHandler));
|
this._eventId = this._parentActor.connect('event', this._modalEventHandler.bind(this));
|
||||||
this._parentActor.add_child(this);
|
this._parentActor.add_child(this);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
10
js/ui/dnd.js
10
js/ui/dnd.js
@ -80,9 +80,9 @@ var _Draggable = new Lang.Class({
|
|||||||
this.actor = actor;
|
this.actor = actor;
|
||||||
if (!params.manualMode) {
|
if (!params.manualMode) {
|
||||||
this.actor.connect('button-press-event',
|
this.actor.connect('button-press-event',
|
||||||
Lang.bind(this, this._onButtonPress));
|
this._onButtonPress.bind(this));
|
||||||
this.actor.connect('touch-event',
|
this.actor.connect('touch-event',
|
||||||
Lang.bind(this, this._onTouchEvent));
|
this._onTouchEvent.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.actor.connect('destroy', () => {
|
this.actor.connect('destroy', () => {
|
||||||
@ -169,7 +169,7 @@ var _Draggable = new Lang.Class({
|
|||||||
_grabActor() {
|
_grabActor() {
|
||||||
this._grabDevice(this.actor);
|
this._grabDevice(this.actor);
|
||||||
this._onEventId = this.actor.connect('event',
|
this._onEventId = this.actor.connect('event',
|
||||||
Lang.bind(this, this._onEvent));
|
this._onEvent.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_ungrabActor() {
|
_ungrabActor() {
|
||||||
@ -445,7 +445,7 @@ var _Draggable = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this._updateHoverId = GLib.idle_add(GLib.PRIORITY_DEFAULT,
|
this._updateHoverId = GLib.idle_add(GLib.PRIORITY_DEFAULT,
|
||||||
Lang.bind(this, this._updateDragHover));
|
this._updateDragHover.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._updateHoverId, '[gnome-shell] this._updateDragHover');
|
GLib.Source.set_name_by_id(this._updateHoverId, '[gnome-shell] this._updateDragHover');
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -600,7 +600,7 @@ var _Draggable = new Lang.Class({
|
|||||||
// during it
|
// during it
|
||||||
this._dragActorDestroyId =
|
this._dragActorDestroyId =
|
||||||
this._dragActor.connect('destroy',
|
this._dragActor.connect('destroy',
|
||||||
Lang.bind(this, this._finishAnimation));
|
this._finishAnimation.bind(this));
|
||||||
|
|
||||||
params['opacity'] = this._dragOrigOpacity;
|
params['opacity'] = this._dragOrigOpacity;
|
||||||
params['transition'] = 'easeOutQuad';
|
params['transition'] = 'easeOutQuad';
|
||||||
|
@ -303,7 +303,7 @@ var EndSessionDialog = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._powerProxy.connect('g-properties-changed',
|
this._powerProxy.connect('g-properties-changed',
|
||||||
Lang.bind(this, this._sync));
|
this._sync.bind(this));
|
||||||
this._sync();
|
this._sync();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -313,12 +313,12 @@ var EndSessionDialog = new Lang.Class({
|
|||||||
this._sessions = [];
|
this._sessions = [];
|
||||||
|
|
||||||
this.connect('destroy',
|
this.connect('destroy',
|
||||||
Lang.bind(this, this._onDestroy));
|
this._onDestroy.bind(this));
|
||||||
this.connect('opened',
|
this.connect('opened',
|
||||||
Lang.bind(this, this._onOpened));
|
this._onOpened.bind(this));
|
||||||
|
|
||||||
this._userLoadedId = this._user.connect('notify::is_loaded', Lang.bind(this, this._sync));
|
this._userLoadedId = this._user.connect('notify::is_loaded', this._sync.bind(this));
|
||||||
this._userChangedId = this._user.connect('changed', Lang.bind(this, this._sync));
|
this._userChangedId = this._user.connect('changed', this._sync.bind(this));
|
||||||
|
|
||||||
let mainContentLayout = new St.BoxLayout({ vertical: false });
|
let mainContentLayout = new St.BoxLayout({ vertical: false });
|
||||||
this.contentLayout.add(mainContentLayout,
|
this.contentLayout.add(mainContentLayout,
|
||||||
@ -354,7 +354,7 @@ var EndSessionDialog = new Lang.Class({
|
|||||||
y_align: St.Align.START });
|
y_align: St.Align.START });
|
||||||
|
|
||||||
this._checkBox = new CheckBox.CheckBox();
|
this._checkBox = new CheckBox.CheckBox();
|
||||||
this._checkBox.actor.connect('clicked', Lang.bind(this, this._sync));
|
this._checkBox.actor.connect('clicked', this._sync.bind(this));
|
||||||
messageLayout.add(this._checkBox.actor);
|
messageLayout.add(this._checkBox.actor);
|
||||||
|
|
||||||
this._batteryWarning = new St.Label({ style_class: 'end-session-dialog-warning',
|
this._batteryWarning = new St.Label({ style_class: 'end-session-dialog-warning',
|
||||||
@ -478,7 +478,7 @@ var EndSessionDialog = new Lang.Class({
|
|||||||
|
|
||||||
_updateButtons() {
|
_updateButtons() {
|
||||||
let dialogContent = DialogContent[this._type];
|
let dialogContent = DialogContent[this._type];
|
||||||
let buttons = [{ action: Lang.bind(this, this.cancel),
|
let buttons = [{ action: this.cancel.bind(this),
|
||||||
label: _("Cancel"),
|
label: _("Cancel"),
|
||||||
key: Clutter.Escape }];
|
key: Clutter.Escape }];
|
||||||
|
|
||||||
|
@ -195,11 +195,11 @@ var InstallExtensionDialog = new Lang.Class({
|
|||||||
this._invocation = invocation;
|
this._invocation = invocation;
|
||||||
|
|
||||||
this.setButtons([{ label: _("Cancel"),
|
this.setButtons([{ label: _("Cancel"),
|
||||||
action: Lang.bind(this, this._onCancelButtonPressed),
|
action: this._onCancelButtonPressed.bind(this),
|
||||||
key: Clutter.Escape
|
key: Clutter.Escape
|
||||||
},
|
},
|
||||||
{ label: _("Install"),
|
{ label: _("Install"),
|
||||||
action: Lang.bind(this, this._onInstallButtonPressed),
|
action: this._onInstallButtonPressed.bind(this),
|
||||||
default: true
|
default: true
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@ var extensionOrder = [];
|
|||||||
var _signals = {};
|
var _signals = {};
|
||||||
Signals.addSignalMethods(_signals);
|
Signals.addSignalMethods(_signals);
|
||||||
|
|
||||||
var connect = Lang.bind(_signals, _signals.connect);
|
var connect = _signals.connect.bind(_signals);
|
||||||
var disconnect = Lang.bind(_signals, _signals.disconnect);
|
var disconnect = _signals.disconnect.bind(_signals);
|
||||||
|
|
||||||
const ENABLED_EXTENSIONS_KEY = 'enabled-extensions';
|
const ENABLED_EXTENSIONS_KEY = 'enabled-extensions';
|
||||||
const DISABLE_USER_EXTENSIONS_KEY = 'disable-user-extensions';
|
const DISABLE_USER_EXTENSIONS_KEY = 'disable-user-extensions';
|
||||||
|
@ -32,7 +32,7 @@ var FocusCaretTracker = new Lang.Class({
|
|||||||
Name: 'FocusCaretTracker',
|
Name: 'FocusCaretTracker',
|
||||||
|
|
||||||
_init() {
|
_init() {
|
||||||
this._atspiListener = Atspi.EventListener.new(Lang.bind(this, this._onChanged));
|
this._atspiListener = Atspi.EventListener.new(this._onChanged.bind(this));
|
||||||
|
|
||||||
this._atspiInited = false;
|
this._atspiInited = false;
|
||||||
this._focusListenerRegistered = false;
|
this._focusListenerRegistered = false;
|
||||||
|
@ -50,19 +50,17 @@ var BaseIcon = new Lang.Class({
|
|||||||
x_fill: true,
|
x_fill: true,
|
||||||
y_fill: true });
|
y_fill: true });
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
this.actor.connect('style-changed',
|
this.actor.connect('style-changed', this._onStyleChanged.bind(this));
|
||||||
Lang.bind(this, this._onStyleChanged));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
this.actor.connect('destroy',
|
|
||||||
Lang.bind(this, this._onDestroy));
|
|
||||||
|
|
||||||
this._spacing = 0;
|
this._spacing = 0;
|
||||||
|
|
||||||
let box = new Shell.GenericContainer();
|
let box = new Shell.GenericContainer();
|
||||||
box.connect('allocate', Lang.bind(this, this._allocate));
|
box.connect('allocate', this._allocate.bind(this));
|
||||||
box.connect('get-preferred-width',
|
box.connect('get-preferred-width',
|
||||||
Lang.bind(this, this._getPreferredWidth));
|
this._getPreferredWidth.bind(this));
|
||||||
box.connect('get-preferred-height',
|
box.connect('get-preferred-height',
|
||||||
Lang.bind(this, this._getPreferredHeight));
|
this._getPreferredHeight.bind(this));
|
||||||
this.actor.set_child(box);
|
this.actor.set_child(box);
|
||||||
|
|
||||||
this.iconSize = ICON_SIZE;
|
this.iconSize = ICON_SIZE;
|
||||||
@ -85,7 +83,7 @@ var BaseIcon = new Lang.Class({
|
|||||||
this.icon = null;
|
this.icon = null;
|
||||||
|
|
||||||
let cache = St.TextureCache.get_default();
|
let cache = St.TextureCache.get_default();
|
||||||
this._iconThemeChangedId = cache.connect('icon-theme-changed', Lang.bind(this, this._onIconThemeChanged));
|
this._iconThemeChangedId = cache.connect('icon-theme-changed', this._onIconThemeChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_allocate(actor, box, flags) {
|
_allocate(actor, box, flags) {
|
||||||
@ -274,7 +272,7 @@ var IconGrid = new Lang.Class({
|
|||||||
this._fixedHItemSize = this._fixedVItemSize = undefined;
|
this._fixedHItemSize = this._fixedVItemSize = undefined;
|
||||||
this._grid = new Shell.GenericContainer();
|
this._grid = new Shell.GenericContainer();
|
||||||
this.actor.add(this._grid, { expand: true, y_align: St.Align.START });
|
this.actor.add(this._grid, { expand: true, y_align: St.Align.START });
|
||||||
this.actor.connect('style-changed', Lang.bind(this, this._onStyleChanged));
|
this.actor.connect('style-changed', this._onStyleChanged.bind(this));
|
||||||
|
|
||||||
// Cancel animations when hiding the overview, to avoid icons
|
// Cancel animations when hiding the overview, to avoid icons
|
||||||
// swarming into the void ...
|
// swarming into the void ...
|
||||||
@ -283,11 +281,11 @@ var IconGrid = new Lang.Class({
|
|||||||
this._cancelAnimation();
|
this._cancelAnimation();
|
||||||
});
|
});
|
||||||
|
|
||||||
this._grid.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this._grid.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this._grid.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this._grid.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this._grid.connect('allocate', Lang.bind(this, this._allocate));
|
this._grid.connect('allocate', this._allocate.bind(this));
|
||||||
this._grid.connect('actor-added', Lang.bind(this, this._childAdded));
|
this._grid.connect('actor-added', this._childAdded.bind(this));
|
||||||
this._grid.connect('actor-removed', Lang.bind(this, this._childRemoved));
|
this._grid.connect('actor-removed', this._childRemoved.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_keyFocusIn(actor) {
|
_keyFocusIn(actor) {
|
||||||
@ -295,7 +293,7 @@ var IconGrid = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_childAdded(grid, child) {
|
_childAdded(grid, child) {
|
||||||
child._iconGridKeyFocusInId = child.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
|
child._iconGridKeyFocusInId = child.connect('key-focus-in', this._keyFocusIn.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_childRemoved(grid, child) {
|
_childRemoved(grid, child) {
|
||||||
@ -780,7 +778,7 @@ var IconGrid = new Lang.Class({
|
|||||||
this._updateSpacingForSize(availWidth, availHeight);
|
this._updateSpacingForSize(availWidth, availHeight);
|
||||||
}
|
}
|
||||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
|
Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
|
||||||
Lang.bind(this, this._updateIconSizes));
|
this._updateIconSizes.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
// Note that this is ICON_SIZE as used by BaseIcon, not elsewhere in IconGrid; it's a bit messed up
|
// Note that this is ICON_SIZE as used by BaseIcon, not elsewhere in IconGrid; it's a bit messed up
|
||||||
|
@ -18,7 +18,7 @@ var KbdA11yDialog = new Lang.Class({
|
|||||||
|
|
||||||
let deviceManager = Clutter.DeviceManager.get_default();
|
let deviceManager = Clutter.DeviceManager.get_default();
|
||||||
deviceManager.connect('kbd-a11y-flags-changed',
|
deviceManager.connect('kbd-a11y-flags-changed',
|
||||||
Lang.bind(this, this._showKbdA11yDialog));
|
this._showKbdA11yDialog.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_showKbdA11yDialog(deviceManager, newFlags, whatChanged) {
|
_showKbdA11yDialog(deviceManager, newFlags, whatChanged) {
|
||||||
|
@ -195,7 +195,7 @@ var LanguageSelectionPopup = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
this.addAction(_("Region & Language Settings"), Lang.bind(this, this._launchSettings));
|
this.addAction(_("Region & Language Settings"), this._launchSettings.bind(this));
|
||||||
this._capturedEventId = 0;
|
this._capturedEventId = 0;
|
||||||
|
|
||||||
this._unmapId = actor.connect('notify::mapped', () => {
|
this._unmapId = actor.connect('notify::mapped', () => {
|
||||||
@ -223,7 +223,7 @@ var LanguageSelectionPopup = new Lang.Class({
|
|||||||
open(animate) {
|
open(animate) {
|
||||||
this.parent(animate);
|
this.parent(animate);
|
||||||
this._capturedEventId = global.stage.connect('captured-event',
|
this._capturedEventId = global.stage.connect('captured-event',
|
||||||
Lang.bind(this, this._onCapturedEvent));
|
this._onCapturedEvent.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
close(animate) {
|
close(animate) {
|
||||||
@ -255,7 +255,7 @@ var Key = new Lang.Class({
|
|||||||
*/
|
*/
|
||||||
this.actor = new St.BoxLayout ({ style_class: 'key-container' });
|
this.actor = new St.BoxLayout ({ style_class: 'key-container' });
|
||||||
this.actor.add(this.keyButton, { expand: true, x_fill: true });
|
this.actor.add(this.keyButton, { expand: true, x_fill: true });
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
this._extended_keys = extendedKeys;
|
this._extended_keys = extendedKeys;
|
||||||
this._extended_keyboard = null;
|
this._extended_keyboard = null;
|
||||||
@ -357,7 +357,7 @@ var Key = new Lang.Class({
|
|||||||
_showSubkeys() {
|
_showSubkeys() {
|
||||||
this._boxPointer.show(BoxPointer.PopupAnimation.FULL);
|
this._boxPointer.show(BoxPointer.PopupAnimation.FULL);
|
||||||
this._capturedEventId = global.stage.connect('captured-event',
|
this._capturedEventId = global.stage.connect('captured-event',
|
||||||
Lang.bind(this, this._onCapturedEvent));
|
this._onCapturedEvent.bind(this));
|
||||||
this._unmapId = this.keyButton.connect('notify::mapped', () => {
|
this._unmapId = this.keyButton.connect('notify::mapped', () => {
|
||||||
if (!this.keyButton.is_mapped())
|
if (!this.keyButton.is_mapped())
|
||||||
this._hideSubkeys();
|
this._hideSubkeys();
|
||||||
@ -492,8 +492,8 @@ var Keyboard = new Lang.Class({
|
|||||||
this._focusInExtendedKeys = false;
|
this._focusInExtendedKeys = false;
|
||||||
|
|
||||||
this._focusCaretTracker = new FocusCaretTracker.FocusCaretTracker();
|
this._focusCaretTracker = new FocusCaretTracker.FocusCaretTracker();
|
||||||
this._focusCaretTracker.connect('focus-changed', Lang.bind(this, this._onFocusChanged));
|
this._focusCaretTracker.connect('focus-changed', this._onFocusChanged.bind(this));
|
||||||
this._focusCaretTracker.connect('caret-moved', Lang.bind(this, this._onCaretMoved));
|
this._focusCaretTracker.connect('caret-moved', this._onCaretMoved.bind(this));
|
||||||
this._languagePopup = null;
|
this._languagePopup = null;
|
||||||
this._currentAccessible = null;
|
this._currentAccessible = null;
|
||||||
this._caretTrackingEnabled = false;
|
this._caretTrackingEnabled = false;
|
||||||
@ -506,7 +506,7 @@ var Keyboard = new Lang.Class({
|
|||||||
this._latched = false; // current level is latched
|
this._latched = false; // current level is latched
|
||||||
|
|
||||||
this._a11yApplicationsSettings = new Gio.Settings({ schema_id: A11Y_APPLICATIONS_SCHEMA });
|
this._a11yApplicationsSettings = new Gio.Settings({ schema_id: A11Y_APPLICATIONS_SCHEMA });
|
||||||
this._a11yApplicationsSettings.connect('changed', Lang.bind(this, this._syncEnabled));
|
this._a11yApplicationsSettings.connect('changed', this._syncEnabled.bind(this));
|
||||||
this._lastDeviceId = null;
|
this._lastDeviceId = null;
|
||||||
this._suggestions = null;
|
this._suggestions = null;
|
||||||
|
|
||||||
@ -531,7 +531,7 @@ var Keyboard = new Lang.Class({
|
|||||||
this._keyboardRequested = false;
|
this._keyboardRequested = false;
|
||||||
this._keyboardRestingId = 0;
|
this._keyboardRestingId = 0;
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
|
Main.layoutManager.connect('monitors-changed', this._relayout.bind(this));
|
||||||
//Main.inputMethod.connect('cursor-location-changed', (o, rect) => {
|
//Main.inputMethod.connect('cursor-location-changed', (o, rect) => {
|
||||||
// if (this._keyboardVisible) {
|
// if (this._keyboardVisible) {
|
||||||
// let currentWindow = global.screen.get_display().focus_window;
|
// let currentWindow = global.screen.get_display().focus_window;
|
||||||
@ -706,10 +706,10 @@ var Keyboard = new Lang.Class({
|
|||||||
// keyboard on RTL locales.
|
// keyboard on RTL locales.
|
||||||
this.actor.text_direction = Clutter.TextDirection.LTR;
|
this.actor.text_direction = Clutter.TextDirection.LTR;
|
||||||
|
|
||||||
this._keyboardNotifyId = this._keyboardController.connect('active-group', Lang.bind(this, this._onGroupChanged));
|
this._keyboardNotifyId = this._keyboardController.connect('active-group', this._onGroupChanged.bind(this));
|
||||||
this._keyboardGroupsChangedId = this._keyboardController.connect('groups-changed', Lang.bind(this, this._onKeyboardGroupsChanged));
|
this._keyboardGroupsChangedId = this._keyboardController.connect('groups-changed', this._onKeyboardGroupsChanged.bind(this));
|
||||||
this._keyboardStateId = this._keyboardController.connect('panel-state', Lang.bind(this, this._onKeyboardStateChanged));
|
this._keyboardStateId = this._keyboardController.connect('panel-state', this._onKeyboardStateChanged.bind(this));
|
||||||
this._focusNotifyId = global.stage.connect('notify::key-focus', Lang.bind(this, this._onKeyFocusChanged));
|
this._focusNotifyId = global.stage.connect('notify::key-focus', this._onKeyFocusChanged.bind(this));
|
||||||
|
|
||||||
this._relayout();
|
this._relayout();
|
||||||
},
|
},
|
||||||
@ -1166,13 +1166,15 @@ var KeyboardController = new Lang.Class({
|
|||||||
|
|
||||||
this._inputSourceManager = InputSourceManager.getInputSourceManager();
|
this._inputSourceManager = InputSourceManager.getInputSourceManager();
|
||||||
this._sourceChangedId = this._inputSourceManager.connect('current-source-changed',
|
this._sourceChangedId = this._inputSourceManager.connect('current-source-changed',
|
||||||
Lang.bind(this, this._onSourceChanged));
|
this._onSourceChanged.bind(this));
|
||||||
this._sourcesModifiedId = this._inputSourceManager.connect ('sources-changed',
|
this._sourcesModifiedId = this._inputSourceManager.connect ('sources-changed',
|
||||||
Lang.bind(this, this._onSourcesModified));
|
this._onSourcesModified.bind(this));
|
||||||
this._currentSource = this._inputSourceManager.currentSource;
|
this._currentSource = this._inputSourceManager.currentSource;
|
||||||
|
|
||||||
Main.inputMethod.connect('notify::content-purpose', Lang.bind(this, this._onContentPurposeHintsChanged));
|
Main.inputMethod.connect('notify::content-purpose',
|
||||||
Main.inputMethod.connect('notify::content-hints', Lang.bind(this, this._onContentPurposeHintsChanged));
|
this._onContentPurposeHintsChanged.bind(this));
|
||||||
|
Main.inputMethod.connect('notify::content-hints',
|
||||||
|
this._onContentPurposeHintsChanged.bind(this));
|
||||||
Main.inputMethod.connect('input-panel-state', (o, state) => {
|
Main.inputMethod.connect('input-panel-state', (o, state) => {
|
||||||
this.emit('panel-state', state);
|
this.emit('panel-state', state);
|
||||||
});
|
});
|
||||||
|
@ -239,7 +239,7 @@ var LayoutManager = new Lang.Class({
|
|||||||
this.addChrome(this.panelBox, { affectsStruts: true,
|
this.addChrome(this.panelBox, { affectsStruts: true,
|
||||||
trackFullscreen: true });
|
trackFullscreen: true });
|
||||||
this.panelBox.connect('allocation-changed',
|
this.panelBox.connect('allocation-changed',
|
||||||
Lang.bind(this, this._panelBoxChanged));
|
this._panelBoxChanged.bind(this));
|
||||||
|
|
||||||
this.modalDialogGroup = new St.Widget({ name: 'modalDialogGroup',
|
this.modalDialogGroup = new St.Widget({ name: 'modalDialogGroup',
|
||||||
layout_manager: new Clutter.BinLayout() });
|
layout_manager: new Clutter.BinLayout() });
|
||||||
@ -270,13 +270,13 @@ var LayoutManager = new Lang.Class({
|
|||||||
|
|
||||||
// Need to update struts on new workspaces when they are added
|
// Need to update struts on new workspaces when they are added
|
||||||
global.screen.connect('notify::n-workspaces',
|
global.screen.connect('notify::n-workspaces',
|
||||||
Lang.bind(this, this._queueUpdateRegions));
|
this._queueUpdateRegions.bind(this));
|
||||||
global.screen.connect('restacked',
|
global.screen.connect('restacked',
|
||||||
Lang.bind(this, this._windowsRestacked));
|
this._windowsRestacked.bind(this));
|
||||||
global.screen.connect('monitors-changed',
|
global.screen.connect('monitors-changed',
|
||||||
Lang.bind(this, this._monitorsChanged));
|
this._monitorsChanged.bind(this));
|
||||||
global.screen.connect('in-fullscreen-changed',
|
global.screen.connect('in-fullscreen-changed',
|
||||||
Lang.bind(this, this._updateFullscreen));
|
this._updateFullscreen.bind(this));
|
||||||
this._monitorsChanged();
|
this._monitorsChanged();
|
||||||
|
|
||||||
// NVIDIA drivers don't preserve FBO contents across
|
// NVIDIA drivers don't preserve FBO contents across
|
||||||
@ -294,7 +294,7 @@ var LayoutManager = new Lang.Class({
|
|||||||
|
|
||||||
// This is called by Main after everything else is constructed
|
// This is called by Main after everything else is constructed
|
||||||
init() {
|
init() {
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
|
|
||||||
this._loadBackground();
|
this._loadBackground();
|
||||||
},
|
},
|
||||||
@ -424,7 +424,7 @@ var LayoutManager = new Lang.Class({
|
|||||||
layoutManager: this,
|
layoutManager: this,
|
||||||
monitorIndex: monitorIndex });
|
monitorIndex: monitorIndex });
|
||||||
|
|
||||||
bgManager.connect('changed', Lang.bind(this, this._addBackgroundMenu));
|
bgManager.connect('changed', this._addBackgroundMenu.bind(this));
|
||||||
this._addBackgroundMenu(bgManager);
|
this._addBackgroundMenu(bgManager);
|
||||||
|
|
||||||
return bgManager;
|
return bgManager;
|
||||||
@ -859,11 +859,11 @@ var LayoutManager = new Lang.Class({
|
|||||||
let actorData = Params.parse(params, defaultParams);
|
let actorData = Params.parse(params, defaultParams);
|
||||||
actorData.actor = actor;
|
actorData.actor = actor;
|
||||||
actorData.visibleId = actor.connect('notify::visible',
|
actorData.visibleId = actor.connect('notify::visible',
|
||||||
Lang.bind(this, this._queueUpdateRegions));
|
this._queueUpdateRegions.bind(this));
|
||||||
actorData.allocationId = actor.connect('notify::allocation',
|
actorData.allocationId = actor.connect('notify::allocation',
|
||||||
Lang.bind(this, this._queueUpdateRegions));
|
this._queueUpdateRegions.bind(this));
|
||||||
actorData.destroyId = actor.connect('destroy',
|
actorData.destroyId = actor.connect('destroy',
|
||||||
Lang.bind(this, this._untrackActor));
|
this._untrackActor.bind(this));
|
||||||
// Note that destroying actor will unset its parent, so we don't
|
// Note that destroying actor will unset its parent, so we don't
|
||||||
// need to connect to 'destroy' too.
|
// need to connect to 'destroy' too.
|
||||||
|
|
||||||
@ -903,7 +903,7 @@ var LayoutManager = new Lang.Class({
|
|||||||
global.window_group.visible = windowsVisible;
|
global.window_group.visible = windowsVisible;
|
||||||
global.top_window_group.visible = windowsVisible;
|
global.top_window_group.visible = windowsVisible;
|
||||||
|
|
||||||
this._trackedActors.forEach(Lang.bind(this, this._updateActorVisibility));
|
this._trackedActors.forEach(this._updateActorVisibility.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
getWorkAreaForMonitor(monitorIndex) {
|
getWorkAreaForMonitor(monitorIndex) {
|
||||||
@ -935,7 +935,7 @@ var LayoutManager = new Lang.Class({
|
|||||||
|
|
||||||
if (!this._updateRegionIdle)
|
if (!this._updateRegionIdle)
|
||||||
this._updateRegionIdle = Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
|
this._updateRegionIdle = Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
|
||||||
Lang.bind(this, this._updateRegions));
|
this._updateRegions.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getWindowActorsForWorkspace(workspace) {
|
_getWindowActorsForWorkspace(workspace) {
|
||||||
@ -1095,7 +1095,7 @@ var HotCorner = new Lang.Class({
|
|||||||
HOT_CORNER_PRESSURE_TIMEOUT,
|
HOT_CORNER_PRESSURE_TIMEOUT,
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW);
|
Shell.ActionMode.OVERVIEW);
|
||||||
this._pressureBarrier.connect('trigger', Lang.bind(this, this._toggleOverview));
|
this._pressureBarrier.connect('trigger', this._toggleOverview.bind(this));
|
||||||
|
|
||||||
// Cache the three ripples instead of dynamically creating and destroying them.
|
// Cache the three ripples instead of dynamically creating and destroying them.
|
||||||
this._ripple1 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0, visible: false });
|
this._ripple1 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0, visible: false });
|
||||||
@ -1168,12 +1168,12 @@ var HotCorner = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.actor.connect('leave-event',
|
this.actor.connect('leave-event',
|
||||||
Lang.bind(this, this._onEnvironsLeft));
|
this._onEnvironsLeft.bind(this));
|
||||||
|
|
||||||
this._corner.connect('enter-event',
|
this._corner.connect('enter-event',
|
||||||
Lang.bind(this, this._onCornerEntered));
|
this._onCornerEntered.bind(this));
|
||||||
this._corner.connect('leave-event',
|
this._corner.connect('leave-event',
|
||||||
Lang.bind(this, this._onCornerLeft));
|
this._onCornerLeft.bind(this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1283,8 +1283,8 @@ var PressureBarrier = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
addBarrier(barrier) {
|
addBarrier(barrier) {
|
||||||
barrier._pressureHitId = barrier.connect('hit', Lang.bind(this, this._onBarrierHit));
|
barrier._pressureHitId = barrier.connect('hit', this._onBarrierHit.bind(this));
|
||||||
barrier._pressureLeftId = barrier.connect('left', Lang.bind(this, this._onBarrierLeft));
|
barrier._pressureLeftId = barrier.connect('left', this._onBarrierLeft.bind(this));
|
||||||
|
|
||||||
this._barriers.push(barrier);
|
this._barriers.push(barrier);
|
||||||
},
|
},
|
||||||
@ -1300,7 +1300,7 @@ var PressureBarrier = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
this._barriers.forEach(Lang.bind(this, this._disconnectBarrier));
|
this._barriers.forEach(this._disconnectBarrier.bind(this));
|
||||||
this._barriers = [];
|
this._barriers = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ var Lightbox = new Lang.Class({
|
|||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
this.shown = false;
|
this.shown = false;
|
||||||
|
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
if (params.width && params.height) {
|
if (params.width && params.height) {
|
||||||
this.actor.width = params.width;
|
this.actor.width = params.width;
|
||||||
@ -133,8 +133,8 @@ var Lightbox = new Lang.Class({
|
|||||||
this.actor.add_constraint(constraint);
|
this.actor.add_constraint(constraint);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._actorAddedSignalId = container.connect('actor-added', Lang.bind(this, this._actorAdded));
|
this._actorAddedSignalId = container.connect('actor-added', this._actorAdded.bind(this));
|
||||||
this._actorRemovedSignalId = container.connect('actor-removed', Lang.bind(this, this._actorRemoved));
|
this._actorRemovedSignalId = container.connect('actor-removed', this._actorRemoved.bind(this));
|
||||||
|
|
||||||
this._highlighted = null;
|
this._highlighted = null;
|
||||||
},
|
},
|
||||||
|
@ -40,9 +40,9 @@ var commandHeader = 'const Clutter = imports.gi.Clutter; ' +
|
|||||||
* in the shell core code too. */
|
* in the shell core code too. */
|
||||||
'const stage = global.stage; ' +
|
'const stage = global.stage; ' +
|
||||||
/* Special lookingGlass functions */
|
/* Special lookingGlass functions */
|
||||||
'const inspect = Lang.bind(Main.lookingGlass, Main.lookingGlass.inspect); ' +
|
'const inspect = Main.lookingGlass.inspect.bind(Main.lookingGlass); ' +
|
||||||
'const it = Main.lookingGlass.getIt(); ' +
|
'const it = Main.lookingGlass.getIt(); ' +
|
||||||
'const r = Lang.bind(Main.lookingGlass, Main.lookingGlass.getResult); ';
|
'const r = Main.lookingGlass.getResult.bind(Main.lookingGlass); ';
|
||||||
|
|
||||||
const HISTORY_KEY = 'looking-glass-history';
|
const HISTORY_KEY = 'looking-glass-history';
|
||||||
// Time between tabs for them to count as a double-tab event
|
// Time between tabs for them to count as a double-tab event
|
||||||
@ -66,7 +66,7 @@ var AutoComplete = new Lang.Class({
|
|||||||
|
|
||||||
_init(entry) {
|
_init(entry) {
|
||||||
this._entry = entry;
|
this._entry = entry;
|
||||||
this._entry.connect('key-press-event', Lang.bind(this, this._entryKeyPressEvent));
|
this._entry.connect('key-press-event', this._entryKeyPressEvent.bind(this));
|
||||||
this._lastTabTime = global.get_current_time();
|
this._lastTabTime = global.get_current_time();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -282,7 +282,7 @@ var ObjLink = new Lang.Class({
|
|||||||
style_class: 'shell-link',
|
style_class: 'shell-link',
|
||||||
label: text });
|
label: text });
|
||||||
this.actor.get_child().single_line_mode = true;
|
this.actor.get_child().single_line_mode = true;
|
||||||
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
|
this.actor.connect('clicked', this._onClicked.bind(this));
|
||||||
|
|
||||||
this._lookingGlass = lookingGlass;
|
this._lookingGlass = lookingGlass;
|
||||||
},
|
},
|
||||||
@ -321,9 +321,9 @@ var WindowList = new Lang.Class({
|
|||||||
_init(lookingGlass) {
|
_init(lookingGlass) {
|
||||||
this.actor = new St.BoxLayout({ name: 'Windows', vertical: true, style: 'spacing: 8px' });
|
this.actor = new St.BoxLayout({ name: 'Windows', vertical: true, style: 'spacing: 8px' });
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
this._updateId = Main.initializeDeferredWork(this.actor, Lang.bind(this, this._updateWindowList));
|
this._updateId = Main.initializeDeferredWork(this.actor, this._updateWindowList.bind(this));
|
||||||
global.display.connect('window-created', Lang.bind(this, this._updateWindowList));
|
global.display.connect('window-created', this._updateWindowList.bind(this));
|
||||||
tracker.connect('tracked-windows-changed', Lang.bind(this, this._updateWindowList));
|
tracker.connect('tracked-windows-changed', this._updateWindowList.bind(this));
|
||||||
|
|
||||||
this._lookingGlass = lookingGlass;
|
this._lookingGlass = lookingGlass;
|
||||||
},
|
},
|
||||||
@ -336,7 +336,7 @@ var WindowList = new Lang.Class({
|
|||||||
let metaWindow = windows[i].metaWindow;
|
let metaWindow = windows[i].metaWindow;
|
||||||
// Avoid multiple connections
|
// Avoid multiple connections
|
||||||
if (!metaWindow._lookingGlassManaged) {
|
if (!metaWindow._lookingGlassManaged) {
|
||||||
metaWindow.connect('unmanaged', Lang.bind(this, this._updateWindowList));
|
metaWindow.connect('unmanaged', this._updateWindowList.bind(this));
|
||||||
metaWindow._lookingGlassManaged = true;
|
metaWindow._lookingGlassManaged = true;
|
||||||
}
|
}
|
||||||
let box = new St.BoxLayout({ vertical: true });
|
let box = new St.BoxLayout({ vertical: true });
|
||||||
@ -399,17 +399,17 @@ var ObjInspector = new Lang.Class({
|
|||||||
label.single_line_mode = true;
|
label.single_line_mode = true;
|
||||||
hbox.add(label, { expand: true, y_fill: false });
|
hbox.add(label, { expand: true, y_fill: false });
|
||||||
let button = new St.Button({ label: 'Insert', style_class: 'lg-obj-inspector-button' });
|
let button = new St.Button({ label: 'Insert', style_class: 'lg-obj-inspector-button' });
|
||||||
button.connect('clicked', Lang.bind(this, this._onInsert));
|
button.connect('clicked', this._onInsert.bind(this));
|
||||||
hbox.add(button);
|
hbox.add(button);
|
||||||
|
|
||||||
if (this._previousObj != null) {
|
if (this._previousObj != null) {
|
||||||
button = new St.Button({ label: 'Back', style_class: 'lg-obj-inspector-button' });
|
button = new St.Button({ label: 'Back', style_class: 'lg-obj-inspector-button' });
|
||||||
button.connect('clicked', Lang.bind(this, this._onBack));
|
button.connect('clicked', this._onBack.bind(this));
|
||||||
hbox.add(button);
|
hbox.add(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
button = new St.Button({ style_class: 'window-close' });
|
button = new St.Button({ style_class: 'window-close' });
|
||||||
button.connect('clicked', Lang.bind(this, this.close));
|
button.connect('clicked', this.close.bind(this));
|
||||||
hbox.add(button);
|
hbox.add(button);
|
||||||
if (typeof(obj) == typeof({})) {
|
if (typeof(obj) == typeof({})) {
|
||||||
let properties = [];
|
let properties = [];
|
||||||
@ -505,7 +505,7 @@ var Inspector = new Lang.Class({
|
|||||||
_init(lookingGlass) {
|
_init(lookingGlass) {
|
||||||
let container = new Shell.GenericContainer({ width: 0,
|
let container = new Shell.GenericContainer({ width: 0,
|
||||||
height: 0 });
|
height: 0 });
|
||||||
container.connect('allocate', Lang.bind(this, this._allocate));
|
container.connect('allocate', this._allocate.bind(this));
|
||||||
Main.uiGroup.add_actor(container);
|
Main.uiGroup.add_actor(container);
|
||||||
|
|
||||||
let eventHandler = new St.BoxLayout({ name: 'LookingGlassDialog',
|
let eventHandler = new St.BoxLayout({ name: 'LookingGlassDialog',
|
||||||
@ -516,10 +516,10 @@ var Inspector = new Lang.Class({
|
|||||||
this._displayText = new St.Label();
|
this._displayText = new St.Label();
|
||||||
eventHandler.add(this._displayText, { expand: true });
|
eventHandler.add(this._displayText, { expand: true });
|
||||||
|
|
||||||
eventHandler.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
|
eventHandler.connect('key-press-event', this._onKeyPressEvent.bind(this));
|
||||||
eventHandler.connect('button-press-event', Lang.bind(this, this._onButtonPressEvent));
|
eventHandler.connect('button-press-event', this._onButtonPressEvent.bind(this));
|
||||||
eventHandler.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
|
eventHandler.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
eventHandler.connect('motion-event', Lang.bind(this, this._onMotionEvent));
|
eventHandler.connect('motion-event', this._onMotionEvent.bind(this));
|
||||||
Clutter.grab_pointer(eventHandler);
|
Clutter.grab_pointer(eventHandler);
|
||||||
Clutter.grab_keyboard(eventHandler);
|
Clutter.grab_keyboard(eventHandler);
|
||||||
|
|
||||||
@ -652,7 +652,7 @@ var Extensions = new Lang.Class({
|
|||||||
this._loadExtension(null, uuid);
|
this._loadExtension(null, uuid);
|
||||||
|
|
||||||
ExtensionSystem.connect('extension-loaded',
|
ExtensionSystem.connect('extension-loaded',
|
||||||
Lang.bind(this, this._loadExtension));
|
this._loadExtension.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_loadExtension(o, uuid) {
|
_loadExtension(o, uuid) {
|
||||||
@ -749,7 +749,7 @@ var Extensions = new Lang.Class({
|
|||||||
style_class: 'shell-link',
|
style_class: 'shell-link',
|
||||||
label: _("View Source") });
|
label: _("View Source") });
|
||||||
viewsource._extension = extension;
|
viewsource._extension = extension;
|
||||||
viewsource.connect('clicked', Lang.bind(this, this._onViewSource));
|
viewsource.connect('clicked', this._onViewSource.bind(this));
|
||||||
metaBox.add(viewsource);
|
metaBox.add(viewsource);
|
||||||
|
|
||||||
if (extension.metadata.url) {
|
if (extension.metadata.url) {
|
||||||
@ -758,7 +758,7 @@ var Extensions = new Lang.Class({
|
|||||||
style_class: 'shell-link',
|
style_class: 'shell-link',
|
||||||
label: _("Web Page") });
|
label: _("Web Page") });
|
||||||
webpage._extension = extension;
|
webpage._extension = extension;
|
||||||
webpage.connect('clicked', Lang.bind(this, this._onWebPage));
|
webpage.connect('clicked', this._onWebPage.bind(this));
|
||||||
metaBox.add(webpage);
|
metaBox.add(webpage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -769,7 +769,7 @@ var Extensions = new Lang.Class({
|
|||||||
viewerrors._extension = extension;
|
viewerrors._extension = extension;
|
||||||
viewerrors._parentBox = box;
|
viewerrors._parentBox = box;
|
||||||
viewerrors._isShowing = false;
|
viewerrors._isShowing = false;
|
||||||
viewerrors.connect('clicked', Lang.bind(this, this._onViewErrors));
|
viewerrors.connect('clicked', this._onViewErrors.bind(this));
|
||||||
metaBox.add(viewerrors);
|
metaBox.add(viewerrors);
|
||||||
|
|
||||||
return box;
|
return box;
|
||||||
@ -797,11 +797,11 @@ var LookingGlass = new Lang.Class({
|
|||||||
vertical: true,
|
vertical: true,
|
||||||
visible: false,
|
visible: false,
|
||||||
reactive: true });
|
reactive: true });
|
||||||
this.actor.connect('key-press-event', Lang.bind(this, this._globalKeyPressEvent));
|
this.actor.connect('key-press-event', this._globalKeyPressEvent.bind(this));
|
||||||
|
|
||||||
this._interfaceSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
|
this._interfaceSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
|
||||||
this._interfaceSettings.connect('changed::monospace-font-name',
|
this._interfaceSettings.connect('changed::monospace-font-name',
|
||||||
Lang.bind(this, this._updateFont));
|
this._updateFont.bind(this));
|
||||||
this._updateFont();
|
this._updateFont();
|
||||||
|
|
||||||
// We want it to appear to slide out from underneath the panel
|
// We want it to appear to slide out from underneath the panel
|
||||||
@ -809,9 +809,9 @@ var LookingGlass = new Lang.Class({
|
|||||||
Main.uiGroup.set_child_below_sibling(this.actor,
|
Main.uiGroup.set_child_below_sibling(this.actor,
|
||||||
Main.layoutManager.panelBox);
|
Main.layoutManager.panelBox);
|
||||||
Main.layoutManager.panelBox.connect('allocation-changed',
|
Main.layoutManager.panelBox.connect('allocation-changed',
|
||||||
Lang.bind(this, this._queueResize));
|
this._queueResize.bind(this));
|
||||||
Main.layoutManager.keyboardBox.connect('allocation-changed',
|
Main.layoutManager.keyboardBox.connect('allocation-changed',
|
||||||
Lang.bind(this, this._queueResize));
|
this._queueResize.bind(this));
|
||||||
|
|
||||||
this._objInspector = new ObjInspector(this);
|
this._objInspector = new ObjInspector(this);
|
||||||
Main.uiGroup.add_actor(this._objInspector.actor);
|
Main.uiGroup.add_actor(this._objInspector.actor);
|
||||||
|
@ -79,7 +79,7 @@ var Magnifier = new Lang.Class({
|
|||||||
let showAtLaunch = this._settingsInit(aZoomRegion);
|
let showAtLaunch = this._settingsInit(aZoomRegion);
|
||||||
aZoomRegion.scrollContentsTo(this.xMouse, this.yMouse);
|
aZoomRegion.scrollContentsTo(this.xMouse, this.yMouse);
|
||||||
|
|
||||||
cursorTracker.connect('cursor-changed', Lang.bind(this, this._updateMouseSprite));
|
cursorTracker.connect('cursor-changed', this._updateMouseSprite.bind(this));
|
||||||
this._cursorTracker = cursorTracker;
|
this._cursorTracker = cursorTracker;
|
||||||
|
|
||||||
// Export to dbus.
|
// Export to dbus.
|
||||||
@ -153,7 +153,7 @@ var Magnifier = new Lang.Class({
|
|||||||
*/
|
*/
|
||||||
startTrackingMouse() {
|
startTrackingMouse() {
|
||||||
if (!this._pointerWatch)
|
if (!this._pointerWatch)
|
||||||
this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(MOUSE_POLL_FREQUENCY, Lang.bind(this, this.scrollToMousePos));
|
this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(MOUSE_POLL_FREQUENCY, this.scrollToMousePos.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -452,38 +452,38 @@ var Magnifier = new Lang.Class({
|
|||||||
});
|
});
|
||||||
|
|
||||||
this._settings.connect('changed::' + SCREEN_POSITION_KEY,
|
this._settings.connect('changed::' + SCREEN_POSITION_KEY,
|
||||||
Lang.bind(this, this._updateScreenPosition));
|
this._updateScreenPosition.bind(this));
|
||||||
this._settings.connect('changed::' + MAG_FACTOR_KEY,
|
this._settings.connect('changed::' + MAG_FACTOR_KEY,
|
||||||
Lang.bind(this, this._updateMagFactor));
|
this._updateMagFactor.bind(this));
|
||||||
this._settings.connect('changed::' + LENS_MODE_KEY,
|
this._settings.connect('changed::' + LENS_MODE_KEY,
|
||||||
Lang.bind(this, this._updateLensMode));
|
this._updateLensMode.bind(this));
|
||||||
this._settings.connect('changed::' + CLAMP_MODE_KEY,
|
this._settings.connect('changed::' + CLAMP_MODE_KEY,
|
||||||
Lang.bind(this, this._updateClampMode));
|
this._updateClampMode.bind(this));
|
||||||
this._settings.connect('changed::' + MOUSE_TRACKING_KEY,
|
this._settings.connect('changed::' + MOUSE_TRACKING_KEY,
|
||||||
Lang.bind(this, this._updateMouseTrackingMode));
|
this._updateMouseTrackingMode.bind(this));
|
||||||
this._settings.connect('changed::' + FOCUS_TRACKING_KEY,
|
this._settings.connect('changed::' + FOCUS_TRACKING_KEY,
|
||||||
Lang.bind(this, this._updateFocusTrackingMode));
|
this._updateFocusTrackingMode.bind(this));
|
||||||
this._settings.connect('changed::' + CARET_TRACKING_KEY,
|
this._settings.connect('changed::' + CARET_TRACKING_KEY,
|
||||||
Lang.bind(this, this._updateCaretTrackingMode));
|
this._updateCaretTrackingMode.bind(this));
|
||||||
|
|
||||||
this._settings.connect('changed::' + INVERT_LIGHTNESS_KEY,
|
this._settings.connect('changed::' + INVERT_LIGHTNESS_KEY,
|
||||||
Lang.bind(this, this._updateInvertLightness));
|
this._updateInvertLightness.bind(this));
|
||||||
this._settings.connect('changed::' + COLOR_SATURATION_KEY,
|
this._settings.connect('changed::' + COLOR_SATURATION_KEY,
|
||||||
Lang.bind(this, this._updateColorSaturation));
|
this._updateColorSaturation.bind(this));
|
||||||
|
|
||||||
this._settings.connect('changed::' + BRIGHT_RED_KEY,
|
this._settings.connect('changed::' + BRIGHT_RED_KEY,
|
||||||
Lang.bind(this, this._updateBrightness));
|
this._updateBrightness.bind(this));
|
||||||
this._settings.connect('changed::' + BRIGHT_GREEN_KEY,
|
this._settings.connect('changed::' + BRIGHT_GREEN_KEY,
|
||||||
Lang.bind(this, this._updateBrightness));
|
this._updateBrightness.bind(this));
|
||||||
this._settings.connect('changed::' + BRIGHT_BLUE_KEY,
|
this._settings.connect('changed::' + BRIGHT_BLUE_KEY,
|
||||||
Lang.bind(this, this._updateBrightness));
|
this._updateBrightness.bind(this));
|
||||||
|
|
||||||
this._settings.connect('changed::' + CONTRAST_RED_KEY,
|
this._settings.connect('changed::' + CONTRAST_RED_KEY,
|
||||||
Lang.bind(this, this._updateContrast));
|
this._updateContrast.bind(this));
|
||||||
this._settings.connect('changed::' + CONTRAST_GREEN_KEY,
|
this._settings.connect('changed::' + CONTRAST_GREEN_KEY,
|
||||||
Lang.bind(this, this._updateContrast));
|
this._updateContrast.bind(this));
|
||||||
this._settings.connect('changed::' + CONTRAST_BLUE_KEY,
|
this._settings.connect('changed::' + CONTRAST_BLUE_KEY,
|
||||||
Lang.bind(this, this._updateContrast));
|
this._updateContrast.bind(this));
|
||||||
|
|
||||||
this._settings.connect('changed::' + SHOW_CROSS_HAIRS_KEY, () => {
|
this._settings.connect('changed::' + SHOW_CROSS_HAIRS_KEY, () => {
|
||||||
this.setCrosshairsVisible(this._settings.get_boolean(SHOW_CROSS_HAIRS_KEY));
|
this.setCrosshairsVisible(this._settings.get_boolean(SHOW_CROSS_HAIRS_KEY));
|
||||||
@ -709,11 +709,11 @@ var ZoomRegion = new Lang.Class({
|
|||||||
this._scrollContentsTimerId = 0;
|
this._scrollContentsTimerId = 0;
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed',
|
Main.layoutManager.connect('monitors-changed',
|
||||||
Lang.bind(this, this._monitorsChanged));
|
this._monitorsChanged.bind(this));
|
||||||
this._focusCaretTracker.connect('caret-moved',
|
this._focusCaretTracker.connect('caret-moved',
|
||||||
Lang.bind(this, this._updateCaret));
|
this._updateCaret.bind(this));
|
||||||
this._focusCaretTracker.connect('focus-changed',
|
this._focusCaretTracker.connect('focus-changed',
|
||||||
Lang.bind(this, this._updateFocus));
|
this._updateFocus.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateFocus(caller, event) {
|
_updateFocus(caller, event) {
|
||||||
@ -1558,7 +1558,7 @@ var Crosshairs = new Lang.Class({
|
|||||||
this.reCenter();
|
this.reCenter();
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed',
|
Main.layoutManager.connect('monitors-changed',
|
||||||
Lang.bind(this, this._monitorsChanged));
|
this._monitorsChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_monitorsChanged() {
|
_monitorsChanged() {
|
||||||
|
@ -96,7 +96,7 @@ function _sessionUpdated() {
|
|||||||
wm.setCustomKeybindingHandler('panel-main-menu',
|
wm.setCustomKeybindingHandler('panel-main-menu',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
sessionMode.hasOverview ? Lang.bind(overview, overview.toggle) : null);
|
sessionMode.hasOverview ? overview.toggle.bind(overview) : null);
|
||||||
wm.allowKeybinding('overlay-key', Shell.ActionMode.NORMAL |
|
wm.allowKeybinding('overlay-key', Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW);
|
Shell.ActionMode.OVERVIEW);
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ var Message = new Lang.Class({
|
|||||||
can_focus: true,
|
can_focus: true,
|
||||||
x_expand: true, x_fill: true });
|
x_expand: true, x_fill: true });
|
||||||
this.actor.connect('key-press-event',
|
this.actor.connect('key-press-event',
|
||||||
Lang.bind(this, this._onKeyPressed));
|
this._onKeyPressed.bind(this));
|
||||||
|
|
||||||
let vbox = new St.BoxLayout({ vertical: true });
|
let vbox = new St.BoxLayout({ vertical: true });
|
||||||
this.actor.set_child(vbox);
|
this.actor.set_child(vbox);
|
||||||
@ -361,10 +361,10 @@ var Message = new Lang.Class({
|
|||||||
this._bodyStack.add_actor(this.bodyLabel.actor);
|
this._bodyStack.add_actor(this.bodyLabel.actor);
|
||||||
this.setBody(body);
|
this.setBody(body);
|
||||||
|
|
||||||
this._closeButton.connect('clicked', Lang.bind(this, this.close));
|
this._closeButton.connect('clicked', this.close.bind(this));
|
||||||
this.actor.connect('notify::hover', Lang.bind(this, this._sync));
|
this.actor.connect('notify::hover', this._sync.bind(this));
|
||||||
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
|
this.actor.connect('clicked', this._onClicked.bind(this));
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
this._sync();
|
this._sync();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -535,11 +535,11 @@ var MessageListSection = new Lang.Class({
|
|||||||
vertical: true });
|
vertical: true });
|
||||||
this.actor.add_actor(this._list);
|
this.actor.add_actor(this._list);
|
||||||
|
|
||||||
this._list.connect('actor-added', Lang.bind(this, this._sync));
|
this._list.connect('actor-added', this._sync.bind(this));
|
||||||
this._list.connect('actor-removed', Lang.bind(this, this._sync));
|
this._list.connect('actor-removed', this._sync.bind(this));
|
||||||
|
|
||||||
let id = Main.sessionMode.connect('updated',
|
let id = Main.sessionMode.connect('updated',
|
||||||
Lang.bind(this, this._sync));
|
this._sync.bind(this));
|
||||||
this.actor.connect('destroy', () => {
|
this.actor.connect('destroy', () => {
|
||||||
Main.sessionMode.disconnect(id);
|
Main.sessionMode.disconnect(id);
|
||||||
});
|
});
|
||||||
@ -583,7 +583,7 @@ var MessageListSection = new Lang.Class({
|
|||||||
pivot_point: pivot,
|
pivot_point: pivot,
|
||||||
scale_x: scale, scale_y: scale });
|
scale_x: scale, scale_y: scale });
|
||||||
obj.keyFocusId = message.actor.connect('key-focus-in',
|
obj.keyFocusId = message.actor.connect('key-focus-in',
|
||||||
Lang.bind(this, this._onKeyFocusIn));
|
this._onKeyFocusIn.bind(this));
|
||||||
obj.destroyId = message.actor.connect('destroy', () => {
|
obj.destroyId = message.actor.connect('destroy', () => {
|
||||||
this.removeMessage(message, false);
|
this.removeMessage(message, false);
|
||||||
});
|
});
|
||||||
|
@ -85,7 +85,7 @@ var FocusGrabber = new Lang.Class({
|
|||||||
|
|
||||||
this._prevKeyFocusActor = global.stage.get_key_focus();
|
this._prevKeyFocusActor = global.stage.get_key_focus();
|
||||||
|
|
||||||
this._focusActorChangedId = global.stage.connect('notify::key-focus', Lang.bind(this, this._focusActorChanged));
|
this._focusActorChangedId = global.stage.connect('notify::key-focus', this._focusActorChanged.bind(this));
|
||||||
|
|
||||||
if (!this._actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false))
|
if (!this._actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false))
|
||||||
this._actor.grab_key_focus();
|
this._actor.grab_key_focus();
|
||||||
@ -164,7 +164,7 @@ var NotificationGenericPolicy = new Lang.Class({
|
|||||||
this.id = 'generic';
|
this.id = 'generic';
|
||||||
|
|
||||||
this._masterSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.notifications' });
|
this._masterSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.notifications' });
|
||||||
this._masterSettings.connect('changed', Lang.bind(this, this._changed));
|
this._masterSettings.connect('changed', this._changed.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
store() { },
|
store() { },
|
||||||
@ -217,8 +217,8 @@ var NotificationApplicationPolicy = new Lang.Class({
|
|||||||
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.notifications.application',
|
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.notifications.application',
|
||||||
path: '/org/gnome/desktop/notifications/application/' + this._canonicalId + '/' });
|
path: '/org/gnome/desktop/notifications/application/' + this._canonicalId + '/' });
|
||||||
|
|
||||||
this._masterSettings.connect('changed', Lang.bind(this, this._changed));
|
this._masterSettings.connect('changed', this._changed.bind(this));
|
||||||
this._settings.connect('changed', Lang.bind(this, this._changed));
|
this._settings.connect('changed', this._changed.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
store() {
|
store() {
|
||||||
@ -591,9 +591,9 @@ var SourceActor = new Lang.Class({
|
|||||||
this._size = size;
|
this._size = size;
|
||||||
|
|
||||||
this.actor = new Shell.GenericContainer();
|
this.actor = new Shell.GenericContainer();
|
||||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this.actor.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
this.actor.connect('allocate', this._allocate.bind(this));
|
||||||
this.actor.connect('destroy', () => {
|
this.actor.connect('destroy', () => {
|
||||||
this._source.disconnect(this._iconUpdatedId);
|
this._source.disconnect(this._iconUpdatedId);
|
||||||
this._actorDestroyed = true;
|
this._actorDestroyed = true;
|
||||||
@ -607,7 +607,7 @@ var SourceActor = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.add_actor(this._iconBin);
|
this.actor.add_actor(this._iconBin);
|
||||||
|
|
||||||
this._iconUpdatedId = this._source.connect('icon-updated', Lang.bind(this, this._updateIcon));
|
this._iconUpdatedId = this._source.connect('icon-updated', this._updateIcon.bind(this));
|
||||||
this._updateIcon();
|
this._updateIcon();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -665,7 +665,7 @@ var SourceActorWithLabel = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.add_actor(this._counterBin);
|
this.actor.add_actor(this._counterBin);
|
||||||
|
|
||||||
this._countUpdatedId = this._source.connect('count-updated', Lang.bind(this, this._updateCount));
|
this._countUpdatedId = this._source.connect('count-updated', this._updateCount.bind(this));
|
||||||
this._updateCount();
|
this._updateCount();
|
||||||
|
|
||||||
this.actor.connect('destroy', () => {
|
this.actor.connect('destroy', () => {
|
||||||
@ -789,8 +789,8 @@ var Source = new Lang.Class({
|
|||||||
while (this.notifications.length >= MAX_NOTIFICATIONS_PER_SOURCE)
|
while (this.notifications.length >= MAX_NOTIFICATIONS_PER_SOURCE)
|
||||||
this.notifications.shift().destroy(NotificationDestroyedReason.EXPIRED);
|
this.notifications.shift().destroy(NotificationDestroyedReason.EXPIRED);
|
||||||
|
|
||||||
notification.connect('destroy', Lang.bind(this, this._onNotificationDestroy));
|
notification.connect('destroy', this._onNotificationDestroy.bind(this));
|
||||||
notification.connect('acknowledged-changed', Lang.bind(this, this.countUpdated));
|
notification.connect('acknowledged-changed', this.countUpdated.bind(this));
|
||||||
this.notifications.push(notification);
|
this.notifications.push(notification);
|
||||||
this.emit('notification-added', notification);
|
this.emit('notification-added', notification);
|
||||||
|
|
||||||
@ -880,9 +880,9 @@ var MessageTray = new Lang.Class({
|
|||||||
x_expand: true,
|
x_expand: true,
|
||||||
layout_manager: new Clutter.BinLayout() });
|
layout_manager: new Clutter.BinLayout() });
|
||||||
this._bannerBin.connect('key-release-event',
|
this._bannerBin.connect('key-release-event',
|
||||||
Lang.bind(this, this._onNotificationKeyRelease));
|
this._onNotificationKeyRelease.bind(this));
|
||||||
this._bannerBin.connect('notify::hover',
|
this._bannerBin.connect('notify::hover',
|
||||||
Lang.bind(this, this._onNotificationHoverChanged));
|
this._onNotificationHoverChanged.bind(this));
|
||||||
this.actor.add_actor(this._bannerBin);
|
this.actor.add_actor(this._bannerBin);
|
||||||
|
|
||||||
this._notificationFocusGrabber = new FocusGrabber(this._bannerBin);
|
this._notificationFocusGrabber = new FocusGrabber(this._bannerBin);
|
||||||
@ -915,35 +915,35 @@ var MessageTray = new Lang.Class({
|
|||||||
Main.layoutManager.addChrome(this.actor, { affectsInputRegion: false });
|
Main.layoutManager.addChrome(this.actor, { affectsInputRegion: false });
|
||||||
Main.layoutManager.trackChrome(this._bannerBin, { affectsInputRegion: true });
|
Main.layoutManager.trackChrome(this._bannerBin, { affectsInputRegion: true });
|
||||||
|
|
||||||
global.screen.connect('in-fullscreen-changed', Lang.bind(this, this._updateState));
|
global.screen.connect('in-fullscreen-changed', this._updateState.bind(this));
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
|
|
||||||
Main.overview.connect('window-drag-begin',
|
Main.overview.connect('window-drag-begin',
|
||||||
Lang.bind(this, this._onDragBegin));
|
this._onDragBegin.bind(this));
|
||||||
Main.overview.connect('window-drag-cancelled',
|
Main.overview.connect('window-drag-cancelled',
|
||||||
Lang.bind(this, this._onDragEnd));
|
this._onDragEnd.bind(this));
|
||||||
Main.overview.connect('window-drag-end',
|
Main.overview.connect('window-drag-end',
|
||||||
Lang.bind(this, this._onDragEnd));
|
this._onDragEnd.bind(this));
|
||||||
|
|
||||||
Main.overview.connect('item-drag-begin',
|
Main.overview.connect('item-drag-begin',
|
||||||
Lang.bind(this, this._onDragBegin));
|
this._onDragBegin.bind(this));
|
||||||
Main.overview.connect('item-drag-cancelled',
|
Main.overview.connect('item-drag-cancelled',
|
||||||
Lang.bind(this, this._onDragEnd));
|
this._onDragEnd.bind(this));
|
||||||
Main.overview.connect('item-drag-end',
|
Main.overview.connect('item-drag-end',
|
||||||
Lang.bind(this, this._onDragEnd));
|
this._onDragEnd.bind(this));
|
||||||
|
|
||||||
Main.xdndHandler.connect('drag-begin',
|
Main.xdndHandler.connect('drag-begin',
|
||||||
Lang.bind(this, this._onDragBegin));
|
this._onDragBegin.bind(this));
|
||||||
Main.xdndHandler.connect('drag-end',
|
Main.xdndHandler.connect('drag-end',
|
||||||
Lang.bind(this, this._onDragEnd));
|
this._onDragEnd.bind(this));
|
||||||
|
|
||||||
Main.wm.addKeybinding('focus-active-notification',
|
Main.wm.addKeybinding('focus-active-notification',
|
||||||
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._expandActiveNotification));
|
this._expandActiveNotification.bind(this));
|
||||||
|
|
||||||
this._sources = new Map();
|
this._sources = new Map();
|
||||||
|
|
||||||
@ -1008,8 +1008,10 @@ var MessageTray = new Lang.Class({
|
|||||||
// Register that we got a notification for this source
|
// Register that we got a notification for this source
|
||||||
source.policy.store();
|
source.policy.store();
|
||||||
|
|
||||||
source.policy.connect('enable-changed', Lang.bind(this, this._onSourceEnableChanged, source));
|
source.policy.connect('enable-changed', () => {
|
||||||
source.policy.connect('policy-changed', Lang.bind(this, this._updateState));
|
this._onSourceEnableChanged(source.policy, source);
|
||||||
|
});
|
||||||
|
source.policy.connect('policy-changed', this._updateState.bind(this));
|
||||||
this._onSourceEnableChanged(source.policy, source);
|
this._onSourceEnableChanged(source.policy, source);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1022,8 +1024,8 @@ var MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
this._sources.set(source, obj);
|
this._sources.set(source, obj);
|
||||||
|
|
||||||
obj.notifyId = source.connect('notify', Lang.bind(this, this._onNotify));
|
obj.notifyId = source.connect('notify', this._onNotify.bind(this));
|
||||||
obj.destroyId = source.connect('destroy', Lang.bind(this, this._onSourceDestroy));
|
obj.destroyId = source.connect('destroy', this._onSourceDestroy.bind(this));
|
||||||
|
|
||||||
this.emit('source-added', source);
|
this.emit('source-added', source);
|
||||||
},
|
},
|
||||||
@ -1088,7 +1090,7 @@ var MessageTray = new Lang.Class({
|
|||||||
let full = (this.queueCount + bannerCount >= MAX_NOTIFICATIONS_IN_QUEUE);
|
let full = (this.queueCount + bannerCount >= MAX_NOTIFICATIONS_IN_QUEUE);
|
||||||
if (!full || notification.urgency == Urgency.CRITICAL) {
|
if (!full || notification.urgency == Urgency.CRITICAL) {
|
||||||
notification.connect('destroy',
|
notification.connect('destroy',
|
||||||
Lang.bind(this, this._onNotificationDestroy));
|
this._onNotificationDestroy.bind(this));
|
||||||
this._notificationQueue.push(notification);
|
this._notificationQueue.push(notification);
|
||||||
this._notificationQueue.sort(
|
this._notificationQueue.sort(
|
||||||
(n1, n2) => n2.urgency - n1.urgency
|
(n1, n2) => n2.urgency - n1.urgency
|
||||||
@ -1148,7 +1150,7 @@ var MessageTray = new Lang.Class({
|
|||||||
// We wait for a longer period if the notification popped up where the mouse pointer was already positioned.
|
// We wait for a longer period if the notification popped up where the mouse pointer was already positioned.
|
||||||
// That gives the user more time to mouse away from the notification and mouse back in in order to expand it.
|
// That gives the user more time to mouse away from the notification and mouse back in in order to expand it.
|
||||||
let timeout = this._useLongerNotificationLeftTimeout ? LONGER_HIDE_TIMEOUT * 1000 : HIDE_TIMEOUT * 1000;
|
let timeout = this._useLongerNotificationLeftTimeout ? LONGER_HIDE_TIMEOUT * 1000 : HIDE_TIMEOUT * 1000;
|
||||||
this._notificationLeftTimeoutId = Mainloop.timeout_add(timeout, Lang.bind(this, this._onNotificationLeftTimeout));
|
this._notificationLeftTimeoutId = Mainloop.timeout_add(timeout, this._onNotificationLeftTimeout.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
|
GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1178,7 +1180,7 @@ var MessageTray = new Lang.Class({
|
|||||||
x > this._notificationLeftMouseX - MOUSE_LEFT_ACTOR_THRESHOLD) {
|
x > this._notificationLeftMouseX - MOUSE_LEFT_ACTOR_THRESHOLD) {
|
||||||
this._notificationLeftMouseX = -1;
|
this._notificationLeftMouseX = -1;
|
||||||
this._notificationLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT * 1000,
|
this._notificationLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT * 1000,
|
||||||
Lang.bind(this, this._onNotificationLeftTimeout));
|
this._onNotificationLeftTimeout.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
|
GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
|
||||||
} else {
|
} else {
|
||||||
this._notificationLeftTimeoutId = 0;
|
this._notificationLeftTimeoutId = 0;
|
||||||
@ -1301,12 +1303,12 @@ var MessageTray = new Lang.Class({
|
|||||||
if (!this._userActiveWhileNotificationShown) {
|
if (!this._userActiveWhileNotificationShown) {
|
||||||
// If the user isn't active, set up a watch to let us know
|
// If the user isn't active, set up a watch to let us know
|
||||||
// when the user becomes active.
|
// when the user becomes active.
|
||||||
this.idleMonitor.add_user_active_watch(Lang.bind(this, this._onIdleMonitorBecameActive));
|
this.idleMonitor.add_user_active_watch(this._onIdleMonitorBecameActive.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
this._banner = this._notification.createBanner();
|
this._banner = this._notification.createBanner();
|
||||||
this._bannerClickedId = this._banner.connect('done-displaying',
|
this._bannerClickedId = this._banner.connect('done-displaying',
|
||||||
Lang.bind(this, this._escapeTray));
|
this._escapeTray.bind(this));
|
||||||
this._bannerUnfocusedId = this._banner.connect('unfocused', () => {
|
this._bannerUnfocusedId = this._banner.connect('unfocused', () => {
|
||||||
this._updateState();
|
this._updateState();
|
||||||
});
|
});
|
||||||
@ -1384,7 +1386,7 @@ var MessageTray = new Lang.Class({
|
|||||||
if (timeout > 0) {
|
if (timeout > 0) {
|
||||||
this._notificationTimeoutId =
|
this._notificationTimeoutId =
|
||||||
Mainloop.timeout_add(timeout,
|
Mainloop.timeout_add(timeout,
|
||||||
Lang.bind(this, this._notificationTimeout));
|
this._notificationTimeout.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._notificationTimeoutId, '[gnome-shell] this._notificationTimeout');
|
GLib.Source.set_name_by_id(this._notificationTimeoutId, '[gnome-shell] this._notificationTimeout');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -60,7 +60,7 @@ var ModalDialog = new Lang.Class({
|
|||||||
coordinate: Clutter.BindCoordinate.ALL });
|
coordinate: Clutter.BindCoordinate.ALL });
|
||||||
this._group.add_constraint(constraint);
|
this._group.add_constraint(constraint);
|
||||||
|
|
||||||
this._group.connect('destroy', Lang.bind(this, this._onGroupDestroy));
|
this._group.connect('destroy', this._onGroupDestroy.bind(this));
|
||||||
|
|
||||||
this.backgroundStack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
this.backgroundStack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||||
this._backgroundBin = new St.Bin({ child: this.backgroundStack,
|
this._backgroundBin = new St.Bin({ child: this.backgroundStack,
|
||||||
@ -194,8 +194,7 @@ var ModalDialog = new Lang.Class({
|
|||||||
{ opacity: 0,
|
{ opacity: 0,
|
||||||
time: OPEN_AND_CLOSE_TIME,
|
time: OPEN_AND_CLOSE_TIME,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
onComplete: Lang.bind(this,
|
onComplete: this._closeComplete.bind(this)
|
||||||
this._closeComplete)
|
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
this._closeComplete();
|
this._closeComplete();
|
||||||
|
@ -74,8 +74,8 @@ var MediaMessage = new Lang.Class({
|
|||||||
this._player.next();
|
this._player.next();
|
||||||
});
|
});
|
||||||
|
|
||||||
this._player.connect('changed', Lang.bind(this, this._update));
|
this._player.connect('changed', this._update.bind(this));
|
||||||
this._player.connect('closed', Lang.bind(this, this.close));
|
this._player.connect('closed', this.close.bind(this));
|
||||||
this._update();
|
this._update();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -117,10 +117,10 @@ var MprisPlayer = new Lang.Class({
|
|||||||
_init(busName) {
|
_init(busName) {
|
||||||
this._mprisProxy = new MprisProxy(Gio.DBus.session, busName,
|
this._mprisProxy = new MprisProxy(Gio.DBus.session, busName,
|
||||||
'/org/mpris/MediaPlayer2',
|
'/org/mpris/MediaPlayer2',
|
||||||
Lang.bind(this, this._onMprisProxyReady));
|
this._onMprisProxyReady.bind(this));
|
||||||
this._playerProxy = new MprisPlayerProxy(Gio.DBus.session, busName,
|
this._playerProxy = new MprisPlayerProxy(Gio.DBus.session, busName,
|
||||||
'/org/mpris/MediaPlayer2',
|
'/org/mpris/MediaPlayer2',
|
||||||
Lang.bind(this, this._onPlayerProxyReady));
|
this._onPlayerProxyReady.bind(this));
|
||||||
|
|
||||||
this._visible = false;
|
this._visible = false;
|
||||||
this._trackArtists = [];
|
this._trackArtists = [];
|
||||||
@ -199,7 +199,7 @@ var MprisPlayer = new Lang.Class({
|
|||||||
|
|
||||||
_onPlayerProxyReady() {
|
_onPlayerProxyReady() {
|
||||||
this._propsChangedId = this._playerProxy.connect('g-properties-changed',
|
this._propsChangedId = this._playerProxy.connect('g-properties-changed',
|
||||||
Lang.bind(this, this._updateState));
|
this._updateState.bind(this));
|
||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -238,7 +238,7 @@ var MediaSection = new Lang.Class({
|
|||||||
this._proxy = new DBusProxy(Gio.DBus.session,
|
this._proxy = new DBusProxy(Gio.DBus.session,
|
||||||
'org.freedesktop.DBus',
|
'org.freedesktop.DBus',
|
||||||
'/org/freedesktop/DBus',
|
'/org/freedesktop/DBus',
|
||||||
Lang.bind(this, this._onProxyReady));
|
this._onProxyReady.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_shouldShow() {
|
_shouldShow() {
|
||||||
@ -272,7 +272,7 @@ var MediaSection = new Lang.Class({
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
this._proxy.connectSignal('NameOwnerChanged',
|
this._proxy.connectSignal('NameOwnerChanged',
|
||||||
Lang.bind(this, this._onNameOwnerChanged));
|
this._onNameOwnerChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onNameOwnerChanged(proxy, sender, [name, oldOwner, newOwner]) {
|
_onNameOwnerChanged(proxy, sender, [name, oldOwner, newOwner]) {
|
||||||
|
@ -106,9 +106,9 @@ var FdoNotificationDaemon = new Lang.Class({
|
|||||||
this._nextNotificationId = 1;
|
this._nextNotificationId = 1;
|
||||||
|
|
||||||
Shell.WindowTracker.get_default().connect('notify::focus-app',
|
Shell.WindowTracker.get_default().connect('notify::focus-app',
|
||||||
Lang.bind(this, this._onFocusAppChanged));
|
this._onFocusAppChanged.bind(this));
|
||||||
Main.overview.connect('hidden',
|
Main.overview.connect('hidden',
|
||||||
Lang.bind(this, this._onFocusAppChanged));
|
this._onFocusAppChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_imageForNotificationData(hints) {
|
_imageForNotificationData(hints) {
|
||||||
@ -480,7 +480,7 @@ var FdoNotificationDaemonSource = new Lang.Class({
|
|||||||
this._nameWatcherId = Gio.DBus.session.watch_name(sender,
|
this._nameWatcherId = Gio.DBus.session.watch_name(sender,
|
||||||
Gio.BusNameWatcherFlags.NONE,
|
Gio.BusNameWatcherFlags.NONE,
|
||||||
null,
|
null,
|
||||||
Lang.bind(this, this._onNameVanished));
|
this._onNameVanished.bind(this));
|
||||||
else
|
else
|
||||||
this._nameWatcherId = 0;
|
this._nameWatcherId = 0;
|
||||||
},
|
},
|
||||||
@ -614,8 +614,9 @@ var GtkNotificationDaemonNotification = new Lang.Class({
|
|||||||
|
|
||||||
if (buttons) {
|
if (buttons) {
|
||||||
buttons.deep_unpack().forEach(button => {
|
buttons.deep_unpack().forEach(button => {
|
||||||
this.addAction(button.label.unpack(),
|
this.addAction(button.label.unpack(), () => {
|
||||||
Lang.bind(this, this._onButtonClicked, button));
|
this._onButtonClicked(button);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -811,7 +812,7 @@ var GtkNotificationDaemon = new Lang.Class({
|
|||||||
delete this._sources[appId];
|
delete this._sources[appId];
|
||||||
this._saveNotifications();
|
this._saveNotifications();
|
||||||
});
|
});
|
||||||
source.connect('count-updated', Lang.bind(this, this._saveNotifications));
|
source.connect('count-updated', this._saveNotifications.bind(this));
|
||||||
Main.messageTray.add(source);
|
Main.messageTray.add(source);
|
||||||
this._sources[appId] = source;
|
this._sources[appId] = source;
|
||||||
return source;
|
return source;
|
||||||
|
@ -62,7 +62,7 @@ var OsdMonitorLabeler = new Lang.Class({
|
|||||||
this._osdLabels = [];
|
this._osdLabels = [];
|
||||||
this._monitorLabels = null;
|
this._monitorLabels = null;
|
||||||
Main.layoutManager.connect('monitors-changed',
|
Main.layoutManager.connect('monitors-changed',
|
||||||
Lang.bind(this, this._reset));
|
this._reset.bind(this));
|
||||||
this._reset();
|
this._reset();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -109,10 +109,10 @@ var OsdWindow = new Lang.Class({
|
|||||||
this._reset();
|
this._reset();
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed',
|
Main.layoutManager.connect('monitors-changed',
|
||||||
Lang.bind(this, this._relayout));
|
this._relayout.bind(this));
|
||||||
let themeContext = St.ThemeContext.get_for_stage(global.stage);
|
let themeContext = St.ThemeContext.get_for_stage(global.stage);
|
||||||
themeContext.connect('notify::scale-factor',
|
themeContext.connect('notify::scale-factor',
|
||||||
Lang.bind(this, this._relayout));
|
this._relayout.bind(this));
|
||||||
this._relayout();
|
this._relayout();
|
||||||
Main.uiGroup.add_child(this.actor);
|
Main.uiGroup.add_child(this.actor);
|
||||||
},
|
},
|
||||||
@ -159,7 +159,7 @@ var OsdWindow = new Lang.Class({
|
|||||||
if (this._hideTimeoutId)
|
if (this._hideTimeoutId)
|
||||||
Mainloop.source_remove(this._hideTimeoutId);
|
Mainloop.source_remove(this._hideTimeoutId);
|
||||||
this._hideTimeoutId = Mainloop.timeout_add(HIDE_TIMEOUT,
|
this._hideTimeoutId = Mainloop.timeout_add(HIDE_TIMEOUT,
|
||||||
Lang.bind(this, this._hide));
|
this._hide.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._hideTimeoutId, '[gnome-shell] this._hide');
|
GLib.Source.set_name_by_id(this._hideTimeoutId, '[gnome-shell] this._hide');
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ var OsdWindowManager = new Lang.Class({
|
|||||||
_init() {
|
_init() {
|
||||||
this._osdWindows = [];
|
this._osdWindows = [];
|
||||||
Main.layoutManager.connect('monitors-changed',
|
Main.layoutManager.connect('monitors-changed',
|
||||||
Lang.bind(this, this._monitorsChanged));
|
this._monitorsChanged.bind(this));
|
||||||
this._monitorsChanged();
|
this._monitorsChanged();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ var ShellInfo = new Lang.Class({
|
|||||||
|
|
||||||
this._undoCallback = undoCallback;
|
this._undoCallback = undoCallback;
|
||||||
if (undoCallback)
|
if (undoCallback)
|
||||||
notification.addAction(_("Undo"), Lang.bind(this, this._onUndoClicked));
|
notification.addAction(_("Undo"), this._onUndoClicked.bind(this));
|
||||||
|
|
||||||
this._source.notify(notification);
|
this._source.notify(notification);
|
||||||
}
|
}
|
||||||
@ -93,7 +93,7 @@ var Overview = new Lang.Class({
|
|||||||
this._overviewCreated = false;
|
this._overviewCreated = false;
|
||||||
this._initCalled = false;
|
this._initCalled = false;
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -148,16 +148,16 @@ var Overview = new Lang.Class({
|
|||||||
|
|
||||||
// XDND
|
// XDND
|
||||||
this._dragMonitor = {
|
this._dragMonitor = {
|
||||||
dragMotion: Lang.bind(this, this._onDragMotion)
|
dragMotion: this._onDragMotion.bind(this)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Main.layoutManager.overviewGroup.connect('scroll-event',
|
Main.layoutManager.overviewGroup.connect('scroll-event',
|
||||||
Lang.bind(this, this._onScrollEvent));
|
this._onScrollEvent.bind(this));
|
||||||
Main.xdndHandler.connect('drag-begin', Lang.bind(this, this._onDragBegin));
|
Main.xdndHandler.connect('drag-begin', this._onDragBegin.bind(this));
|
||||||
Main.xdndHandler.connect('drag-end', Lang.bind(this, this._onDragEnd));
|
Main.xdndHandler.connect('drag-end', this._onDragEnd.bind(this));
|
||||||
|
|
||||||
global.screen.connect('restacked', Lang.bind(this, this._onRestacked));
|
global.screen.connect('restacked', this._onRestacked.bind(this));
|
||||||
|
|
||||||
this._windowSwitchTimeoutId = 0;
|
this._windowSwitchTimeoutId = 0;
|
||||||
this._windowSwitchTimestamp = 0;
|
this._windowSwitchTimestamp = 0;
|
||||||
@ -257,7 +257,7 @@ var Overview = new Lang.Class({
|
|||||||
this.dashIconSize = this._dash.iconSize;
|
this.dashIconSize = this._dash.iconSize;
|
||||||
});
|
});
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
|
Main.layoutManager.connect('monitors-changed', this._relayout.bind(this));
|
||||||
this._relayout();
|
this._relayout();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -119,15 +119,15 @@ var SlidingControl = new Lang.Class({
|
|||||||
style_class: 'overview-controls',
|
style_class: 'overview-controls',
|
||||||
clip_to_allocation: true });
|
clip_to_allocation: true });
|
||||||
|
|
||||||
Main.overview.connect('hiding', Lang.bind(this, this._onOverviewHiding));
|
Main.overview.connect('hiding', this._onOverviewHiding.bind(this));
|
||||||
|
|
||||||
Main.overview.connect('item-drag-begin', Lang.bind(this, this._onDragBegin));
|
Main.overview.connect('item-drag-begin', this._onDragBegin.bind(this));
|
||||||
Main.overview.connect('item-drag-end', Lang.bind(this, this._onDragEnd));
|
Main.overview.connect('item-drag-end', this._onDragEnd.bind(this));
|
||||||
Main.overview.connect('item-drag-cancelled', Lang.bind(this, this._onDragEnd));
|
Main.overview.connect('item-drag-cancelled', this._onDragEnd.bind(this));
|
||||||
|
|
||||||
Main.overview.connect('window-drag-begin', Lang.bind(this, this._onWindowDragBegin));
|
Main.overview.connect('window-drag-begin', this._onWindowDragBegin.bind(this));
|
||||||
Main.overview.connect('window-drag-cancelled', Lang.bind(this, this._onWindowDragEnd));
|
Main.overview.connect('window-drag-cancelled', this._onWindowDragEnd.bind(this));
|
||||||
Main.overview.connect('window-drag-end', Lang.bind(this, this._onWindowDragEnd));
|
Main.overview.connect('window-drag-end', this._onWindowDragEnd.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getSlide() {
|
_getSlide() {
|
||||||
@ -252,8 +252,8 @@ var ThumbnailsSlider = new Lang.Class({
|
|||||||
this.actor.track_hover = true;
|
this.actor.track_hover = true;
|
||||||
this.actor.add_actor(this._thumbnailsBox.actor);
|
this.actor.add_actor(this._thumbnailsBox.actor);
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._updateSlide));
|
Main.layoutManager.connect('monitors-changed', this._updateSlide.bind(this));
|
||||||
this.actor.connect('notify::hover', Lang.bind(this, this._updateSlide));
|
this.actor.connect('notify::hover', this._updateSlide.bind(this));
|
||||||
this._thumbnailsBox.actor.bind_property('visible', this.actor, 'visible', GObject.BindingFlags.SYNC_CREATE);
|
this._thumbnailsBox.actor.bind_property('visible', this.actor, 'visible', GObject.BindingFlags.SYNC_CREATE);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -328,7 +328,7 @@ var DashSlider = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.add_actor(this._dash.actor);
|
this.actor.add_actor(this._dash.actor);
|
||||||
|
|
||||||
this._dash.connect('icon-size-changed', Lang.bind(this, this._updateSlide));
|
this._dash.connect('icon-size-changed', this._updateSlide.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getSlide() {
|
_getSlide() {
|
||||||
@ -410,8 +410,8 @@ var ControlsManager = new Lang.Class({
|
|||||||
|
|
||||||
this.viewSelector = new ViewSelector.ViewSelector(searchEntry,
|
this.viewSelector = new ViewSelector.ViewSelector(searchEntry,
|
||||||
this.dash.showAppsButton);
|
this.dash.showAppsButton);
|
||||||
this.viewSelector.connect('page-changed', Lang.bind(this, this._setVisibility));
|
this.viewSelector.connect('page-changed', this._setVisibility.bind(this));
|
||||||
this.viewSelector.connect('page-empty', Lang.bind(this, this._onPageEmpty));
|
this.viewSelector.connect('page-empty', this._onPageEmpty.bind(this));
|
||||||
|
|
||||||
let layout = new ControlsLayout();
|
let layout = new ControlsLayout();
|
||||||
this.actor = new St.Widget({ layout_manager: layout,
|
this.actor = new St.Widget({ layout_manager: layout,
|
||||||
@ -428,9 +428,9 @@ var ControlsManager = new Lang.Class({
|
|||||||
expand: true });
|
expand: true });
|
||||||
this._group.add_actor(this._thumbnailsSlider.actor);
|
this._group.add_actor(this._thumbnailsSlider.actor);
|
||||||
|
|
||||||
layout.connect('allocation-changed', Lang.bind(this, this._updateWorkspacesGeometry));
|
layout.connect('allocation-changed', this._updateWorkspacesGeometry.bind(this));
|
||||||
|
|
||||||
Main.overview.connect('showing', Lang.bind(this, this._updateSpacerVisibility));
|
Main.overview.connect('showing', this._updateSpacerVisibility.bind(this));
|
||||||
Main.overview.connect('item-drag-begin', () => {
|
Main.overview.connect('item-drag-begin', () => {
|
||||||
let activePage = this.viewSelector.getActivePage();
|
let activePage = this.viewSelector.getActivePage();
|
||||||
if (activePage != ViewSelector.ViewPage.WINDOWS)
|
if (activePage != ViewSelector.ViewPage.WINDOWS)
|
||||||
|
@ -49,7 +49,7 @@ var PadChooser = new Lang.Class({
|
|||||||
this.actor.set_child(arrow);
|
this.actor.set_child(arrow);
|
||||||
this._ensureMenu(groupDevices);
|
this._ensureMenu(groupDevices);
|
||||||
|
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
this.actor.connect('clicked', actor => {
|
this.actor.connect('clicked', actor => {
|
||||||
if (actor.get_checked()) {
|
if (actor.get_checked()) {
|
||||||
if (this._padChooserMenu != null)
|
if (this._padChooserMenu != null)
|
||||||
@ -104,7 +104,7 @@ var KeybindingEntry = new Lang.Class({
|
|||||||
_init() {
|
_init() {
|
||||||
this.actor = new St.Entry({ hint_text: _("New shortcut…"),
|
this.actor = new St.Entry({ hint_text: _("New shortcut…"),
|
||||||
style: 'width: 10em' });
|
style: 'width: 10em' });
|
||||||
this.actor.connect('captured-event', Lang.bind(this, this._onCapturedEvent));
|
this.actor.connect('captured-event', this._onCapturedEvent.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onCapturedEvent(actor, event) {
|
_onCapturedEvent(actor, event) {
|
||||||
@ -127,7 +127,7 @@ var ActionComboBox = new Lang.Class({
|
|||||||
|
|
||||||
_init() {
|
_init() {
|
||||||
this.actor = new St.Button({ style_class: 'button' });
|
this.actor = new St.Button({ style_class: 'button' });
|
||||||
this.actor.connect('clicked', Lang.bind(this, this._onButtonClicked));
|
this.actor.connect('clicked', this._onButtonClicked.bind(this));
|
||||||
this.actor.set_toggle_mode(true);
|
this.actor.set_toggle_mode(true);
|
||||||
|
|
||||||
let boxLayout = new Clutter.BoxLayout({ orientation: Clutter.Orientation.HORIZONTAL,
|
let boxLayout = new Clutter.BoxLayout({ orientation: Clutter.Orientation.HORIZONTAL,
|
||||||
@ -216,17 +216,17 @@ var ActionEditor = new Lang.Class({
|
|||||||
this.actor = new St.Widget({ layout_manager: boxLayout });
|
this.actor = new St.Widget({ layout_manager: boxLayout });
|
||||||
|
|
||||||
this._actionComboBox = new ActionComboBox();
|
this._actionComboBox = new ActionComboBox();
|
||||||
this._actionComboBox.connect('action-selected', Lang.bind(this, this._onActionSelected));
|
this._actionComboBox.connect('action-selected', this._onActionSelected.bind(this));
|
||||||
this.actor.add_actor(this._actionComboBox.actor);
|
this.actor.add_actor(this._actionComboBox.actor);
|
||||||
|
|
||||||
this._keybindingEdit = new KeybindingEntry();
|
this._keybindingEdit = new KeybindingEntry();
|
||||||
this._keybindingEdit.connect('keybinding-edited', Lang.bind(this, this._onKeybindingEdited));
|
this._keybindingEdit.connect('keybinding-edited', this._onKeybindingEdited.bind(this));
|
||||||
this.actor.add_actor(this._keybindingEdit.actor);
|
this.actor.add_actor(this._keybindingEdit.actor);
|
||||||
|
|
||||||
this._doneButton = new St.Button({ label: _("Done"),
|
this._doneButton = new St.Button({ label: _("Done"),
|
||||||
style_class: 'button',
|
style_class: 'button',
|
||||||
x_expand: false});
|
x_expand: false});
|
||||||
this._doneButton.connect('clicked', Lang.bind(this, this._onEditingDone));
|
this._doneButton.connect('clicked', this._onEditingDone.bind(this));
|
||||||
this.actor.add_actor(this._doneButton);
|
this.actor.add_actor(this._doneButton);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -634,7 +634,7 @@ var PadOsd = new Lang.Class({
|
|||||||
this._settings = settings;
|
this._settings = settings;
|
||||||
this._imagePath = imagePath;
|
this._imagePath = imagePath;
|
||||||
this._editionMode = editionMode;
|
this._editionMode = editionMode;
|
||||||
this._capturedEventId = global.stage.connect('captured-event', Lang.bind(this, this._onCapturedEvent));
|
this._capturedEventId = global.stage.connect('captured-event', this._onCapturedEvent.bind(this));
|
||||||
this._padChooser = null;
|
this._padChooser = null;
|
||||||
|
|
||||||
let deviceManager = Clutter.DeviceManager.get_default();
|
let deviceManager = Clutter.DeviceManager.get_default();
|
||||||
@ -670,7 +670,7 @@ var PadOsd = new Lang.Class({
|
|||||||
y_expand: true,
|
y_expand: true,
|
||||||
vertical: true,
|
vertical: true,
|
||||||
reactive: true });
|
reactive: true });
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
Main.uiGroup.add_actor(this.actor);
|
Main.uiGroup.add_actor(this.actor);
|
||||||
|
|
||||||
this._monitorIndex = monitorIndex;
|
this._monitorIndex = monitorIndex;
|
||||||
@ -698,7 +698,7 @@ var PadOsd = new Lang.Class({
|
|||||||
this._updatePadChooser();
|
this._updatePadChooser();
|
||||||
|
|
||||||
this._actionEditor = new ActionEditor();
|
this._actionEditor = new ActionEditor();
|
||||||
this._actionEditor.connect('done', Lang.bind(this, this._endActionEdition));
|
this._actionEditor.connect('done', this._endActionEdition.bind(this));
|
||||||
|
|
||||||
this._padDiagram = new PadDiagram({ image: this._imagePath,
|
this._padDiagram = new PadDiagram({ image: this._imagePath,
|
||||||
left_handed: settings.get_boolean('left-handed'),
|
left_handed: settings.get_boolean('left-handed'),
|
||||||
|
@ -102,7 +102,7 @@ var AppMenuButton = new Lang.Class({
|
|||||||
this._busyNotifyId = 0;
|
this._busyNotifyId = 0;
|
||||||
|
|
||||||
let bin = new St.Bin({ name: 'appMenu' });
|
let bin = new St.Bin({ name: 'appMenu' });
|
||||||
bin.connect('style-changed', Lang.bind(this, this._onStyleChanged));
|
bin.connect('style-changed', this._onStyleChanged.bind(this));
|
||||||
this.actor.add_actor(bin);
|
this.actor.add_actor(bin);
|
||||||
|
|
||||||
this.actor.bind_property("reactive", this.actor, "can-focus", 0);
|
this.actor.bind_property("reactive", this.actor, "can-focus", 0);
|
||||||
@ -113,7 +113,7 @@ var AppMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
let textureCache = St.TextureCache.get_default();
|
let textureCache = St.TextureCache.get_default();
|
||||||
textureCache.connect('icon-theme-changed',
|
textureCache.connect('icon-theme-changed',
|
||||||
Lang.bind(this, this._onIconThemeChanged));
|
this._onIconThemeChanged.bind(this));
|
||||||
|
|
||||||
this._iconBox = new St.Bin({ style_class: 'app-menu-icon' });
|
this._iconBox = new St.Bin({ style_class: 'app-menu-icon' });
|
||||||
this._container.add_actor(this._iconBox);
|
this._container.add_actor(this._iconBox);
|
||||||
@ -128,10 +128,10 @@ var AppMenuButton = new Lang.Class({
|
|||||||
!Main.overview.visible;
|
!Main.overview.visible;
|
||||||
if (!this._visible)
|
if (!this._visible)
|
||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
this._overviewHidingId = Main.overview.connect('hiding', Lang.bind(this, this._sync));
|
this._overviewHidingId = Main.overview.connect('hiding', this._sync.bind(this));
|
||||||
this._overviewShowingId = Main.overview.connect('showing', Lang.bind(this, this._sync));
|
this._overviewShowingId = Main.overview.connect('showing', this._sync.bind(this));
|
||||||
this._showsAppMenuId = this._gtkSettings.connect('notify::gtk-shell-shows-app-menu',
|
this._showsAppMenuId = this._gtkSettings.connect('notify::gtk-shell-shows-app-menu',
|
||||||
Lang.bind(this, this._sync));
|
this._sync.bind(this));
|
||||||
|
|
||||||
this._stop = true;
|
this._stop = true;
|
||||||
|
|
||||||
@ -140,11 +140,11 @@ var AppMenuButton = new Lang.Class({
|
|||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
let appSys = Shell.AppSystem.get_default();
|
let appSys = Shell.AppSystem.get_default();
|
||||||
this._focusAppNotifyId =
|
this._focusAppNotifyId =
|
||||||
tracker.connect('notify::focus-app', Lang.bind(this, this._focusAppChanged));
|
tracker.connect('notify::focus-app', this._focusAppChanged.bind(this));
|
||||||
this._appStateChangedSignalId =
|
this._appStateChangedSignalId =
|
||||||
appSys.connect('app-state-changed', Lang.bind(this, this._onAppStateChanged));
|
appSys.connect('app-state-changed', this._onAppStateChanged.bind(this));
|
||||||
this._switchWorkspaceNotifyId =
|
this._switchWorkspaceNotifyId =
|
||||||
global.window_manager.connect('switch-workspace', Lang.bind(this, this._sync));
|
global.window_manager.connect('switch-workspace', this._sync.bind(this));
|
||||||
|
|
||||||
this._sync();
|
this._sync();
|
||||||
},
|
},
|
||||||
@ -298,9 +298,9 @@ var AppMenuButton = new Lang.Class({
|
|||||||
this._targetApp = targetApp;
|
this._targetApp = targetApp;
|
||||||
|
|
||||||
if (this._targetApp) {
|
if (this._targetApp) {
|
||||||
this._appMenuNotifyId = this._targetApp.connect('notify::menu', Lang.bind(this, this._sync));
|
this._appMenuNotifyId = this._targetApp.connect('notify::menu', this._sync.bind(this));
|
||||||
this._actionGroupNotifyId = this._targetApp.connect('notify::action-group', Lang.bind(this, this._sync));
|
this._actionGroupNotifyId = this._targetApp.connect('notify::action-group', this._sync.bind(this));
|
||||||
this._busyNotifyId = this._targetApp.connect('notify::busy', Lang.bind(this, this._sync));
|
this._busyNotifyId = this._targetApp.connect('notify::busy', this._sync.bind(this));
|
||||||
this._label.set_text(this._targetApp.get_name());
|
this._label.set_text(this._targetApp.get_name());
|
||||||
this.actor.set_accessible_name(this._targetApp.get_name());
|
this.actor.set_accessible_name(this._targetApp.get_name());
|
||||||
}
|
}
|
||||||
@ -414,8 +414,8 @@ var ActivitiesButton = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.label_actor = this._label;
|
this.actor.label_actor = this._label;
|
||||||
|
|
||||||
this.actor.connect('captured-event', Lang.bind(this, this._onCapturedEvent));
|
this.actor.connect('captured-event', this._onCapturedEvent.bind(this));
|
||||||
this.actor.connect_after('key-release-event', Lang.bind(this, this._onKeyRelease));
|
this.actor.connect_after('key-release-event', this._onKeyRelease.bind(this));
|
||||||
|
|
||||||
Main.overview.connect('showing', () => {
|
Main.overview.connect('showing', () => {
|
||||||
this.actor.add_style_pseudo_class('overview');
|
this.actor.add_style_pseudo_class('overview');
|
||||||
@ -435,8 +435,9 @@ var ActivitiesButton = new Lang.Class({
|
|||||||
|
|
||||||
if (this._xdndTimeOut != 0)
|
if (this._xdndTimeOut != 0)
|
||||||
Mainloop.source_remove(this._xdndTimeOut);
|
Mainloop.source_remove(this._xdndTimeOut);
|
||||||
this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT,
|
this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT, () => {
|
||||||
Lang.bind(this, this._xdndToggleOverview, actor));
|
this._xdndToggleOverview(actor);
|
||||||
|
});
|
||||||
GLib.Source.set_name_by_id(this._xdndTimeOut, '[gnome-shell] this._xdndToggleOverview');
|
GLib.Source.set_name_by_id(this._xdndTimeOut, '[gnome-shell] this._xdndToggleOverview');
|
||||||
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
@ -491,8 +492,8 @@ var PanelCorner = new Lang.Class({
|
|||||||
this._side = side;
|
this._side = side;
|
||||||
|
|
||||||
this.actor = new St.DrawingArea({ style_class: 'panel-corner' });
|
this.actor = new St.DrawingArea({ style_class: 'panel-corner' });
|
||||||
this.actor.connect('style-changed', Lang.bind(this, this._styleChanged));
|
this.actor.connect('style-changed', this._styleChanged.bind(this));
|
||||||
this.actor.connect('repaint', Lang.bind(this, this._repaint));
|
this.actor.connect('repaint', this._repaint.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_findRightmostButton(container) {
|
_findRightmostButton(container) {
|
||||||
@ -791,11 +792,11 @@ var Panel = new Lang.Class({
|
|||||||
this._rightCorner = new PanelCorner(St.Side.RIGHT);
|
this._rightCorner = new PanelCorner(St.Side.RIGHT);
|
||||||
this.actor.add_actor(this._rightCorner.actor);
|
this.actor.add_actor(this._rightCorner.actor);
|
||||||
|
|
||||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this.actor.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
this.actor.connect('allocate', this._allocate.bind(this));
|
||||||
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
|
this.actor.connect('button-press-event', this._onButtonPress.bind(this));
|
||||||
this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPress));
|
this.actor.connect('key-press-event', this._onKeyPress.bind(this));
|
||||||
|
|
||||||
Main.overview.connect('showing', () => {
|
Main.overview.connect('showing', () => {
|
||||||
this.actor.add_style_pseudo_class('overview');
|
this.actor.add_style_pseudo_class('overview');
|
||||||
@ -810,12 +811,12 @@ var Panel = new Lang.Class({
|
|||||||
Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'focus-top-bar-symbolic',
|
Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'focus-top-bar-symbolic',
|
||||||
{ sortGroup: CtrlAltTab.SortGroup.TOP });
|
{ sortGroup: CtrlAltTab.SortGroup.TOP });
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._updatePanel));
|
Main.sessionMode.connect('updated', this._updatePanel.bind(this));
|
||||||
|
|
||||||
this._trackedWindows = new Map();
|
this._trackedWindows = new Map();
|
||||||
global.window_group.connect('actor-added', Lang.bind(this, this._onWindowActorAdded));
|
global.window_group.connect('actor-added', this._onWindowActorAdded.bind(this));
|
||||||
global.window_group.connect('actor-removed', Lang.bind(this, this._onWindowActorRemoved));
|
global.window_group.connect('actor-removed', this._onWindowActorRemoved.bind(this));
|
||||||
global.window_manager.connect('switch-workspace', Lang.bind(this, this._updateSolidStyle));
|
global.window_manager.connect('switch-workspace', this._updateSolidStyle.bind(this));
|
||||||
|
|
||||||
global.screen.connect('workareas-changed', () => { this.actor.queue_relayout(); });
|
global.screen.connect('workareas-changed', () => { this.actor.queue_relayout(); });
|
||||||
this._updatePanel();
|
this._updatePanel();
|
||||||
@ -824,7 +825,7 @@ var Panel = new Lang.Class({
|
|||||||
_onWindowActorAdded(container, metaWindowActor) {
|
_onWindowActorAdded(container, metaWindowActor) {
|
||||||
let signalIds = [];
|
let signalIds = [];
|
||||||
['allocation-changed', 'notify::visible'].forEach(s => {
|
['allocation-changed', 'notify::visible'].forEach(s => {
|
||||||
signalIds.push(metaWindowActor.connect(s, Lang.bind(this, this._updateSolidStyle)));
|
signalIds.push(metaWindowActor.connect(s, this._updateSolidStyle.bind(this)));
|
||||||
});
|
});
|
||||||
this._trackedWindows.set(metaWindowActor, signalIds);
|
this._trackedWindows.set(metaWindowActor, signalIds);
|
||||||
},
|
},
|
||||||
@ -1151,7 +1152,7 @@ var Panel = new Lang.Class({
|
|||||||
emitter.disconnect(destroyId);
|
emitter.disconnect(destroyId);
|
||||||
container.destroy();
|
container.destroy();
|
||||||
});
|
});
|
||||||
indicator.connect('menu-set', Lang.bind(this, this._onMenuSet));
|
indicator.connect('menu-set', this._onMenuSet.bind(this));
|
||||||
this._onMenuSet(indicator);
|
this._onMenuSet(indicator);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -25,11 +25,11 @@ var ButtonBox = new Lang.Class({
|
|||||||
x_fill: true,
|
x_fill: true,
|
||||||
child: this.actor });
|
child: this.actor });
|
||||||
|
|
||||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this.actor.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
this.actor.connect('allocate', this._allocate.bind(this));
|
||||||
|
|
||||||
this.actor.connect('style-changed', Lang.bind(this, this._onStyleChanged));
|
this.actor.connect('style-changed', this._onStyleChanged.bind(this));
|
||||||
this._minHPadding = this._natHPadding = 0.0;
|
this._minHPadding = this._natHPadding = 0.0;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -100,8 +100,8 @@ var Button = new Lang.Class({
|
|||||||
accessible_name: nameText ? nameText : "",
|
accessible_name: nameText ? nameText : "",
|
||||||
accessible_role: Atk.Role.MENU });
|
accessible_role: Atk.Role.MENU });
|
||||||
|
|
||||||
this.actor.connect('event', Lang.bind(this, this._onEvent));
|
this.actor.connect('event', this._onEvent.bind(this));
|
||||||
this.actor.connect('notify::visible', Lang.bind(this, this._onVisibilityChanged));
|
this.actor.connect('notify::visible', this._onVisibilityChanged.bind(this));
|
||||||
|
|
||||||
if (dontCreateMenu)
|
if (dontCreateMenu)
|
||||||
this.menu = new PopupMenu.PopupDummyMenu(this.actor);
|
this.menu = new PopupMenu.PopupDummyMenu(this.actor);
|
||||||
@ -122,8 +122,8 @@ var Button = new Lang.Class({
|
|||||||
this.menu = menu;
|
this.menu = menu;
|
||||||
if (this.menu) {
|
if (this.menu) {
|
||||||
this.menu.actor.add_style_class_name('panel-menu');
|
this.menu.actor.add_style_class_name('panel-menu');
|
||||||
this.menu.connect('open-state-changed', Lang.bind(this, this._onOpenStateChanged));
|
this.menu.connect('open-state-changed', this._onOpenStateChanged.bind(this));
|
||||||
this.menu.actor.connect('key-press-event', Lang.bind(this, this._onMenuKeyPress));
|
this.menu.actor.connect('key-press-event', this._onMenuKeyPress.bind(this));
|
||||||
|
|
||||||
Main.uiGroup.add_actor(this.menu.actor);
|
Main.uiGroup.add_actor(this.menu.actor);
|
||||||
this.menu.actor.hide();
|
this.menu.actor.hide();
|
||||||
@ -220,7 +220,7 @@ var SystemIndicator = new Lang.Class({
|
|||||||
_addIndicator() {
|
_addIndicator() {
|
||||||
let icon = new St.Icon({ style_class: 'system-status-icon' });
|
let icon = new St.Icon({ style_class: 'system-status-icon' });
|
||||||
this.indicators.add_actor(icon);
|
this.indicators.add_actor(icon);
|
||||||
icon.connect('notify::visible', Lang.bind(this, this._syncIndicatorsVisible));
|
icon.connect('notify::visible', this._syncIndicatorsVisible.bind(this));
|
||||||
this._syncIndicatorsVisible();
|
this._syncIndicatorsVisible();
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ var PointerWatcher = new Lang.Class({
|
|||||||
|
|
||||||
_init() {
|
_init() {
|
||||||
this._idleMonitor = Meta.IdleMonitor.get_core();
|
this._idleMonitor = Meta.IdleMonitor.get_core();
|
||||||
this._idleMonitor.add_idle_watch(IDLE_TIME, Lang.bind(this, this._onIdleMonitorBecameIdle));
|
this._idleMonitor.add_idle_watch(IDLE_TIME, this._onIdleMonitorBecameIdle.bind(this));
|
||||||
this._idle = this._idleMonitor.get_idletime() > IDLE_TIME;
|
this._idle = this._idleMonitor.get_idletime() > IDLE_TIME;
|
||||||
this._watches = [];
|
this._watches = [];
|
||||||
this.pointerX = null;
|
this.pointerX = null;
|
||||||
@ -88,7 +88,7 @@ var PointerWatcher = new Lang.Class({
|
|||||||
|
|
||||||
_onIdleMonitorBecameIdle(monitor) {
|
_onIdleMonitorBecameIdle(monitor) {
|
||||||
this._idle = true;
|
this._idle = true;
|
||||||
this._idleMonitor.add_user_active_watch(Lang.bind(this, this._onIdleMonitorBecameActive));
|
this._idleMonitor.add_user_active_watch(this._onIdleMonitorBecameActive.bind(this));
|
||||||
this._updateTimeout();
|
this._updateTimeout();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ var PointerWatcher = new Lang.Class({
|
|||||||
minInterval = Math.min(this._watches[i].interval, minInterval);
|
minInterval = Math.min(this._watches[i].interval, minInterval);
|
||||||
|
|
||||||
this._timeoutId = Mainloop.timeout_add(minInterval,
|
this._timeoutId = Mainloop.timeout_add(minInterval,
|
||||||
Lang.bind(this, this._onTimeout));
|
this._onTimeout.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._onTimeout');
|
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._onTimeout');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -92,17 +92,17 @@ var PopupBaseMenuItem = new Lang.Class({
|
|||||||
this.actor.add_style_class_name(params.style_class);
|
this.actor.add_style_class_name(params.style_class);
|
||||||
|
|
||||||
if (this._activatable) {
|
if (this._activatable) {
|
||||||
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPressEvent));
|
this.actor.connect('button-press-event', this._onButtonPressEvent.bind(this));
|
||||||
this.actor.connect('button-release-event', Lang.bind(this, this._onButtonReleaseEvent));
|
this.actor.connect('button-release-event', this._onButtonReleaseEvent.bind(this));
|
||||||
this.actor.connect('touch-event', Lang.bind(this, this._onTouchEvent));
|
this.actor.connect('touch-event', this._onTouchEvent.bind(this));
|
||||||
this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
|
this.actor.connect('key-press-event', this._onKeyPressEvent.bind(this));
|
||||||
}
|
}
|
||||||
if (params.reactive && params.hover)
|
if (params.reactive && params.hover)
|
||||||
this.actor.connect('notify::hover', Lang.bind(this, this._onHoverChanged));
|
this.actor.connect('notify::hover', this._onHoverChanged.bind(this));
|
||||||
|
|
||||||
this.actor.connect('key-focus-in', Lang.bind(this, this._onKeyFocusIn));
|
this.actor.connect('key-focus-in', this._onKeyFocusIn.bind(this));
|
||||||
this.actor.connect('key-focus-out', Lang.bind(this, this._onKeyFocusOut));
|
this.actor.connect('key-focus-out', this._onKeyFocusOut.bind(this));
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getTopMenu() {
|
_getTopMenu() {
|
||||||
@ -262,7 +262,7 @@ var PopupSeparatorMenuItem = new Lang.Class({
|
|||||||
this.actor.label_actor = this.label;
|
this.actor.label_actor = this.label;
|
||||||
|
|
||||||
this.label.connect('notify::text',
|
this.label.connect('notify::text',
|
||||||
Lang.bind(this, this._syncVisibility));
|
this._syncVisibility.bind(this));
|
||||||
this._syncVisibility();
|
this._syncVisibility();
|
||||||
|
|
||||||
this._separator = new St.Widget({ style_class: 'popup-separator-menu-item',
|
this._separator = new St.Widget({ style_class: 'popup-separator-menu-item',
|
||||||
@ -439,7 +439,7 @@ var PopupMenuBase = new Lang.Class({
|
|||||||
|
|
||||||
this._sensitive = true;
|
this._sensitive = true;
|
||||||
|
|
||||||
this._sessionUpdatedId = Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
this._sessionUpdatedId = Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getTopMenu() {
|
_getTopMenu() {
|
||||||
@ -650,7 +650,7 @@ var PopupMenuBase = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (menuItem instanceof PopupMenuSection) {
|
if (menuItem instanceof PopupMenuSection) {
|
||||||
let activeChangeId = menuItem.connect('active-changed', Lang.bind(this, this._subMenuActiveChanged));
|
let activeChangeId = menuItem.connect('active-changed', this._subMenuActiveChanged.bind(this));
|
||||||
|
|
||||||
let parentOpenStateChangedId = this.connect('open-state-changed', (self, open) => {
|
let parentOpenStateChangedId = this.connect('open-state-changed', (self, open) => {
|
||||||
if (open)
|
if (open)
|
||||||
@ -679,7 +679,7 @@ var PopupMenuBase = new Lang.Class({
|
|||||||
this.box.insert_child_below(menuItem.menu.actor, before_item);
|
this.box.insert_child_below(menuItem.menu.actor, before_item);
|
||||||
|
|
||||||
this._connectItemSignals(menuItem);
|
this._connectItemSignals(menuItem);
|
||||||
let subMenuActiveChangeId = menuItem.menu.connect('active-changed', Lang.bind(this, this._subMenuActiveChanged));
|
let subMenuActiveChangeId = menuItem.menu.connect('active-changed', this._subMenuActiveChanged.bind(this));
|
||||||
let closingId = this.connect('menu-closed', () => {
|
let closingId = this.connect('menu-closed', () => {
|
||||||
menuItem.menu.close(BoxPointer.PopupAnimation.NONE);
|
menuItem.menu.close(BoxPointer.PopupAnimation.NONE);
|
||||||
});
|
});
|
||||||
@ -784,7 +784,7 @@ var PopupMenu = new Lang.Class({
|
|||||||
|
|
||||||
if (this.sourceActor)
|
if (this.sourceActor)
|
||||||
this._keyPressId = this.sourceActor.connect('key-press-event',
|
this._keyPressId = this.sourceActor.connect('key-press-event',
|
||||||
Lang.bind(this, this._onKeyPress));
|
this._onKeyPress.bind(this));
|
||||||
|
|
||||||
this._openedSubMenu = null;
|
this._openedSubMenu = null;
|
||||||
},
|
},
|
||||||
@ -935,7 +935,7 @@ var PopupSubMenu = new Lang.Class({
|
|||||||
this.actor.add_actor(this.box);
|
this.actor.add_actor(this.box);
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
this.actor.clip_to_allocation = true;
|
this.actor.clip_to_allocation = true;
|
||||||
this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
|
this.actor.connect('key-press-event', this._onKeyPressEvent.bind(this));
|
||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1116,7 +1116,7 @@ var PopupSubMenuMenuItem = new Lang.Class({
|
|||||||
this.actor.add_accessible_state (Atk.StateType.EXPANDABLE);
|
this.actor.add_accessible_state (Atk.StateType.EXPANDABLE);
|
||||||
|
|
||||||
this.menu = new PopupSubMenu(this.actor, this._triangle);
|
this.menu = new PopupSubMenu(this.actor, this._triangle);
|
||||||
this.menu.connect('open-state-changed', Lang.bind(this, this._subMenuOpenStateChanged));
|
this.menu.connect('open-state-changed', this._subMenuOpenStateChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_setParent(parent) {
|
_setParent(parent) {
|
||||||
@ -1224,8 +1224,8 @@ var PopupMenuManager = new Lang.Class({
|
|||||||
|
|
||||||
let menudata = {
|
let menudata = {
|
||||||
menu: menu,
|
menu: menu,
|
||||||
openStateChangeId: menu.connect('open-state-changed', Lang.bind(this, this._onMenuOpenState)),
|
openStateChangeId: menu.connect('open-state-changed', this._onMenuOpenState.bind(this)),
|
||||||
destroyId: menu.connect('destroy', Lang.bind(this, this._onMenuDestroy)),
|
destroyId: menu.connect('destroy', this._onMenuDestroy.bind(this)),
|
||||||
enterId: 0,
|
enterId: 0,
|
||||||
focusInId: 0
|
focusInId: 0
|
||||||
};
|
};
|
||||||
@ -1286,7 +1286,9 @@ var PopupMenuManager = new Lang.Class({
|
|||||||
if (this.activeMenu)
|
if (this.activeMenu)
|
||||||
this.activeMenu.close(BoxPointer.PopupAnimation.FADE);
|
this.activeMenu.close(BoxPointer.PopupAnimation.FADE);
|
||||||
this._grabHelper.grab({ actor: menu.actor, focus: menu.sourceActor,
|
this._grabHelper.grab({ actor: menu.actor, focus: menu.sourceActor,
|
||||||
onUngrab: Lang.bind(this, this._closeMenu, menu) });
|
onUngrab: isUser => {
|
||||||
|
this._closeMenu(isUser, menu);
|
||||||
|
} });
|
||||||
} else {
|
} else {
|
||||||
this._grabHelper.ungrab({ actor: menu.actor });
|
this._grabHelper.ungrab({ actor: menu.actor });
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ var RemoteMenuSeparatorItemMapper = new Lang.Class({
|
|||||||
_init(trackerItem) {
|
_init(trackerItem) {
|
||||||
this._trackerItem = trackerItem;
|
this._trackerItem = trackerItem;
|
||||||
this.menuItem = new PopupMenu.PopupSeparatorMenuItem();
|
this.menuItem = new PopupMenu.PopupSeparatorMenuItem();
|
||||||
this._trackerItem.connect('notify::label', Lang.bind(this, this._updateLabel));
|
this._trackerItem.connect('notify::label', this._updateLabel.bind(this));
|
||||||
this._updateLabel();
|
this._updateLabel();
|
||||||
|
|
||||||
this.menuItem.connect('destroy', () => {
|
this.menuItem.connect('destroy', () => {
|
||||||
@ -82,7 +82,7 @@ var RemoteMenuSubmenuItemMapper = new Lang.Class({
|
|||||||
_init(trackerItem) {
|
_init(trackerItem) {
|
||||||
this._trackerItem = trackerItem;
|
this._trackerItem = trackerItem;
|
||||||
this.menuItem = new RequestSubMenu();
|
this.menuItem = new RequestSubMenu();
|
||||||
this._trackerItem.connect('notify::label', Lang.bind(this, this._updateLabel));
|
this._trackerItem.connect('notify::label', this._updateLabel.bind(this));
|
||||||
this._updateLabel();
|
this._updateLabel();
|
||||||
|
|
||||||
this._tracker = Shell.MenuTracker.new_for_item_submenu(this._trackerItem,
|
this._tracker = Shell.MenuTracker.new_for_item_submenu(this._trackerItem,
|
||||||
@ -129,10 +129,10 @@ var RemoteMenuItemMapper = new Lang.Class({
|
|||||||
|
|
||||||
this._trackerItem.bind_property('visible', this.menuItem.actor, 'visible', GObject.BindingFlags.SYNC_CREATE);
|
this._trackerItem.bind_property('visible', this.menuItem.actor, 'visible', GObject.BindingFlags.SYNC_CREATE);
|
||||||
|
|
||||||
this._trackerItem.connect('notify::label', Lang.bind(this, this._updateLabel));
|
this._trackerItem.connect('notify::label', this._updateLabel.bind(this));
|
||||||
this._trackerItem.connect('notify::sensitive', Lang.bind(this, this._updateSensitivity));
|
this._trackerItem.connect('notify::sensitive', this._updateSensitivity.bind(this));
|
||||||
this._trackerItem.connect('notify::role', Lang.bind(this, this._updateRole));
|
this._trackerItem.connect('notify::role', this._updateRole.bind(this));
|
||||||
this._trackerItem.connect('notify::toggled', Lang.bind(this, this._updateDecoration));
|
this._trackerItem.connect('notify::toggled', this._updateDecoration.bind(this));
|
||||||
|
|
||||||
this._updateLabel();
|
this._updateLabel();
|
||||||
this._updateSensitivity();
|
this._updateSensitivity();
|
||||||
|
@ -261,13 +261,17 @@ var RemoteSearchProvider = new Lang.Class({
|
|||||||
|
|
||||||
getInitialResultSet(terms, callback, cancellable) {
|
getInitialResultSet(terms, callback, cancellable) {
|
||||||
this.proxy.GetInitialResultSetRemote(terms,
|
this.proxy.GetInitialResultSetRemote(terms,
|
||||||
Lang.bind(this, this._getResultsFinished, callback),
|
(results, error) => {
|
||||||
|
this._getResultsFinished(results, error, callback);
|
||||||
|
},
|
||||||
cancellable);
|
cancellable);
|
||||||
},
|
},
|
||||||
|
|
||||||
getSubsearchResultSet(previousResults, newTerms, callback, cancellable) {
|
getSubsearchResultSet(previousResults, newTerms, callback, cancellable) {
|
||||||
this.proxy.GetSubsearchResultSetRemote(previousResults, newTerms,
|
this.proxy.GetSubsearchResultSetRemote(previousResults, newTerms,
|
||||||
Lang.bind(this, this._getResultsFinished, callback),
|
(results, error) => {
|
||||||
|
this._getResultsFinished(results, error, callback);
|
||||||
|
},
|
||||||
cancellable);
|
cancellable);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -290,8 +294,9 @@ var RemoteSearchProvider = new Lang.Class({
|
|||||||
resultMetas.push({ id: metas[i]['id'],
|
resultMetas.push({ id: metas[i]['id'],
|
||||||
name: metas[i]['name'],
|
name: metas[i]['name'],
|
||||||
description: metas[i]['description'],
|
description: metas[i]['description'],
|
||||||
createIcon: Lang.bind(this,
|
createIcon: size => {
|
||||||
this.createIcon, metas[i]),
|
this.createIcon(size, metas[i]);
|
||||||
|
},
|
||||||
clipboardText: metas[i]['clipboardText'] });
|
clipboardText: metas[i]['clipboardText'] });
|
||||||
}
|
}
|
||||||
callback(resultMetas);
|
callback(resultMetas);
|
||||||
@ -299,7 +304,9 @@ var RemoteSearchProvider = new Lang.Class({
|
|||||||
|
|
||||||
getResultMetas(ids, callback, cancellable) {
|
getResultMetas(ids, callback, cancellable) {
|
||||||
this.proxy.GetResultMetasRemote(ids,
|
this.proxy.GetResultMetasRemote(ids,
|
||||||
Lang.bind(this, this._getResultMetasFinished, callback),
|
(results, error) => {
|
||||||
|
this._getResultMetasFinished(results, error, callback);
|
||||||
|
},
|
||||||
cancellable);
|
cancellable);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -49,10 +49,10 @@ var RunDialog = new Lang.Class({
|
|||||||
Main.createLookingGlass().open();
|
Main.createLookingGlass().open();
|
||||||
},
|
},
|
||||||
|
|
||||||
'r': Lang.bind(this, this._restart),
|
'r': this._restart.bind(this),
|
||||||
|
|
||||||
// Developer brain backwards compatibility
|
// Developer brain backwards compatibility
|
||||||
'restart': Lang.bind(this, this._restart),
|
'restart': this._restart.bind(this),
|
||||||
|
|
||||||
'debugexit': () => {
|
'debugexit': () => {
|
||||||
Meta.quit(Meta.ExitCode.ERROR);
|
Meta.quit(Meta.ExitCode.ERROR);
|
||||||
@ -106,7 +106,7 @@ var RunDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._errorBox.hide();
|
this._errorBox.hide();
|
||||||
|
|
||||||
this.setButtons([{ action: Lang.bind(this, this.close),
|
this.setButtons([{ action: this.close.bind(this),
|
||||||
label: _("Close"),
|
label: _("Close"),
|
||||||
key: Clutter.Escape }]);
|
key: Clutter.Escape }]);
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ var Clock = new Lang.Class({
|
|||||||
this.actor.add(this._date, { x_align: St.Align.MIDDLE });
|
this.actor.add(this._date, { x_align: St.Align.MIDDLE });
|
||||||
|
|
||||||
this._wallClock = new GnomeDesktop.WallClock({ time_only: true });
|
this._wallClock = new GnomeDesktop.WallClock({ time_only: true });
|
||||||
this._wallClock.connect('notify::clock', Lang.bind(this, this._updateClock));
|
this._wallClock.connect('notify::clock', this._updateClock.bind(this));
|
||||||
|
|
||||||
this._updateClock();
|
this._updateClock();
|
||||||
},
|
},
|
||||||
@ -117,7 +117,7 @@ var NotificationsBox = new Lang.Class({
|
|||||||
});
|
});
|
||||||
this._updateVisibility();
|
this._updateVisibility();
|
||||||
|
|
||||||
this._sourceAddedId = Main.messageTray.connect('source-added', Lang.bind(this, this._sourceAdded));
|
this._sourceAddedId = Main.messageTray.connect('source-added', this._sourceAdded.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
@ -353,7 +353,7 @@ var Arrow = new Lang.Class({
|
|||||||
this.x_fill = this.y_fill = true;
|
this.x_fill = this.y_fill = true;
|
||||||
|
|
||||||
this._drawingArea = new St.DrawingArea();
|
this._drawingArea = new St.DrawingArea();
|
||||||
this._drawingArea.connect('repaint', Lang.bind(this, this._drawArrow));
|
this._drawingArea.connect('repaint', this._drawArrow.bind(this));
|
||||||
this.child = this._drawingArea;
|
this.child = this._drawingArea;
|
||||||
|
|
||||||
this._shadowHelper = null;
|
this._shadowHelper = null;
|
||||||
@ -445,9 +445,9 @@ var ScreenShield = new Lang.Class({
|
|||||||
visible: false,
|
visible: false,
|
||||||
});
|
});
|
||||||
this._lockScreenGroup.connect('key-press-event',
|
this._lockScreenGroup.connect('key-press-event',
|
||||||
Lang.bind(this, this._onLockScreenKeyPress));
|
this._onLockScreenKeyPress.bind(this));
|
||||||
this._lockScreenGroup.connect('scroll-event',
|
this._lockScreenGroup.connect('scroll-event',
|
||||||
Lang.bind(this, this._onLockScreenScroll));
|
this._onLockScreenScroll.bind(this));
|
||||||
Main.ctrlAltTabManager.addGroup(this._lockScreenGroup, _("Lock"), 'changes-prevent-symbolic');
|
Main.ctrlAltTabManager.addGroup(this._lockScreenGroup, _("Lock"), 'changes-prevent-symbolic');
|
||||||
|
|
||||||
this._lockScreenContents = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
this._lockScreenContents = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
||||||
@ -463,7 +463,7 @@ var ScreenShield = new Lang.Class({
|
|||||||
this._bgManagers = [];
|
this._bgManagers = [];
|
||||||
|
|
||||||
this._updateBackgrounds();
|
this._updateBackgrounds();
|
||||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._updateBackgrounds));
|
Main.layoutManager.connect('monitors-changed', this._updateBackgrounds.bind(this));
|
||||||
|
|
||||||
this._arrowAnimationId = 0;
|
this._arrowAnimationId = 0;
|
||||||
this._arrowWatchId = 0;
|
this._arrowWatchId = 0;
|
||||||
@ -484,9 +484,9 @@ var ScreenShield = new Lang.Class({
|
|||||||
this._lockScreenContents.add_actor(this._arrowContainer);
|
this._lockScreenContents.add_actor(this._arrowContainer);
|
||||||
|
|
||||||
this._dragAction = new Clutter.GestureAction();
|
this._dragAction = new Clutter.GestureAction();
|
||||||
this._dragAction.connect('gesture-begin', Lang.bind(this, this._onDragBegin));
|
this._dragAction.connect('gesture-begin', this._onDragBegin.bind(this));
|
||||||
this._dragAction.connect('gesture-progress', Lang.bind(this, this._onDragMotion));
|
this._dragAction.connect('gesture-progress', this._onDragMotion.bind(this));
|
||||||
this._dragAction.connect('gesture-end', Lang.bind(this, this._onDragEnd));
|
this._dragAction.connect('gesture-end', this._onDragEnd.bind(this));
|
||||||
this._lockScreenGroup.add_action(this._dragAction);
|
this._lockScreenGroup.add_action(this._dragAction);
|
||||||
|
|
||||||
this._lockDialogGroup = new St.Widget({ x_expand: true,
|
this._lockDialogGroup = new St.Widget({ x_expand: true,
|
||||||
@ -528,7 +528,7 @@ var ScreenShield = new Lang.Class({
|
|||||||
|
|
||||||
this._loginManager = LoginManager.getLoginManager();
|
this._loginManager = LoginManager.getLoginManager();
|
||||||
this._loginManager.connect('prepare-for-sleep',
|
this._loginManager.connect('prepare-for-sleep',
|
||||||
Lang.bind(this, this._prepareForSleep));
|
this._prepareForSleep.bind(this));
|
||||||
|
|
||||||
this._loginSession = null;
|
this._loginSession = null;
|
||||||
this._loginManager.getCurrentSessionProxy(sessionProxy => {
|
this._loginManager.getCurrentSessionProxy(sessionProxy => {
|
||||||
@ -537,15 +537,15 @@ var ScreenShield = new Lang.Class({
|
|||||||
() => { this.lock(false); });
|
() => { this.lock(false); });
|
||||||
this._loginSession.connectSignal('Unlock',
|
this._loginSession.connectSignal('Unlock',
|
||||||
() => { this.deactivate(false); });
|
() => { this.deactivate(false); });
|
||||||
this._loginSession.connect('g-properties-changed', Lang.bind(this, this._syncInhibitor));
|
this._loginSession.connect('g-properties-changed', this._syncInhibitor.bind(this));
|
||||||
this._syncInhibitor();
|
this._syncInhibitor();
|
||||||
});
|
});
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: SCREENSAVER_SCHEMA });
|
this._settings = new Gio.Settings({ schema_id: SCREENSAVER_SCHEMA });
|
||||||
this._settings.connect('changed::' + LOCK_ENABLED_KEY, Lang.bind(this, this._syncInhibitor));
|
this._settings.connect('changed::' + LOCK_ENABLED_KEY, this._syncInhibitor.bind(this));
|
||||||
|
|
||||||
this._lockSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
|
this._lockSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
|
||||||
this._lockSettings.connect('changed::' + DISABLE_LOCK_KEY, Lang.bind(this, this._syncInhibitor));
|
this._lockSettings.connect('changed::' + DISABLE_LOCK_KEY, this._syncInhibitor.bind(this));
|
||||||
|
|
||||||
this._isModal = false;
|
this._isModal = false;
|
||||||
this._hasLockScreen = false;
|
this._hasLockScreen = false;
|
||||||
@ -563,11 +563,11 @@ var ScreenShield = new Lang.Class({
|
|||||||
this._longLightbox = new Lightbox.Lightbox(Main.uiGroup,
|
this._longLightbox = new Lightbox.Lightbox(Main.uiGroup,
|
||||||
{ inhibitEvents: true,
|
{ inhibitEvents: true,
|
||||||
fadeFactor: 1 });
|
fadeFactor: 1 });
|
||||||
this._longLightbox.connect('shown', Lang.bind(this, this._onLongLightboxShown));
|
this._longLightbox.connect('shown', this._onLongLightboxShown.bind(this));
|
||||||
this._shortLightbox = new Lightbox.Lightbox(Main.uiGroup,
|
this._shortLightbox = new Lightbox.Lightbox(Main.uiGroup,
|
||||||
{ inhibitEvents: true,
|
{ inhibitEvents: true,
|
||||||
fadeFactor: 1 });
|
fadeFactor: 1 });
|
||||||
this._shortLightbox.connect('shown', Lang.bind(this, this._onShortLightboxShown));
|
this._shortLightbox.connect('shown', this._onShortLightboxShown.bind(this));
|
||||||
|
|
||||||
this.idleMonitor = Meta.IdleMonitor.get_core();
|
this.idleMonitor = Meta.IdleMonitor.get_core();
|
||||||
this._cursorTracker = Meta.CursorTracker.get_for_screen(global.screen);
|
this._cursorTracker = Meta.CursorTracker.get_for_screen(global.screen);
|
||||||
@ -862,7 +862,7 @@ var ScreenShield = new Lang.Class({
|
|||||||
lightbox.show(time);
|
lightbox.show(time);
|
||||||
|
|
||||||
if (this._becameActiveId == 0)
|
if (this._becameActiveId == 0)
|
||||||
this._becameActiveId = this.idleMonitor.add_user_active_watch(Lang.bind(this, this._onUserBecameActive));
|
this._becameActiveId = this.idleMonitor.add_user_active_watch(this._onUserBecameActive.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onUserBecameActive() {
|
_onUserBecameActive() {
|
||||||
@ -954,7 +954,7 @@ var ScreenShield = new Lang.Class({
|
|||||||
{ y: -h,
|
{ y: -h,
|
||||||
time: time,
|
time: time,
|
||||||
transition: 'easeInQuad',
|
transition: 'easeInQuad',
|
||||||
onComplete: Lang.bind(this, this._hideLockScreenComplete),
|
onComplete: this._hideLockScreenComplete.bind(this),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this._hideLockScreenComplete();
|
this._hideLockScreenComplete();
|
||||||
@ -984,7 +984,7 @@ var ScreenShield = new Lang.Class({
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._dialog.connect('failed', Lang.bind(this, this._onUnlockFailed));
|
this._dialog.connect('failed', this._onUnlockFailed.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
this._dialog.allowCancel = allowCancel;
|
this._dialog.allowCancel = allowCancel;
|
||||||
@ -1042,14 +1042,14 @@ var ScreenShield = new Lang.Class({
|
|||||||
this._arrowActiveWatchId = 0;
|
this._arrowActiveWatchId = 0;
|
||||||
|
|
||||||
if (!this._arrowAnimationId) {
|
if (!this._arrowAnimationId) {
|
||||||
this._arrowAnimationId = Mainloop.timeout_add(6000, Lang.bind(this, this._animateArrows));
|
this._arrowAnimationId = Mainloop.timeout_add(6000, this._animateArrows.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._arrowAnimationId, '[gnome-shell] this._animateArrows');
|
GLib.Source.set_name_by_id(this._arrowAnimationId, '[gnome-shell] this._animateArrows');
|
||||||
this._animateArrows();
|
this._animateArrows();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this._arrowWatchId)
|
if (!this._arrowWatchId)
|
||||||
this._arrowWatchId = this.idleMonitor.add_idle_watch(ARROW_IDLE_TIME,
|
this._arrowWatchId = this.idleMonitor.add_idle_watch(ARROW_IDLE_TIME,
|
||||||
Lang.bind(this, this._pauseArrowAnimation));
|
this._pauseArrowAnimation.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_pauseArrowAnimation() {
|
_pauseArrowAnimation() {
|
||||||
@ -1059,7 +1059,7 @@ var ScreenShield = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this._arrowActiveWatchId)
|
if (!this._arrowActiveWatchId)
|
||||||
this._arrowActiveWatchId = this.idleMonitor.add_user_active_watch(Lang.bind(this, this._startArrowAnimation));
|
this._arrowActiveWatchId = this.idleMonitor.add_user_active_watch(this._startArrowAnimation.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_stopArrowAnimation() {
|
_stopArrowAnimation() {
|
||||||
@ -1148,7 +1148,7 @@ var ScreenShield = new Lang.Class({
|
|||||||
this._lockScreenContents.add_actor(this._lockScreenContentsBox);
|
this._lockScreenContents.add_actor(this._lockScreenContentsBox);
|
||||||
|
|
||||||
this._notificationsBox = new NotificationsBox();
|
this._notificationsBox = new NotificationsBox();
|
||||||
this._wakeUpScreenId = this._notificationsBox.connect('wake-up-screen', Lang.bind(this, this._wakeUpScreen));
|
this._wakeUpScreenId = this._notificationsBox.connect('wake-up-screen', this._wakeUpScreen.bind(this));
|
||||||
this._lockScreenContentsBox.add(this._notificationsBox.actor, { x_fill: true,
|
this._lockScreenContentsBox.add(this._notificationsBox.actor, { x_fill: true,
|
||||||
y_fill: true,
|
y_fill: true,
|
||||||
expand: true });
|
expand: true });
|
||||||
@ -1234,7 +1234,7 @@ var ScreenShield = new Lang.Class({
|
|||||||
scale_y: 0,
|
scale_y: 0,
|
||||||
time: animate ? Overview.ANIMATION_TIME : 0,
|
time: animate ? Overview.ANIMATION_TIME : 0,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
onComplete: Lang.bind(this, this._completeDeactivate),
|
onComplete: this._completeDeactivate.bind(this),
|
||||||
onCompleteScope: this
|
onCompleteScope: this
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -45,7 +45,7 @@ var ScreencastService = new Lang.Class({
|
|||||||
|
|
||||||
this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' });
|
this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' });
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
get isRecording() {
|
get isRecording() {
|
||||||
@ -59,7 +59,7 @@ var ScreencastService = new Lang.Class({
|
|||||||
screen: global.screen });
|
screen: global.screen });
|
||||||
recorder._watchNameId =
|
recorder._watchNameId =
|
||||||
Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
|
Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
|
||||||
Lang.bind(this, this._onNameVanished));
|
this._onNameVanished.bind(this));
|
||||||
this._recorders.set(sender, recorder);
|
this._recorders.set(sender, recorder);
|
||||||
this.emit('updated');
|
this.emit('updated');
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ var ScreenshotService = new Lang.Class({
|
|||||||
let shooter = new Shell.Screenshot();
|
let shooter = new Shell.Screenshot();
|
||||||
shooter._watchNameId =
|
shooter._watchNameId =
|
||||||
Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
|
Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
|
||||||
Lang.bind(this, this._onNameVanished));
|
this._onNameVanished.bind(this));
|
||||||
|
|
||||||
this._screenShooter.set(sender, shooter);
|
this._screenShooter.set(sender, shooter);
|
||||||
|
|
||||||
@ -157,8 +157,10 @@ var ScreenshotService = new Lang.Class({
|
|||||||
if (!screenshot)
|
if (!screenshot)
|
||||||
return;
|
return;
|
||||||
screenshot.screenshot_area (x, y, width, height, filename,
|
screenshot.screenshot_area (x, y, width, height, filename,
|
||||||
Lang.bind(this, this._onScreenshotComplete,
|
(obj, result, area, filenameUsed) => {
|
||||||
flash, invocation));
|
this._onScreenshotComplete(obj, result, area, filenameUsed,
|
||||||
|
flash, invocation);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
ScreenshotWindowAsync(params, invocation) {
|
ScreenshotWindowAsync(params, invocation) {
|
||||||
@ -167,8 +169,10 @@ var ScreenshotService = new Lang.Class({
|
|||||||
if (!screenshot)
|
if (!screenshot)
|
||||||
return;
|
return;
|
||||||
screenshot.screenshot_window (include_frame, include_cursor, filename,
|
screenshot.screenshot_window (include_frame, include_cursor, filename,
|
||||||
Lang.bind(this, this._onScreenshotComplete,
|
(obj, result, area, filenameUsed) => {
|
||||||
flash, invocation));
|
this._onScreenshotComplete(obj, result, area, filenameUsed,
|
||||||
|
flash, invocation);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
ScreenshotAsync(params, invocation) {
|
ScreenshotAsync(params, invocation) {
|
||||||
@ -177,8 +181,10 @@ var ScreenshotService = new Lang.Class({
|
|||||||
if (!screenshot)
|
if (!screenshot)
|
||||||
return;
|
return;
|
||||||
screenshot.screenshot(include_cursor, filename,
|
screenshot.screenshot(include_cursor, filename,
|
||||||
Lang.bind(this, this._onScreenshotComplete,
|
(obj, result, area, filenameUsed) => {
|
||||||
flash, invocation));
|
this._onScreenshotComplete(obj, result, area, filenameUsed,
|
||||||
|
flash, invocation);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
SelectAreaAsync(params, invocation) {
|
SelectAreaAsync(params, invocation) {
|
||||||
@ -233,11 +239,11 @@ var SelectArea = new Lang.Class({
|
|||||||
this._grabHelper = new GrabHelper.GrabHelper(this._group);
|
this._grabHelper = new GrabHelper.GrabHelper(this._group);
|
||||||
|
|
||||||
this._group.connect('button-press-event',
|
this._group.connect('button-press-event',
|
||||||
Lang.bind(this, this._onButtonPress));
|
this._onButtonPress.bind(this));
|
||||||
this._group.connect('button-release-event',
|
this._group.connect('button-release-event',
|
||||||
Lang.bind(this, this._onButtonRelease));
|
this._onButtonRelease.bind(this));
|
||||||
this._group.connect('motion-event',
|
this._group.connect('motion-event',
|
||||||
Lang.bind(this, this._onMotionEvent));
|
this._onMotionEvent.bind(this));
|
||||||
|
|
||||||
let constraint = new Clutter.BindConstraint({ source: global.stage,
|
let constraint = new Clutter.BindConstraint({ source: global.stage,
|
||||||
coordinate: Clutter.BindCoordinate.ALL });
|
coordinate: Clutter.BindCoordinate.ALL });
|
||||||
@ -252,7 +258,7 @@ var SelectArea = new Lang.Class({
|
|||||||
|
|
||||||
show() {
|
show() {
|
||||||
if (!this._grabHelper.grab({ actor: this._group,
|
if (!this._grabHelper.grab({ actor: this._group,
|
||||||
onUngrab: Lang.bind(this, this._onUngrab) }))
|
onUngrab: this._onUngrab.bind(this) }))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
global.screen.set_cursor(Meta.Cursor.CROSSHAIR);
|
global.screen.set_cursor(Meta.Cursor.CROSSHAIR);
|
||||||
|
@ -59,7 +59,7 @@ var SearchResult = new Lang.Class({
|
|||||||
y_fill: true });
|
y_fill: true });
|
||||||
|
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
this.actor.connect('clicked', Lang.bind(this, this.activate));
|
this.actor.connect('clicked', this.activate.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
activate() {
|
activate() {
|
||||||
@ -116,12 +116,12 @@ var ListSearchResult = new Lang.Class({
|
|||||||
|
|
||||||
this._termsChangedId =
|
this._termsChangedId =
|
||||||
this._resultsView.connect('terms-changed',
|
this._resultsView.connect('terms-changed',
|
||||||
Lang.bind(this, this._highlightTerms));
|
this._highlightTerms.bind(this));
|
||||||
|
|
||||||
this._highlightTerms();
|
this._highlightTerms();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_highlightTerms() {
|
_highlightTerms() {
|
||||||
@ -240,8 +240,8 @@ var SearchResultsBase = new Lang.Class({
|
|||||||
metasNeeded.forEach((resultId, i) => {
|
metasNeeded.forEach((resultId, i) => {
|
||||||
let meta = metas[i];
|
let meta = metas[i];
|
||||||
let display = this._createResultDisplay(meta);
|
let display = this._createResultDisplay(meta);
|
||||||
display.connect('activate', Lang.bind(this, this._activateResult));
|
display.connect('activate', this._activateResult.bind(this));
|
||||||
display.actor.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
|
display.actor.connect('key-focus-in', this._keyFocusIn.bind(this));
|
||||||
this._resultDisplays[resultId] = display;
|
this._resultDisplays[resultId] = display;
|
||||||
});
|
});
|
||||||
callback(true);
|
callback(true);
|
||||||
@ -292,7 +292,7 @@ var ListSearchResults = new Lang.Class({
|
|||||||
|
|
||||||
this._container = new St.BoxLayout({ style_class: 'search-section-content' });
|
this._container = new St.BoxLayout({ style_class: 'search-section-content' });
|
||||||
this.providerInfo = new ProviderInfo(provider);
|
this.providerInfo = new ProviderInfo(provider);
|
||||||
this.providerInfo.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
|
this.providerInfo.connect('key-focus-in', this._keyFocusIn.bind(this));
|
||||||
this.providerInfo.connect('clicked', () => {
|
this.providerInfo.connect('clicked', () => {
|
||||||
this.providerInfo.animateLaunch();
|
this.providerInfo.animateLaunch();
|
||||||
provider.launchSearch(this._terms);
|
provider.launchSearch(this._terms);
|
||||||
@ -414,7 +414,7 @@ var SearchResults = new Lang.Class({
|
|||||||
this._scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
this._scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
||||||
this._scrollView.add_actor(scrollChild);
|
this._scrollView.add_actor(scrollChild);
|
||||||
let action = new Clutter.PanAction({ interpolate: true });
|
let action = new Clutter.PanAction({ interpolate: true });
|
||||||
action.connect('pan', Lang.bind(this, this._onPan));
|
action.connect('pan', this._onPan.bind(this));
|
||||||
this._scrollView.add_action(action);
|
this._scrollView.add_action(action);
|
||||||
|
|
||||||
this.actor.add(this._scrollView, { x_fill: true,
|
this.actor.add(this._scrollView, { x_fill: true,
|
||||||
@ -441,10 +441,10 @@ var SearchResults = new Lang.Class({
|
|||||||
this._highlightRegex = null;
|
this._highlightRegex = null;
|
||||||
|
|
||||||
this._searchSettings = new Gio.Settings({ schema_id: SEARCH_PROVIDERS_SCHEMA });
|
this._searchSettings = new Gio.Settings({ schema_id: SEARCH_PROVIDERS_SCHEMA });
|
||||||
this._searchSettings.connect('changed::disabled', Lang.bind(this, this._reloadRemoteProviders));
|
this._searchSettings.connect('changed::disabled', this._reloadRemoteProviders.bind(this));
|
||||||
this._searchSettings.connect('changed::enabled', Lang.bind(this, this._reloadRemoteProviders));
|
this._searchSettings.connect('changed::enabled', this._reloadRemoteProviders.bind(this));
|
||||||
this._searchSettings.connect('changed::disable-external', Lang.bind(this, this._reloadRemoteProviders));
|
this._searchSettings.connect('changed::disable-external', this._reloadRemoteProviders.bind(this));
|
||||||
this._searchSettings.connect('changed::sort-order', Lang.bind(this, this._reloadRemoteProviders));
|
this._searchSettings.connect('changed::sort-order', this._reloadRemoteProviders.bind(this));
|
||||||
|
|
||||||
this._searchTimeoutId = 0;
|
this._searchTimeoutId = 0;
|
||||||
this._cancellable = new Gio.Cancellable();
|
this._cancellable = new Gio.Cancellable();
|
||||||
@ -460,7 +460,7 @@ var SearchResults = new Lang.Class({
|
|||||||
});
|
});
|
||||||
|
|
||||||
RemoteSearch.loadRemoteSearchProviders(this._searchSettings, providers => {
|
RemoteSearch.loadRemoteSearchProviders(this._searchSettings, providers => {
|
||||||
providers.forEach(Lang.bind(this, this._registerProvider));
|
providers.forEach(this._registerProvider.bind(this));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -511,9 +511,18 @@ var SearchResults = new Lang.Class({
|
|||||||
|
|
||||||
let previousProviderResults = previousResults[provider.id];
|
let previousProviderResults = previousResults[provider.id];
|
||||||
if (this._isSubSearch && previousProviderResults)
|
if (this._isSubSearch && previousProviderResults)
|
||||||
provider.getSubsearchResultSet(previousProviderResults, this._terms, Lang.bind(this, this._gotResults, provider), this._cancellable);
|
provider.getSubsearchResultSet(previousProviderResults,
|
||||||
|
this._terms,
|
||||||
|
results => {
|
||||||
|
this._gotResults(results, provider);
|
||||||
|
},
|
||||||
|
this._cancellable);
|
||||||
else
|
else
|
||||||
provider.getInitialResultSet(this._terms, Lang.bind(this, this._gotResults, provider), this._cancellable);
|
provider.getInitialResultSet(this._terms,
|
||||||
|
results => {
|
||||||
|
this._gotResults(results, provider);
|
||||||
|
},
|
||||||
|
this._cancellable);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._updateSearchProgress();
|
this._updateSearchProgress();
|
||||||
@ -556,7 +565,7 @@ var SearchResults = new Lang.Class({
|
|||||||
this._updateSearchProgress();
|
this._updateSearchProgress();
|
||||||
|
|
||||||
if (this._searchTimeoutId == 0)
|
if (this._searchTimeoutId == 0)
|
||||||
this._searchTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 150, Lang.bind(this, this._onSearchTimeout));
|
this._searchTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 150, this._onSearchTimeout.bind(this));
|
||||||
|
|
||||||
let escapedTerms = this._terms.map(term => Shell.util_regex_escape(term));
|
let escapedTerms = this._terms.map(term => Shell.util_regex_escape(term));
|
||||||
this._highlightRegex = new RegExp(`(${escapedTerms.join('|')})`, 'gi');
|
this._highlightRegex = new RegExp(`(${escapedTerms.join('|')})`, 'gi');
|
||||||
@ -585,7 +594,7 @@ var SearchResults = new Lang.Class({
|
|||||||
else
|
else
|
||||||
providerDisplay = new GridSearchResults(provider, this);
|
providerDisplay = new GridSearchResults(provider, this);
|
||||||
|
|
||||||
providerDisplay.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
|
providerDisplay.connect('key-focus-in', this._keyFocusIn.bind(this));
|
||||||
providerDisplay.actor.hide();
|
providerDisplay.actor.hide();
|
||||||
this._content.add(providerDisplay.actor);
|
this._content.add(providerDisplay.actor);
|
||||||
provider.display = providerDisplay;
|
provider.display = providerDisplay;
|
||||||
|
@ -99,9 +99,9 @@ var GnomeShell = new Lang.Class({
|
|||||||
|
|
||||||
this._cachedOverviewVisible = false;
|
this._cachedOverviewVisible = false;
|
||||||
Main.overview.connect('showing',
|
Main.overview.connect('showing',
|
||||||
Lang.bind(this, this._checkOverviewVisibleChanged));
|
this._checkOverviewVisibleChanged.bind(this));
|
||||||
Main.overview.connect('hidden',
|
Main.overview.connect('hidden',
|
||||||
Lang.bind(this, this._checkOverviewVisibleChanged));
|
this._checkOverviewVisibleChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -224,7 +224,7 @@ var GnomeShell = new Lang.Class({
|
|||||||
|
|
||||||
if (!this._grabbers.has(sender)) {
|
if (!this._grabbers.has(sender)) {
|
||||||
let id = Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
|
let id = Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
|
||||||
Lang.bind(this, this._onGrabberBusNameVanished));
|
this._onGrabberBusNameVanished.bind(this));
|
||||||
this._grabbers.set(sender, id);
|
this._grabbers.set(sender, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ var GnomeShellExtensions = new Lang.Class({
|
|||||||
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(GnomeShellExtensionsIface, this);
|
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(GnomeShellExtensionsIface, this);
|
||||||
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/Shell');
|
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/Shell');
|
||||||
ExtensionSystem.connect('extension-state-changed',
|
ExtensionSystem.connect('extension-state-changed',
|
||||||
Lang.bind(this, this._extensionStateChanged));
|
this._extensionStateChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,12 +23,12 @@ var EntryMenu = new Lang.Class({
|
|||||||
// Populate menu
|
// Populate menu
|
||||||
let item;
|
let item;
|
||||||
item = new PopupMenu.PopupMenuItem(_("Copy"));
|
item = new PopupMenu.PopupMenuItem(_("Copy"));
|
||||||
item.connect('activate', Lang.bind(this, this._onCopyActivated));
|
item.connect('activate', this._onCopyActivated.bind(this));
|
||||||
this.addMenuItem(item);
|
this.addMenuItem(item);
|
||||||
this._copyItem = item;
|
this._copyItem = item;
|
||||||
|
|
||||||
item = new PopupMenu.PopupMenuItem(_("Paste"));
|
item = new PopupMenu.PopupMenuItem(_("Paste"));
|
||||||
item.connect('activate', Lang.bind(this, this._onPasteActivated));
|
item.connect('activate', this._onPasteActivated.bind(this));
|
||||||
this.addMenuItem(item);
|
this.addMenuItem(item);
|
||||||
this._pasteItem = item;
|
this._pasteItem = item;
|
||||||
|
|
||||||
@ -40,8 +40,7 @@ var EntryMenu = new Lang.Class({
|
|||||||
|
|
||||||
_makePasswordItem() {
|
_makePasswordItem() {
|
||||||
let item = new PopupMenu.PopupMenuItem('');
|
let item = new PopupMenu.PopupMenuItem('');
|
||||||
item.connect('activate', Lang.bind(this,
|
item.connect('activate', this._onPasswordActivated.bind(this));
|
||||||
this._onPasswordActivated));
|
|
||||||
this.addMenuItem(item);
|
this.addMenuItem(item);
|
||||||
this._passwordItem = item;
|
this._passwordItem = item;
|
||||||
},
|
},
|
||||||
@ -161,10 +160,14 @@ function addContextMenu(entry, params) {
|
|||||||
// Add an event handler to both the entry and its clutter_text; the former
|
// Add an event handler to both the entry and its clutter_text; the former
|
||||||
// so padding is included in the clickable area, the latter because the
|
// so padding is included in the clickable area, the latter because the
|
||||||
// event processing of ClutterText prevents event-bubbling.
|
// event processing of ClutterText prevents event-bubbling.
|
||||||
entry.clutter_text.connect('button-press-event', Lang.bind(null, _onButtonPressEvent, entry));
|
entry.clutter_text.connect('button-press-event', (actor, event) => {
|
||||||
entry.connect('button-press-event', Lang.bind(null, _onButtonPressEvent, entry));
|
_onButtonPressEvent(actor, event, entry);
|
||||||
|
});
|
||||||
|
entry.connect('button-press-event', (actor, event) => {
|
||||||
|
_onButtonPressEvent(actor, event, entry);
|
||||||
|
});
|
||||||
|
|
||||||
entry.connect('popup-menu', Lang.bind(null, _onPopup, entry));
|
entry.connect('popup-menu', actor => { _onPopup(actor, entry); });
|
||||||
|
|
||||||
entry.connect('destroy', () => {
|
entry.connect('destroy', () => {
|
||||||
entry.menu.destroy();
|
entry.menu.destroy();
|
||||||
|
@ -39,9 +39,8 @@ function _setButtonsForChoices(dialog, choices) {
|
|||||||
for (let idx = 0; idx < choices.length; idx++) {
|
for (let idx = 0; idx < choices.length; idx++) {
|
||||||
let button = idx;
|
let button = idx;
|
||||||
buttons.unshift({ label: choices[idx],
|
buttons.unshift({ label: choices[idx],
|
||||||
action: Lang.bind(dialog, function() {
|
action: () => { dialog.emit('response', button); }
|
||||||
dialog.emit('response', button);
|
});
|
||||||
})});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.setButtons(buttons);
|
dialog.setButtons(buttons);
|
||||||
@ -88,7 +87,7 @@ var ListItem = new Lang.Class({
|
|||||||
child: this._nameLabel });
|
child: this._nameLabel });
|
||||||
layout.add(labelBin);
|
layout.add(labelBin);
|
||||||
|
|
||||||
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
|
this.actor.connect('clicked', this._onClicked.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onClicked() {
|
_onClicked() {
|
||||||
@ -112,15 +111,15 @@ var ShellMountOperation = new Lang.Class({
|
|||||||
this.mountOp = new Shell.MountOperation();
|
this.mountOp = new Shell.MountOperation();
|
||||||
|
|
||||||
this.mountOp.connect('ask-question',
|
this.mountOp.connect('ask-question',
|
||||||
Lang.bind(this, this._onAskQuestion));
|
this._onAskQuestion.bind(this));
|
||||||
this.mountOp.connect('ask-password',
|
this.mountOp.connect('ask-password',
|
||||||
Lang.bind(this, this._onAskPassword));
|
this._onAskPassword.bind(this));
|
||||||
this.mountOp.connect('show-processes-2',
|
this.mountOp.connect('show-processes-2',
|
||||||
Lang.bind(this, this._onShowProcesses2));
|
this._onShowProcesses2.bind(this));
|
||||||
this.mountOp.connect('aborted',
|
this.mountOp.connect('aborted',
|
||||||
Lang.bind(this, this.close));
|
this.close.bind(this));
|
||||||
this.mountOp.connect('show-unmount-progress',
|
this.mountOp.connect('show-unmount-progress',
|
||||||
Lang.bind(this, this._onShowUnmountProgress));
|
this._onShowUnmountProgress.bind(this));
|
||||||
|
|
||||||
this._gicon = source.get_icon();
|
this._gicon = source.get_icon();
|
||||||
},
|
},
|
||||||
@ -319,7 +318,7 @@ var ShellMountPasswordDialog = new Lang.Class({
|
|||||||
text: "",
|
text: "",
|
||||||
can_focus: true});
|
can_focus: true});
|
||||||
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
|
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
|
||||||
this._passwordEntry.clutter_text.connect('activate', Lang.bind(this, this._onEntryActivate));
|
this._passwordEntry.clutter_text.connect('activate', this._onEntryActivate.bind(this));
|
||||||
this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
|
this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
|
||||||
this._passwordBox.add(this._passwordEntry, {expand: true });
|
this._passwordBox.add(this._passwordEntry, {expand: true });
|
||||||
this.setInitialKeyFocus(this._passwordEntry);
|
this.setInitialKeyFocus(this._passwordEntry);
|
||||||
@ -342,11 +341,11 @@ var ShellMountPasswordDialog = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
let buttons = [{ label: _("Cancel"),
|
let buttons = [{ label: _("Cancel"),
|
||||||
action: Lang.bind(this, this._onCancelButton),
|
action: this._onCancelButton.bind(this),
|
||||||
key: Clutter.Escape
|
key: Clutter.Escape
|
||||||
},
|
},
|
||||||
{ label: _("Unlock"),
|
{ label: _("Unlock"),
|
||||||
action: Lang.bind(this, this._onUnlockButton),
|
action: this._onUnlockButton.bind(this),
|
||||||
default: true
|
default: true
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
@ -23,11 +23,11 @@ var Slider = new Lang.Class({
|
|||||||
can_focus: true,
|
can_focus: true,
|
||||||
reactive: true,
|
reactive: true,
|
||||||
accessible_role: Atk.Role.SLIDER });
|
accessible_role: Atk.Role.SLIDER });
|
||||||
this.actor.connect('repaint', Lang.bind(this, this._sliderRepaint));
|
this.actor.connect('repaint', this._sliderRepaint.bind(this));
|
||||||
this.actor.connect('button-press-event', Lang.bind(this, this._startDragging));
|
this.actor.connect('button-press-event', this._startDragging.bind(this));
|
||||||
this.actor.connect('touch-event', Lang.bind(this, this._touchDragging));
|
this.actor.connect('touch-event', this._touchDragging.bind(this));
|
||||||
this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
|
this.actor.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
this.actor.connect('key-press-event', Lang.bind(this, this.onKeyPressEvent));
|
this.actor.connect('key-press-event', this.onKeyPressEvent.bind(this));
|
||||||
this.actor.connect('allocation-changed', (actor, box) => {
|
this.actor.connect('allocation-changed', (actor, box) => {
|
||||||
this._sliderWidth = box.get_width();
|
this._sliderWidth = box.get_width();
|
||||||
});
|
});
|
||||||
@ -38,13 +38,13 @@ var Slider = new Lang.Class({
|
|||||||
this._customAccessible = St.GenericAccessible.new_for_actor(this.actor);
|
this._customAccessible = St.GenericAccessible.new_for_actor(this.actor);
|
||||||
this.actor.set_accessible(this._customAccessible);
|
this.actor.set_accessible(this._customAccessible);
|
||||||
|
|
||||||
this._customAccessible.connect('get-current-value', Lang.bind(this, this._getCurrentValue));
|
this._customAccessible.connect('get-current-value', this._getCurrentValue.bind(this));
|
||||||
this._customAccessible.connect('get-minimum-value', Lang.bind(this, this._getMinimumValue));
|
this._customAccessible.connect('get-minimum-value', this._getMinimumValue.bind(this));
|
||||||
this._customAccessible.connect('get-maximum-value', Lang.bind(this, this._getMaximumValue));
|
this._customAccessible.connect('get-maximum-value', this._getMaximumValue.bind(this));
|
||||||
this._customAccessible.connect('get-minimum-increment', Lang.bind(this, this._getMinimumIncrement));
|
this._customAccessible.connect('get-minimum-increment', this._getMinimumIncrement.bind(this));
|
||||||
this._customAccessible.connect('set-current-value', Lang.bind(this, this._setCurrentValue));
|
this._customAccessible.connect('set-current-value', this._setCurrentValue.bind(this));
|
||||||
|
|
||||||
this.connect('value-changed', Lang.bind(this, this._valueChanged));
|
this.connect('value-changed', this._valueChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
setValue(value) {
|
setValue(value) {
|
||||||
@ -137,8 +137,8 @@ var Slider = new Lang.Class({
|
|||||||
this._grabbedSequence = sequence;
|
this._grabbedSequence = sequence;
|
||||||
|
|
||||||
if (sequence == null) {
|
if (sequence == null) {
|
||||||
this._releaseId = this.actor.connect('button-release-event', Lang.bind(this, this._endDragging));
|
this._releaseId = this.actor.connect('button-release-event', this._endDragging.bind(this));
|
||||||
this._motionId = this.actor.connect('motion-event', Lang.bind(this, this._motionEvent));
|
this._motionId = this.actor.connect('motion-event', this._motionEvent.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need to emit 'drag-begin' before moving the handle to make
|
// We need to emit 'drag-begin' before moving the handle to make
|
||||||
|
@ -49,7 +49,7 @@ var ATIndicator = new Lang.Class({
|
|||||||
this.actor.add_child(this._hbox);
|
this.actor.add_child(this._hbox);
|
||||||
|
|
||||||
this._a11ySettings = new Gio.Settings({ schema_id: A11Y_SCHEMA });
|
this._a11ySettings = new Gio.Settings({ schema_id: A11Y_SCHEMA });
|
||||||
this._a11ySettings.connect('changed::' + KEY_ALWAYS_SHOW, Lang.bind(this, this._queueSyncMenuVisibility));
|
this._a11ySettings.connect('changed::' + KEY_ALWAYS_SHOW, this._queueSyncMenuVisibility.bind(this));
|
||||||
|
|
||||||
let highContrast = this._buildHCItem();
|
let highContrast = this._buildHCItem();
|
||||||
this.menu.addMenuItem(highContrast);
|
this.menu.addMenuItem(highContrast);
|
||||||
@ -102,7 +102,7 @@ var ATIndicator = new Lang.Class({
|
|||||||
if (this._syncMenuVisibilityIdle)
|
if (this._syncMenuVisibilityIdle)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._syncMenuVisibilityIdle = Mainloop.idle_add(Lang.bind(this, this._syncMenuVisibility));
|
this._syncMenuVisibilityIdle = Mainloop.idle_add(this._syncMenuVisibility.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._syncMenuVisibilityIdle, '[gnome-shell] this._syncMenuVisibility');
|
GLib.Source.set_name_by_id(this._syncMenuVisibilityIdle, '[gnome-shell] this._syncMenuVisibility');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ var Indicator = new Lang.Class({
|
|||||||
|
|
||||||
this._sync();
|
this._sync();
|
||||||
});
|
});
|
||||||
this._proxy.connect('g-properties-changed', Lang.bind(this, this._sync));
|
this._proxy.connect('g-properties-changed', this._sync.bind(this));
|
||||||
|
|
||||||
this._item = new PopupMenu.PopupSubMenuMenuItem(_("Bluetooth"), true);
|
this._item = new PopupMenu.PopupSubMenuMenuItem(_("Bluetooth"), true);
|
||||||
this._item.icon.icon_name = 'bluetooth-active-symbolic';
|
this._item.icon.icon_name = 'bluetooth-active-symbolic';
|
||||||
@ -59,10 +59,10 @@ var Indicator = new Lang.Class({
|
|||||||
|
|
||||||
this._client = new GnomeBluetooth.Client();
|
this._client = new GnomeBluetooth.Client();
|
||||||
this._model = this._client.get_model();
|
this._model = this._client.get_model();
|
||||||
this._model.connect('row-changed', Lang.bind(this, this._sync));
|
this._model.connect('row-changed', this._sync.bind(this));
|
||||||
this._model.connect('row-deleted', Lang.bind(this, this._sync));
|
this._model.connect('row-deleted', this._sync.bind(this));
|
||||||
this._model.connect('row-inserted', Lang.bind(this, this._sync));
|
this._model.connect('row-inserted', this._sync.bind(this));
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sync));
|
Main.sessionMode.connect('updated', this._sync.bind(this));
|
||||||
this._sync();
|
this._sync();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ var Indicator = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._proxy.connect('g-properties-changed', Lang.bind(this, this._sync));
|
this._proxy.connect('g-properties-changed', this._sync.bind(this));
|
||||||
this._sync();
|
this._sync();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ var Indicator = new Lang.Class({
|
|||||||
this.menu.addMenuItem(this._item);
|
this.menu.addMenuItem(this._item);
|
||||||
|
|
||||||
this._slider = new Slider.Slider(0);
|
this._slider = new Slider.Slider(0);
|
||||||
this._slider.connect('value-changed', Lang.bind(this, this._sliderChanged));
|
this._slider.connect('value-changed', this._sliderChanged.bind(this));
|
||||||
this._slider.actor.accessible_name = _("Brightness");
|
this._slider.actor.accessible_name = _("Brightness");
|
||||||
|
|
||||||
let icon = new St.Icon({ icon_name: 'display-brightness-symbolic',
|
let icon = new St.Icon({ icon_name: 'display-brightness-symbolic',
|
||||||
|
@ -199,7 +199,7 @@ var InputSourceSystemSettings = new Lang.Class({
|
|||||||
this._BUS_PATH,
|
this._BUS_PATH,
|
||||||
null,
|
null,
|
||||||
Gio.DBusSignalFlags.NONE,
|
Gio.DBusSignalFlags.NONE,
|
||||||
Lang.bind(this, this._reload));
|
this._reload.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_reload() {
|
_reload() {
|
||||||
@ -265,9 +265,9 @@ var InputSourceSessionSettings = new Lang.Class({
|
|||||||
|
|
||||||
_init() {
|
_init() {
|
||||||
this._settings = new Gio.Settings({ schema_id: this._DESKTOP_INPUT_SOURCES_SCHEMA });
|
this._settings = new Gio.Settings({ schema_id: this._DESKTOP_INPUT_SOURCES_SCHEMA });
|
||||||
this._settings.connect('changed::' + this._KEY_INPUT_SOURCES, Lang.bind(this, this._emitInputSourcesChanged));
|
this._settings.connect('changed::' + this._KEY_INPUT_SOURCES, this._emitInputSourcesChanged.bind(this));
|
||||||
this._settings.connect('changed::' + this._KEY_KEYBOARD_OPTIONS, Lang.bind(this, this._emitKeyboardOptionsChanged));
|
this._settings.connect('changed::' + this._KEY_KEYBOARD_OPTIONS, this._emitKeyboardOptionsChanged.bind(this));
|
||||||
this._settings.connect('changed::' + this._KEY_PER_WINDOW, Lang.bind(this, this._emitPerWindowChanged));
|
this._settings.connect('changed::' + this._KEY_PER_WINDOW, this._emitPerWindowChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getSourcesList(key) {
|
_getSourcesList(key) {
|
||||||
@ -327,37 +327,37 @@ var InputSourceManager = new Lang.Class({
|
|||||||
new Gio.Settings({ schema_id: "org.gnome.desktop.wm.keybindings" }),
|
new Gio.Settings({ schema_id: "org.gnome.desktop.wm.keybindings" }),
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
Shell.ActionMode.ALL,
|
Shell.ActionMode.ALL,
|
||||||
Lang.bind(this, this._switchInputSource));
|
this._switchInputSource.bind(this));
|
||||||
this._keybindingActionBackward =
|
this._keybindingActionBackward =
|
||||||
Main.wm.addKeybinding('switch-input-source-backward',
|
Main.wm.addKeybinding('switch-input-source-backward',
|
||||||
new Gio.Settings({ schema_id: "org.gnome.desktop.wm.keybindings" }),
|
new Gio.Settings({ schema_id: "org.gnome.desktop.wm.keybindings" }),
|
||||||
Meta.KeyBindingFlags.IS_REVERSED,
|
Meta.KeyBindingFlags.IS_REVERSED,
|
||||||
Shell.ActionMode.ALL,
|
Shell.ActionMode.ALL,
|
||||||
Lang.bind(this, this._switchInputSource));
|
this._switchInputSource.bind(this));
|
||||||
if (Main.sessionMode.isGreeter)
|
if (Main.sessionMode.isGreeter)
|
||||||
this._settings = new InputSourceSystemSettings();
|
this._settings = new InputSourceSystemSettings();
|
||||||
else
|
else
|
||||||
this._settings = new InputSourceSessionSettings();
|
this._settings = new InputSourceSessionSettings();
|
||||||
this._settings.connect('input-sources-changed', Lang.bind(this, this._inputSourcesChanged));
|
this._settings.connect('input-sources-changed', this._inputSourcesChanged.bind(this));
|
||||||
this._settings.connect('keyboard-options-changed', Lang.bind(this, this._keyboardOptionsChanged));
|
this._settings.connect('keyboard-options-changed', this._keyboardOptionsChanged.bind(this));
|
||||||
|
|
||||||
this._xkbInfo = KeyboardManager.getXkbInfo();
|
this._xkbInfo = KeyboardManager.getXkbInfo();
|
||||||
this._keyboardManager = KeyboardManager.getKeyboardManager();
|
this._keyboardManager = KeyboardManager.getKeyboardManager();
|
||||||
|
|
||||||
this._ibusReady = false;
|
this._ibusReady = false;
|
||||||
this._ibusManager = IBusManager.getIBusManager();
|
this._ibusManager = IBusManager.getIBusManager();
|
||||||
this._ibusManager.connect('ready', Lang.bind(this, this._ibusReadyCallback));
|
this._ibusManager.connect('ready', this._ibusReadyCallback.bind(this));
|
||||||
this._ibusManager.connect('properties-registered', Lang.bind(this, this._ibusPropertiesRegistered));
|
this._ibusManager.connect('properties-registered', this._ibusPropertiesRegistered.bind(this));
|
||||||
this._ibusManager.connect('property-updated', Lang.bind(this, this._ibusPropertyUpdated));
|
this._ibusManager.connect('property-updated', this._ibusPropertyUpdated.bind(this));
|
||||||
this._ibusManager.connect('set-content-type', Lang.bind(this, this._ibusSetContentType));
|
this._ibusManager.connect('set-content-type', this._ibusSetContentType.bind(this));
|
||||||
|
|
||||||
global.display.connect('modifiers-accelerator-activated', Lang.bind(this, this._modifiersSwitcher));
|
global.display.connect('modifiers-accelerator-activated', this._modifiersSwitcher.bind(this));
|
||||||
|
|
||||||
this._sourcesPerWindow = false;
|
this._sourcesPerWindow = false;
|
||||||
this._focusWindowNotifyId = 0;
|
this._focusWindowNotifyId = 0;
|
||||||
this._overviewShowingId = 0;
|
this._overviewShowingId = 0;
|
||||||
this._overviewHiddenId = 0;
|
this._overviewHiddenId = 0;
|
||||||
this._settings.connect('per-window-changed', Lang.bind(this, this._sourcesPerWindowChanged));
|
this._settings.connect('per-window-changed', this._sourcesPerWindowChanged.bind(this));
|
||||||
this._sourcesPerWindowChanged();
|
this._sourcesPerWindowChanged();
|
||||||
this._disableIBus = false;
|
this._disableIBus = false;
|
||||||
},
|
},
|
||||||
@ -578,7 +578,7 @@ var InputSourceManager = new Lang.Class({
|
|||||||
infosList[i].displayName,
|
infosList[i].displayName,
|
||||||
infosList[i].shortName,
|
infosList[i].shortName,
|
||||||
i);
|
i);
|
||||||
is.connect('activate', Lang.bind(this, this.activateInputSource));
|
is.connect('activate', this.activateInputSource.bind(this));
|
||||||
|
|
||||||
if (!(is.shortName in inputSourcesByShortName))
|
if (!(is.shortName in inputSourcesByShortName))
|
||||||
inputSourcesByShortName[is.shortName] = [];
|
inputSourcesByShortName[is.shortName] = [];
|
||||||
@ -720,11 +720,11 @@ var InputSourceManager = new Lang.Class({
|
|||||||
|
|
||||||
if (this._sourcesPerWindow && this._focusWindowNotifyId == 0) {
|
if (this._sourcesPerWindow && this._focusWindowNotifyId == 0) {
|
||||||
this._focusWindowNotifyId = global.display.connect('notify::focus-window',
|
this._focusWindowNotifyId = global.display.connect('notify::focus-window',
|
||||||
Lang.bind(this, this._setPerWindowInputSource));
|
this._setPerWindowInputSource.bind(this));
|
||||||
this._overviewShowingId = Main.overview.connect('showing',
|
this._overviewShowingId = Main.overview.connect('showing',
|
||||||
Lang.bind(this, this._setPerWindowInputSource));
|
this._setPerWindowInputSource.bind(this));
|
||||||
this._overviewHiddenId = Main.overview.connect('hidden',
|
this._overviewHiddenId = Main.overview.connect('hidden',
|
||||||
Lang.bind(this, this._setPerWindowInputSource));
|
this._setPerWindowInputSource.bind(this));
|
||||||
} else if (!this._sourcesPerWindow && this._focusWindowNotifyId != 0) {
|
} else if (!this._sourcesPerWindow && this._focusWindowNotifyId != 0) {
|
||||||
global.display.disconnect(this._focusWindowNotifyId);
|
global.display.disconnect(this._focusWindowNotifyId);
|
||||||
this._focusWindowNotifyId = 0;
|
this._focusWindowNotifyId = 0;
|
||||||
@ -784,9 +784,9 @@ var InputSourceIndicator = new Lang.Class({
|
|||||||
this._indicatorLabels = {};
|
this._indicatorLabels = {};
|
||||||
|
|
||||||
this._container = new Shell.GenericContainer();
|
this._container = new Shell.GenericContainer();
|
||||||
this._container.connect('get-preferred-width', Lang.bind(this, this._containerGetPreferredWidth));
|
this._container.connect('get-preferred-width', this._containerGetPreferredWidth.bind(this));
|
||||||
this._container.connect('get-preferred-height', Lang.bind(this, this._containerGetPreferredHeight));
|
this._container.connect('get-preferred-height', this._containerGetPreferredHeight.bind(this));
|
||||||
this._container.connect('allocate', Lang.bind(this, this._containerAllocate));
|
this._container.connect('allocate', this._containerAllocate.bind(this));
|
||||||
|
|
||||||
this._hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
this._hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
||||||
this._hbox.add_child(this._container);
|
this._hbox.add_child(this._container);
|
||||||
@ -801,14 +801,14 @@ var InputSourceIndicator = new Lang.Class({
|
|||||||
this._propSection.actor.hide();
|
this._propSection.actor.hide();
|
||||||
|
|
||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
this._showLayoutItem = this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, this._showLayout));
|
this._showLayoutItem = this.menu.addAction(_("Show Keyboard Layout"), this._showLayout.bind(this));
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
|
|
||||||
this._inputSourceManager = getInputSourceManager();
|
this._inputSourceManager = getInputSourceManager();
|
||||||
this._inputSourceManager.connect('sources-changed', Lang.bind(this, this._sourcesChanged));
|
this._inputSourceManager.connect('sources-changed', this._sourcesChanged.bind(this));
|
||||||
this._inputSourceManager.connect('current-source-changed', Lang.bind(this, this._currentSourceChanged));
|
this._inputSourceManager.connect('current-source-changed', this._currentSourceChanged.bind(this));
|
||||||
this._inputSourceManager.reload();
|
this._inputSourceManager.reload();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -73,9 +73,9 @@ var Indicator = new Lang.Class({
|
|||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: LOCATION_SCHEMA });
|
this._settings = new Gio.Settings({ schema_id: LOCATION_SCHEMA });
|
||||||
this._settings.connect('changed::' + ENABLED,
|
this._settings.connect('changed::' + ENABLED,
|
||||||
Lang.bind(this, this._onMaxAccuracyLevelChanged));
|
this._onMaxAccuracyLevelChanged.bind(this));
|
||||||
this._settings.connect('changed::' + MAX_ACCURACY_LEVEL,
|
this._settings.connect('changed::' + MAX_ACCURACY_LEVEL,
|
||||||
Lang.bind(this, this._onMaxAccuracyLevelChanged));
|
this._onMaxAccuracyLevelChanged.bind(this));
|
||||||
|
|
||||||
this._indicator = this._addIndicator();
|
this._indicator = this._addIndicator();
|
||||||
this._indicator.icon_name = 'find-location-symbolic';
|
this._indicator.icon_name = 'find-location-symbolic';
|
||||||
@ -87,7 +87,7 @@ var Indicator = new Lang.Class({
|
|||||||
this._agent.export(Gio.DBus.system, '/org/freedesktop/GeoClue2/Agent');
|
this._agent.export(Gio.DBus.system, '/org/freedesktop/GeoClue2/Agent');
|
||||||
|
|
||||||
this._item.label.text = _("Location Enabled");
|
this._item.label.text = _("Location Enabled");
|
||||||
this._onOffAction = this._item.menu.addAction(_("Disable"), Lang.bind(this, this._onOnOffAction));
|
this._onOffAction = this._item.menu.addAction(_("Disable"), this._onOnOffAction.bind(this));
|
||||||
this._item.menu.addSettingsAction(_("Privacy Settings"), 'gnome-privacy-panel.desktop');
|
this._item.menu.addSettingsAction(_("Privacy Settings"), 'gnome-privacy-panel.desktop');
|
||||||
|
|
||||||
this.menu.addMenuItem(this._item);
|
this.menu.addMenuItem(this._item);
|
||||||
@ -95,9 +95,9 @@ var Indicator = new Lang.Class({
|
|||||||
this._watchId = Gio.bus_watch_name(Gio.BusType.SYSTEM,
|
this._watchId = Gio.bus_watch_name(Gio.BusType.SYSTEM,
|
||||||
'org.freedesktop.GeoClue2',
|
'org.freedesktop.GeoClue2',
|
||||||
0,
|
0,
|
||||||
Lang.bind(this, this._connectToGeoclue),
|
this._connectToGeoclue.bind(this),
|
||||||
Lang.bind(this, this._onGeoclueVanished));
|
this._onGeoclueVanished.bind(this));
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._onSessionUpdated));
|
Main.sessionMode.connect('updated', this._onSessionUpdated.bind(this));
|
||||||
this._onSessionUpdated();
|
this._onSessionUpdated();
|
||||||
this._onMaxAccuracyLevelChanged();
|
this._onMaxAccuracyLevelChanged();
|
||||||
this._connectToGeoclue();
|
this._connectToGeoclue();
|
||||||
@ -143,7 +143,7 @@ var Indicator = new Lang.Class({
|
|||||||
new GeoclueManager(Gio.DBus.system,
|
new GeoclueManager(Gio.DBus.system,
|
||||||
'org.freedesktop.GeoClue2',
|
'org.freedesktop.GeoClue2',
|
||||||
'/org/freedesktop/GeoClue2/Manager',
|
'/org/freedesktop/GeoClue2/Manager',
|
||||||
Lang.bind(this, this._onManagerProxyReady));
|
this._onManagerProxyReady.bind(this));
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -156,11 +156,11 @@ var Indicator = new Lang.Class({
|
|||||||
|
|
||||||
this._managerProxy = proxy;
|
this._managerProxy = proxy;
|
||||||
this._propertiesChangedId = this._managerProxy.connect('g-properties-changed',
|
this._propertiesChangedId = this._managerProxy.connect('g-properties-changed',
|
||||||
Lang.bind(this, this._onGeocluePropsChanged));
|
this._onGeocluePropsChanged.bind(this));
|
||||||
|
|
||||||
this._syncIndicator();
|
this._syncIndicator();
|
||||||
|
|
||||||
this._managerProxy.AddAgentRemote('gnome-shell', Lang.bind(this, this._onAgentRegistered));
|
this._managerProxy.AddAgentRemote('gnome-shell', this._onAgentRegistered.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onAgentRegistered(result, error) {
|
_onAgentRegistered(result, error) {
|
||||||
@ -235,7 +235,7 @@ var Indicator = new Lang.Class({
|
|||||||
|
|
||||||
_connectToPermissionStore() {
|
_connectToPermissionStore() {
|
||||||
this._permStoreProxy = null;
|
this._permStoreProxy = null;
|
||||||
new PermissionStore.PermissionStore(Lang.bind(this, this._onPermStoreProxyReady), null);
|
new PermissionStore.PermissionStore(this._onPermStoreProxyReady.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onPermStoreProxyReady(proxy, error) {
|
_onPermStoreProxyReady(proxy, error) {
|
||||||
@ -281,8 +281,7 @@ var AppAuthorizer = new Lang.Class({
|
|||||||
|
|
||||||
this._permStoreProxy.LookupRemote(APP_PERMISSIONS_TABLE,
|
this._permStoreProxy.LookupRemote(APP_PERMISSIONS_TABLE,
|
||||||
APP_PERMISSIONS_ID,
|
APP_PERMISSIONS_ID,
|
||||||
Lang.bind(this,
|
this._onPermLookupDone.bind(this));
|
||||||
this._onPermLookupDone));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onPermLookupDone(result, error) {
|
_onPermLookupDone(result, error) {
|
||||||
@ -392,10 +391,10 @@ var GeolocationDialog = new Lang.Class({
|
|||||||
this.contentLayout.add_actor(content);
|
this.contentLayout.add_actor(content);
|
||||||
|
|
||||||
let button = this.addButton({ label: _("Deny Access"),
|
let button = this.addButton({ label: _("Deny Access"),
|
||||||
action: Lang.bind(this, this._onDenyClicked),
|
action: this._onDenyClicked.bind(this),
|
||||||
key: Clutter.KEY_Escape });
|
key: Clutter.KEY_Escape });
|
||||||
this.addButton({ label: _("Grant Access"),
|
this.addButton({ label: _("Grant Access"),
|
||||||
action: Lang.bind(this, this._onGrantClicked) });
|
action: this._onGrantClicked.bind(this) });
|
||||||
|
|
||||||
this.setInitialKeyFocus(button);
|
this.setInitialKeyFocus(button);
|
||||||
},
|
},
|
||||||
|
@ -114,10 +114,10 @@ var NMConnectionItem = new Lang.Class({
|
|||||||
|
|
||||||
_buildUI() {
|
_buildUI() {
|
||||||
this.labelItem = new PopupMenu.PopupMenuItem('');
|
this.labelItem = new PopupMenu.PopupMenuItem('');
|
||||||
this.labelItem.connect('activate', Lang.bind(this, this._toggle));
|
this.labelItem.connect('activate', this._toggle.bind(this));
|
||||||
|
|
||||||
this.radioItem = new PopupMenu.PopupMenuItem(this._connection.get_id(), false);
|
this.radioItem = new PopupMenu.PopupMenuItem(this._connection.get_id(), false);
|
||||||
this.radioItem.connect('activate', Lang.bind(this, this._activate));
|
this.radioItem.connect('activate', this._activate.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
@ -186,7 +186,7 @@ var NMConnectionItem = new Lang.Class({
|
|||||||
|
|
||||||
if (this._activeConnection)
|
if (this._activeConnection)
|
||||||
this._activeConnectionChangedId = this._activeConnection.connect('notify::state',
|
this._activeConnectionChangedId = this._activeConnection.connect('notify::state',
|
||||||
Lang.bind(this, this._connectionStateChanged));
|
this._connectionStateChanged.bind(this));
|
||||||
|
|
||||||
this._sync();
|
this._sync();
|
||||||
},
|
},
|
||||||
@ -210,7 +210,7 @@ var NMConnectionSection = new Lang.Class({
|
|||||||
this.item.menu.addMenuItem(this._labelSection);
|
this.item.menu.addMenuItem(this._labelSection);
|
||||||
this.item.menu.addMenuItem(this._radioSection);
|
this.item.menu.addMenuItem(this._radioSection);
|
||||||
|
|
||||||
this._notifyConnectivityId = this._client.connect('notify::connectivity', Lang.bind(this, this._iconChanged));
|
this._notifyConnectivityId = this._client.connect('notify::connectivity', this._iconChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
@ -281,7 +281,7 @@ var NMConnectionSection = new Lang.Class({
|
|||||||
let pos = this._connections.indexOf(connection);
|
let pos = this._connections.indexOf(connection);
|
||||||
|
|
||||||
this._connections.splice(pos, 1);
|
this._connections.splice(pos, 1);
|
||||||
pos = Util.insertSorted(this._connections, connection, Lang.bind(this, this._connectionSortFunction));
|
pos = Util.insertSorted(this._connections, connection, this._connectionSortFunction.bind(this));
|
||||||
this._labelSection.moveMenuItem(item.labelItem, pos);
|
this._labelSection.moveMenuItem(item.labelItem, pos);
|
||||||
this._radioSection.moveMenuItem(item.radioItem, pos);
|
this._radioSection.moveMenuItem(item.radioItem, pos);
|
||||||
|
|
||||||
@ -297,9 +297,9 @@ var NMConnectionSection = new Lang.Class({
|
|||||||
item.connect('activation-failed', (item, reason) => {
|
item.connect('activation-failed', (item, reason) => {
|
||||||
this.emit('activation-failed', reason);
|
this.emit('activation-failed', reason);
|
||||||
});
|
});
|
||||||
item.connect('name-changed', Lang.bind(this, this._sync));
|
item.connect('name-changed', this._sync.bind(this));
|
||||||
|
|
||||||
let pos = Util.insertSorted(this._connections, connection, Lang.bind(this, this._connectionSortFunction));
|
let pos = Util.insertSorted(this._connections, connection, this._connectionSortFunction.bind(this));
|
||||||
this._labelSection.addMenuItem(item.labelItem, pos);
|
this._labelSection.addMenuItem(item.labelItem, pos);
|
||||||
this._radioSection.addMenuItem(item.radioItem, pos);
|
this._radioSection.addMenuItem(item.radioItem, pos);
|
||||||
this._connectionItems.set(connection.get_uuid(), item);
|
this._connectionItems.set(connection.get_uuid(), item);
|
||||||
@ -333,11 +333,11 @@ var NMConnectionDevice = new Lang.Class({
|
|||||||
this._device = device;
|
this._device = device;
|
||||||
this._description = '';
|
this._description = '';
|
||||||
|
|
||||||
this._autoConnectItem = this.item.menu.addAction(_("Connect"), Lang.bind(this, this._autoConnect));
|
this._autoConnectItem = this.item.menu.addAction(_("Connect"), this._autoConnect.bind(this));
|
||||||
this._deactivateItem = this._radioSection.addAction(_("Turn Off"), Lang.bind(this, this.deactivateConnection));
|
this._deactivateItem = this._radioSection.addAction(_("Turn Off"), this.deactivateConnection.bind(this));
|
||||||
|
|
||||||
this._stateChangedId = this._device.connect('state-changed', Lang.bind(this, this._deviceStateChanged));
|
this._stateChangedId = this._device.connect('state-changed', this._deviceStateChanged.bind(this));
|
||||||
this._activeConnectionChangedId = this._device.connect('notify::active-connection', Lang.bind(this, this._activeConnectionChanged));
|
this._activeConnectionChangedId = this._device.connect('notify::active-connection', this._activeConnectionChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_canReachInternet() {
|
_canReachInternet() {
|
||||||
@ -547,7 +547,7 @@ var NMDeviceModem = new Lang.Class({
|
|||||||
this._mobileDevice = new ModemManager.ModemGsm(device.udi);
|
this._mobileDevice = new ModemManager.ModemGsm(device.udi);
|
||||||
|
|
||||||
if (this._mobileDevice) {
|
if (this._mobileDevice) {
|
||||||
this._operatorNameId = this._mobileDevice.connect('notify::operator-name', Lang.bind(this, this._sync));
|
this._operatorNameId = this._mobileDevice.connect('notify::operator-name', this._sync.bind(this));
|
||||||
this._signalQualityId = this._mobileDevice.connect('notify::signal-quality', () => {
|
this._signalQualityId = this._mobileDevice.connect('notify::signal-quality', () => {
|
||||||
this._iconChanged();
|
this._iconChanged();
|
||||||
});
|
});
|
||||||
@ -709,11 +709,11 @@ var NMWirelessDialog = new Lang.Class({
|
|||||||
this._device = device;
|
this._device = device;
|
||||||
|
|
||||||
this._wirelessEnabledChangedId = this._client.connect('notify::wireless-enabled',
|
this._wirelessEnabledChangedId = this._client.connect('notify::wireless-enabled',
|
||||||
Lang.bind(this, this._syncView));
|
this._syncView.bind(this));
|
||||||
|
|
||||||
this._rfkill = Rfkill.getRfkillManager();
|
this._rfkill = Rfkill.getRfkillManager();
|
||||||
this._airplaneModeChangedId = this._rfkill.connect('airplane-mode-changed',
|
this._airplaneModeChangedId = this._rfkill.connect('airplane-mode-changed',
|
||||||
Lang.bind(this, this._syncView));
|
this._syncView.bind(this));
|
||||||
|
|
||||||
this._networks = [];
|
this._networks = [];
|
||||||
this._buildLayout();
|
this._buildLayout();
|
||||||
@ -723,9 +723,9 @@ var NMWirelessDialog = new Lang.Class({
|
|||||||
connection => device.connection_valid(connection)
|
connection => device.connection_valid(connection)
|
||||||
);
|
);
|
||||||
|
|
||||||
this._apAddedId = device.connect('access-point-added', Lang.bind(this, this._accessPointAdded));
|
this._apAddedId = device.connect('access-point-added', this._accessPointAdded.bind(this));
|
||||||
this._apRemovedId = device.connect('access-point-removed', Lang.bind(this, this._accessPointRemoved));
|
this._apRemovedId = device.connect('access-point-removed', this._accessPointRemoved.bind(this));
|
||||||
this._activeApChangedId = device.connect('notify::active-access-point', Lang.bind(this, this._activeApChanged));
|
this._activeApChangedId = device.connect('notify::active-access-point', this._activeApChanged.bind(this));
|
||||||
|
|
||||||
// accessPointAdded will also create dialog items
|
// accessPointAdded will also create dialog items
|
||||||
let accessPoints = device.get_access_points() || [ ];
|
let accessPoints = device.get_access_points() || [ ];
|
||||||
@ -738,7 +738,7 @@ var NMWirelessDialog = new Lang.Class({
|
|||||||
this._updateSensitivity();
|
this._updateSensitivity();
|
||||||
this._syncView();
|
this._syncView();
|
||||||
|
|
||||||
this._scanTimeoutId = Mainloop.timeout_add_seconds(15, Lang.bind(this, this._onScanTimeout));
|
this._scanTimeoutId = Mainloop.timeout_add_seconds(15, this._onScanTimeout.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._scanTimeoutId, '[gnome-shell] this._onScanTimeout');
|
GLib.Source.set_name_by_id(this._scanTimeoutId, '[gnome-shell] this._onScanTimeout');
|
||||||
this._onScanTimeout();
|
this._onScanTimeout();
|
||||||
|
|
||||||
@ -915,10 +915,10 @@ var NMWirelessDialog = new Lang.Class({
|
|||||||
|
|
||||||
this.contentLayout.add(this._stack, { expand: true });
|
this.contentLayout.add(this._stack, { expand: true });
|
||||||
|
|
||||||
this._disconnectButton = this.addButton({ action: Lang.bind(this, this.close),
|
this._disconnectButton = this.addButton({ action: this.close.bind(this),
|
||||||
label: _("Cancel"),
|
label: _("Cancel"),
|
||||||
key: Clutter.Escape });
|
key: Clutter.Escape });
|
||||||
this._connectButton = this.addButton({ action: Lang.bind(this, this._connect),
|
this._connectButton = this.addButton({ action: this._connect.bind(this),
|
||||||
label: _("Connect"),
|
label: _("Connect"),
|
||||||
key: Clutter.Return });
|
key: Clutter.Return });
|
||||||
},
|
},
|
||||||
@ -1064,7 +1064,7 @@ var NMWirelessDialog = new Lang.Class({
|
|||||||
if (accessPoint.get_ssid() == null) {
|
if (accessPoint.get_ssid() == null) {
|
||||||
// This access point is not visible yet
|
// This access point is not visible yet
|
||||||
// Wait for it to get a ssid
|
// Wait for it to get a ssid
|
||||||
accessPoint._notifySsidId = accessPoint.connect('notify::ssid', Lang.bind(this, this._notifySsidCb));
|
accessPoint._notifySsidId = accessPoint.connect('notify::ssid', this._notifySsidCb.bind(this));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1170,19 +1170,19 @@ var NMDeviceWireless = new Lang.Class({
|
|||||||
this._description = '';
|
this._description = '';
|
||||||
|
|
||||||
this.item = new PopupMenu.PopupSubMenuMenuItem('', true);
|
this.item = new PopupMenu.PopupSubMenuMenuItem('', true);
|
||||||
this.item.menu.addAction(_("Select Network"), Lang.bind(this, this._showDialog));
|
this.item.menu.addAction(_("Select Network"), this._showDialog.bind(this));
|
||||||
|
|
||||||
this._toggleItem = new PopupMenu.PopupMenuItem('');
|
this._toggleItem = new PopupMenu.PopupMenuItem('');
|
||||||
this._toggleItem.connect('activate', Lang.bind(this, this._toggleWifi));
|
this._toggleItem.connect('activate', this._toggleWifi.bind(this));
|
||||||
this.item.menu.addMenuItem(this._toggleItem);
|
this.item.menu.addMenuItem(this._toggleItem);
|
||||||
|
|
||||||
this.item.menu.addSettingsAction(_("Wi-Fi Settings"), 'gnome-wifi-panel.desktop');
|
this.item.menu.addSettingsAction(_("Wi-Fi Settings"), 'gnome-wifi-panel.desktop');
|
||||||
|
|
||||||
this._wirelessEnabledChangedId = this._client.connect('notify::wireless-enabled', Lang.bind(this, this._sync));
|
this._wirelessEnabledChangedId = this._client.connect('notify::wireless-enabled', this._sync.bind(this));
|
||||||
this._wirelessHwEnabledChangedId = this._client.connect('notify::wireless-hardware-enabled', Lang.bind(this, this._sync));
|
this._wirelessHwEnabledChangedId = this._client.connect('notify::wireless-hardware-enabled', this._sync.bind(this));
|
||||||
this._activeApChangedId = this._device.connect('notify::active-access-point', Lang.bind(this, this._activeApChanged));
|
this._activeApChangedId = this._device.connect('notify::active-access-point', this._activeApChanged.bind(this));
|
||||||
this._stateChangedId = this._device.connect('state-changed', Lang.bind(this, this._deviceStateChanged));
|
this._stateChangedId = this._device.connect('state-changed', this._deviceStateChanged.bind(this));
|
||||||
this._notifyConnectivityId = this._client.connect('notify::connectivity', Lang.bind(this, this._iconChanged));
|
this._notifyConnectivityId = this._client.connect('notify::connectivity', this._iconChanged.bind(this));
|
||||||
|
|
||||||
this._sync();
|
this._sync();
|
||||||
},
|
},
|
||||||
@ -1248,7 +1248,7 @@ var NMDeviceWireless = new Lang.Class({
|
|||||||
|
|
||||||
_showDialog() {
|
_showDialog() {
|
||||||
this._dialog = new NMWirelessDialog(this._client, this._device);
|
this._dialog = new NMWirelessDialog(this._client, this._device);
|
||||||
this._dialog.connect('closed', Lang.bind(this, this._dialogClosed));
|
this._dialog.connect('closed', this._dialogClosed.bind(this));
|
||||||
this._dialog.open();
|
this._dialog.open();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1271,7 +1271,7 @@ var NMDeviceWireless = new Lang.Class({
|
|||||||
|
|
||||||
if (this._activeAccessPoint) {
|
if (this._activeAccessPoint) {
|
||||||
this._strengthChangedId = this._activeAccessPoint.connect('notify::strength',
|
this._strengthChangedId = this._activeAccessPoint.connect('notify::strength',
|
||||||
Lang.bind(this, this._strengthChanged));
|
this._strengthChanged.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
this._sync();
|
this._sync();
|
||||||
@ -1385,10 +1385,10 @@ var NMVpnConnectionItem = new Lang.Class({
|
|||||||
|
|
||||||
_buildUI() {
|
_buildUI() {
|
||||||
this.labelItem = new PopupMenu.PopupMenuItem('');
|
this.labelItem = new PopupMenu.PopupMenuItem('');
|
||||||
this.labelItem.connect('activate', Lang.bind(this, this._toggle));
|
this.labelItem.connect('activate', this._toggle.bind(this));
|
||||||
|
|
||||||
this.radioItem = new PopupMenu.PopupSwitchMenuItem(this._connection.get_id(), false);
|
this.radioItem = new PopupMenu.PopupSwitchMenuItem(this._connection.get_id(), false);
|
||||||
this.radioItem.connect('toggled', Lang.bind(this, this._toggle));
|
this.radioItem.connect('toggled', this._toggle.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_sync() {
|
_sync() {
|
||||||
@ -1444,7 +1444,7 @@ var NMVpnConnectionItem = new Lang.Class({
|
|||||||
|
|
||||||
if (this._activeConnection)
|
if (this._activeConnection)
|
||||||
this._activeConnectionChangedId = this._activeConnection.connect('vpn-state-changed',
|
this._activeConnectionChangedId = this._activeConnection.connect('vpn-state-changed',
|
||||||
Lang.bind(this, this._connectionStateChanged));
|
this._connectionStateChanged.bind(this));
|
||||||
|
|
||||||
this._sync();
|
this._sync();
|
||||||
},
|
},
|
||||||
@ -1548,8 +1548,8 @@ var DeviceCategory = new Lang.Class({
|
|||||||
this.devices = [];
|
this.devices = [];
|
||||||
|
|
||||||
this.section = new PopupMenu.PopupMenuSection();
|
this.section = new PopupMenu.PopupMenuSection();
|
||||||
this.section.box.connect('actor-added', Lang.bind(this, this._sync));
|
this.section.box.connect('actor-added', this._sync.bind(this));
|
||||||
this.section.box.connect('actor-removed', Lang.bind(this, this._sync));
|
this.section.box.connect('actor-removed', this._sync.bind(this));
|
||||||
this.addMenuItem(this.section);
|
this.addMenuItem(this.section);
|
||||||
|
|
||||||
this._summaryItem = new PopupMenu.PopupSubMenuMenuItem('', true);
|
this._summaryItem = new PopupMenu.PopupSubMenuMenuItem('', true);
|
||||||
@ -1627,7 +1627,7 @@ var NMApplet = new Lang.Class({
|
|||||||
this._ctypes[NM.SETTING_GSM_SETTING_NAME] = NMConnectionCategory.WWAN;
|
this._ctypes[NM.SETTING_GSM_SETTING_NAME] = NMConnectionCategory.WWAN;
|
||||||
this._ctypes[NM.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN;
|
this._ctypes[NM.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN;
|
||||||
|
|
||||||
NM.Client.new_async(null, Lang.bind(this, this._clientGot));
|
NM.Client.new_async(null, this._clientGot.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_clientGot(obj, result) {
|
_clientGot(obj, result) {
|
||||||
@ -1655,8 +1655,8 @@ var NMApplet = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._vpnSection = new NMVpnSection(this._client);
|
this._vpnSection = new NMVpnSection(this._client);
|
||||||
this._vpnSection.connect('activation-failed', Lang.bind(this, this._onActivationFailed));
|
this._vpnSection.connect('activation-failed', this._onActivationFailed.bind(this));
|
||||||
this._vpnSection.connect('icon-changed', Lang.bind(this, this._updateIcon));
|
this._vpnSection.connect('icon-changed', this._updateIcon.bind(this));
|
||||||
this.menu.addMenuItem(this._vpnSection.item);
|
this.menu.addMenuItem(this._vpnSection.item);
|
||||||
|
|
||||||
this._readConnections();
|
this._readConnections();
|
||||||
@ -1665,19 +1665,19 @@ var NMApplet = new Lang.Class({
|
|||||||
this._syncMainConnection();
|
this._syncMainConnection();
|
||||||
this._syncVpnConnections();
|
this._syncVpnConnections();
|
||||||
|
|
||||||
this._client.connect('notify::nm-running', Lang.bind(this, this._syncNMState));
|
this._client.connect('notify::nm-running', this._syncNMState.bind(this));
|
||||||
this._client.connect('notify::networking-enabled', Lang.bind(this, this._syncNMState));
|
this._client.connect('notify::networking-enabled', this._syncNMState.bind(this));
|
||||||
this._client.connect('notify::state', Lang.bind(this, this._syncNMState));
|
this._client.connect('notify::state', this._syncNMState.bind(this));
|
||||||
this._client.connect('notify::primary-connection', Lang.bind(this, this._syncMainConnection));
|
this._client.connect('notify::primary-connection', this._syncMainConnection.bind(this));
|
||||||
this._client.connect('notify::activating-connection', Lang.bind(this, this._syncMainConnection));
|
this._client.connect('notify::activating-connection', this._syncMainConnection.bind(this));
|
||||||
this._client.connect('notify::active-connections', Lang.bind(this, this._syncVpnConnections));
|
this._client.connect('notify::active-connections', this._syncVpnConnections.bind(this));
|
||||||
this._client.connect('notify::connectivity', Lang.bind(this, this._syncConnectivity));
|
this._client.connect('notify::connectivity', this._syncConnectivity.bind(this));
|
||||||
this._client.connect('device-added', Lang.bind(this, this._deviceAdded));
|
this._client.connect('device-added', this._deviceAdded.bind(this));
|
||||||
this._client.connect('device-removed', Lang.bind(this, this._deviceRemoved));
|
this._client.connect('device-removed', this._deviceRemoved.bind(this));
|
||||||
this._client.connect('connection-added', Lang.bind(this, this._connectionAdded));
|
this._client.connect('connection-added', this._connectionAdded.bind(this));
|
||||||
this._client.connect('connection-removed', Lang.bind(this, this._connectionRemoved));
|
this._client.connect('connection-removed', this._connectionRemoved.bind(this));
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1766,7 +1766,7 @@ var NMApplet = new Lang.Class({
|
|||||||
|
|
||||||
_addDeviceWrapper(wrapper) {
|
_addDeviceWrapper(wrapper) {
|
||||||
wrapper._activationFailedId = wrapper.connect('activation-failed',
|
wrapper._activationFailedId = wrapper.connect('activation-failed',
|
||||||
Lang.bind(this, this._onActivationFailed));
|
this._onActivationFailed.bind(this));
|
||||||
|
|
||||||
let section = this._devices[wrapper.category].section;
|
let section = this._devices[wrapper.category].section;
|
||||||
section.addMenuItem(wrapper.item);
|
section.addMenuItem(wrapper.item);
|
||||||
@ -1833,8 +1833,8 @@ var NMApplet = new Lang.Class({
|
|||||||
|
|
||||||
if (this._mainConnection) {
|
if (this._mainConnection) {
|
||||||
if (this._mainConnection._primaryDevice)
|
if (this._mainConnection._primaryDevice)
|
||||||
this._mainConnectionIconChangedId = this._mainConnection._primaryDevice.connect('icon-changed', Lang.bind(this, this._updateIcon));
|
this._mainConnectionIconChangedId = this._mainConnection._primaryDevice.connect('icon-changed', this._updateIcon.bind(this));
|
||||||
this._mainConnectionStateChangedId = this._mainConnection.connect('notify::state', Lang.bind(this, this._mainConnectionStateChanged));
|
this._mainConnectionStateChangedId = this._mainConnection.connect('notify::state', this._mainConnectionStateChanged.bind(this));
|
||||||
this._mainConnectionStateChanged();
|
this._mainConnectionStateChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1880,7 +1880,7 @@ var NMApplet = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
connection._updatedId = connection.connect('changed', Lang.bind(this, this._updateConnection));
|
connection._updatedId = connection.connect('changed', this._updateConnection.bind(this));
|
||||||
|
|
||||||
this._updateConnection(connection);
|
this._updateConnection(connection);
|
||||||
this._connections.push(connection);
|
this._connections.push(connection);
|
||||||
@ -1888,7 +1888,7 @@ var NMApplet = new Lang.Class({
|
|||||||
|
|
||||||
_readConnections() {
|
_readConnections() {
|
||||||
let connections = this._client.get_connections();
|
let connections = this._client.get_connections();
|
||||||
connections.forEach(Lang.bind(this, this._addConnection));
|
connections.forEach(this._addConnection.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_connectionAdded(client, connection) {
|
_connectionAdded(client, connection) {
|
||||||
@ -2027,7 +2027,7 @@ var NMApplet = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._portalHelperProxy = proxy;
|
this._portalHelperProxy = proxy;
|
||||||
proxy.connectSignal('Done', Lang.bind(this, this._portalHelperDone));
|
proxy.connectSignal('Done', this._portalHelperDone.bind(this));
|
||||||
|
|
||||||
proxy.AuthenticateRemote(path, '', timestamp);
|
proxy.AuthenticateRemote(path, '', timestamp);
|
||||||
});
|
});
|
||||||
|
@ -35,7 +35,7 @@ var Indicator = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._proxy.connect('g-properties-changed',
|
this._proxy.connect('g-properties-changed',
|
||||||
Lang.bind(this, this._sync));
|
this._sync.bind(this));
|
||||||
this._sync();
|
this._sync();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ var Indicator = new Lang.Class({
|
|||||||
this._item.menu.addSettingsAction(_("Display Settings"), 'gnome-display-panel.desktop');
|
this._item.menu.addSettingsAction(_("Display Settings"), 'gnome-display-panel.desktop');
|
||||||
this.menu.addMenuItem(this._item);
|
this.menu.addMenuItem(this._item);
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
this._sync();
|
this._sync();
|
||||||
},
|
},
|
||||||
|
@ -38,7 +38,7 @@ var Indicator = new Lang.Class({
|
|||||||
|
|
||||||
this._desktopSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
|
this._desktopSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
|
||||||
this._desktopSettings.connect('changed::' + SHOW_BATTERY_PERCENTAGE,
|
this._desktopSettings.connect('changed::' + SHOW_BATTERY_PERCENTAGE,
|
||||||
Lang.bind(this, this._sync));
|
this._sync.bind(this));
|
||||||
|
|
||||||
this._indicator = this._addIndicator();
|
this._indicator = this._addIndicator();
|
||||||
this._percentageLabel = new St.Label({ y_expand: true,
|
this._percentageLabel = new St.Label({ y_expand: true,
|
||||||
@ -53,7 +53,7 @@ var Indicator = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._proxy.connect('g-properties-changed',
|
this._proxy.connect('g-properties-changed',
|
||||||
Lang.bind(this, this._sync));
|
this._sync.bind(this));
|
||||||
this._sync();
|
this._sync();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ var Indicator = new Lang.Class({
|
|||||||
this._item.menu.addSettingsAction(_("Power Settings"), 'gnome-power-panel.desktop');
|
this._item.menu.addSettingsAction(_("Power Settings"), 'gnome-power-panel.desktop');
|
||||||
this.menu.addMenuItem(this._item);
|
this.menu.addMenuItem(this._item);
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ var RfkillManager = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._proxy.connect('g-properties-changed',
|
this._proxy.connect('g-properties-changed',
|
||||||
Lang.bind(this, this._changed));
|
this._changed.bind(this));
|
||||||
this._changed();
|
this._changed();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -76,7 +76,7 @@ var Indicator = new Lang.Class({
|
|||||||
this.parent();
|
this.parent();
|
||||||
|
|
||||||
this._manager = getRfkillManager();
|
this._manager = getRfkillManager();
|
||||||
this._manager.connect('airplane-mode-changed', Lang.bind(this, this._sync));
|
this._manager.connect('airplane-mode-changed', this._sync.bind(this));
|
||||||
|
|
||||||
this._indicator = this._addIndicator();
|
this._indicator = this._addIndicator();
|
||||||
this._indicator.icon_name = 'airplane-mode-symbolic';
|
this._indicator.icon_name = 'airplane-mode-symbolic';
|
||||||
@ -93,7 +93,7 @@ var Indicator = new Lang.Class({
|
|||||||
this._item.menu.addSettingsAction(_("Network Settings"), 'gnome-network-panel.desktop');
|
this._item.menu.addSettingsAction(_("Network Settings"), 'gnome-network-panel.desktop');
|
||||||
this.menu.addMenuItem(this._item);
|
this.menu.addMenuItem(this._item);
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ var Indicator = new Lang.Class({
|
|||||||
this._indicator.add_style_class_name('screencast-indicator');
|
this._indicator.add_style_class_name('screencast-indicator');
|
||||||
this._sync();
|
this._sync();
|
||||||
|
|
||||||
Main.screencastService.connect('updated', Lang.bind(this, this._sync));
|
Main.screencastService.connect('updated', this._sync.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_sync() {
|
_sync() {
|
||||||
|
@ -21,26 +21,26 @@ var AltSwitcher = new Lang.Class({
|
|||||||
|
|
||||||
_init(standard, alternate) {
|
_init(standard, alternate) {
|
||||||
this._standard = standard;
|
this._standard = standard;
|
||||||
this._standard.connect('notify::visible', Lang.bind(this, this._sync));
|
this._standard.connect('notify::visible', this._sync.bind(this));
|
||||||
if (this._standard instanceof St.Button)
|
if (this._standard instanceof St.Button)
|
||||||
this._standard.connect('clicked',
|
this._standard.connect('clicked',
|
||||||
() => { this._clickAction.release(); });
|
() => { this._clickAction.release(); });
|
||||||
|
|
||||||
this._alternate = alternate;
|
this._alternate = alternate;
|
||||||
this._alternate.connect('notify::visible', Lang.bind(this, this._sync));
|
this._alternate.connect('notify::visible', this._sync.bind(this));
|
||||||
if (this._alternate instanceof St.Button)
|
if (this._alternate instanceof St.Button)
|
||||||
this._alternate.connect('clicked',
|
this._alternate.connect('clicked',
|
||||||
() => { this._clickAction.release(); });
|
() => { this._clickAction.release(); });
|
||||||
|
|
||||||
this._capturedEventId = global.stage.connect('captured-event', Lang.bind(this, this._onCapturedEvent));
|
this._capturedEventId = global.stage.connect('captured-event', this._onCapturedEvent.bind(this));
|
||||||
|
|
||||||
this._flipped = false;
|
this._flipped = false;
|
||||||
|
|
||||||
this._clickAction = new Clutter.ClickAction();
|
this._clickAction = new Clutter.ClickAction();
|
||||||
this._clickAction.connect('long-press', Lang.bind(this, this._onLongPress));
|
this._clickAction.connect('long-press', this._onLongPress.bind(this));
|
||||||
|
|
||||||
this.actor = new St.Bin();
|
this.actor = new St.Bin();
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
this.actor.connect('notify::mapped', () => { this._flipped = false; });
|
this.actor.connect('notify::mapped', () => { this._flipped = false; });
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ var Indicator = new Lang.Class({
|
|||||||
});
|
});
|
||||||
this._updateMultiUser();
|
this._updateMultiUser();
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -251,8 +251,8 @@ var Indicator = new Lang.Class({
|
|||||||
this._switchUserSubMenu.menu.addSettingsAction(_("Account Settings"),
|
this._switchUserSubMenu.menu.addSettingsAction(_("Account Settings"),
|
||||||
'gnome-user-accounts-panel.desktop');
|
'gnome-user-accounts-panel.desktop');
|
||||||
|
|
||||||
this._user.connect('notify::is-loaded', Lang.bind(this, this._updateSwitchUserSubMenu));
|
this._user.connect('notify::is-loaded', this._updateSwitchUserSubMenu.bind(this));
|
||||||
this._user.connect('changed', Lang.bind(this, this._updateSwitchUserSubMenu));
|
this._user.connect('changed', this._updateSwitchUserSubMenu.bind(this));
|
||||||
|
|
||||||
this.menu.addMenuItem(this._switchUserSubMenu);
|
this.menu.addMenuItem(this._switchUserSubMenu);
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ var Client = new Lang.Class({
|
|||||||
Gio.DBus.system,
|
Gio.DBus.system,
|
||||||
BOLT_DBUS_NAME,
|
BOLT_DBUS_NAME,
|
||||||
BOLT_DBUS_PATH,
|
BOLT_DBUS_PATH,
|
||||||
Lang.bind(this, this._onProxyReady)
|
this._onProxyReady.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
this.probing = false;
|
this.probing = false;
|
||||||
@ -94,8 +94,8 @@ var Client = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._proxy = proxy;
|
this._proxy = proxy;
|
||||||
this._propsChangedId = this._proxy.connect('g-properties-changed', Lang.bind(this, this._onPropertiesChanged));
|
this._propsChangedId = this._proxy.connect('g-properties-changed', this._onPropertiesChanged.bind(this));
|
||||||
this._deviceAddedId = this._proxy.connectSignal('DeviceAdded', Lang.bind(this, this._onDeviceAdded), true);
|
this._deviceAddedId = this._proxy.connectSignal('DeviceAdded', this._onDeviceAdded.bind(this));
|
||||||
|
|
||||||
this.probing = this._proxy.Probing;
|
this.probing = this._proxy.Probing;
|
||||||
if (this.probing)
|
if (this.probing)
|
||||||
@ -161,7 +161,7 @@ var AuthRobot = new Lang.Class({
|
|||||||
this._devicesToEnroll = [];
|
this._devicesToEnroll = [];
|
||||||
this._enrolling = false;
|
this._enrolling = false;
|
||||||
|
|
||||||
this._client.connect('device-added', Lang.bind(this, this._onDeviceAdded));
|
this._client.connect('device-added', this._onDeviceAdded.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
@ -201,7 +201,7 @@ var AuthRobot = new Lang.Class({
|
|||||||
|
|
||||||
this.enrolling = true;
|
this.enrolling = true;
|
||||||
GLib.idle_add(GLib.PRIORITY_DEFAULT,
|
GLib.idle_add(GLib.PRIORITY_DEFAULT,
|
||||||
Lang.bind(this, this._enrollDevicesIdle));
|
this._enrollDevicesIdle.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onEnrollDone(device, error) {
|
_onEnrollDone(device, error) {
|
||||||
@ -216,7 +216,7 @@ var AuthRobot = new Lang.Class({
|
|||||||
|
|
||||||
if (this._enrolling)
|
if (this._enrolling)
|
||||||
GLib.idle_add(GLib.PRIORITY_DEFAULT,
|
GLib.idle_add(GLib.PRIORITY_DEFAULT,
|
||||||
Lang.bind(this, this._enrollDevicesIdle));
|
this._enrollDevicesIdle.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_enrollDevicesIdle() {
|
_enrollDevicesIdle() {
|
||||||
@ -228,7 +228,7 @@ var AuthRobot = new Lang.Class({
|
|||||||
|
|
||||||
this._client.enrollDevice(dev.Uid,
|
this._client.enrollDevice(dev.Uid,
|
||||||
Policy.DEFAULT,
|
Policy.DEFAULT,
|
||||||
Lang.bind(this, this._onEnrollDone));
|
this._onEnrollDone.bind(this));
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,14 +249,14 @@ var Indicator = new Lang.Class({
|
|||||||
this._indicator.icon_name = 'thunderbolt-symbolic';
|
this._indicator.icon_name = 'thunderbolt-symbolic';
|
||||||
|
|
||||||
this._client = new Client();
|
this._client = new Client();
|
||||||
this._client.connect('probing-changed', Lang.bind(this, this._onProbing));
|
this._client.connect('probing-changed', this._onProbing.bind(this));
|
||||||
|
|
||||||
this._robot = new AuthRobot(this._client);
|
this._robot = new AuthRobot(this._client);
|
||||||
|
|
||||||
this._robot.connect('enroll-device', Lang.bind(this, this._onEnrollDevice));
|
this._robot.connect('enroll-device', this._onEnrollDevice.bind(this));
|
||||||
this._robot.connect('enroll-failed', Lang.bind(this, this._onEnrollFailed));
|
this._robot.connect('enroll-failed', this._onEnrollFailed.bind(this));
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sync));
|
Main.sessionMode.connect('updated', this._sync.bind(this));
|
||||||
this._sync();
|
this._sync();
|
||||||
|
|
||||||
this._source = null;
|
this._source = null;
|
||||||
|
@ -36,8 +36,8 @@ var StreamSlider = new Lang.Class({
|
|||||||
this.item = new PopupMenu.PopupBaseMenuItem({ activate: false });
|
this.item = new PopupMenu.PopupBaseMenuItem({ activate: false });
|
||||||
|
|
||||||
this._slider = new Slider.Slider(0);
|
this._slider = new Slider.Slider(0);
|
||||||
this._slider.connect('value-changed', Lang.bind(this, this._sliderChanged));
|
this._slider.connect('value-changed', this._sliderChanged.bind(this));
|
||||||
this._slider.connect('drag-end', Lang.bind(this, this._notifyVolumeChange));
|
this._slider.connect('drag-end', this._notifyVolumeChange.bind(this));
|
||||||
|
|
||||||
this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
|
this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
|
||||||
this.item.actor.add(this._icon);
|
this.item.actor.add(this._icon);
|
||||||
@ -81,8 +81,8 @@ var StreamSlider = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_connectStream(stream) {
|
_connectStream(stream) {
|
||||||
this._mutedChangedId = stream.connect('notify::is-muted', Lang.bind(this, this._updateVolume));
|
this._mutedChangedId = stream.connect('notify::is-muted', this._updateVolume.bind(this));
|
||||||
this._volumeChangedId = stream.connect('notify::volume', Lang.bind(this, this._updateVolume));
|
this._volumeChangedId = stream.connect('notify::volume', this._updateVolume.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_shouldBeVisible() {
|
_shouldBeVisible() {
|
||||||
@ -172,7 +172,7 @@ var OutputStreamSlider = new Lang.Class({
|
|||||||
|
|
||||||
_connectStream(stream) {
|
_connectStream(stream) {
|
||||||
this.parent(stream);
|
this.parent(stream);
|
||||||
this._portChangedId = stream.connect('notify::port', Lang.bind(this, this._portChanged));
|
this._portChangedId = stream.connect('notify::port', this._portChanged.bind(this));
|
||||||
this._portChanged();
|
this._portChanged();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -219,8 +219,8 @@ var InputStreamSlider = new Lang.Class({
|
|||||||
_init(control) {
|
_init(control) {
|
||||||
this.parent(control);
|
this.parent(control);
|
||||||
this._slider.actor.accessible_name = _("Microphone");
|
this._slider.actor.accessible_name = _("Microphone");
|
||||||
this._control.connect('stream-added', Lang.bind(this, this._maybeShowInput));
|
this._control.connect('stream-added', this._maybeShowInput.bind(this));
|
||||||
this._control.connect('stream-removed', Lang.bind(this, this._maybeShowInput));
|
this._control.connect('stream-removed', this._maybeShowInput.bind(this));
|
||||||
this._icon.icon_name = 'audio-input-microphone-symbolic';
|
this._icon.icon_name = 'audio-input-microphone-symbolic';
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -265,9 +265,9 @@ var VolumeMenu = new Lang.Class({
|
|||||||
this.hasHeadphones = false;
|
this.hasHeadphones = false;
|
||||||
|
|
||||||
this._control = control;
|
this._control = control;
|
||||||
this._control.connect('state-changed', Lang.bind(this, this._onControlStateChanged));
|
this._control.connect('state-changed', this._onControlStateChanged.bind(this));
|
||||||
this._control.connect('default-sink-changed', Lang.bind(this, this._readOutput));
|
this._control.connect('default-sink-changed', this._readOutput.bind(this));
|
||||||
this._control.connect('default-source-changed', Lang.bind(this, this._readInput));
|
this._control.connect('default-source-changed', this._readInput.bind(this));
|
||||||
|
|
||||||
this._output = new OutputStreamSlider(this._control);
|
this._output = new OutputStreamSlider(this._control);
|
||||||
this._output.connect('stream-updated', () => {
|
this._output.connect('stream-updated', () => {
|
||||||
@ -337,7 +337,7 @@ var Indicator = new Lang.Class({
|
|||||||
|
|
||||||
this.menu.addMenuItem(this._volumeMenu);
|
this.menu.addMenuItem(this._volumeMenu);
|
||||||
|
|
||||||
this.indicators.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
|
this.indicators.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onScrollEvent(actor, event) {
|
_onScrollEvent(actor, event) {
|
||||||
|
@ -50,10 +50,10 @@ var SwitcherPopup = new Lang.Class({
|
|||||||
this.actor = new Shell.GenericContainer({ style_class: 'switcher-popup',
|
this.actor = new Shell.GenericContainer({ style_class: 'switcher-popup',
|
||||||
reactive: true,
|
reactive: true,
|
||||||
visible: false });
|
visible: false });
|
||||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this.actor.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
this.actor.connect('allocate', this._allocate.bind(this));
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
Main.uiGroup.add_actor(this.actor);
|
Main.uiGroup.add_actor(this.actor);
|
||||||
|
|
||||||
@ -124,16 +124,16 @@ var SwitcherPopup = new Lang.Class({
|
|||||||
this._haveModal = true;
|
this._haveModal = true;
|
||||||
this._modifierMask = primaryModifier(mask);
|
this._modifierMask = primaryModifier(mask);
|
||||||
|
|
||||||
this.actor.connect('key-press-event', Lang.bind(this, this._keyPressEvent));
|
this.actor.connect('key-press-event', this._keyPressEvent.bind(this));
|
||||||
this.actor.connect('key-release-event', Lang.bind(this, this._keyReleaseEvent));
|
this.actor.connect('key-release-event', this._keyReleaseEvent.bind(this));
|
||||||
|
|
||||||
this.actor.connect('button-press-event', Lang.bind(this, this._clickedOutside));
|
this.actor.connect('button-press-event', this._clickedOutside.bind(this));
|
||||||
this.actor.connect('scroll-event', Lang.bind(this, this._scrollEvent));
|
this.actor.connect('scroll-event', this._scrollEvent.bind(this));
|
||||||
|
|
||||||
this.actor.add_actor(this._switcherList.actor);
|
this.actor.add_actor(this._switcherList.actor);
|
||||||
this._switcherList.connect('item-activated', Lang.bind(this, this._itemActivated));
|
this._switcherList.connect('item-activated', this._itemActivated.bind(this));
|
||||||
this._switcherList.connect('item-entered', Lang.bind(this, this._itemEntered));
|
this._switcherList.connect('item-entered', this._itemEntered.bind(this));
|
||||||
this._switcherList.connect('item-removed', Lang.bind(this, this._itemRemoved));
|
this._switcherList.connect('item-removed', this._itemRemoved.bind(this));
|
||||||
|
|
||||||
// Need to force an allocation so we can figure out whether we
|
// Need to force an allocation so we can figure out whether we
|
||||||
// need to scroll when selecting
|
// need to scroll when selecting
|
||||||
@ -267,7 +267,7 @@ var SwitcherPopup = new Lang.Class({
|
|||||||
if (this._motionTimeoutId != 0)
|
if (this._motionTimeoutId != 0)
|
||||||
Mainloop.source_remove(this._motionTimeoutId);
|
Mainloop.source_remove(this._motionTimeoutId);
|
||||||
|
|
||||||
this._motionTimeoutId = Mainloop.timeout_add(DISABLE_HOVER_TIMEOUT, Lang.bind(this, this._mouseTimedOut));
|
this._motionTimeoutId = Mainloop.timeout_add(DISABLE_HOVER_TIMEOUT, this._mouseTimedOut.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._motionTimeoutId, '[gnome-shell] this._mouseTimedOut');
|
GLib.Source.set_name_by_id(this._motionTimeoutId, '[gnome-shell] this._mouseTimedOut');
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -337,9 +337,9 @@ var SwitcherList = new Lang.Class({
|
|||||||
|
|
||||||
_init(squareItems) {
|
_init(squareItems) {
|
||||||
this.actor = new Shell.GenericContainer({ style_class: 'switcher-list' });
|
this.actor = new Shell.GenericContainer({ style_class: 'switcher-list' });
|
||||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this.actor.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._allocateTop));
|
this.actor.connect('allocate', this._allocateTop.bind(this));
|
||||||
|
|
||||||
// Here we use a GenericContainer so that we can force all the
|
// Here we use a GenericContainer so that we can force all the
|
||||||
// children to have the same width.
|
// children to have the same width.
|
||||||
@ -349,9 +349,9 @@ var SwitcherList = new Lang.Class({
|
|||||||
this._list.spacing = this._list.get_theme_node().get_length('spacing');
|
this._list.spacing = this._list.get_theme_node().get_length('spacing');
|
||||||
});
|
});
|
||||||
|
|
||||||
this._list.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this._list.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this._list.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this._list.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this._list.connect('allocate', Lang.bind(this, this._allocate));
|
this._list.connect('allocate', this._allocate.bind(this));
|
||||||
|
|
||||||
this._scrollView = new St.ScrollView({ style_class: 'hfade',
|
this._scrollView = new St.ScrollView({ style_class: 'hfade',
|
||||||
enable_mouse_scrolling: false });
|
enable_mouse_scrolling: false });
|
||||||
|
@ -52,9 +52,9 @@ var UnlockDialog = new Lang.Class({
|
|||||||
this.actor.add_child(this._promptBox);
|
this.actor.add_child(this._promptBox);
|
||||||
|
|
||||||
this._authPrompt = new AuthPrompt.AuthPrompt(new Gdm.Client(), AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
|
this._authPrompt = new AuthPrompt.AuthPrompt(new Gdm.Client(), AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
|
||||||
this._authPrompt.connect('failed', Lang.bind(this, this._fail));
|
this._authPrompt.connect('failed', this._fail.bind(this));
|
||||||
this._authPrompt.connect('cancelled', Lang.bind(this, this._fail));
|
this._authPrompt.connect('cancelled', this._fail.bind(this));
|
||||||
this._authPrompt.connect('reset', Lang.bind(this, this._onReset));
|
this._authPrompt.connect('reset', this._onReset.bind(this));
|
||||||
this._authPrompt.setPasswordChar('\u25cf');
|
this._authPrompt.setPasswordChar('\u25cf');
|
||||||
this._authPrompt.nextButton.label = _("Unlock");
|
this._authPrompt.nextButton.label = _("Unlock");
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ var UnlockDialog = new Lang.Class({
|
|||||||
reactive: true,
|
reactive: true,
|
||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
x_fill: false });
|
x_fill: false });
|
||||||
this._otherUserButton.connect('clicked', Lang.bind(this, this._otherUserClicked));
|
this._otherUserButton.connect('clicked', this._otherUserClicked.bind(this));
|
||||||
this._promptBox.add_child(this._otherUserButton);
|
this._promptBox.add_child(this._otherUserButton);
|
||||||
} else {
|
} else {
|
||||||
this._otherUserButton = null;
|
this._otherUserButton = null;
|
||||||
@ -84,7 +84,7 @@ var UnlockDialog = new Lang.Class({
|
|||||||
Main.ctrlAltTabManager.addGroup(this.actor, _("Unlock Window"), 'dialog-password-symbolic');
|
Main.ctrlAltTabManager.addGroup(this.actor, _("Unlock Window"), 'dialog-password-symbolic');
|
||||||
|
|
||||||
this._idleMonitor = Meta.IdleMonitor.get_core();
|
this._idleMonitor = Meta.IdleMonitor.get_core();
|
||||||
this._idleWatchId = this._idleMonitor.add_idle_watch(IDLE_TIMEOUT * 1000, Lang.bind(this, this._escape));
|
this._idleWatchId = this._idleMonitor.add_idle_watch(IDLE_TIMEOUT * 1000, this._escape.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateSensitivity(sensitive) {
|
_updateSensitivity(sensitive) {
|
||||||
|
@ -38,7 +38,7 @@ var Avatar = new Lang.Class({
|
|||||||
|
|
||||||
// Monitor the scaling factor to make sure we recreate the avatar when needed.
|
// Monitor the scaling factor to make sure we recreate the avatar when needed.
|
||||||
let themeContext = St.ThemeContext.get_for_stage(global.stage);
|
let themeContext = St.ThemeContext.get_for_stage(global.stage);
|
||||||
themeContext.connect('notify::scale-factor', Lang.bind(this, this.update));
|
themeContext.connect('notify::scale-factor', this.update.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
setSensitive(sensitive) {
|
setSensitive(sensitive) {
|
||||||
@ -85,8 +85,8 @@ var UserWidgetLabel = new Lang.Class({
|
|||||||
|
|
||||||
this._currentLabel = null;
|
this._currentLabel = null;
|
||||||
|
|
||||||
this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUser));
|
this._userLoadedId = this._user.connect('notify::is-loaded', this._updateUser.bind(this));
|
||||||
this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUser));
|
this._userChangedId = this._user.connect('changed', this._updateUser.bind(this));
|
||||||
this._updateUser();
|
this._updateUser();
|
||||||
|
|
||||||
// We can't override the destroy vfunc because that might be called during
|
// We can't override the destroy vfunc because that might be called during
|
||||||
@ -94,7 +94,7 @@ var UserWidgetLabel = new Lang.Class({
|
|||||||
// so we use a signal, that will be disconnected by GObject the first time
|
// so we use a signal, that will be disconnected by GObject the first time
|
||||||
// the actor is destroyed (which is guaranteed to be as part of a normal
|
// the actor is destroyed (which is guaranteed to be as part of a normal
|
||||||
// destroy() call from JS, possibly from some ancestor)
|
// destroy() call from JS, possibly from some ancestor)
|
||||||
this.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
@ -159,7 +159,7 @@ var UserWidget = new Lang.Class({
|
|||||||
|
|
||||||
this.actor = new St.BoxLayout({ style_class: 'user-widget',
|
this.actor = new St.BoxLayout({ style_class: 'user-widget',
|
||||||
vertical: false });
|
vertical: false });
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
this._avatar = new Avatar(user);
|
this._avatar = new Avatar(user);
|
||||||
this.actor.add_child(this._avatar.actor);
|
this.actor.add_child(this._avatar.actor);
|
||||||
@ -170,8 +170,8 @@ var UserWidget = new Lang.Class({
|
|||||||
this._label.bind_property('label-actor', this.actor, 'label-actor',
|
this._label.bind_property('label-actor', this.actor, 'label-actor',
|
||||||
GObject.BindingFlags.SYNC_CREATE);
|
GObject.BindingFlags.SYNC_CREATE);
|
||||||
|
|
||||||
this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUser));
|
this._userLoadedId = this._user.connect('notify::is-loaded', this._updateUser.bind(this));
|
||||||
this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUser));
|
this._userChangedId = this._user.connect('changed', this._updateUser.bind(this));
|
||||||
this._updateUser();
|
this._updateUser();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ var TouchpadShowOverviewAction = new Lang.Class({
|
|||||||
Name: 'TouchpadShowOverviewAction',
|
Name: 'TouchpadShowOverviewAction',
|
||||||
|
|
||||||
_init(actor) {
|
_init(actor) {
|
||||||
actor.connect('captured-event', Lang.bind(this, this._handleEvent));
|
actor.connect('captured-event', this._handleEvent.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_handleEvent(actor, event) {
|
_handleEvent(actor, event) {
|
||||||
@ -145,7 +145,7 @@ var ViewSelector = new Lang.Class({
|
|||||||
this.actor = new Shell.Stack({ name: 'viewSelector' });
|
this.actor = new Shell.Stack({ name: 'viewSelector' });
|
||||||
|
|
||||||
this._showAppsButton = showAppsButton;
|
this._showAppsButton = showAppsButton;
|
||||||
this._showAppsButton.connect('notify::checked', Lang.bind(this, this._onShowAppsButtonToggled));
|
this._showAppsButton.connect('notify::checked', this._onShowAppsButtonToggled.bind(this));
|
||||||
|
|
||||||
this._activePage = null;
|
this._activePage = null;
|
||||||
|
|
||||||
@ -155,8 +155,8 @@ var ViewSelector = new Lang.Class({
|
|||||||
ShellEntry.addContextMenu(this._entry);
|
ShellEntry.addContextMenu(this._entry);
|
||||||
|
|
||||||
this._text = this._entry.clutter_text;
|
this._text = this._entry.clutter_text;
|
||||||
this._text.connect('text-changed', Lang.bind(this, this._onTextChanged));
|
this._text.connect('text-changed', this._onTextChanged.bind(this));
|
||||||
this._text.connect('key-press-event', Lang.bind(this, this._onKeyPress));
|
this._text.connect('key-press-event', this._onKeyPress.bind(this));
|
||||||
this._text.connect('key-focus-in', () => {
|
this._text.connect('key-focus-in', () => {
|
||||||
this._searchResults.highlightDefault(true);
|
this._searchResults.highlightDefault(true);
|
||||||
});
|
});
|
||||||
@ -170,8 +170,8 @@ var ViewSelector = new Lang.Class({
|
|||||||
this._entry.menu.close();
|
this._entry.menu.close();
|
||||||
this._searchResults.popupMenuDefault();
|
this._searchResults.popupMenuDefault();
|
||||||
});
|
});
|
||||||
this._entry.connect('notify::mapped', Lang.bind(this, this._onMapped));
|
this._entry.connect('notify::mapped', this._onMapped.bind(this));
|
||||||
global.stage.connect('notify::key-focus', Lang.bind(this, this._onStageKeyFocusChanged));
|
global.stage.connect('notify::key-focus', this._onStageKeyFocusChanged.bind(this));
|
||||||
|
|
||||||
this._entry.set_primary_icon(new St.Icon({ style_class: 'search-entry-icon',
|
this._entry.set_primary_icon(new St.Icon({ style_class: 'search-entry-icon',
|
||||||
icon_name: 'edit-find-symbolic' }));
|
icon_name: 'edit-find-symbolic' }));
|
||||||
@ -208,7 +208,7 @@ var ViewSelector = new Lang.Class({
|
|||||||
this._stageKeyPressId = 0;
|
this._stageKeyPressId = 0;
|
||||||
Main.overview.connect('showing', () => {
|
Main.overview.connect('showing', () => {
|
||||||
this._stageKeyPressId = global.stage.connect('key-press-event',
|
this._stageKeyPressId = global.stage.connect('key-press-event',
|
||||||
Lang.bind(this, this._onStageKeyPress));
|
this._onStageKeyPress.bind(this));
|
||||||
});
|
});
|
||||||
Main.overview.connect('hiding', () => {
|
Main.overview.connect('hiding', () => {
|
||||||
if (this._stageKeyPressId != 0) {
|
if (this._stageKeyPressId != 0) {
|
||||||
@ -233,14 +233,14 @@ var ViewSelector = new Lang.Class({
|
|||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._toggleAppsPage));
|
this._toggleAppsPage.bind(this));
|
||||||
|
|
||||||
Main.wm.addKeybinding('toggle-overview',
|
Main.wm.addKeybinding('toggle-overview',
|
||||||
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(Main.overview, Main.overview.toggle));
|
Main.overview.toggle.bind(Main.overview));
|
||||||
|
|
||||||
let side;
|
let side;
|
||||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
||||||
@ -258,11 +258,11 @@ var ViewSelector = new Lang.Class({
|
|||||||
global.stage.add_action(gesture);
|
global.stage.add_action(gesture);
|
||||||
|
|
||||||
gesture = new ShowOverviewAction();
|
gesture = new ShowOverviewAction();
|
||||||
gesture.connect('activated', Lang.bind(this, this._pinchGestureActivated));
|
gesture.connect('activated', this._pinchGestureActivated.bind(this));
|
||||||
global.stage.add_action(gesture);
|
global.stage.add_action(gesture);
|
||||||
|
|
||||||
gesture = new TouchpadShowOverviewAction(global.stage);
|
gesture = new TouchpadShowOverviewAction(global.stage);
|
||||||
gesture.connect('activated', Lang.bind(this, this._pinchGestureActivated));
|
gesture.connect('activated', this._pinchGestureActivated.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_pinchGestureActivated(action, scale) {
|
_pinchGestureActivated(action, scale) {
|
||||||
@ -484,7 +484,7 @@ var ViewSelector = new Lang.Class({
|
|||||||
if (this._entry.mapped) {
|
if (this._entry.mapped) {
|
||||||
// Enable 'find-as-you-type'
|
// Enable 'find-as-you-type'
|
||||||
this._capturedEventId = global.stage.connect('captured-event',
|
this._capturedEventId = global.stage.connect('captured-event',
|
||||||
Lang.bind(this, this._onCapturedEvent));
|
this._onCapturedEvent.bind(this));
|
||||||
this._text.set_cursor_visible(true);
|
this._text.set_cursor_visible(true);
|
||||||
this._text.set_selection(0, 0);
|
this._text.set_selection(0, 0);
|
||||||
} else {
|
} else {
|
||||||
@ -538,7 +538,7 @@ var ViewSelector = new Lang.Class({
|
|||||||
|
|
||||||
if (this._iconClickedId == 0)
|
if (this._iconClickedId == 0)
|
||||||
this._iconClickedId = this._entry.connect('secondary-icon-clicked',
|
this._iconClickedId = this._entry.connect('secondary-icon-clicked',
|
||||||
Lang.bind(this, this.reset));
|
this.reset.bind(this));
|
||||||
} else {
|
} else {
|
||||||
if (this._iconClickedId > 0) {
|
if (this._iconClickedId > 0) {
|
||||||
this._entry.disconnect(this._iconClickedId);
|
this._entry.disconnect(this._iconClickedId);
|
||||||
|
@ -12,7 +12,7 @@ var WindowAttentionHandler = new Lang.Class({
|
|||||||
_init() {
|
_init() {
|
||||||
this._tracker = Shell.WindowTracker.get_default();
|
this._tracker = Shell.WindowTracker.get_default();
|
||||||
this._windowDemandsAttentionId = global.display.connect('window-demands-attention',
|
this._windowDemandsAttentionId = global.display.connect('window-demands-attention',
|
||||||
Lang.bind(this, this._onWindowDemandsAttention));
|
this._onWindowDemandsAttention.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getTitleAndBanner(app, window) {
|
_getTitleAndBanner(app, window) {
|
||||||
@ -72,7 +72,7 @@ var Source = new Lang.Class({
|
|||||||
this.signalIDs.push(this._window.connect('unmanaged',
|
this.signalIDs.push(this._window.connect('unmanaged',
|
||||||
() => { this.destroy(); }));
|
() => { this.destroy(); }));
|
||||||
|
|
||||||
this.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
|
@ -82,13 +82,13 @@ var DisplayChangeDialog = new Lang.Class({
|
|||||||
to avoid ellipsizing the labels.
|
to avoid ellipsizing the labels.
|
||||||
*/
|
*/
|
||||||
this._cancelButton = this.addButton({ label: _("Revert Settings"),
|
this._cancelButton = this.addButton({ label: _("Revert Settings"),
|
||||||
action: Lang.bind(this, this._onFailure),
|
action: this._onFailure.bind(this),
|
||||||
key: Clutter.Escape });
|
key: Clutter.Escape });
|
||||||
this._okButton = this.addButton({ label: _("Keep Changes"),
|
this._okButton = this.addButton({ label: _("Keep Changes"),
|
||||||
action: Lang.bind(this, this._onSuccess),
|
action: this._onSuccess.bind(this),
|
||||||
default: true });
|
default: true });
|
||||||
|
|
||||||
this._timeoutId = Mainloop.timeout_add(ONE_SECOND, Lang.bind(this, this._tick));
|
this._timeoutId = Mainloop.timeout_add(ONE_SECOND, this._tick.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._tick');
|
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._tick');
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -198,17 +198,17 @@ var WorkspaceTracker = new Lang.Class({
|
|||||||
this._pauseWorkspaceCheck = false;
|
this._pauseWorkspaceCheck = false;
|
||||||
|
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
tracker.connect('startup-sequence-changed', Lang.bind(this, this._queueCheckWorkspaces));
|
tracker.connect('startup-sequence-changed', this._queueCheckWorkspaces.bind(this));
|
||||||
|
|
||||||
global.screen.connect('notify::n-workspaces', Lang.bind(this, this._nWorkspacesChanged));
|
global.screen.connect('notify::n-workspaces', this._nWorkspacesChanged.bind(this));
|
||||||
global.window_manager.connect('switch-workspace', Lang.bind(this, this._queueCheckWorkspaces));
|
global.window_manager.connect('switch-workspace', this._queueCheckWorkspaces.bind(this));
|
||||||
|
|
||||||
global.screen.connect('window-entered-monitor', Lang.bind(this, this._windowEnteredMonitor));
|
global.screen.connect('window-entered-monitor', this._windowEnteredMonitor.bind(this));
|
||||||
global.screen.connect('window-left-monitor', Lang.bind(this, this._windowLeftMonitor));
|
global.screen.connect('window-left-monitor', this._windowLeftMonitor.bind(this));
|
||||||
global.screen.connect('restacked', Lang.bind(this, this._windowsRestacked));
|
global.screen.connect('restacked', this._windowsRestacked.bind(this));
|
||||||
|
|
||||||
this._workspaceSettings = this._getWorkspaceSettings();
|
this._workspaceSettings = this._getWorkspaceSettings();
|
||||||
this._workspaceSettings.connect('changed::dynamic-workspaces', Lang.bind(this, this._queueCheckWorkspaces));
|
this._workspaceSettings.connect('changed::dynamic-workspaces', this._queueCheckWorkspaces.bind(this));
|
||||||
|
|
||||||
this._nWorkspacesChanged();
|
this._nWorkspacesChanged();
|
||||||
},
|
},
|
||||||
@ -340,7 +340,7 @@ var WorkspaceTracker = new Lang.Class({
|
|||||||
|
|
||||||
_queueCheckWorkspaces() {
|
_queueCheckWorkspaces() {
|
||||||
if (this._checkWorkspacesId == 0)
|
if (this._checkWorkspacesId == 0)
|
||||||
this._checkWorkspacesId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, this._checkWorkspaces));
|
this._checkWorkspacesId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, this._checkWorkspaces.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_nWorkspacesChanged() {
|
_nWorkspacesChanged() {
|
||||||
@ -360,8 +360,8 @@ var WorkspaceTracker = new Lang.Class({
|
|||||||
|
|
||||||
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
|
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
|
||||||
let workspace = this._workspaces[w];
|
let workspace = this._workspaces[w];
|
||||||
workspace._windowAddedId = workspace.connect('window-added', Lang.bind(this, this._queueCheckWorkspaces));
|
workspace._windowAddedId = workspace.connect('window-added', this._queueCheckWorkspaces.bind(this));
|
||||||
workspace._windowRemovedId = workspace.connect('window-removed', Lang.bind(this, this._windowRemoved));
|
workspace._windowRemovedId = workspace.connect('window-removed', this._windowRemoved.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -454,7 +454,7 @@ var TilePreview = new Lang.Class({
|
|||||||
{ opacity: 0,
|
{ opacity: 0,
|
||||||
time: WINDOW_ANIMATION_TIME,
|
time: WINDOW_ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
onComplete: Lang.bind(this, this._reset)
|
onComplete: this._reset.bind(this)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -483,7 +483,7 @@ var TouchpadWorkspaceSwitchAction = new Lang.Class({
|
|||||||
_init(actor) {
|
_init(actor) {
|
||||||
this._dx = 0;
|
this._dx = 0;
|
||||||
this._dy = 0;
|
this._dy = 0;
|
||||||
actor.connect('captured-event', Lang.bind(this, this._handleEvent));
|
actor.connect('captured-event', this._handleEvent.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_checkActivated() {
|
_checkActivated() {
|
||||||
@ -692,7 +692,7 @@ var WindowManager = new Lang.Class({
|
|||||||
this._isWorkspacePrepended = false;
|
this._isWorkspacePrepended = false;
|
||||||
|
|
||||||
this._switchData = null;
|
this._switchData = null;
|
||||||
this._shellwm.connect('kill-switch-workspace', Lang.bind(this, this._switchWorkspaceDone));
|
this._shellwm.connect('kill-switch-workspace', this._switchWorkspaceDone.bind(this));
|
||||||
this._shellwm.connect('kill-window-effects', (shellwm, actor) => {
|
this._shellwm.connect('kill-window-effects', (shellwm, actor) => {
|
||||||
this._minimizeWindowDone(shellwm, actor);
|
this._minimizeWindowDone(shellwm, actor);
|
||||||
this._mapWindowDone(shellwm, actor);
|
this._mapWindowDone(shellwm, actor);
|
||||||
@ -700,21 +700,21 @@ var WindowManager = new Lang.Class({
|
|||||||
this._sizeChangeWindowDone(shellwm, actor);
|
this._sizeChangeWindowDone(shellwm, actor);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._shellwm.connect('switch-workspace', Lang.bind(this, this._switchWorkspace));
|
this._shellwm.connect('switch-workspace', this._switchWorkspace.bind(this));
|
||||||
this._shellwm.connect('show-tile-preview', Lang.bind(this, this._showTilePreview));
|
this._shellwm.connect('show-tile-preview', this._showTilePreview.bind(this));
|
||||||
this._shellwm.connect('hide-tile-preview', Lang.bind(this, this._hideTilePreview));
|
this._shellwm.connect('hide-tile-preview', this._hideTilePreview.bind(this));
|
||||||
this._shellwm.connect('show-window-menu', Lang.bind(this, this._showWindowMenu));
|
this._shellwm.connect('show-window-menu', this._showWindowMenu.bind(this));
|
||||||
this._shellwm.connect('minimize', Lang.bind(this, this._minimizeWindow));
|
this._shellwm.connect('minimize', this._minimizeWindow.bind(this));
|
||||||
this._shellwm.connect('unminimize', Lang.bind(this, this._unminimizeWindow));
|
this._shellwm.connect('unminimize', this._unminimizeWindow.bind(this));
|
||||||
this._shellwm.connect('size-change', Lang.bind(this, this._sizeChangeWindow));
|
this._shellwm.connect('size-change', this._sizeChangeWindow.bind(this));
|
||||||
this._shellwm.connect('size-changed', Lang.bind(this, this._sizeChangedWindow));
|
this._shellwm.connect('size-changed', this._sizeChangedWindow.bind(this));
|
||||||
this._shellwm.connect('map', Lang.bind(this, this._mapWindow));
|
this._shellwm.connect('map', this._mapWindow.bind(this));
|
||||||
this._shellwm.connect('destroy', Lang.bind(this, this._destroyWindow));
|
this._shellwm.connect('destroy', this._destroyWindow.bind(this));
|
||||||
this._shellwm.connect('filter-keybinding', Lang.bind(this, this._filterKeybinding));
|
this._shellwm.connect('filter-keybinding', this._filterKeybinding.bind(this));
|
||||||
this._shellwm.connect('confirm-display-change', Lang.bind(this, this._confirmDisplayChange));
|
this._shellwm.connect('confirm-display-change', this._confirmDisplayChange.bind(this));
|
||||||
this._shellwm.connect('create-close-dialog', Lang.bind(this, this._createCloseDialog));
|
this._shellwm.connect('create-close-dialog', this._createCloseDialog.bind(this));
|
||||||
this._shellwm.connect('create-inhibit-shortcuts-dialog', Lang.bind(this, this._createInhibitShortcutsDialog));
|
this._shellwm.connect('create-inhibit-shortcuts-dialog', this._createInhibitShortcutsDialog.bind(this));
|
||||||
global.screen.connect('restacked', Lang.bind(this, this._syncStacking));
|
global.screen.connect('restacked', this._syncStacking.bind(this));
|
||||||
|
|
||||||
this._workspaceSwitcherPopup = null;
|
this._workspaceSwitcherPopup = null;
|
||||||
this._tilePreview = null;
|
this._tilePreview = null;
|
||||||
@ -735,187 +735,187 @@ var WindowManager = new Lang.Class({
|
|||||||
this.setCustomKeybindingHandler('switch-to-workspace-left',
|
this.setCustomKeybindingHandler('switch-to-workspace-left',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-right',
|
this.setCustomKeybindingHandler('switch-to-workspace-right',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-up',
|
this.setCustomKeybindingHandler('switch-to-workspace-up',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-down',
|
this.setCustomKeybindingHandler('switch-to-workspace-down',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-last',
|
this.setCustomKeybindingHandler('switch-to-workspace-last',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-left',
|
this.setCustomKeybindingHandler('move-to-workspace-left',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-right',
|
this.setCustomKeybindingHandler('move-to-workspace-right',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-up',
|
this.setCustomKeybindingHandler('move-to-workspace-up',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-down',
|
this.setCustomKeybindingHandler('move-to-workspace-down',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-1',
|
this.setCustomKeybindingHandler('switch-to-workspace-1',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-2',
|
this.setCustomKeybindingHandler('switch-to-workspace-2',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-3',
|
this.setCustomKeybindingHandler('switch-to-workspace-3',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-4',
|
this.setCustomKeybindingHandler('switch-to-workspace-4',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-5',
|
this.setCustomKeybindingHandler('switch-to-workspace-5',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-6',
|
this.setCustomKeybindingHandler('switch-to-workspace-6',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-7',
|
this.setCustomKeybindingHandler('switch-to-workspace-7',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-8',
|
this.setCustomKeybindingHandler('switch-to-workspace-8',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-9',
|
this.setCustomKeybindingHandler('switch-to-workspace-9',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-10',
|
this.setCustomKeybindingHandler('switch-to-workspace-10',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-11',
|
this.setCustomKeybindingHandler('switch-to-workspace-11',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-to-workspace-12',
|
this.setCustomKeybindingHandler('switch-to-workspace-12',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-1',
|
this.setCustomKeybindingHandler('move-to-workspace-1',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-2',
|
this.setCustomKeybindingHandler('move-to-workspace-2',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-3',
|
this.setCustomKeybindingHandler('move-to-workspace-3',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-4',
|
this.setCustomKeybindingHandler('move-to-workspace-4',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-5',
|
this.setCustomKeybindingHandler('move-to-workspace-5',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-6',
|
this.setCustomKeybindingHandler('move-to-workspace-6',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-7',
|
this.setCustomKeybindingHandler('move-to-workspace-7',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-8',
|
this.setCustomKeybindingHandler('move-to-workspace-8',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-9',
|
this.setCustomKeybindingHandler('move-to-workspace-9',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-10',
|
this.setCustomKeybindingHandler('move-to-workspace-10',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-11',
|
this.setCustomKeybindingHandler('move-to-workspace-11',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-12',
|
this.setCustomKeybindingHandler('move-to-workspace-12',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('move-to-workspace-last',
|
this.setCustomKeybindingHandler('move-to-workspace-last',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
this._showWorkspaceSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-applications',
|
this.setCustomKeybindingHandler('switch-applications',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._startSwitcher));
|
this._startSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-group',
|
this.setCustomKeybindingHandler('switch-group',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._startSwitcher));
|
this._startSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-applications-backward',
|
this.setCustomKeybindingHandler('switch-applications-backward',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._startSwitcher));
|
this._startSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-group-backward',
|
this.setCustomKeybindingHandler('switch-group-backward',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._startSwitcher));
|
this._startSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-windows',
|
this.setCustomKeybindingHandler('switch-windows',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._startSwitcher));
|
this._startSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-windows-backward',
|
this.setCustomKeybindingHandler('switch-windows-backward',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._startSwitcher));
|
this._startSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('cycle-windows',
|
this.setCustomKeybindingHandler('cycle-windows',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._startSwitcher));
|
this._startSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('cycle-windows-backward',
|
this.setCustomKeybindingHandler('cycle-windows-backward',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._startSwitcher));
|
this._startSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('cycle-group',
|
this.setCustomKeybindingHandler('cycle-group',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._startSwitcher));
|
this._startSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('cycle-group-backward',
|
this.setCustomKeybindingHandler('cycle-group-backward',
|
||||||
Shell.ActionMode.NORMAL,
|
Shell.ActionMode.NORMAL,
|
||||||
Lang.bind(this, this._startSwitcher));
|
this._startSwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-panels',
|
this.setCustomKeybindingHandler('switch-panels',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW |
|
Shell.ActionMode.OVERVIEW |
|
||||||
Shell.ActionMode.LOCK_SCREEN |
|
Shell.ActionMode.LOCK_SCREEN |
|
||||||
Shell.ActionMode.UNLOCK_SCREEN |
|
Shell.ActionMode.UNLOCK_SCREEN |
|
||||||
Shell.ActionMode.LOGIN_SCREEN,
|
Shell.ActionMode.LOGIN_SCREEN,
|
||||||
Lang.bind(this, this._startA11ySwitcher));
|
this._startA11ySwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-panels-backward',
|
this.setCustomKeybindingHandler('switch-panels-backward',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW |
|
Shell.ActionMode.OVERVIEW |
|
||||||
Shell.ActionMode.LOCK_SCREEN |
|
Shell.ActionMode.LOCK_SCREEN |
|
||||||
Shell.ActionMode.UNLOCK_SCREEN |
|
Shell.ActionMode.UNLOCK_SCREEN |
|
||||||
Shell.ActionMode.LOGIN_SCREEN,
|
Shell.ActionMode.LOGIN_SCREEN,
|
||||||
Lang.bind(this, this._startA11ySwitcher));
|
this._startA11ySwitcher.bind(this));
|
||||||
this.setCustomKeybindingHandler('switch-monitor',
|
this.setCustomKeybindingHandler('switch-monitor',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW,
|
Shell.ActionMode.OVERVIEW,
|
||||||
Lang.bind(this, this._startSwitcher));
|
this._startSwitcher.bind(this));
|
||||||
|
|
||||||
this.addKeybinding('pause-resume-tweens',
|
this.addKeybinding('pause-resume-tweens',
|
||||||
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
Shell.ActionMode.ALL,
|
Shell.ActionMode.ALL,
|
||||||
Lang.bind(this, this._toggleTweens));
|
this._toggleTweens.bind(this));
|
||||||
|
|
||||||
this.addKeybinding('open-application-menu',
|
this.addKeybinding('open-application-menu',
|
||||||
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.POPUP,
|
Shell.ActionMode.POPUP,
|
||||||
Lang.bind(this, this._toggleAppMenu));
|
this._toggleAppMenu.bind(this));
|
||||||
|
|
||||||
this.addKeybinding('toggle-message-tray',
|
this.addKeybinding('toggle-message-tray',
|
||||||
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
@ -923,10 +923,10 @@ var WindowManager = new Lang.Class({
|
|||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL |
|
||||||
Shell.ActionMode.OVERVIEW |
|
Shell.ActionMode.OVERVIEW |
|
||||||
Shell.ActionMode.POPUP,
|
Shell.ActionMode.POPUP,
|
||||||
Lang.bind(this, this._toggleCalendar));
|
this._toggleCalendar.bind(this));
|
||||||
|
|
||||||
global.display.connect('show-resize-popup', Lang.bind(this, this._showResizePopup));
|
global.display.connect('show-resize-popup', this._showResizePopup.bind(this));
|
||||||
global.display.connect('show-pad-osd', Lang.bind(this, this._showPadOsd));
|
global.display.connect('show-pad-osd', this._showPadOsd.bind(this));
|
||||||
global.display.connect('show-osd', (display, monitorIndex, iconName, label) => {
|
global.display.connect('show-osd', (display, monitorIndex, iconName, label) => {
|
||||||
let icon = Gio.Icon.new_for_string(iconName);
|
let icon = Gio.Icon.new_for_string(iconName);
|
||||||
Main.osdWindowManager.show(monitorIndex, icon, label, null);
|
Main.osdWindowManager.show(monitorIndex, icon, label, null);
|
||||||
@ -974,15 +974,15 @@ var WindowManager = new Lang.Class({
|
|||||||
false, -1, 1);
|
false, -1, 1);
|
||||||
|
|
||||||
let gesture = new WorkspaceSwitchAction();
|
let gesture = new WorkspaceSwitchAction();
|
||||||
gesture.connect('activated', Lang.bind(this, this._actionSwitchWorkspace));
|
gesture.connect('activated', this._actionSwitchWorkspace.bind(this));
|
||||||
global.stage.add_action(gesture);
|
global.stage.add_action(gesture);
|
||||||
|
|
||||||
// This is not a normal Clutter.GestureAction, doesn't need add_action()
|
// This is not a normal Clutter.GestureAction, doesn't need add_action()
|
||||||
gesture = new TouchpadWorkspaceSwitchAction(global.stage);
|
gesture = new TouchpadWorkspaceSwitchAction(global.stage);
|
||||||
gesture.connect('activated', Lang.bind(this, this._actionSwitchWorkspace));
|
gesture.connect('activated', this._actionSwitchWorkspace.bind(this));
|
||||||
|
|
||||||
gesture = new AppSwitchAction();
|
gesture = new AppSwitchAction();
|
||||||
gesture.connect('activated', Lang.bind(this, this._switchApp));
|
gesture.connect('activated', this._switchApp.bind(this));
|
||||||
global.stage.add_action(gesture);
|
global.stage.add_action(gesture);
|
||||||
|
|
||||||
let mode = Shell.ActionMode.ALL & ~Shell.ActionMode.LOCK_SCREEN;
|
let mode = Shell.ActionMode.ALL & ~Shell.ActionMode.LOCK_SCREEN;
|
||||||
|
@ -138,7 +138,7 @@ var WindowClone = new Lang.Class({
|
|||||||
this._stackAbove = null;
|
this._stackAbove = null;
|
||||||
|
|
||||||
this._windowClone._updateId = this.metaWindow.connect('size-changed',
|
this._windowClone._updateId = this.metaWindow.connect('size-changed',
|
||||||
Lang.bind(this, this._onRealWindowSizeChanged));
|
this._onRealWindowSizeChanged.bind(this));
|
||||||
this._windowClone._destroyId =
|
this._windowClone._destroyId =
|
||||||
this.realWindow.connect('destroy', () => {
|
this.realWindow.connect('destroy', () => {
|
||||||
// First destroy the clone and then destroy everything
|
// First destroy the clone and then destroy everything
|
||||||
@ -154,11 +154,11 @@ var WindowClone = new Lang.Class({
|
|||||||
this.actor.y = this._boundingBox.y;
|
this.actor.y = this._boundingBox.y;
|
||||||
|
|
||||||
let clickAction = new Clutter.ClickAction();
|
let clickAction = new Clutter.ClickAction();
|
||||||
clickAction.connect('clicked', Lang.bind(this, this._onClicked));
|
clickAction.connect('clicked', this._onClicked.bind(this));
|
||||||
clickAction.connect('long-press', Lang.bind(this, this._onLongPress));
|
clickAction.connect('long-press', this._onLongPress.bind(this));
|
||||||
this.actor.add_action(clickAction);
|
this.actor.add_action(clickAction);
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPress));
|
this.actor.connect('key-press-event', this._onKeyPress.bind(this));
|
||||||
|
|
||||||
this.actor.connect('enter-event', () => { this.emit('show-chrome'); });
|
this.actor.connect('enter-event', () => { this.emit('show-chrome'); });
|
||||||
this.actor.connect('key-focus-in', () => { this.emit('show-chrome'); });
|
this.actor.connect('key-focus-in', () => { this.emit('show-chrome'); });
|
||||||
@ -171,9 +171,9 @@ var WindowClone = new Lang.Class({
|
|||||||
manualMode: true,
|
manualMode: true,
|
||||||
dragActorMaxSize: WINDOW_DND_SIZE,
|
dragActorMaxSize: WINDOW_DND_SIZE,
|
||||||
dragActorOpacity: DRAGGING_WINDOW_OPACITY });
|
dragActorOpacity: DRAGGING_WINDOW_OPACITY });
|
||||||
this._draggable.connect('drag-begin', Lang.bind(this, this._onDragBegin));
|
this._draggable.connect('drag-begin', this._onDragBegin.bind(this));
|
||||||
this._draggable.connect('drag-cancelled', Lang.bind(this, this._onDragCancelled));
|
this._draggable.connect('drag-cancelled', this._onDragCancelled.bind(this));
|
||||||
this._draggable.connect('drag-end', Lang.bind(this, this._onDragEnd));
|
this._draggable.connect('drag-end', this._onDragEnd.bind(this));
|
||||||
this.inDrag = false;
|
this.inDrag = false;
|
||||||
|
|
||||||
this._selected = false;
|
this._selected = false;
|
||||||
@ -460,11 +460,11 @@ var WindowOverlay = new Lang.Class({
|
|||||||
button._overlap = 0;
|
button._overlap = 0;
|
||||||
|
|
||||||
this._idleToggleCloseId = 0;
|
this._idleToggleCloseId = 0;
|
||||||
button.connect('clicked', Lang.bind(this, this._closeWindow));
|
button.connect('clicked', this._closeWindow.bind(this));
|
||||||
|
|
||||||
windowClone.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
windowClone.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
windowClone.connect('show-chrome', Lang.bind(this, this._onShowChrome));
|
windowClone.connect('show-chrome', this._onShowChrome.bind(this));
|
||||||
windowClone.connect('hide-chrome', Lang.bind(this, this._onHideChrome));
|
windowClone.connect('hide-chrome', this._onHideChrome.bind(this));
|
||||||
|
|
||||||
this._windowAddedId = 0;
|
this._windowAddedId = 0;
|
||||||
|
|
||||||
@ -482,10 +482,10 @@ var WindowOverlay = new Lang.Class({
|
|||||||
parentActor.add_actor(this.title);
|
parentActor.add_actor(this.title);
|
||||||
parentActor.add_actor(this.closeButton);
|
parentActor.add_actor(this.closeButton);
|
||||||
title.connect('style-changed',
|
title.connect('style-changed',
|
||||||
Lang.bind(this, this._onStyleChanged));
|
this._onStyleChanged.bind(this));
|
||||||
button.connect('style-changed',
|
button.connect('style-changed',
|
||||||
Lang.bind(this, this._onStyleChanged));
|
this._onStyleChanged.bind(this));
|
||||||
this.border.connect('style-changed', Lang.bind(this, this._onStyleChanged));
|
this.border.connect('style-changed', this._onStyleChanged.bind(this));
|
||||||
// force a style change if we are already on a stage - otherwise
|
// force a style change if we are already on a stage - otherwise
|
||||||
// the signal will be emitted normally when we are added
|
// the signal will be emitted normally when we are added
|
||||||
if (parentActor.get_stage())
|
if (parentActor.get_stage())
|
||||||
@ -583,8 +583,7 @@ var WindowOverlay = new Lang.Class({
|
|||||||
this._workspace = metaWindow.get_workspace();
|
this._workspace = metaWindow.get_workspace();
|
||||||
|
|
||||||
this._windowAddedId = this._workspace.connect('window-added',
|
this._windowAddedId = this._workspace.connect('window-added',
|
||||||
Lang.bind(this,
|
this._onWindowAdded.bind(this));
|
||||||
this._onWindowAdded));
|
|
||||||
|
|
||||||
this._windowClone.deleteAll();
|
this._windowClone.deleteAll();
|
||||||
},
|
},
|
||||||
@ -668,7 +667,7 @@ var WindowOverlay = new Lang.Class({
|
|||||||
|
|
||||||
_onHideChrome() {
|
_onHideChrome() {
|
||||||
if (this._idleToggleCloseId == 0) {
|
if (this._idleToggleCloseId == 0) {
|
||||||
this._idleToggleCloseId = Mainloop.timeout_add(750, Lang.bind(this, this._idleToggleCloseButton));
|
this._idleToggleCloseId = Mainloop.timeout_add(750, this._idleToggleCloseButton.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._idleToggleCloseId, '[gnome-shell] this._idleToggleCloseButton');
|
GLib.Source.set_name_by_id(this._idleToggleCloseId, '[gnome-shell] this._idleToggleCloseButton');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1126,7 +1125,7 @@ var Workspace = new Lang.Class({
|
|||||||
this.actor.add_actor(this._dropRect);
|
this.actor.add_actor(this._dropRect);
|
||||||
this.actor.add_actor(this._windowOverlaysGroup);
|
this.actor.add_actor(this._windowOverlaysGroup);
|
||||||
|
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
let windows = global.get_window_actors().filter(this._isMyWindow, this);
|
let windows = global.get_window_actors().filter(this._isMyWindow, this);
|
||||||
|
|
||||||
@ -1143,14 +1142,14 @@ var Workspace = new Lang.Class({
|
|||||||
// Track window changes
|
// Track window changes
|
||||||
if (this.metaWorkspace) {
|
if (this.metaWorkspace) {
|
||||||
this._windowAddedId = this.metaWorkspace.connect('window-added',
|
this._windowAddedId = this.metaWorkspace.connect('window-added',
|
||||||
Lang.bind(this, this._windowAdded));
|
this._windowAdded.bind(this));
|
||||||
this._windowRemovedId = this.metaWorkspace.connect('window-removed',
|
this._windowRemovedId = this.metaWorkspace.connect('window-removed',
|
||||||
Lang.bind(this, this._windowRemoved));
|
this._windowRemoved.bind(this));
|
||||||
}
|
}
|
||||||
this._windowEnteredMonitorId = global.screen.connect('window-entered-monitor',
|
this._windowEnteredMonitorId = global.screen.connect('window-entered-monitor',
|
||||||
Lang.bind(this, this._windowEnteredMonitor));
|
this._windowEnteredMonitor.bind(this));
|
||||||
this._windowLeftMonitorId = global.screen.connect('window-left-monitor',
|
this._windowLeftMonitorId = global.screen.connect('window-left-monitor',
|
||||||
Lang.bind(this, this._windowLeftMonitor));
|
this._windowLeftMonitor.bind(this));
|
||||||
this._repositionWindowsId = 0;
|
this._repositionWindowsId = 0;
|
||||||
|
|
||||||
this.leavingOverview = false;
|
this.leavingOverview = false;
|
||||||
@ -1480,7 +1479,7 @@ var Workspace = new Lang.Class({
|
|||||||
|
|
||||||
this._currentLayout = null;
|
this._currentLayout = null;
|
||||||
this._repositionWindowsId = Mainloop.timeout_add(750,
|
this._repositionWindowsId = Mainloop.timeout_add(750,
|
||||||
Lang.bind(this, this._delayedWindowRepositioning));
|
this._delayedWindowRepositioning.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._repositionWindowsId, '[gnome-shell] this._delayedWindowRepositioning');
|
GLib.Source.set_name_by_id(this._repositionWindowsId, '[gnome-shell] this._delayedWindowRepositioning');
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1586,8 +1585,7 @@ var Workspace = new Lang.Class({
|
|||||||
fadeToOverview() {
|
fadeToOverview() {
|
||||||
// We don't want to reposition windows while animating in this way.
|
// We don't want to reposition windows while animating in this way.
|
||||||
this._animatingWindowsFade = true;
|
this._animatingWindowsFade = true;
|
||||||
this._overviewShownId = Main.overview.connect('shown', Lang.bind(this,
|
this._overviewShownId = Main.overview.connect('shown', this._doneShowingOverview.bind(this));
|
||||||
this._doneShowingOverview));
|
|
||||||
if (this._windows.length == 0)
|
if (this._windows.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1633,8 +1631,7 @@ var Workspace = new Lang.Class({
|
|||||||
|
|
||||||
fadeFromOverview() {
|
fadeFromOverview() {
|
||||||
this.leavingOverview = true;
|
this.leavingOverview = true;
|
||||||
this._overviewHiddenId = Main.overview.connect('hidden', Lang.bind(this,
|
this._overviewHiddenId = Main.overview.connect('hidden', this._doneLeavingOverview.bind(this));
|
||||||
this._doneLeavingOverview));
|
|
||||||
if (this._windows.length == 0)
|
if (this._windows.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1731,8 +1728,7 @@ var Workspace = new Lang.Class({
|
|||||||
Mainloop.source_remove(this._repositionWindowsId);
|
Mainloop.source_remove(this._repositionWindowsId);
|
||||||
this._repositionWindowsId = 0;
|
this._repositionWindowsId = 0;
|
||||||
}
|
}
|
||||||
this._overviewHiddenId = Main.overview.connect('hidden', Lang.bind(this,
|
this._overviewHiddenId = Main.overview.connect('hidden', this._doneLeavingOverview.bind(this));
|
||||||
this._doneLeavingOverview));
|
|
||||||
|
|
||||||
if (this.metaWorkspace != null && this.metaWorkspace != currentWorkspace)
|
if (this.metaWorkspace != null && this.metaWorkspace != currentWorkspace)
|
||||||
return;
|
return;
|
||||||
@ -1838,7 +1834,7 @@ var Workspace = new Lang.Class({
|
|||||||
clone.positioned = positioned;
|
clone.positioned = positioned;
|
||||||
|
|
||||||
clone.connect('selected',
|
clone.connect('selected',
|
||||||
Lang.bind(this, this._onCloneSelected));
|
this._onCloneSelected.bind(this));
|
||||||
clone.connect('drag-begin', () => {
|
clone.connect('drag-begin', () => {
|
||||||
Main.overview.beginWindowDrag(clone.metaWindow);
|
Main.overview.beginWindowDrag(clone.metaWindow);
|
||||||
overlay.hide();
|
overlay.hide();
|
||||||
@ -1856,7 +1852,7 @@ var Workspace = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.add_actor(clone.actor);
|
this.actor.add_actor(clone.actor);
|
||||||
|
|
||||||
overlay.connect('show-close-button', Lang.bind(this, this._onShowOverlayClose));
|
overlay.connect('show-close-button', this._onShowOverlayClose.bind(this));
|
||||||
|
|
||||||
if (this._windows.length == 0)
|
if (this._windows.length == 0)
|
||||||
clone.setStackAbove(null);
|
clone.setStackAbove(null);
|
||||||
|
@ -36,9 +36,9 @@ var WorkspaceSwitcherPopup = new Lang.Class({
|
|||||||
this._itemSpacing = this._list.get_theme_node().get_length('spacing');
|
this._itemSpacing = this._list.get_theme_node().get_length('spacing');
|
||||||
});
|
});
|
||||||
|
|
||||||
this._list.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this._list.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this._list.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this._list.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this._list.connect('allocate', Lang.bind(this, this._allocate));
|
this._list.connect('allocate', this._allocate.bind(this));
|
||||||
this._container.add(this._list);
|
this._container.add(this._list);
|
||||||
|
|
||||||
this.actor.add_actor(this._container);
|
this.actor.add_actor(this._container);
|
||||||
@ -48,8 +48,8 @@ var WorkspaceSwitcherPopup = new Lang.Class({
|
|||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
|
|
||||||
this._globalSignals = [];
|
this._globalSignals = [];
|
||||||
this._globalSignals.push(global.screen.connect('workspace-added', Lang.bind(this, this._redisplay)));
|
this._globalSignals.push(global.screen.connect('workspace-added', this._redisplay.bind(this)));
|
||||||
this._globalSignals.push(global.screen.connect('workspace-removed', Lang.bind(this, this._redisplay)));
|
this._globalSignals.push(global.screen.connect('workspace-removed', this._redisplay.bind(this)));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getPreferredHeight(actor, forWidth, alloc) {
|
_getPreferredHeight(actor, forWidth, alloc) {
|
||||||
@ -142,7 +142,7 @@ var WorkspaceSwitcherPopup = new Lang.Class({
|
|||||||
this._redisplay();
|
this._redisplay();
|
||||||
if (this._timeoutId != 0)
|
if (this._timeoutId != 0)
|
||||||
Mainloop.source_remove(this._timeoutId);
|
Mainloop.source_remove(this._timeoutId);
|
||||||
this._timeoutId = Mainloop.timeout_add(DISPLAY_TIMEOUT, Lang.bind(this, this._onTimeout));
|
this._timeoutId = Mainloop.timeout_add(DISPLAY_TIMEOUT, this._onTimeout.bind(this));
|
||||||
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._onTimeout');
|
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._onTimeout');
|
||||||
this._show();
|
this._show();
|
||||||
},
|
},
|
||||||
|
@ -69,7 +69,7 @@ var WindowClone = new Lang.Class({
|
|||||||
this.metaWindow = realWindow.meta_window;
|
this.metaWindow = realWindow.meta_window;
|
||||||
|
|
||||||
this.clone._updateId = this.metaWindow.connect('position-changed',
|
this.clone._updateId = this.metaWindow.connect('position-changed',
|
||||||
Lang.bind(this, this._onPositionChanged));
|
this._onPositionChanged.bind(this));
|
||||||
this.clone._destroyId = this.realWindow.connect('destroy', () => {
|
this.clone._destroyId = this.realWindow.connect('destroy', () => {
|
||||||
// First destroy the clone and then destroy everything
|
// First destroy the clone and then destroy everything
|
||||||
// This will ensure that we never see it in the _disconnectSignals loop
|
// This will ensure that we never see it in the _disconnectSignals loop
|
||||||
@ -79,19 +79,19 @@ var WindowClone = new Lang.Class({
|
|||||||
this._onPositionChanged();
|
this._onPositionChanged();
|
||||||
|
|
||||||
this.actor.connect('button-release-event',
|
this.actor.connect('button-release-event',
|
||||||
Lang.bind(this, this._onButtonRelease));
|
this._onButtonRelease.bind(this));
|
||||||
this.actor.connect('touch-event',
|
this.actor.connect('touch-event',
|
||||||
Lang.bind(this, this._onTouchEvent));
|
this._onTouchEvent.bind(this));
|
||||||
|
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
this._draggable = DND.makeDraggable(this.actor,
|
this._draggable = DND.makeDraggable(this.actor,
|
||||||
{ restoreOnSuccess: true,
|
{ restoreOnSuccess: true,
|
||||||
dragActorMaxSize: Workspace.WINDOW_DND_SIZE,
|
dragActorMaxSize: Workspace.WINDOW_DND_SIZE,
|
||||||
dragActorOpacity: Workspace.DRAGGING_WINDOW_OPACITY });
|
dragActorOpacity: Workspace.DRAGGING_WINDOW_OPACITY });
|
||||||
this._draggable.connect('drag-begin', Lang.bind(this, this._onDragBegin));
|
this._draggable.connect('drag-begin', this._onDragBegin.bind(this));
|
||||||
this._draggable.connect('drag-cancelled', Lang.bind(this, this._onDragCancelled));
|
this._draggable.connect('drag-cancelled', this._onDragCancelled.bind(this));
|
||||||
this._draggable.connect('drag-end', Lang.bind(this, this._onDragEnd));
|
this._draggable.connect('drag-end', this._onDragEnd.bind(this));
|
||||||
this.inDrag = false;
|
this.inDrag = false;
|
||||||
|
|
||||||
let iter = win => {
|
let iter = win => {
|
||||||
@ -153,8 +153,9 @@ var WindowClone = new Lang.Class({
|
|||||||
let clone = new Clutter.Clone({ source: realDialog });
|
let clone = new Clutter.Clone({ source: realDialog });
|
||||||
this._updateDialogPosition(realDialog, clone);
|
this._updateDialogPosition(realDialog, clone);
|
||||||
|
|
||||||
clone._updateId = metaDialog.connect('position-changed',
|
clone._updateId = metaDialog.connect('position-changed', dialog => {
|
||||||
Lang.bind(this, this._updateDialogPosition, clone));
|
this._updateDialogPosition(dialog, clone);
|
||||||
|
});
|
||||||
clone._destroyId = realDialog.connect('destroy', () => {
|
clone._destroyId = realDialog.connect('destroy', () => {
|
||||||
clone.destroy();
|
clone.destroy();
|
||||||
});
|
});
|
||||||
@ -270,7 +271,7 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
this._contents = new Clutter.Actor();
|
this._contents = new Clutter.Actor();
|
||||||
this.actor.add_child(this._contents);
|
this.actor.add_child(this._contents);
|
||||||
|
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
this._createBackground();
|
this._createBackground();
|
||||||
|
|
||||||
@ -289,8 +290,7 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
for (let i = 0; i < windows.length; i++) {
|
for (let i = 0; i < windows.length; i++) {
|
||||||
let minimizedChangedId =
|
let minimizedChangedId =
|
||||||
windows[i].meta_window.connect('notify::minimized',
|
windows[i].meta_window.connect('notify::minimized',
|
||||||
Lang.bind(this,
|
this._updateMinimized.bind(this));
|
||||||
this._updateMinimized));
|
|
||||||
this._allWindows.push(windows[i].meta_window);
|
this._allWindows.push(windows[i].meta_window);
|
||||||
this._minimizedChangedIds.push(minimizedChangedId);
|
this._minimizedChangedIds.push(minimizedChangedId);
|
||||||
|
|
||||||
@ -301,13 +301,13 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
|
|
||||||
// Track window changes
|
// Track window changes
|
||||||
this._windowAddedId = this.metaWorkspace.connect('window-added',
|
this._windowAddedId = this.metaWorkspace.connect('window-added',
|
||||||
Lang.bind(this, this._windowAdded));
|
this._windowAdded.bind(this));
|
||||||
this._windowRemovedId = this.metaWorkspace.connect('window-removed',
|
this._windowRemovedId = this.metaWorkspace.connect('window-removed',
|
||||||
Lang.bind(this, this._windowRemoved));
|
this._windowRemoved.bind(this));
|
||||||
this._windowEnteredMonitorId = global.screen.connect('window-entered-monitor',
|
this._windowEnteredMonitorId = global.screen.connect('window-entered-monitor',
|
||||||
Lang.bind(this, this._windowEnteredMonitor));
|
this._windowEnteredMonitor.bind(this));
|
||||||
this._windowLeftMonitorId = global.screen.connect('window-left-monitor',
|
this._windowLeftMonitorId = global.screen.connect('window-left-monitor',
|
||||||
Lang.bind(this, this._windowLeftMonitor));
|
this._windowLeftMonitor.bind(this));
|
||||||
|
|
||||||
this.state = ThumbnailState.NORMAL;
|
this.state = ThumbnailState.NORMAL;
|
||||||
this._slidePosition = 0; // Fully slid in
|
this._slidePosition = 0; // Fully slid in
|
||||||
@ -410,8 +410,7 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
|
|
||||||
if (this._allWindows.indexOf(metaWin) == -1) {
|
if (this._allWindows.indexOf(metaWin) == -1) {
|
||||||
let minimizedChangedId = metaWin.connect('notify::minimized',
|
let minimizedChangedId = metaWin.connect('notify::minimized',
|
||||||
Lang.bind(this,
|
this._updateMinimized.bind(this));
|
||||||
this._updateMinimized));
|
|
||||||
this._allWindows.push(metaWin);
|
this._allWindows.push(metaWin);
|
||||||
this._minimizedChangedIds.push(minimizedChangedId);
|
this._minimizedChangedIds.push(minimizedChangedId);
|
||||||
}
|
}
|
||||||
@ -618,9 +617,9 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
this.actor = new Shell.GenericContainer({ reactive: true,
|
this.actor = new Shell.GenericContainer({ reactive: true,
|
||||||
style_class: 'workspace-thumbnails',
|
style_class: 'workspace-thumbnails',
|
||||||
request_mode: Clutter.RequestMode.WIDTH_FOR_HEIGHT });
|
request_mode: Clutter.RequestMode.WIDTH_FOR_HEIGHT });
|
||||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this.actor.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
this.actor.connect('allocate', this._allocate.bind(this));
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
|
|
||||||
let indicator = new St.Bin({ style_class: 'workspace-thumbnail-indicator' });
|
let indicator = new St.Bin({ style_class: 'workspace-thumbnail-indicator' });
|
||||||
@ -651,30 +650,30 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
this._thumbnails = [];
|
this._thumbnails = [];
|
||||||
|
|
||||||
this.actor.connect('button-press-event', () => Clutter.EVENT_STOP);
|
this.actor.connect('button-press-event', () => Clutter.EVENT_STOP);
|
||||||
this.actor.connect('button-release-event', Lang.bind(this, this._onButtonRelease));
|
this.actor.connect('button-release-event', this._onButtonRelease.bind(this));
|
||||||
this.actor.connect('touch-event', Lang.bind(this, this._onTouchEvent));
|
this.actor.connect('touch-event', this._onTouchEvent.bind(this));
|
||||||
|
|
||||||
Main.overview.connect('showing',
|
Main.overview.connect('showing',
|
||||||
Lang.bind(this, this._createThumbnails));
|
this._createThumbnails.bind(this));
|
||||||
Main.overview.connect('hidden',
|
Main.overview.connect('hidden',
|
||||||
Lang.bind(this, this._destroyThumbnails));
|
this._destroyThumbnails.bind(this));
|
||||||
|
|
||||||
Main.overview.connect('item-drag-begin',
|
Main.overview.connect('item-drag-begin',
|
||||||
Lang.bind(this, this._onDragBegin));
|
this._onDragBegin.bind(this));
|
||||||
Main.overview.connect('item-drag-end',
|
Main.overview.connect('item-drag-end',
|
||||||
Lang.bind(this, this._onDragEnd));
|
this._onDragEnd.bind(this));
|
||||||
Main.overview.connect('item-drag-cancelled',
|
Main.overview.connect('item-drag-cancelled',
|
||||||
Lang.bind(this, this._onDragCancelled));
|
this._onDragCancelled.bind(this));
|
||||||
Main.overview.connect('window-drag-begin',
|
Main.overview.connect('window-drag-begin',
|
||||||
Lang.bind(this, this._onDragBegin));
|
this._onDragBegin.bind(this));
|
||||||
Main.overview.connect('window-drag-end',
|
Main.overview.connect('window-drag-end',
|
||||||
Lang.bind(this, this._onDragEnd));
|
this._onDragEnd.bind(this));
|
||||||
Main.overview.connect('window-drag-cancelled',
|
Main.overview.connect('window-drag-cancelled',
|
||||||
Lang.bind(this, this._onDragCancelled));
|
this._onDragCancelled.bind(this));
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: OVERRIDE_SCHEMA });
|
this._settings = new Gio.Settings({ schema_id: OVERRIDE_SCHEMA });
|
||||||
this._settings.connect('changed::dynamic-workspaces',
|
this._settings.connect('changed::dynamic-workspaces',
|
||||||
Lang.bind(this, this._updateSwitcherVisibility));
|
this._updateSwitcherVisibility.bind(this));
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed', () => {
|
Main.layoutManager.connect('monitors-changed', () => {
|
||||||
this._destroyThumbnails();
|
this._destroyThumbnails();
|
||||||
@ -721,7 +720,7 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
_onDragBegin() {
|
_onDragBegin() {
|
||||||
this._dragCancelled = false;
|
this._dragCancelled = false;
|
||||||
this._dragMonitor = {
|
this._dragMonitor = {
|
||||||
dragMotion: Lang.bind(this, this._onDragMotion)
|
dragMotion: this._onDragMotion.bind(this)
|
||||||
};
|
};
|
||||||
DND.addDragMonitor(this._dragMonitor);
|
DND.addDragMonitor(this._dragMonitor);
|
||||||
},
|
},
|
||||||
@ -865,13 +864,13 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
_createThumbnails() {
|
_createThumbnails() {
|
||||||
this._switchWorkspaceNotifyId =
|
this._switchWorkspaceNotifyId =
|
||||||
global.window_manager.connect('switch-workspace',
|
global.window_manager.connect('switch-workspace',
|
||||||
Lang.bind(this, this._activeWorkspaceChanged));
|
this._activeWorkspaceChanged.bind(this));
|
||||||
this._nWorkspacesNotifyId =
|
this._nWorkspacesNotifyId =
|
||||||
global.screen.connect('notify::n-workspaces',
|
global.screen.connect('notify::n-workspaces',
|
||||||
Lang.bind(this, this._workspacesChanged));
|
this._workspacesChanged.bind(this));
|
||||||
this._syncStackingId =
|
this._syncStackingId =
|
||||||
Main.overview.connect('windows-restacked',
|
Main.overview.connect('windows-restacked',
|
||||||
Lang.bind(this, this._syncStacking));
|
this._syncStacking.bind(this));
|
||||||
|
|
||||||
this._targetScale = 0;
|
this._targetScale = 0;
|
||||||
this._scale = 0;
|
this._scale = 0;
|
||||||
@ -1108,7 +1107,7 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
|
Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
|
||||||
Lang.bind(this, this._updateStates));
|
this._updateStates.bind(this));
|
||||||
|
|
||||||
this._stateUpdateQueued = true;
|
this._stateUpdateQueued = true;
|
||||||
},
|
},
|
||||||
|
@ -32,7 +32,7 @@ var WorkspacesViewBase = new Lang.Class({
|
|||||||
_init(monitorIndex) {
|
_init(monitorIndex) {
|
||||||
this.actor = new St.Widget({ style_class: 'workspaces-view',
|
this.actor = new St.Widget({ style_class: 'workspaces-view',
|
||||||
reactive: true });
|
reactive: true });
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
global.focus_manager.add_group(this.actor);
|
global.focus_manager.add_group(this.actor);
|
||||||
|
|
||||||
// The actor itself isn't a drop target, so we don't want to pick on its area
|
// The actor itself isn't a drop target, so we don't want to pick on its area
|
||||||
@ -44,8 +44,8 @@ var WorkspacesViewBase = new Lang.Class({
|
|||||||
this._actualGeometry = null;
|
this._actualGeometry = null;
|
||||||
|
|
||||||
this._inDrag = false;
|
this._inDrag = false;
|
||||||
this._windowDragBeginId = Main.overview.connect('window-drag-begin', Lang.bind(this, this._dragBegin));
|
this._windowDragBeginId = Main.overview.connect('window-drag-begin', this._dragBegin.bind(this));
|
||||||
this._windowDragEndId = Main.overview.connect('window-drag-end', Lang.bind(this, this._dragEnd));
|
this._windowDragEndId = Main.overview.connect('window-drag-end', this._dragEnd.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
@ -105,11 +105,11 @@ var WorkspacesView = new Lang.Class({
|
|||||||
step_increment: 0,
|
step_increment: 0,
|
||||||
upper: global.screen.n_workspaces });
|
upper: global.screen.n_workspaces });
|
||||||
this.scrollAdjustment.connect('notify::value',
|
this.scrollAdjustment.connect('notify::value',
|
||||||
Lang.bind(this, this._onScroll));
|
this._onScroll.bind(this));
|
||||||
|
|
||||||
this._workspaces = [];
|
this._workspaces = [];
|
||||||
this._updateWorkspaces();
|
this._updateWorkspaces();
|
||||||
this._updateWorkspacesId = global.screen.connect('notify::n-workspaces', Lang.bind(this, this._updateWorkspaces));
|
this._updateWorkspacesId = global.screen.connect('notify::n-workspaces', this._updateWorkspaces.bind(this));
|
||||||
|
|
||||||
this._overviewShownId =
|
this._overviewShownId =
|
||||||
Main.overview.connect('shown', () => {
|
Main.overview.connect('shown', () => {
|
||||||
@ -119,7 +119,7 @@ var WorkspacesView = new Lang.Class({
|
|||||||
|
|
||||||
this._switchWorkspaceNotifyId =
|
this._switchWorkspaceNotifyId =
|
||||||
global.window_manager.connect('switch-workspace',
|
global.window_manager.connect('switch-workspace',
|
||||||
Lang.bind(this, this._activeWorkspaceChanged));
|
this._activeWorkspaceChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_setReservedSlot(window) {
|
_setReservedSlot(window) {
|
||||||
@ -414,8 +414,8 @@ var WorkspacesDisplay = new Lang.Class({
|
|||||||
_init() {
|
_init() {
|
||||||
this.actor = new DelegateFocusNavigator({ clip_to_allocation: true });
|
this.actor = new DelegateFocusNavigator({ clip_to_allocation: true });
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
this.actor.connect('notify::allocation', Lang.bind(this, this._updateWorkspacesActualGeometry));
|
this.actor.connect('notify::allocation', this._updateWorkspacesActualGeometry.bind(this));
|
||||||
this.actor.connect('parent-set', Lang.bind(this, this._parentSet));
|
this.actor.connect('parent-set', this._parentSet.bind(this));
|
||||||
|
|
||||||
let clickAction = new Clutter.ClickAction();
|
let clickAction = new Clutter.ClickAction();
|
||||||
clickAction.connect('clicked', action => {
|
clickAction.connect('clicked', action => {
|
||||||
@ -432,7 +432,7 @@ var WorkspacesDisplay = new Lang.Class({
|
|||||||
this.actor.bind_property('mapped', clickAction, 'enabled', GObject.BindingFlags.SYNC_CREATE);
|
this.actor.bind_property('mapped', clickAction, 'enabled', GObject.BindingFlags.SYNC_CREATE);
|
||||||
|
|
||||||
let panAction = new Clutter.PanAction({ threshold_trigger_edge: Clutter.GestureTriggerEdge.AFTER });
|
let panAction = new Clutter.PanAction({ threshold_trigger_edge: Clutter.GestureTriggerEdge.AFTER });
|
||||||
panAction.connect('pan', Lang.bind(this, this._onPan));
|
panAction.connect('pan', this._onPan.bind(this));
|
||||||
panAction.connect('gesture-begin', () => {
|
panAction.connect('gesture-begin', () => {
|
||||||
if (this._workspacesOnlyOnPrimary) {
|
if (this._workspacesOnlyOnPrimary) {
|
||||||
let event = Clutter.get_current_event();
|
let event = Clutter.get_current_event();
|
||||||
@ -464,8 +464,7 @@ var WorkspacesDisplay = new Lang.Class({
|
|||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: OVERRIDE_SCHEMA });
|
this._settings = new Gio.Settings({ schema_id: OVERRIDE_SCHEMA });
|
||||||
this._settings.connect('changed::workspaces-only-on-primary',
|
this._settings.connect('changed::workspaces-only-on-primary',
|
||||||
Lang.bind(this,
|
this._workspacesOnlyOnPrimaryChanged.bind(this));
|
||||||
this._workspacesOnlyOnPrimaryChanged));
|
|
||||||
this._workspacesOnlyOnPrimaryChanged();
|
this._workspacesOnlyOnPrimaryChanged();
|
||||||
|
|
||||||
this._switchWorkspaceNotifyId = 0;
|
this._switchWorkspaceNotifyId = 0;
|
||||||
@ -501,12 +500,12 @@ var WorkspacesDisplay = new Lang.Class({
|
|||||||
|
|
||||||
this._restackedNotifyId =
|
this._restackedNotifyId =
|
||||||
Main.overview.connect('windows-restacked',
|
Main.overview.connect('windows-restacked',
|
||||||
Lang.bind(this, this._onRestacked));
|
this._onRestacked.bind(this));
|
||||||
if (this._scrollEventId == 0)
|
if (this._scrollEventId == 0)
|
||||||
this._scrollEventId = Main.overview.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
|
this._scrollEventId = Main.overview.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
|
|
||||||
if (this._keyPressEventId == 0)
|
if (this._keyPressEventId == 0)
|
||||||
this._keyPressEventId = global.stage.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
|
this._keyPressEventId = global.stage.connect('key-press-event', this._onKeyPressEvent.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
animateFromOverview(fadeOnPrimary) {
|
animateFromOverview(fadeOnPrimary) {
|
||||||
@ -561,11 +560,11 @@ var WorkspacesDisplay = new Lang.Class({
|
|||||||
else
|
else
|
||||||
view = new WorkspacesView(i);
|
view = new WorkspacesView(i);
|
||||||
|
|
||||||
view.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
|
view.actor.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
if (i == this._primaryIndex) {
|
if (i == this._primaryIndex) {
|
||||||
this._scrollAdjustment = view.scrollAdjustment;
|
this._scrollAdjustment = view.scrollAdjustment;
|
||||||
this._scrollAdjustment.connect('notify::value',
|
this._scrollAdjustment.connect('notify::value',
|
||||||
Lang.bind(this, this._scrollValueChanged));
|
this._scrollValueChanged.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
this._workspacesViews.push(view);
|
this._workspacesViews.push(view);
|
||||||
|
@ -25,9 +25,9 @@ var XdndHandler = new Lang.Class({
|
|||||||
global.init_xdnd();
|
global.init_xdnd();
|
||||||
|
|
||||||
var dnd = Meta.get_backend().get_dnd();
|
var dnd = Meta.get_backend().get_dnd();
|
||||||
dnd.connect('dnd-enter', Lang.bind(this, this._onEnter));
|
dnd.connect('dnd-enter', this._onEnter.bind(this));
|
||||||
dnd.connect('dnd-position-change', Lang.bind(this, this._onPositionChanged));
|
dnd.connect('dnd-position-change', this._onPositionChanged.bind(this));
|
||||||
dnd.connect('dnd-leave', Lang.bind(this, this._onLeave));
|
dnd.connect('dnd-leave', this._onLeave.bind(this));
|
||||||
|
|
||||||
this._windowGroupVisibilityHandlerId = 0;
|
this._windowGroupVisibilityHandlerId = 0;
|
||||||
},
|
},
|
||||||
@ -49,7 +49,7 @@ var XdndHandler = new Lang.Class({
|
|||||||
_onEnter() {
|
_onEnter() {
|
||||||
this._windowGroupVisibilityHandlerId =
|
this._windowGroupVisibilityHandlerId =
|
||||||
global.window_group.connect('notify::visible',
|
global.window_group.connect('notify::visible',
|
||||||
Lang.bind(this, this._onWindowGroupVisibilityChanged));
|
this._onWindowGroupVisibilityChanged.bind(this));
|
||||||
|
|
||||||
this.emit('drag-begin', global.get_current_time());
|
this.emit('drag-begin', global.get_current_time());
|
||||||
},
|
},
|
||||||
|
@ -39,9 +39,9 @@ function FlowedBoxes() {
|
|||||||
FlowedBoxes.prototype = {
|
FlowedBoxes.prototype = {
|
||||||
_init() {
|
_init() {
|
||||||
this.actor = new Shell.GenericContainer();
|
this.actor = new Shell.GenericContainer();
|
||||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this.actor.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
this.actor.connect('allocate', this._allocate.bind(this));
|
||||||
|
|
||||||
for (let i = 0; i < BOX_WIDTHS.length; i++) {
|
for (let i = 0; i < BOX_WIDTHS.length; i++) {
|
||||||
let child = new St.Bin({ width: BOX_WIDTHS[i], height: BOX_HEIGHT,
|
let child = new St.Bin({ width: BOX_WIDTHS[i], height: BOX_HEIGHT,
|
||||||
@ -135,9 +135,9 @@ SizingIllustrator.prototype = {
|
|||||||
_init() {
|
_init() {
|
||||||
this.actor = new Shell.GenericContainer();
|
this.actor = new Shell.GenericContainer();
|
||||||
|
|
||||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this.actor.connect('get-preferred-width', this._getPreferredWidth.bind(this));
|
||||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
this.actor.connect('allocate', this._allocate.bind(this));
|
||||||
|
|
||||||
this.minWidthLine = new St.Bin({ style: 'background: red' });
|
this.minWidthLine = new St.Bin({ style: 'background: red' });
|
||||||
this.actor.add_actor(this.minWidthLine);
|
this.actor.add_actor(this.minWidthLine);
|
||||||
@ -156,9 +156,9 @@ SizingIllustrator.prototype = {
|
|||||||
|
|
||||||
this.handle = new St.Bin({ style: 'background: yellow; border: 1px solid black;',
|
this.handle = new St.Bin({ style: 'background: yellow; border: 1px solid black;',
|
||||||
reactive: true });
|
reactive: true });
|
||||||
this.handle.connect('button-press-event', Lang.bind(this, this._handlePressed));
|
this.handle.connect('button-press-event', this._handlePressed.bind(this));
|
||||||
this.handle.connect('button-release-event', Lang.bind(this, this._handleReleased));
|
this.handle.connect('button-release-event', this._handleReleased.bind(this));
|
||||||
this.handle.connect('motion-event', Lang.bind(this, this._handleMotion));
|
this.handle.connect('motion-event', this._handleMotion.bind(this));
|
||||||
this.actor.add_actor(this.handle);
|
this.actor.add_actor(this.handle);
|
||||||
|
|
||||||
this._inDrag = false;
|
this._inDrag = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user