Compare commits
143 Commits
Author | SHA1 | Date | |
---|---|---|---|
0221099e7e | |||
374caade47 | |||
a5937d1d6d | |||
e36ba874a8 | |||
22392d1328 | |||
0dee82fb9f | |||
68f00f397f | |||
905801b178 | |||
4a7082bb0f | |||
2e90c5fa4b | |||
50e849a186 | |||
e7f2e92410 | |||
b1b455ff1a | |||
ab4c72d758 | |||
86a520b880 | |||
4bf033a885 | |||
e3ebc8d0c6 | |||
fc5ab44704 | |||
d5e8f174d4 | |||
d9a1434ae9 | |||
d0bdea3178 | |||
ccadf6aca1 | |||
266b0e9dd0 | |||
f7355f593d | |||
a301820258 | |||
47ea10b7c9 | |||
2c0376c150 | |||
ac58c4280b | |||
e39d7152f2 | |||
e522e2e804 | |||
2ba26407f1 | |||
996dd74157 | |||
878946962d | |||
84d2d3feb3 | |||
19e864ed3b | |||
c9bf72c5c4 | |||
5fe349d5ba | |||
1f03599d1c | |||
a24999b7a3 | |||
8237a1f6e0 | |||
f9dec475a1 | |||
68b01a8f56 | |||
f56ba0877a | |||
5ac6201d91 | |||
a21a22fdb5 | |||
a0fa50ac31 | |||
b1dd746443 | |||
c15e163eb1 | |||
7a3927c168 | |||
6eed4e31d7 | |||
f0557ea05c | |||
44894262f4 | |||
b03bcc85aa | |||
70057c6a55 | |||
86bd5b281d | |||
ad3e9ab205 | |||
02bbf409ea | |||
f56e4e177e | |||
fc26559f2c | |||
fdaddbd1e0 | |||
04f61567ba | |||
a0785cdbc1 | |||
94101e8bb8 | |||
f13dbf2f26 | |||
bae6f06e4e | |||
d8b9e23502 | |||
7d59eaa67e | |||
c0a453f64f | |||
5336175736 | |||
2997e4950b | |||
a49fb90d86 | |||
ffc0eb1de2 | |||
853c81eb62 | |||
594cc7cbef | |||
0932324d39 | |||
2d6cf236c4 | |||
642107a28f | |||
581b38ecf4 | |||
fbc03cc262 | |||
a6ff195893 | |||
f411724064 | |||
39f43a4cd4 | |||
c82cb918ae | |||
38cdaa6c20 | |||
0327069e83 | |||
7601b029c8 | |||
fb509dfc25 | |||
874a91968f | |||
0963ccddba | |||
c4e0f6df08 | |||
58aafe9520 | |||
a46df7f8ec | |||
1dd16618d1 | |||
a4190f83ac | |||
a8e17f73ec | |||
86a741c1ee | |||
5cc6fef689 | |||
522a5fe480 | |||
b1239b1257 | |||
58063d9ee1 | |||
d7aba2dece | |||
35fced27df | |||
be76b19300 | |||
376d696b8b | |||
695d61968d | |||
d6d09fd3c8 | |||
f1b1501f9b | |||
cdbc99e992 | |||
69afe7785d | |||
b99e304f1e | |||
c29bd46e7a | |||
5fcf40b973 | |||
a198dfe3d8 | |||
5b10d157fe | |||
5cc42b18b0 | |||
cb4252e888 | |||
09d3cdb023 | |||
71515a8a11 | |||
11ca8dd54f | |||
e00f22ebe6 | |||
13390543b0 | |||
de95ced92c | |||
f6a08472a0 | |||
9f7b101437 | |||
9c0707d4dc | |||
78a92fb6be | |||
01509cf1a5 | |||
61e9f51274 | |||
201bd9d42e | |||
8a78f08f6c | |||
a5e54f9712 | |||
526834e39b | |||
bdde2476d2 | |||
3171f9debe | |||
0e2aeac5f9 | |||
788fb5547c | |||
c4d2c0ee64 | |||
977686a77a | |||
44b29f210c | |||
36c7d65ccf | |||
b81d24fdb4 | |||
bfdbee8115 | |||
4a17c8f4a9 |
@ -1,19 +1,16 @@
|
|||||||
Coding guide
|
# Coding guide
|
||||||
============
|
|
||||||
|
|
||||||
Our goal is to have all JavaScript code in GNOME follow a consistent style. In
|
Our goal is to have all JavaScript code in GNOME follow a consistent style. In
|
||||||
a dynamic language like JavaScript, it is essential to be rigorous about style
|
a dynamic language like JavaScript, it is essential to be rigorous about style
|
||||||
(and unit tests), or you rapidly end up with a spaghetti-code mess.
|
(and unit tests), or you rapidly end up with a spaghetti-code mess.
|
||||||
|
|
||||||
A quick note
|
## A quick note
|
||||||
------------
|
|
||||||
|
|
||||||
Life isn't fun if you can't break the rules. If a rule seems unnecessarily
|
Life isn't fun if you can't break the rules. If a rule seems unnecessarily
|
||||||
restrictive while you're coding, ignore it, and let the patch reviewer decide
|
restrictive while you're coding, ignore it, and let the patch reviewer decide
|
||||||
what to do.
|
what to do.
|
||||||
|
|
||||||
Indentation and whitespace
|
## Indentation and whitespace
|
||||||
--------------------------
|
|
||||||
|
|
||||||
Use four-space indents. Braces are on the same line as their associated
|
Use four-space indents. Braces are on the same line as their associated
|
||||||
statements. You should only omit braces if *both* sides of the statement are
|
statements. You should only omit braces if *both* sides of the statement are
|
||||||
@ -22,7 +19,7 @@ on one line.
|
|||||||
* One space after the `function` keyword. No space between the function name
|
* One space after the `function` keyword. No space between the function name
|
||||||
* in a declaration or a call. One space before the parens in the `if`
|
* in a declaration or a call. One space before the parens in the `if`
|
||||||
* statements, or `while`, or `for` loops.
|
* statements, or `while`, or `for` loops.
|
||||||
|
```javascript
|
||||||
function foo(a, b) {
|
function foo(a, b) {
|
||||||
let bar;
|
let bar;
|
||||||
|
|
||||||
@ -39,22 +36,20 @@ on one line.
|
|||||||
print(20);
|
print(20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Semicolons
|
## Semicolons
|
||||||
----------
|
|
||||||
|
|
||||||
JavaScript allows omitting semicolons at the end of lines, but don't. Always
|
JavaScript allows omitting semicolons at the end of lines, but don't. Always
|
||||||
end statements with a semicolon.
|
end statements with a semicolon.
|
||||||
|
|
||||||
js2-mode
|
## js2-mode
|
||||||
--------
|
|
||||||
|
|
||||||
If using Emacs, do not use js2-mode. It is outdated and hasn't worked for a
|
If using Emacs, do not use js2-mode. It is outdated and hasn't worked for a
|
||||||
while. emacs now has a built-in JavaScript mode, js-mode, based on
|
while. emacs now has a built-in JavaScript mode, js-mode, based on
|
||||||
espresso-mode. It is the de facto emacs mode for JavaScript.
|
espresso-mode. It is the de facto emacs mode for JavaScript.
|
||||||
|
|
||||||
File naming and creation
|
## File naming and creation
|
||||||
------------------------
|
|
||||||
|
|
||||||
For JavaScript files, use lowerCamelCase-style names, with a `.js` extension.
|
For JavaScript files, use lowerCamelCase-style names, with a `.js` extension.
|
||||||
|
|
||||||
@ -67,14 +62,13 @@ library name followed by a dash, e.g. `shell-app-system.c`. Create a
|
|||||||
`-private.h` header when you want to share code internally in the
|
`-private.h` header when you want to share code internally in the
|
||||||
library. These headers are not installed, distributed or introspected.
|
library. These headers are not installed, distributed or introspected.
|
||||||
|
|
||||||
Imports
|
## Imports
|
||||||
-------
|
|
||||||
|
|
||||||
Use UpperCamelCase when importing modules to distinguish them from ordinary
|
Use UpperCamelCase when importing modules to distinguish them from ordinary
|
||||||
variables, e.g.
|
variables, e.g.
|
||||||
|
```javascript
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
|
```
|
||||||
Imports should be categorized into one of two places. The top-most import block
|
Imports should be categorized into one of two places. The top-most import block
|
||||||
should contain only "environment imports". These are either modules from
|
should contain only "environment imports". These are either modules from
|
||||||
gobject-introspection or modules added by gjs itself.
|
gobject-introspection or modules added by gjs itself.
|
||||||
@ -85,7 +79,7 @@ e.g. `imports.ui.popupMenu`.
|
|||||||
|
|
||||||
Each import block should be sorted alphabetically. Don't import modules you
|
Each import block should be sorted alphabetically. Don't import modules you
|
||||||
don't use.
|
don't use.
|
||||||
|
```javascript
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
@ -95,23 +89,22 @@ don't use.
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
|
```
|
||||||
The alphabetical ordering should be done independently of the location of the
|
The alphabetical ordering should be done independently of the location of the
|
||||||
location. Never reference `imports` in actual code.
|
location. Never reference `imports` in actual code.
|
||||||
|
|
||||||
Constants
|
## Constants
|
||||||
---------
|
|
||||||
|
|
||||||
We use CONSTANTS_CASE to define constants. All constants should be directly
|
We use CONSTANTS_CASE to define constants. All constants should be directly
|
||||||
under the imports:
|
under the imports:
|
||||||
|
```javascript
|
||||||
const MY_DBUS_INTERFACE = 'org.my.Interface';
|
const MY_DBUS_INTERFACE = 'org.my.Interface';
|
||||||
|
```
|
||||||
|
|
||||||
Variable declaration
|
## Variable declaration
|
||||||
--------------------
|
|
||||||
|
|
||||||
Always use either `const` or `let` when defining a variable.
|
Always use either `const` or `let` when defining a variable.
|
||||||
|
```javascript
|
||||||
// Iterating over an array
|
// Iterating over an array
|
||||||
for (let i = 0; i < arr.length; ++i) {
|
for (let i = 0; i < arr.length; ++i) {
|
||||||
let item = arr[i];
|
let item = arr[i];
|
||||||
@ -121,17 +114,17 @@ Always use either `const` or `let` when defining a variable.
|
|||||||
for (let prop in someobj) {
|
for (let prop in someobj) {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
If you use "var" then the variable is added to function scope, not block scope.
|
If you use "var" then the variable is added to function scope, not block scope.
|
||||||
See [What's new in JavaScript 1.7](https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.7#Block_scope_with_let_%28Merge_into_let_Statement%29)
|
See [What's new in JavaScript 1.7](https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.7#Block_scope_with_let_%28Merge_into_let_Statement%29)
|
||||||
|
|
||||||
Classes
|
## Classes
|
||||||
-------
|
|
||||||
|
|
||||||
There are many approaches to classes in JavaScript. We use our own class framework
|
There are many approaches to classes in JavaScript. We use our own class framework
|
||||||
(sigh), which is built in gjs. The advantage is that it supports inheriting from
|
(sigh), which is built in gjs. The advantage is that it supports inheriting from
|
||||||
GObjects, although this feature isn't used very often in the Shell itself.
|
GObjects, although this feature isn't used very often in the Shell itself.
|
||||||
|
```javascript
|
||||||
var IconLabelMenuItem = new Lang.Class({
|
var IconLabelMenuItem = new Lang.Class({
|
||||||
Name: 'IconLabelMenuItem',
|
Name: 'IconLabelMenuItem',
|
||||||
Extends: PopupMenu.PopupMenuBaseItem,
|
Extends: PopupMenu.PopupMenuBaseItem,
|
||||||
@ -146,6 +139,7 @@ GObjects, although this feature isn't used very often in the Shell itself.
|
|||||||
log("menu opened!");
|
log("menu opened!");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
```
|
||||||
|
|
||||||
* 'Name' is required. 'Extends' is optional. If you leave it out, you will
|
* 'Name' is required. 'Extends' is optional. If you leave it out, you will
|
||||||
automatically inherit from Object.
|
automatically inherit from Object.
|
||||||
@ -162,13 +156,12 @@ GObjects, although this feature isn't used very often in the Shell itself.
|
|||||||
still a giant function call, even though it may resemble a more
|
still a giant function call, even though it may resemble a more
|
||||||
conventional syntax.
|
conventional syntax.
|
||||||
|
|
||||||
GObject Introspection
|
## GObject Introspection
|
||||||
---------------------
|
|
||||||
|
|
||||||
GObject Introspection is a powerful feature that allows us to have native
|
GObject Introspection is a powerful feature that allows us to have native
|
||||||
bindings for almost any library built around GObject. If a library requires
|
bindings for almost any library built around GObject. If a library requires
|
||||||
you to inherit from a type to use it, you can do so:
|
you to inherit from a type to use it, you can do so:
|
||||||
|
```javascript
|
||||||
var MyClutterActor = new Lang.Class({
|
var MyClutterActor = new Lang.Class({
|
||||||
Name: 'MyClutterActor',
|
Name: 'MyClutterActor',
|
||||||
Extends: Clutter.Actor,
|
Extends: Clutter.Actor,
|
||||||
@ -188,9 +181,9 @@ you to inherit from a type to use it, you can do so:
|
|||||||
alloc.x2, alloc.y2);
|
alloc.x2, alloc.y2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
```
|
||||||
|
|
||||||
Translatable strings, `environment.js`
|
## Translatable strings, `environment.js`
|
||||||
--------------------------------------
|
|
||||||
|
|
||||||
We use gettext to translate the GNOME Shell into all the languages that GNOME
|
We use gettext to translate the GNOME Shell into all the languages that GNOME
|
||||||
supports. The `gettext` function is aliased globally as `_`, you do not need to
|
supports. The `gettext` function is aliased globally as `_`, you do not need to
|
||||||
@ -204,8 +197,7 @@ and "double quotes" for strings that the user may see. This allows us to
|
|||||||
quickly find untranslated or mistranslated strings by grepping through the
|
quickly find untranslated or mistranslated strings by grepping through the
|
||||||
sources for double quotes without a gettext call around them.
|
sources for double quotes without a gettext call around them.
|
||||||
|
|
||||||
`actor` and `_delegate`
|
## `actor` and `_delegate`
|
||||||
-----------------------
|
|
||||||
|
|
||||||
gjs allows us to set so-called "expando properties" on introspected objects,
|
gjs allows us to set so-called "expando properties" on introspected objects,
|
||||||
allowing us to treat them like any other. Because the Shell was built before
|
allowing us to treat them like any other. Because the Shell was built before
|
||||||
@ -214,7 +206,7 @@ that has a property called `actor`. We call this wrapper class the "delegate".
|
|||||||
|
|
||||||
We sometimes use expando properties to set a property called `_delegate` on
|
We sometimes use expando properties to set a property called `_delegate` on
|
||||||
the actor itself:
|
the actor itself:
|
||||||
|
```javascript
|
||||||
var MyClass = new Lang.Class({
|
var MyClass = new Lang.Class({
|
||||||
Name: 'MyClass',
|
Name: 'MyClass',
|
||||||
|
|
||||||
@ -229,6 +221,7 @@ the actor itself:
|
|||||||
actor.set_label("You clicked the button!");
|
actor.set_label("You clicked the button!");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
```
|
||||||
|
|
||||||
The 'delegate' property is important for anything which trying to get the
|
The 'delegate' property is important for anything which trying to get the
|
||||||
delegate object from an associated actor. For instance, the drag and drop
|
delegate object from an associated actor. For instance, the drag and drop
|
||||||
@ -236,16 +229,14 @@ system calls the `handleDragOver` function on the delegate of a "drop target"
|
|||||||
when the user drags an item over it. If you do not set the `_delegate`
|
when the user drags an item over it. If you do not set the `_delegate`
|
||||||
property, your actor will not be able to be dropped onto.
|
property, your actor will not be able to be dropped onto.
|
||||||
|
|
||||||
Functional style
|
## Functional style
|
||||||
----------------
|
|
||||||
|
|
||||||
JavaScript Array objects offer a lot of common functional programming
|
JavaScript Array objects offer a lot of common functional programming
|
||||||
capabilities such as forEach, map, filter and so on. You can use these when
|
capabilities such as forEach, map, filter and so on. You can use these when
|
||||||
they make sense, but please don't have a spaghetti mess of function programming
|
they make sense, but please don't have a spaghetti mess of function programming
|
||||||
messed in a procedural style. Use your best judgment.
|
messed in a procedural style. Use your best judgment.
|
||||||
|
|
||||||
Closures
|
## Closures
|
||||||
--------
|
|
||||||
|
|
||||||
`this` will not be captured in a closure, it is relative to how the closure is
|
`this` will not be captured in a closure, it is relative to how the closure is
|
||||||
invoked, not to the value of this where the closure is created, because "this"
|
invoked, not to the value of this where the closure is created, because "this"
|
||||||
@ -254,15 +245,16 @@ variable that can be captured in closures.
|
|||||||
|
|
||||||
All closures should be wrapped with Function.prototype.bind or use arrow
|
All closures should be wrapped with Function.prototype.bind or use arrow
|
||||||
notation.
|
notation.
|
||||||
|
```javascript
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
|
||||||
let closure1 = () => { this._fnorbate(); };
|
let closure1 = () => { this._fnorbate(); };
|
||||||
let closure2 = this._fnorbate.bind(this);
|
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:
|
||||||
|
```javascript
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const FnorbLib = imports.fborbLib;
|
const FnorbLib = imports.fborbLib;
|
||||||
|
|
||||||
@ -276,19 +268,21 @@ prototype:
|
|||||||
this._updateFnorb();
|
this._updateFnorb();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
```
|
||||||
|
|
||||||
Object literal syntax
|
## Object literal syntax
|
||||||
---------------------
|
|
||||||
|
|
||||||
In JavaScript, these are equivalent:
|
In JavaScript, these are equivalent:
|
||||||
|
```javascript
|
||||||
foo = { 'bar': 42 };
|
foo = { 'bar': 42 };
|
||||||
foo = { bar: 42 };
|
foo = { bar: 42 };
|
||||||
|
```
|
||||||
|
|
||||||
and so are these:
|
and so are these:
|
||||||
|
```javascript
|
||||||
var b = foo['bar'];
|
var b = foo['bar'];
|
||||||
var b = foo.bar;
|
var b = foo.bar;
|
||||||
|
```
|
||||||
|
|
||||||
If your usage of an object is like an object, then you're defining "member
|
If your usage of an object is like an object, then you're defining "member
|
||||||
variables." For member variables, use the no-quotes no-brackets syntax: `{ bar:
|
variables." For member variables, use the no-quotes no-brackets syntax: `{ bar:
|
||||||
@ -298,14 +292,13 @@ If your usage of an object is like a hash table (and thus conceptually the keys
|
|||||||
can have special chars in them), don't use quotes, but use brackets: `{ bar: 42
|
can have special chars in them), don't use quotes, but use brackets: `{ bar: 42
|
||||||
}`, `foo['bar']`.
|
}`, `foo['bar']`.
|
||||||
|
|
||||||
Getters, setters, and Tweener
|
## Getters, setters, and Tweener
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
Getters and setters should be used when you are dealing with an API that is
|
Getters and setters should be used when you are dealing with an API that is
|
||||||
designed around setting properties, like Tweener. If you want to animate an
|
designed around setting properties, like Tweener. If you want to animate an
|
||||||
arbitrary property, create a getter and setter, and use Tweener to animate the
|
arbitrary property, create a getter and setter, and use Tweener to animate the
|
||||||
property.
|
property.
|
||||||
|
```javascript
|
||||||
var ANIMATION_TIME = 2000;
|
var ANIMATION_TIME = 2000;
|
||||||
|
|
||||||
var MyClass = new Lang.Class({
|
var MyClass = new Lang.Class({
|
||||||
@ -331,3 +324,4 @@ property.
|
|||||||
{ position: 100,
|
{ position: 100,
|
||||||
time: ANIMATION_TIME,
|
time: ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad' });
|
transition: 'easeOutQuad' });
|
||||||
|
```
|
@ -1,7 +0,0 @@
|
|||||||
Owen Taylor
|
|
||||||
E-mail: otaylor@redhat.com
|
|
||||||
Userid: otaylor
|
|
||||||
|
|
||||||
Colin Walters
|
|
||||||
E-mail: walters@verbum.org
|
|
||||||
Userid: walters
|
|
81
NEWS
81
NEWS
@ -1,3 +1,84 @@
|
|||||||
|
3.29.4
|
||||||
|
======
|
||||||
|
* Fix "Clear All" for calendar events [Florian; #325]
|
||||||
|
* Allow cancelling direct switch operations [Xavier; #315]
|
||||||
|
* Support being started by systemd --user [Iain; !137, !138]
|
||||||
|
* Support key event forwarding required by some input methods [Carlos; #275]
|
||||||
|
* Misc. bug fixes and cleanups [Jasper, Andrea, Florian; #663461, #372, !112,
|
||||||
|
#414, !151]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Andrea Azzarone, Carlos Garnacho, Xavier Johnson, Iain Lane, Florian Müllner,
|
||||||
|
Jasper St. Pierre
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Stas Solovey [ru]
|
||||||
|
|
||||||
|
3.29.3
|
||||||
|
======
|
||||||
|
* Save creation time in screenshot metadata [Florian; #790481]
|
||||||
|
* Improve consistency between ctrl- and middle-click on app icons [Xavier; #316]
|
||||||
|
* Add support for font-feature-settings CSS property [Ryan; #34]
|
||||||
|
* Adjust to MetaScreen removal [Jonas; #759538]
|
||||||
|
* Misc. bug fixes [Florian, Marco, Sam; #298, #788931, #26, #76, !54, #788882,
|
||||||
|
#791233]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jonas Ådahl, Ryan Hendrickson, Xavier Johnson, Florian Müllner, Joe Rabinoff,
|
||||||
|
Sam Spilsbury, Marco Trevisan (Treviño)
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Gun Chleoc [gd], Yi-Jyun Pan [zh_TW], Cédric Valmary [oc], Jordi Mas [ca]
|
||||||
|
|
||||||
|
3.29.2
|
||||||
|
======
|
||||||
|
* Guard against untimely keyboard map changes [Carlos; #240]
|
||||||
|
* Fix icons in search provider results [Florian; #249]
|
||||||
|
* Fix blurriness of OSD under some resolutions [Silvère; #782011]
|
||||||
|
* Fix lagging pointer when zoomed [Daniel; #682013]
|
||||||
|
* Misc. bug fixes [Milan, Xiaoguang, Florian, Mario, Ole; #244, #787871,
|
||||||
|
#781471, #136, #214, #294]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Ole Jørgen Brønner, Milan Crha, Carlos Garnacho, Yussuf Khalil,
|
||||||
|
Silvère Latchurié, Florian Müllner, Mario Sanchez Prada, Ray Strode,
|
||||||
|
Daniel van Vugt, Xiaoguang Wang
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Rafael Fontenelle [pt_BR], Kukuh Syafaat [id], Marcos Lans [gl],
|
||||||
|
Anders Jonsson [sv], Mingcong Bai [zh_CN]
|
||||||
|
|
||||||
|
3.29.1
|
||||||
|
======
|
||||||
|
* Support icons in app-menu [Florian; #760985]
|
||||||
|
* Misc. bug fixes [Marco, Florian, Lubomir; #792687, #221, !63]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Piotr Drąg, Takao Fujiwara, Christian Kellner, Florian Müllner,
|
||||||
|
Mario Sanchez Prada, Lubomir Rintel, Didier Roche, Marco Trevisan (Treviño),
|
||||||
|
verdre
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
gogo [hr], Stas Solovey [ru], Matej Urbančič [sl], Daniel Șerbănescu [ro],
|
||||||
|
Fabio Tomat [fur], Marek Cernocky [cs], Daniel Mustieles [es]
|
||||||
|
|
||||||
|
3.28.1
|
||||||
|
======
|
||||||
|
* Fix compose characters in shell entries [Carlos; #115]
|
||||||
|
* Don't show authentication dialogs on lock screen [Florian; #179, #166]
|
||||||
|
* Fix handling of UTC timezone in world clock [Florian; #150]
|
||||||
|
* Fix keyboard navigation in overview when hovering windows [Florian; #50]
|
||||||
|
* Misc. bug fixes [Florian; #127, #788908, #763886, !39]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jeremy Bicha, Carlos Garnacho, Andy Holmes, Florian Müllner, Bastien Nocera
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Stas Solovey [ru], Daniel Șerbănescu [ro], Dušan Kazik [sk],
|
||||||
|
Rafael Fontenelle [pt_BR], Nathan Follens [nl], Dz Chen [zh_CN],
|
||||||
|
Matej Urbančič [sl], Hannie Dumoleyn [nl], Khaled Hosny [ar],
|
||||||
|
Guillaume Bernard [fr]
|
||||||
|
|
||||||
3.28.0
|
3.28.0
|
||||||
======
|
======
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# GNOME Shell
|
||||||
GNOME Shell provides core user interface functions for the GNOME 3 desktop,
|
GNOME Shell provides core user interface functions for the GNOME 3 desktop,
|
||||||
like switching to windows and launching applications. GNOME Shell takes
|
like switching to windows and launching applications. GNOME Shell takes
|
||||||
advantage of the capabilities of modern graphics hardware and introduces
|
advantage of the capabilities of modern graphics hardware and introduces
|
||||||
@ -6,15 +7,14 @@ easy to use experience.
|
|||||||
|
|
||||||
For more information about GNOME Shell, including instructions on how
|
For more information about GNOME Shell, including instructions on how
|
||||||
to build GNOME Shell from source and how to get involved with the project,
|
to build GNOME Shell from source and how to get involved with the project,
|
||||||
see:
|
see the [project wiki][wiki]
|
||||||
|
|
||||||
https://wiki.gnome.org/Projects/GnomeShell
|
Bugs should be reported to the GNOME [bug tracking system][bug-tracker].
|
||||||
|
|
||||||
Bugs should be reported at http://bugzilla.gnome.org against the 'gnome-shell'
|
## License
|
||||||
product.
|
|
||||||
|
|
||||||
License
|
|
||||||
=======
|
|
||||||
GNOME Shell is distributed under the terms of the GNU General Public License,
|
GNOME Shell is distributed under the terms of the GNU General Public License,
|
||||||
version 2 or later. See the COPYING file for details.
|
version 2 or later. See the [COPYING][license] file for details.
|
||||||
|
|
||||||
|
[project-wiki]: https://wiki.gnome.org/Projects/GnomeShell
|
||||||
|
[bug-tracker]: https://gitlab.gnome.org/GNOME/gnome-shell/issues
|
||||||
|
[license]: COPYING
|
@ -4,14 +4,14 @@ the extensions repository to provide good integration, letting the website
|
|||||||
know which extensions are enabled and disabled, and allowing the website to
|
know which extensions are enabled and disabled, and allowing the website to
|
||||||
enable, disable and install them.
|
enable, disable and install them.
|
||||||
|
|
||||||
Bugs should be reported at http://bugzilla.gnome.org against the 'gnome-shell'
|
Bugs should be reported to the GNOME [bug tracking system][bug-tracker].
|
||||||
product.
|
|
||||||
|
|
||||||
License
|
## License
|
||||||
=======
|
|
||||||
The GNOME Shell Browser Plugin, like GNOME Shell itself is distributed under
|
The GNOME Shell Browser Plugin, like GNOME Shell itself is distributed under
|
||||||
the GNU General Public License, version 2 or later. The plugin also contains
|
the GNU General Public License, version 2 or later. The plugin also contains
|
||||||
header files from the "NPAPI SDK" project, tri-licensed under MPL 1.1, GPL 2.0
|
header files from the "NPAPI SDK" project, tri-licensed under MPL 1.1, GPL 2.0
|
||||||
and LGPL 2.1. These headers are third-party sources and can be retrieved from:
|
and LGPL 2.1. These headers are third-party sources and can be retrieved from:
|
||||||
|
|
||||||
http://code.google.com/p/npapi-sdk/
|
http://code.google.com/p/npapi-sdk/
|
||||||
|
|
||||||
|
[bug-tracker]: https://gitlab.gnome.org/GNOME/gnome-shell/issues
|
5
data/gnome-shell-wayland.target
Normal file
5
data/gnome-shell-wayland.target
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=GNOME Shell (wayland sync point)
|
||||||
|
After=gnome-shell.service
|
||||||
|
BindsTo=gnome-shell.service
|
||||||
|
Conflicts=gnome-shell-x11.target
|
5
data/gnome-shell-x11.target
Normal file
5
data/gnome-shell-x11.target
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=GNOME Shell (x11 sync point)
|
||||||
|
After=gnome-shell.service
|
||||||
|
BindsTo=gnome-shell.service
|
||||||
|
Conflicts=gnome-shell-wayland.target
|
11
data/gnome-shell.service.in
Normal file
11
data/gnome-shell.service.in
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=GNOME Shell
|
||||||
|
Wants=gnome-session.service
|
||||||
|
After=graphical-session-pre.target gnome-session-bus.target
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=dbus
|
||||||
|
ExecStart=@bindir@/gnome-shell
|
||||||
|
Restart=on-failure
|
||||||
|
BusName=org.gnome.Shell
|
@ -93,6 +93,23 @@ schema = configure_file(
|
|||||||
install_dir: schemadir
|
install_dir: schemadir
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if have_systemd
|
||||||
|
unitconf = configuration_data()
|
||||||
|
unitconf.set('bindir', bindir)
|
||||||
|
|
||||||
|
unit = configure_file(
|
||||||
|
input: 'gnome-shell.service.in',
|
||||||
|
output: 'gnome-shell.service',
|
||||||
|
configuration: unitconf,
|
||||||
|
install_dir: systemduserunitdir
|
||||||
|
)
|
||||||
|
|
||||||
|
units = files('gnome-shell-wayland.target',
|
||||||
|
'gnome-shell-x11.target')
|
||||||
|
|
||||||
|
install_data(units, install_dir: systemduserunitdir)
|
||||||
|
endif
|
||||||
|
|
||||||
# for unit tests - gnome.compile_schemas() only looks in srcdir
|
# for unit tests - gnome.compile_schemas() only looks in srcdir
|
||||||
custom_target('compile-schemas',
|
custom_target('compile-schemas',
|
||||||
input: schema,
|
input: schema,
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
To generate the css files, from the project directory:
|
|
||||||
|
|
||||||
sass --sourcemap=none --update .
|
|
@ -1,31 +0,0 @@
|
|||||||
Summary
|
|
||||||
-------
|
|
||||||
|
|
||||||
* Do not edit the CSS directly, edit the source SCSS files and the CSS files will be generated
|
|
||||||
automatically when building with meson + ninja and left inside the build directory to be
|
|
||||||
incorporated into the gresource XML (you'll need to have sassc installed).
|
|
||||||
|
|
||||||
How to tweak the theme
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
Adwaita is a complex theme, so to keep it maintainable it's written and processed in SASS, the
|
|
||||||
generated CSS is then transformed into a gresource file during gtk build and used at runtime in a
|
|
||||||
non-legible or editable form.
|
|
||||||
|
|
||||||
It is very likely your change will happen in the _common.scss file. That's where all the widget
|
|
||||||
selectors are defined. Here's a rundown of the "supporting" stylesheets, that are unlikely to be the
|
|
||||||
right place for a drive by stylesheet fix:
|
|
||||||
|
|
||||||
_colors.scss - global color definitions. We keep the number of defined colors to a necessary minimum,
|
|
||||||
most colors are derived from a handful of basics. It is an exact copy of the gtk+
|
|
||||||
counterpart. Light theme is used for the classic theme and dark is for GNOME3 shell
|
|
||||||
default.
|
|
||||||
|
|
||||||
_drawing.scss - drawing helper mixings/functions to allow easier definition of widget drawing under
|
|
||||||
specific context. This is why Adwaita isn't 15000 LOC.
|
|
||||||
|
|
||||||
_common.scss - actual definitions of style for each widget. This is where you are likely to add/remove
|
|
||||||
your changes.
|
|
||||||
|
|
||||||
You can read about SASS at http://sass-lang.com/documentation/. Once you make your changes to the
|
|
||||||
_common.scss file, you can run ninja to generate the final CSS files.
|
|
32
data/theme/README.md
Normal file
32
data/theme/README.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
## Summary
|
||||||
|
|
||||||
|
Do not edit the CSS directly, edit the source SCSS files and the CSS files
|
||||||
|
will be generated automatically when building with meson + ninja and left
|
||||||
|
inside the build directory to be incorporated into the gresource XML (you'll
|
||||||
|
need to have sassc installed).
|
||||||
|
|
||||||
|
## How to tweak the theme
|
||||||
|
|
||||||
|
Adwaita is a complex theme, so to keep it maintainable it's written and
|
||||||
|
processed in SASS, the generated CSS is then transformed into a gresource
|
||||||
|
file during gtk build and used at runtime in a non-legible or editable form.
|
||||||
|
|
||||||
|
It is very likely your change will happen in the [_common.scss][common] file.
|
||||||
|
That's where all the widget selectors are defined. Here's a rundown of
|
||||||
|
the "supporting" stylesheets, that are unlikely to be the right place
|
||||||
|
for a drive by stylesheet fix:
|
||||||
|
|
||||||
|
| File | Description |
|
||||||
|
| ------------------------ | ----------------- |
|
||||||
|
| [_colors.scss][colors] | global color definitions. We keep the number of defined colors to a necessary minimum, most colors are derived from a handful of basics. It is an exact copy of the gtk+ counterpart. Light theme is used for the classic theme and dark is for GNOME3 shell default. |
|
||||||
|
| [_drawing.scss][drawing] | drawing helper mixings/functions to allow easier definition of widget drawing under specific context. This is why Adwaita isn't 15000 LOC. |
|
||||||
|
| [_common.scss][common] | actual definitions of style for each widget. This is where you are likely to add/remove your changes. |
|
||||||
|
|
||||||
|
You can read about SASS on its [web page][sass-web]. Once you make your
|
||||||
|
changes to the [_common.scss][common] file, you can run ninja to generate the
|
||||||
|
final CSS files.
|
||||||
|
|
||||||
|
[common]: data/theme/gnome-shell-sass/_common.scss
|
||||||
|
[colors]: data/theme/gnome-shell-sass/_colors.scss
|
||||||
|
[drawing]: data/theme/gnome-shell-sass/_drawing.scss
|
||||||
|
[sass-web]: http://sass-lang.com/documentation/
|
@ -1,6 +0,0 @@
|
|||||||
--- Generating the css file ---
|
|
||||||
|
|
||||||
You need sass to generate the css file.
|
|
||||||
|
|
||||||
To generate them run from a command line in the project directory:
|
|
||||||
sass --sourcemap=none --update ./
|
|
@ -1,7 +0,0 @@
|
|||||||
GNOME Shell Sass is a project intended to allow the sharing of the theme sources in sass between gnome-shell and other projects like gnome-shell-extensions.
|
|
||||||
|
|
||||||
License
|
|
||||||
=======
|
|
||||||
GNOME Shell Sass is distributed under the terms of the GNU General Public License,
|
|
||||||
version 2 or later. See the COPYING file for details.
|
|
||||||
|
|
16
data/theme/gnome-shell-sass/README.md
Normal file
16
data/theme/gnome-shell-sass/README.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# GNOME Shell Sass
|
||||||
|
GNOME Shell Sass is a project intended to allow the sharing of the
|
||||||
|
theme sources in sass between gnome-shell and other projects like
|
||||||
|
gnome-shell-extensions.
|
||||||
|
|
||||||
|
Any changes should be done in the [GNOME Shell subtree][shell-subtree]
|
||||||
|
and not the stand-alone [gnome-shell-sass repository][sass-repo]. They
|
||||||
|
will then be synchronized periodically before releases.
|
||||||
|
|
||||||
|
## License
|
||||||
|
GNOME Shell Sass is distributed under the terms of the GNU General Public
|
||||||
|
License, version 2 or later. See the [COPYING][license] file for details.
|
||||||
|
|
||||||
|
[shell-subtree]: https://gitlab.gnome.org/GNOME/gnome-shell/tree/master/data/theme/gnome-shell-sass
|
||||||
|
[sass-repo]: https://gitlab.gnome.org/GNOME/gnome-shell-sass
|
||||||
|
[license]: COPYING
|
@ -733,6 +733,7 @@ StScrollBar {
|
|||||||
transition-duration: 500ms;
|
transition-duration: 500ms;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
height: 1.86em;
|
height: 1.86em;
|
||||||
|
font-feature-settings: "tnum";
|
||||||
|
|
||||||
&.unlock-screen,
|
&.unlock-screen,
|
||||||
&.login-screen,
|
&.login-screen,
|
||||||
@ -958,6 +959,7 @@ StScrollBar {
|
|||||||
padding: 0.1em;
|
padding: 0.1em;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
border-radius: 1.4em;
|
border-radius: 1.4em;
|
||||||
|
font-feature-settings: "tnum";
|
||||||
&:hover,&:focus { background-color: lighten($bg_color,5%); }
|
&:hover,&:focus { background-color: lighten($bg_color,5%); }
|
||||||
&:active,&:selected {
|
&:active,&:selected {
|
||||||
color: lighten($selected_fg_color,5%);
|
color: lighten($selected_fg_color,5%);
|
||||||
@ -1111,7 +1113,7 @@ StScrollBar {
|
|||||||
.aggregate-menu {
|
.aggregate-menu {
|
||||||
min-width: 21em;
|
min-width: 21em;
|
||||||
.popup-menu-icon { padding: 0 4px; }
|
.popup-menu-icon { padding: 0 4px; }
|
||||||
.popup-sub-menu .popup-menu-item :first-child {
|
.popup-sub-menu .popup-menu-item > :first-child {
|
||||||
&:ltr { /* 12px spacing + 2*4px padding */
|
&:ltr { /* 12px spacing + 2*4px padding */
|
||||||
padding-left: 20px; margin-left: 1.09em; }
|
padding-left: 20px; margin-left: 1.09em; }
|
||||||
&:rtl { /* 12px spacing + 2*4px padding */
|
&:rtl { /* 12px spacing + 2*4px padding */
|
||||||
@ -1788,20 +1790,19 @@ StScrollBar {
|
|||||||
.login-dialog-user-list-view { -st-vfade-offset: 1em; }
|
.login-dialog-user-list-view { -st-vfade-offset: 1em; }
|
||||||
.login-dialog-user-list {
|
.login-dialog-user-list {
|
||||||
spacing: 12px;
|
spacing: 12px;
|
||||||
padding: .2em;
|
|
||||||
width: 23em;
|
width: 23em;
|
||||||
&:expanded .login-dialog-user-list-item:selected { background-color: $selected_bg_color; color: $selected_fg_color; }
|
&:expanded .login-dialog-user-list-item:selected { background-color: $selected_bg_color; color: $selected_fg_color; }
|
||||||
&:expanded .login-dialog-user-list-item:logged-in { border-right: 2px solid $selected_bg_color; }
|
&:expanded .login-dialog-user-list-item:logged-in { border-right: 2px solid $selected_bg_color; }
|
||||||
}
|
}
|
||||||
.login-dialog-user-list-item {
|
.login-dialog-user-list-item {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: .2em;
|
padding: 6px;
|
||||||
color: darken($osd_fg_color,30%);
|
color: darken($osd_fg_color,30%);
|
||||||
&:ltr { padding-right: 1em; }
|
&:ltr .user-widget { padding-right: 1em; }
|
||||||
&:rtl { padding-left: 1em; }
|
&:rtl .user-widget { padding-left: 1em; }
|
||||||
.login-dialog-timed-login-indicator {
|
.login-dialog-timed-login-indicator {
|
||||||
height: 2px;
|
height: 2px;
|
||||||
margin: 2px 0 0 0;
|
margin-top: 6px;
|
||||||
background-color: $osd_fg_color;
|
background-color: $osd_fg_color;
|
||||||
}
|
}
|
||||||
&:focus .login-dialog-timed-login-indicator { background-color: $selected_fg_color; }
|
&:focus .login-dialog-timed-login-indicator { background-color: $selected_fg_color; }
|
||||||
@ -1816,8 +1817,8 @@ StScrollBar {
|
|||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
}
|
}
|
||||||
.user-widget-label {
|
.user-widget-label {
|
||||||
&:ltr { padding-left: 18px; }
|
&:ltr { padding-left: 14px; }
|
||||||
&:rtl { padding-right: 18px; }
|
&:rtl { padding-right: 14px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-prompt-layout {
|
.login-dialog-prompt-layout {
|
||||||
@ -1868,6 +1869,7 @@ StScrollBar {
|
|||||||
.screen-shield-clock-time {
|
.screen-shield-clock-time {
|
||||||
font-size: 72pt;
|
font-size: 72pt;
|
||||||
text-shadow: 0px 2px 2px rgba(0,0,0,0.4);
|
text-shadow: 0px 2px 2px rgba(0,0,0,0.4);
|
||||||
|
font-feature-settings: "tnum";
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-shield-clock-date {
|
.screen-shield-clock-date {
|
||||||
|
@ -25,7 +25,6 @@ const GLib = imports.gi.GLib;
|
|||||||
const GObject = imports.gi.GObject;
|
const GObject = imports.gi.GObject;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Mainloop = imports.mainloop;
|
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const Pango = imports.gi.Pango;
|
const Pango = imports.gi.Pango;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
@ -86,7 +85,8 @@ var UserListItem = new Lang.Class({
|
|||||||
GObject.BindingFlags.SYNC_CREATE);
|
GObject.BindingFlags.SYNC_CREATE);
|
||||||
|
|
||||||
this._timedLoginIndicator = new St.Bin({ style_class: 'login-dialog-timed-login-indicator',
|
this._timedLoginIndicator = new St.Bin({ style_class: 'login-dialog-timed-login-indicator',
|
||||||
scale_x: 0 });
|
scale_x: 0,
|
||||||
|
visible: false });
|
||||||
layout.add(this._timedLoginIndicator);
|
layout.add(this._timedLoginIndicator);
|
||||||
|
|
||||||
this.actor.connect('clicked', this._onClicked.bind(this));
|
this.actor.connect('clicked', this._onClicked.bind(this));
|
||||||
@ -126,6 +126,8 @@ var UserListItem = new Lang.Class({
|
|||||||
|
|
||||||
this.hideTimedLoginIndicator();
|
this.hideTimedLoginIndicator();
|
||||||
|
|
||||||
|
this._timedLoginIndicator.visible = true;
|
||||||
|
|
||||||
let startTime = GLib.get_monotonic_time();
|
let startTime = GLib.get_monotonic_time();
|
||||||
|
|
||||||
this._timedLoginTimeoutId = GLib.timeout_add (GLib.PRIORITY_DEFAULT, 33,
|
this._timedLoginTimeoutId = GLib.timeout_add (GLib.PRIORITY_DEFAULT, 33,
|
||||||
@ -152,6 +154,8 @@ var UserListItem = new Lang.Class({
|
|||||||
GLib.source_remove(this._timedLoginTimeoutId);
|
GLib.source_remove(this._timedLoginTimeoutId);
|
||||||
this._timedLoginTimeoutId = 0;
|
this._timedLoginTimeoutId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._timedLoginIndicator.visible = false;
|
||||||
this._timedLoginIndicator.scale_x = 0.;
|
this._timedLoginIndicator.scale_x = 0.;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -991,59 +995,81 @@ var LoginDialog = new Lang.Class({
|
|||||||
return hold;
|
return hold;
|
||||||
},
|
},
|
||||||
|
|
||||||
_showTimedLoginAnimation() {
|
|
||||||
this._timedLoginItem.actor.grab_key_focus();
|
|
||||||
return this._timedLoginItem.showTimedLoginIndicator(this._timedLoginAnimationTime);
|
|
||||||
},
|
|
||||||
|
|
||||||
_blockTimedLoginUntilIdle() {
|
_blockTimedLoginUntilIdle() {
|
||||||
// This blocks timed login from starting until a few
|
|
||||||
// seconds after the user stops interacting with the
|
|
||||||
// login screen.
|
|
||||||
//
|
|
||||||
// We skip this step if the timed login delay is very
|
|
||||||
// short.
|
|
||||||
if ((this._timedLoginDelay - _TIMED_LOGIN_IDLE_THRESHOLD) <= 0)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
let hold = new Batch.Hold();
|
let hold = new Batch.Hold();
|
||||||
|
|
||||||
this._timedLoginIdleTimeOutId = Mainloop.timeout_add_seconds(_TIMED_LOGIN_IDLE_THRESHOLD,
|
this._timedLoginIdleTimeOutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, _TIMED_LOGIN_IDLE_THRESHOLD,
|
||||||
() => {
|
() => {
|
||||||
this._timedLoginAnimationTime -= _TIMED_LOGIN_IDLE_THRESHOLD;
|
this._timedLoginIdleTimeOutId = 0;
|
||||||
hold.release();
|
hold.release();
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
});
|
});
|
||||||
GLib.Source.set_name_by_id(this._timedLoginIdleTimeOutId, '[gnome-shell] this._timedLoginAnimationTime');
|
GLib.Source.set_name_by_id(this._timedLoginIdleTimeOutId, '[gnome-shell] this._timedLoginIdleTimeOutId');
|
||||||
return hold;
|
return hold;
|
||||||
},
|
},
|
||||||
|
|
||||||
_startTimedLogin(userName, delay) {
|
_startTimedLogin(userName, delay) {
|
||||||
this._timedLoginItem = null;
|
let firstRun = true;
|
||||||
this._timedLoginDelay = delay;
|
|
||||||
this._timedLoginAnimationTime = delay;
|
// Cancel execution of old batch
|
||||||
|
if (this._timedLoginBatch) {
|
||||||
|
this._timedLoginBatch.cancel();
|
||||||
|
this._timedLoginBatch = null;
|
||||||
|
firstRun = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reset previous idle-timeout
|
||||||
|
if (this._timedLoginIdleTimeOutId) {
|
||||||
|
GLib.source_remove(this._timedLoginIdleTimeOutId);
|
||||||
|
this._timedLoginIdleTimeOutId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
let loginItem = null;
|
||||||
|
let animationTime;
|
||||||
|
|
||||||
let tasks = [() => this._waitForItemForUser(userName),
|
let tasks = [() => this._waitForItemForUser(userName),
|
||||||
|
|
||||||
() => {
|
() => {
|
||||||
this._timedLoginItem = this._userList.getItemFromUserName(userName);
|
loginItem = this._userList.getItemFromUserName(userName);
|
||||||
|
|
||||||
|
// If there is an animation running on the item, reset it.
|
||||||
|
loginItem.hideTimedLoginIndicator();
|
||||||
},
|
},
|
||||||
|
|
||||||
() => {
|
() => {
|
||||||
// If we're just starting out, start on the right
|
// If we're just starting out, start on the right item.
|
||||||
// item.
|
|
||||||
if (!this._userManager.is_loaded) {
|
if (!this._userManager.is_loaded) {
|
||||||
this._userList.jumpToItem(this._timedLoginItem);
|
this._userList.jumpToItem(loginItem);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
this._blockTimedLoginUntilIdle,
|
|
||||||
|
|
||||||
() => {
|
() => {
|
||||||
this._userList.scrollToItem(this._timedLoginItem);
|
// This blocks the timed login animation until a few
|
||||||
|
// seconds after the user stops interacting with the
|
||||||
|
// login screen.
|
||||||
|
|
||||||
|
// We skip this step if the timed login delay is very short.
|
||||||
|
if (delay > _TIMED_LOGIN_IDLE_THRESHOLD) {
|
||||||
|
animationTime = delay - _TIMED_LOGIN_IDLE_THRESHOLD;
|
||||||
|
return this._blockTimedLoginUntilIdle();
|
||||||
|
} else {
|
||||||
|
animationTime = delay;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
this._showTimedLoginAnimation,
|
() => {
|
||||||
|
// If idle timeout is done, make sure the timed login indicator is shown
|
||||||
|
if (delay > _TIMED_LOGIN_IDLE_THRESHOLD &&
|
||||||
|
this._authPrompt.actor.visible)
|
||||||
|
this._authPrompt.cancel();
|
||||||
|
|
||||||
|
if (delay > _TIMED_LOGIN_IDLE_THRESHOLD || firstRun) {
|
||||||
|
this._userList.scrollToItem(loginItem);
|
||||||
|
loginItem.actor.grab_key_focus();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
() => loginItem.showTimedLoginIndicator(animationTime),
|
||||||
|
|
||||||
() => {
|
() => {
|
||||||
this._timedLoginBatch = null;
|
this._timedLoginBatch = null;
|
||||||
@ -1055,37 +1081,17 @@ var LoginDialog = new Lang.Class({
|
|||||||
return this._timedLoginBatch.run();
|
return this._timedLoginBatch.run();
|
||||||
},
|
},
|
||||||
|
|
||||||
_resetTimedLogin() {
|
|
||||||
if (this._timedLoginBatch) {
|
|
||||||
this._timedLoginBatch.cancel();
|
|
||||||
this._timedLoginBatch = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._timedLoginItem)
|
|
||||||
this._timedLoginItem.hideTimedLoginIndicator();
|
|
||||||
|
|
||||||
let userName = this._timedLoginItem.user.get_user_name();
|
|
||||||
|
|
||||||
if (userName)
|
|
||||||
this._startTimedLogin(userName, this._timedLoginDelay);
|
|
||||||
},
|
|
||||||
|
|
||||||
_onTimedLoginRequested(client, userName, seconds) {
|
_onTimedLoginRequested(client, userName, seconds) {
|
||||||
|
if (this._timedLoginBatch)
|
||||||
|
return;
|
||||||
|
|
||||||
this._startTimedLogin(userName, seconds);
|
this._startTimedLogin(userName, seconds);
|
||||||
|
|
||||||
|
// Restart timed login on user interaction
|
||||||
global.stage.connect('captured-event', (actor, event) => {
|
global.stage.connect('captured-event', (actor, event) => {
|
||||||
if (this._timedLoginDelay == undefined)
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
|
|
||||||
if (event.type() == Clutter.EventType.KEY_PRESS ||
|
if (event.type() == Clutter.EventType.KEY_PRESS ||
|
||||||
event.type() == Clutter.EventType.BUTTON_PRESS) {
|
event.type() == Clutter.EventType.BUTTON_PRESS) {
|
||||||
if (this._timedLoginBatch) {
|
this._startTimedLogin(userName, seconds);
|
||||||
this._timedLoginBatch.cancel();
|
|
||||||
this._timedLoginBatch = null;
|
|
||||||
}
|
|
||||||
} else if (event.type() == Clutter.EventType.KEY_RELEASE ||
|
|
||||||
event.type() == Clutter.EventType.BUTTON_RELEASE) {
|
|
||||||
this._resetTimedLogin();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
@ -350,16 +350,19 @@ var ShellUserVerifier = new Lang.Class({
|
|||||||
try {
|
try {
|
||||||
this._clearUserVerifier();
|
this._clearUserVerifier();
|
||||||
this._userVerifier = client.open_reauthentication_channel_finish(result);
|
this._userVerifier = client.open_reauthentication_channel_finish(result);
|
||||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
|
||||||
return;
|
|
||||||
} catch(e if e.matches(Gio.DBusError, Gio.DBusError.ACCESS_DENIED) &&
|
|
||||||
!this._reauthOnly) {
|
|
||||||
// Gdm emits org.freedesktop.DBus.Error.AccessDenied when there is
|
|
||||||
// no session to reauthenticate. Fall back to performing verification
|
|
||||||
// from this login session
|
|
||||||
client.get_user_verifier(this._cancellable, this._userVerifierGot.bind(this));
|
|
||||||
return;
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||||
|
return;
|
||||||
|
if (e.matches(Gio.DBusError, Gio.DBusError.ACCESS_DENIED) &&
|
||||||
|
!this._reauthOnly) {
|
||||||
|
// Gdm emits org.freedesktop.DBus.Error.AccessDenied when there
|
||||||
|
// is no session to reauthenticate. Fall back to performing
|
||||||
|
// verification from this login session
|
||||||
|
client.get_user_verifier(this._cancellable,
|
||||||
|
this._userVerifierGot.bind(this));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._reportInitError('Failed to open reauthentication channel', e);
|
this._reportInitError('Failed to open reauthentication channel', e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -374,9 +377,9 @@ var ShellUserVerifier = new Lang.Class({
|
|||||||
try {
|
try {
|
||||||
this._clearUserVerifier();
|
this._clearUserVerifier();
|
||||||
this._userVerifier = client.get_user_verifier_finish(result);
|
this._userVerifier = client.get_user_verifier_finish(result);
|
||||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
|
||||||
return;
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||||
|
return;
|
||||||
this._reportInitError('Failed to obtain user verifier', e);
|
this._reportInitError('Failed to obtain user verifier', e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -434,9 +437,9 @@ var ShellUserVerifier = new Lang.Class({
|
|||||||
(obj, result) => {
|
(obj, result) => {
|
||||||
try {
|
try {
|
||||||
obj.call_begin_verification_for_user_finish(result);
|
obj.call_begin_verification_for_user_finish(result);
|
||||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
|
||||||
return;
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||||
|
return;
|
||||||
this._reportInitError('Failed to start verification for user', e);
|
this._reportInitError('Failed to start verification for user', e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -449,9 +452,9 @@ var ShellUserVerifier = new Lang.Class({
|
|||||||
(obj, result) => {
|
(obj, result) => {
|
||||||
try {
|
try {
|
||||||
obj.call_begin_verification_finish(result);
|
obj.call_begin_verification_finish(result);
|
||||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
|
||||||
return;
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||||
|
return;
|
||||||
this._reportInitError('Failed to start verification', e);
|
this._reportInitError('Failed to start verification', e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,11 @@ var IBusManager = new Lang.Class({
|
|||||||
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', this._updateProperty.bind(this));
|
this._panelService.connect('update-property', this._updateProperty.bind(this));
|
||||||
|
this._panelService.connect('set-cursor-location', (ps, x, y, w, h) => {
|
||||||
|
let cursorLocation = { x, y, width: w, height: h };
|
||||||
|
this.emit('set-cursor-location', cursorLocation);
|
||||||
|
});
|
||||||
|
|
||||||
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
|
||||||
|
@ -15,6 +15,8 @@ var InputMethod = new Lang.Class({
|
|||||||
this._purpose = 0;
|
this._purpose = 0;
|
||||||
this._enabled = true;
|
this._enabled = true;
|
||||||
this._currentFocus = null;
|
this._currentFocus = null;
|
||||||
|
this._currentEvent = null;
|
||||||
|
this._doForwardEvent = false;
|
||||||
this._ibus = IBus.Bus.new_async();
|
this._ibus = IBus.Bus.new_async();
|
||||||
this._ibus.connect('connected', this._onConnected.bind(this));
|
this._ibus.connect('connected', this._onConnected.bind(this));
|
||||||
this._ibus.connect('disconnected', this._clear.bind(this));
|
this._ibus.connect('disconnected', this._clear.bind(this));
|
||||||
@ -25,6 +27,9 @@ var InputMethod = new Lang.Class({
|
|||||||
this._onSourceChanged.bind(this));
|
this._onSourceChanged.bind(this));
|
||||||
this._currentSource = this._inputSourceManager.currentSource;
|
this._currentSource = this._inputSourceManager.currentSource;
|
||||||
|
|
||||||
|
let deviceManager = Clutter.DeviceManager.get_default();
|
||||||
|
this._virtualDevice = deviceManager.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
|
||||||
|
|
||||||
if (this._ibus.is_connected())
|
if (this._ibus.is_connected())
|
||||||
this._onConnected();
|
this._onConnected();
|
||||||
},
|
},
|
||||||
@ -64,6 +69,7 @@ var InputMethod = new Lang.Class({
|
|||||||
this._context.connect('commit-text', this._onCommitText.bind(this));
|
this._context.connect('commit-text', this._onCommitText.bind(this));
|
||||||
this._context.connect('delete-surrounding-text', this._onDeleteSurroundingText.bind(this));
|
this._context.connect('delete-surrounding-text', this._onDeleteSurroundingText.bind(this));
|
||||||
this._context.connect('update-preedit-text', this._onUpdatePreeditText.bind(this));
|
this._context.connect('update-preedit-text', this._onUpdatePreeditText.bind(this));
|
||||||
|
this._context.connect('forward-key-event', this._onForwardKeyEvent.bind(this));
|
||||||
|
|
||||||
this._updateCapabilities();
|
this._updateCapabilities();
|
||||||
},
|
},
|
||||||
@ -96,6 +102,24 @@ var InputMethod = new Lang.Class({
|
|||||||
this.set_preedit_text(str, pos);
|
this.set_preedit_text(str, pos);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onForwardKeyEvent(context, keyval, keycode, state) {
|
||||||
|
let press = (state & IBus.ModifierType.RELEASE_MASK) == 0;
|
||||||
|
|
||||||
|
if (this._currentEvent) {
|
||||||
|
// If we are handling this same event in filter_key_press(),
|
||||||
|
// just let it go through, sending the same event again will
|
||||||
|
// be silenced away because the key counts as pressed.
|
||||||
|
if (this._currentEvent.get_key_symbol() == keyval &&
|
||||||
|
(this._currentEvent.type() == Clutter.EventType.KEY_PRESS) == press) {
|
||||||
|
this._doForwardEvent = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this._virtualDevice.notify_key(Clutter.get_current_event_time(), keycode,
|
||||||
|
press ? Clutter.KeyState.PRESSED : Clutter.KeyState.RELEASED);
|
||||||
|
},
|
||||||
|
|
||||||
vfunc_focus_in(focus) {
|
vfunc_focus_in(focus) {
|
||||||
this._currentFocus = focus;
|
this._currentFocus = focus;
|
||||||
if (this._context) {
|
if (this._context) {
|
||||||
@ -188,8 +212,7 @@ var InputMethod = new Lang.Class({
|
|||||||
vfunc_filter_key_event(event) {
|
vfunc_filter_key_event(event) {
|
||||||
if (!this._context || !this._enabled)
|
if (!this._context || !this._enabled)
|
||||||
return false;
|
return false;
|
||||||
if (!this._currentSource ||
|
if (!this._currentSource)
|
||||||
this._currentSource.type == Keyboard.INPUT_SOURCE_TYPE_XKB)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
let state = event.get_state();
|
let state = event.get_state();
|
||||||
@ -198,13 +221,23 @@ var InputMethod = new Lang.Class({
|
|||||||
|
|
||||||
if (event.type() == Clutter.EventType.KEY_RELEASE)
|
if (event.type() == Clutter.EventType.KEY_RELEASE)
|
||||||
state |= IBus.ModifierType.RELEASE_MASK;
|
state |= IBus.ModifierType.RELEASE_MASK;
|
||||||
|
|
||||||
|
this._currentEvent = event;
|
||||||
|
this._doForwardEvent = false;
|
||||||
|
|
||||||
this._context.process_key_event_async(event.get_key_symbol(),
|
this._context.process_key_event_async(event.get_key_symbol(),
|
||||||
event.get_key_code() - 8, // Convert XKB keycodes to evcodes
|
event.get_key_code() - 8, // Convert XKB keycodes to evcodes
|
||||||
state, -1, null,
|
state, -1, null,
|
||||||
(context, res) => {
|
(context, res) => {
|
||||||
try {
|
try {
|
||||||
let retval = context.process_key_event_async_finish(res);
|
let retval = context.process_key_event_async_finish(res);
|
||||||
|
|
||||||
|
if (this._doForwardEvent)
|
||||||
|
retval = false;
|
||||||
|
|
||||||
this.notify_key_event(event, retval);
|
this.notify_key_event(event, retval);
|
||||||
|
this._doForwardEvent = false;
|
||||||
|
this._currentEvent = null;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log('Error processing key on IM: ' + e.message);
|
log('Error processing key on IM: ' + e.message);
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,8 @@ var KeyboardManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
setUserLayouts(ids) {
|
setUserLayouts(ids) {
|
||||||
|
let currentId = this._current ? this._current.id : null;
|
||||||
|
let currentGroupIndex = this._current ? this._current.groupIndex : null;
|
||||||
this._current = null;
|
this._current = null;
|
||||||
this._layoutInfos = {};
|
this._layoutInfos = {};
|
||||||
|
|
||||||
@ -115,6 +117,9 @@ var KeyboardManager = new Lang.Class({
|
|||||||
info.group = group;
|
info.group = group;
|
||||||
info.groupIndex = groupIndex;
|
info.groupIndex = groupIndex;
|
||||||
|
|
||||||
|
if (currentId == id && currentGroupIndex == groupIndex)
|
||||||
|
this._current = info;
|
||||||
|
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -40,14 +40,24 @@ const SystemdLoginSessionIface = '<node> \
|
|||||||
<signal name="Lock" /> \
|
<signal name="Lock" /> \
|
||||||
<signal name="Unlock" /> \
|
<signal name="Unlock" /> \
|
||||||
<property name="Active" type="b" access="read" /> \
|
<property name="Active" type="b" access="read" /> \
|
||||||
|
<property name="Class" type="s" access="read" /> \
|
||||||
|
<property name="Id" type="s" access="read" /> \
|
||||||
<method name="SetLockedHint"> \
|
<method name="SetLockedHint"> \
|
||||||
<arg type="b" direction="in"/> \
|
<arg type="b" direction="in"/> \
|
||||||
</method> \
|
</method> \
|
||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
|
const SystemdLoginUserIface = '<node> \
|
||||||
|
<interface name="org.freedesktop.login1.User"> \
|
||||||
|
<property name="Display" type="(so)" access="read" /> \
|
||||||
|
<property name="Sessions" type="a(so)" access="read" /> \
|
||||||
|
</interface> \
|
||||||
|
</node>';
|
||||||
|
|
||||||
const SystemdLoginManager = Gio.DBusProxy.makeProxyWrapper(SystemdLoginManagerIface);
|
const SystemdLoginManager = Gio.DBusProxy.makeProxyWrapper(SystemdLoginManagerIface);
|
||||||
const SystemdLoginSession = Gio.DBusProxy.makeProxyWrapper(SystemdLoginSessionIface);
|
const SystemdLoginSession = Gio.DBusProxy.makeProxyWrapper(SystemdLoginSessionIface);
|
||||||
|
const SystemdLoginUser = Gio.DBusProxy.makeProxyWrapper(SystemdLoginUserIface);
|
||||||
|
|
||||||
function haveSystemd() {
|
function haveSystemd() {
|
||||||
return GLib.access("/run/systemd/seats", 0) >= 0;
|
return GLib.access("/run/systemd/seats", 0) >= 0;
|
||||||
@ -109,6 +119,9 @@ var LoginManagerSystemd = new Lang.Class({
|
|||||||
this._proxy = new SystemdLoginManager(Gio.DBus.system,
|
this._proxy = new SystemdLoginManager(Gio.DBus.system,
|
||||||
'org.freedesktop.login1',
|
'org.freedesktop.login1',
|
||||||
'/org/freedesktop/login1');
|
'/org/freedesktop/login1');
|
||||||
|
this._userProxy = new SystemdLoginUser(Gio.DBus.system,
|
||||||
|
'org.freedesktop.login1',
|
||||||
|
'/org/freedesktop/login1/user/self');
|
||||||
this._proxy.connectSignal('PrepareForSleep',
|
this._proxy.connectSignal('PrepareForSleep',
|
||||||
this._prepareForSleep.bind(this));
|
this._prepareForSleep.bind(this));
|
||||||
},
|
},
|
||||||
@ -121,8 +134,31 @@ var LoginManagerSystemd = new Lang.Class({
|
|||||||
|
|
||||||
let sessionId = GLib.getenv('XDG_SESSION_ID');
|
let sessionId = GLib.getenv('XDG_SESSION_ID');
|
||||||
if (!sessionId) {
|
if (!sessionId) {
|
||||||
log('Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session.');
|
log('Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.');
|
||||||
return;
|
let [session, objectPath] = this._userProxy.Display;
|
||||||
|
if (session) {
|
||||||
|
log(`Will monitor session ${session}`);
|
||||||
|
sessionId = session;
|
||||||
|
} else {
|
||||||
|
log('Failed to find "Display" session; are we the greeter?');
|
||||||
|
|
||||||
|
for (let [session, objectPath] of this._userProxy.Sessions) {
|
||||||
|
let sessionProxy = new SystemdLoginSession(Gio.DBus.system,
|
||||||
|
'org.freedesktop.login1',
|
||||||
|
objectPath);
|
||||||
|
log(`Considering ${session}, class=${sessionProxy.Class}`);
|
||||||
|
if (sessionProxy.Class == 'greeter') {
|
||||||
|
log(`Yes, will monitor session ${session}`);
|
||||||
|
sessionId = session;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!sessionId) {
|
||||||
|
log('No, failed to get session from logind.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._proxy.GetSessionRemote(sessionId, (result, error) => {
|
this._proxy.GetSessionRemote(sessionId, (result, error) => {
|
||||||
|
@ -17,7 +17,7 @@ const Params = imports.misc.params;
|
|||||||
var SCROLL_TIME = 0.1;
|
var SCROLL_TIME = 0.1;
|
||||||
|
|
||||||
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
||||||
const _balancedParens = '\\((?:[^\\s()<>]+|(?:\\(?:[^\\s()<>]+\\)))*\\)';
|
const _balancedParens = '\\([^\\s()<>]+\\)';
|
||||||
const _leadingJunk = '[\\s`(\\[{\'\\"<\u00AB\u201C\u2018]';
|
const _leadingJunk = '[\\s`(\\[{\'\\"<\u00AB\u201C\u2018]';
|
||||||
const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u201C\u201D\u2018\u2019]';
|
const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u201C\u201D\u2018\u2019]';
|
||||||
|
|
||||||
|
@ -136,8 +136,7 @@ function run() {
|
|||||||
global.frame_finish_timestamp = true;
|
global.frame_finish_timestamp = true;
|
||||||
|
|
||||||
for (let k = 0; k < 5; k++)
|
for (let k = 0; k < 5; k++)
|
||||||
yield Scripting.createTestWindow(640, 480,
|
yield Scripting.createTestWindow({ maximized: true });
|
||||||
{ maximized: true });
|
|
||||||
yield Scripting.waitTestWindows();
|
yield Scripting.waitTestWindows();
|
||||||
|
|
||||||
yield Scripting.sleep(1000);
|
yield Scripting.sleep(1000);
|
||||||
@ -158,8 +157,7 @@ function run() {
|
|||||||
yield Scripting.destroyTestWindows();
|
yield Scripting.destroyTestWindows();
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
|
|
||||||
yield Scripting.createTestWindow(640, 480,
|
yield Scripting.createTestWindow({ maximized: true,
|
||||||
{ maximized: true,
|
|
||||||
redraws: true});
|
redraws: true});
|
||||||
yield Scripting.waitTestWindows();
|
yield Scripting.waitTestWindows();
|
||||||
|
|
||||||
|
@ -502,7 +502,8 @@ var CyclerPopup = new Lang.Class({
|
|||||||
_finish() {
|
_finish() {
|
||||||
let window = this._items[this._selectedIndex];
|
let window = this._items[this._selectedIndex];
|
||||||
let ws = window.get_workspace();
|
let ws = window.get_workspace();
|
||||||
let activeWs = global.screen.get_active_workspace();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWs = workspaceManager.get_active_workspace();
|
||||||
|
|
||||||
if (window.minimized) {
|
if (window.minimized) {
|
||||||
Main.wm.skipNextEffect(window.get_compositor_private());
|
Main.wm.skipNextEffect(window.get_compositor_private());
|
||||||
@ -572,7 +573,14 @@ var WindowSwitcherPopup = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_getWindowList() {
|
_getWindowList() {
|
||||||
let workspace = this._settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace() : null;
|
let workspace = null;
|
||||||
|
|
||||||
|
if (this._settings.get_boolean('current-workspace-only')) {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
|
workspace = workspaceManager.get_active_workspace();
|
||||||
|
}
|
||||||
|
|
||||||
return getWindows(workspace);
|
return getWindows(workspace);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -620,7 +628,14 @@ var WindowCyclerPopup = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_getWindows() {
|
_getWindows() {
|
||||||
let workspace = this._settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace() : null;
|
let workspace = null;
|
||||||
|
|
||||||
|
if (this._settings.get_boolean('current-workspace-only')) {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
|
workspace = workspaceManager.get_active_workspace();
|
||||||
|
}
|
||||||
|
|
||||||
return getWindows(workspace);
|
return getWindows(workspace);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -669,8 +684,14 @@ var AppSwitcher = new Lang.Class({
|
|||||||
|
|
||||||
let windowTracker = Shell.WindowTracker.get_default();
|
let windowTracker = Shell.WindowTracker.get_default();
|
||||||
let settings = new Gio.Settings({ schema_id: 'org.gnome.shell.app-switcher' });
|
let settings = new Gio.Settings({ schema_id: 'org.gnome.shell.app-switcher' });
|
||||||
let workspace = settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace()
|
|
||||||
: null;
|
let workspace = null;
|
||||||
|
if (settings.get_boolean('current-workspace-only')) {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
|
workspace = workspaceManager.get_active_workspace();
|
||||||
|
}
|
||||||
|
|
||||||
let allWindows = global.display.get_tab_list(Meta.TabList.NORMAL, workspace);
|
let allWindows = global.display.get_tab_list(Meta.TabList.NORMAL, workspace);
|
||||||
|
|
||||||
// Construct the AppIcons, add to the popup
|
// Construct the AppIcons, add to the popup
|
||||||
|
@ -1778,10 +1778,11 @@ var AppIcon = new Lang.Class({
|
|||||||
activate(button) {
|
activate(button) {
|
||||||
let event = Clutter.get_current_event();
|
let event = Clutter.get_current_event();
|
||||||
let modifiers = event ? event.get_state() : 0;
|
let modifiers = event ? event.get_state() : 0;
|
||||||
let openNewWindow = this.app.can_open_new_window () &&
|
let isMiddleButton = button && button == Clutter.BUTTON_MIDDLE;
|
||||||
modifiers & Clutter.ModifierType.CONTROL_MASK &&
|
let isCtrlPressed = (modifiers & Clutter.ModifierType.CONTROL_MASK) != 0;
|
||||||
this.app.state == Shell.AppState.RUNNING ||
|
let openNewWindow = this.app.can_open_new_window() &&
|
||||||
button && button == 2;
|
this.app.state == Shell.AppState.RUNNING &&
|
||||||
|
(isCtrlPressed || isMiddleButton);
|
||||||
|
|
||||||
if (this.app.state == Shell.AppState.STOPPED || openNewWindow)
|
if (this.app.state == Shell.AppState.STOPPED || openNewWindow)
|
||||||
this.animateLaunch();
|
this.animateLaunch();
|
||||||
@ -1861,7 +1862,8 @@ var AppIconMenu = new Lang.Class({
|
|||||||
|
|
||||||
// Display the app windows menu items and the separator between windows
|
// Display the app windows menu items and the separator between windows
|
||||||
// of the current desktop and other windows.
|
// of the current desktop and other windows.
|
||||||
let activeWorkspace = global.screen.get_active_workspace();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
let separatorShown = windows.length > 0 && windows[0].get_workspace() != activeWorkspace;
|
let separatorShown = windows.length > 0 && windows[0].get_workspace() != activeWorkspace;
|
||||||
|
|
||||||
for (let i = 0; i < windows.length; i++) {
|
for (let i = 0; i < windows.length; i++) {
|
||||||
@ -1870,7 +1872,9 @@ var AppIconMenu = new Lang.Class({
|
|||||||
this._appendSeparator();
|
this._appendSeparator();
|
||||||
separatorShown = true;
|
separatorShown = true;
|
||||||
}
|
}
|
||||||
let item = this._appendMenuItem(window.title);
|
let title = window.title ? window.title
|
||||||
|
: this._source.app.get_name();
|
||||||
|
let item = this._appendMenuItem(title);
|
||||||
item.connect('activate', () => {
|
item.connect('activate', () => {
|
||||||
this.emit('activate-window', window);
|
this.emit('activate-window', window);
|
||||||
});
|
});
|
||||||
|
@ -13,6 +13,7 @@ const RENAMED_DESKTOP_IDS = {
|
|||||||
'dconf-editor.desktop': 'ca.desrt.dconf-editor.desktop',
|
'dconf-editor.desktop': 'ca.desrt.dconf-editor.desktop',
|
||||||
'empathy.desktop': 'org.gnome.Empathy.desktop',
|
'empathy.desktop': 'org.gnome.Empathy.desktop',
|
||||||
'epiphany.desktop': 'org.gnome.Epiphany.desktop',
|
'epiphany.desktop': 'org.gnome.Epiphany.desktop',
|
||||||
|
'evolution.desktop': 'org.gnome.Evolution.desktop',
|
||||||
'file-roller.desktop': 'org.gnome.FileRoller.desktop',
|
'file-roller.desktop': 'org.gnome.FileRoller.desktop',
|
||||||
'gcalctool.desktop': 'org.gnome.Calculator.desktop',
|
'gcalctool.desktop': 'org.gnome.Calculator.desktop',
|
||||||
'geary.desktop': 'org.gnome.Geary.desktop',
|
'geary.desktop': 'org.gnome.Geary.desktop',
|
||||||
@ -34,6 +35,7 @@ const RENAMED_DESKTOP_IDS = {
|
|||||||
'gnome-screenshot.desktop': 'org.gnome.Screenshot.desktop',
|
'gnome-screenshot.desktop': 'org.gnome.Screenshot.desktop',
|
||||||
'gnome-software.desktop': 'org.gnome.Software.desktop',
|
'gnome-software.desktop': 'org.gnome.Software.desktop',
|
||||||
'gnome-terminal.desktop': 'org.gnome.Terminal.desktop',
|
'gnome-terminal.desktop': 'org.gnome.Terminal.desktop',
|
||||||
|
'gnome-tweaks.desktop': 'org.gnome.tweaks.desktop',
|
||||||
'gnome-weather.desktop': 'org.gnome.Weather.Application.desktop',
|
'gnome-weather.desktop': 'org.gnome.Weather.Application.desktop',
|
||||||
'gnomine.desktop': 'gnome-mines.desktop',
|
'gnomine.desktop': 'gnome-mines.desktop',
|
||||||
'gnotravex.desktop': 'gnome-tetravex.desktop',
|
'gnotravex.desktop': 'gnome-tetravex.desktop',
|
||||||
|
@ -240,7 +240,7 @@ var Background = new Lang.Class({
|
|||||||
file: null,
|
file: null,
|
||||||
style: null });
|
style: null });
|
||||||
|
|
||||||
this.background = new Meta.Background({ meta_screen: global.screen });
|
this.background = new Meta.Background({ meta_display: global.display });
|
||||||
this.background._delegate = this;
|
this.background._delegate = this;
|
||||||
|
|
||||||
this._settings = params.settings;
|
this._settings = params.settings;
|
||||||
@ -499,12 +499,12 @@ var SystemBackground = new Lang.Class({
|
|||||||
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/noise-texture.png');
|
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/noise-texture.png');
|
||||||
|
|
||||||
if (_systemBackground == null) {
|
if (_systemBackground == null) {
|
||||||
_systemBackground = new Meta.Background({ meta_screen: global.screen });
|
_systemBackground = new Meta.Background({ meta_display: global.display });
|
||||||
_systemBackground.set_color(DEFAULT_BACKGROUND_COLOR);
|
_systemBackground.set_color(DEFAULT_BACKGROUND_COLOR);
|
||||||
_systemBackground.set_file(file, GDesktopEnums.BackgroundStyle.WALLPAPER);
|
_systemBackground.set_file(file, GDesktopEnums.BackgroundStyle.WALLPAPER);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.actor = new Meta.BackgroundActor({ meta_screen: global.screen,
|
this.actor = new Meta.BackgroundActor({ meta_display: global.display,
|
||||||
monitor: 0,
|
monitor: 0,
|
||||||
background: _systemBackground });
|
background: _systemBackground });
|
||||||
|
|
||||||
@ -538,8 +538,10 @@ var BackgroundSource = new Lang.Class({
|
|||||||
this._settings = new Gio.Settings({ schema_id: settingsSchema });
|
this._settings = new Gio.Settings({ schema_id: settingsSchema });
|
||||||
this._backgrounds = [];
|
this._backgrounds = [];
|
||||||
|
|
||||||
this._monitorsChangedId = global.screen.connect('monitors-changed',
|
let monitorManager = Meta.MonitorManager.get();
|
||||||
this._onMonitorsChanged.bind(this));
|
this._monitorsChangedId =
|
||||||
|
monitorManager.connect('monitors-changed',
|
||||||
|
this._onMonitorsChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onMonitorsChanged() {
|
_onMonitorsChanged() {
|
||||||
@ -604,7 +606,8 @@ var BackgroundSource = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
global.screen.disconnect(this._monitorsChangedId);
|
let monitorManager = Meta.MonitorManager.get();
|
||||||
|
monitorManager.disconnect(this._monitorsChangedId);
|
||||||
|
|
||||||
for (let monitorIndex in this._backgrounds) {
|
for (let monitorIndex in this._backgrounds) {
|
||||||
let background = this._backgrounds[monitorIndex];
|
let background = this._backgrounds[monitorIndex];
|
||||||
@ -751,7 +754,7 @@ var BackgroundManager = new Lang.Class({
|
|||||||
|
|
||||||
_createBackgroundActor() {
|
_createBackgroundActor() {
|
||||||
let background = this._backgroundSource.getBackground(this._monitorIndex);
|
let background = this._backgroundSource.getBackground(this._monitorIndex);
|
||||||
let backgroundActor = new Meta.BackgroundActor({ meta_screen: global.screen,
|
let backgroundActor = new Meta.BackgroundActor({ meta_display: global.display,
|
||||||
monitor: this._monitorIndex,
|
monitor: this._monitorIndex,
|
||||||
background: background.background,
|
background: background.background,
|
||||||
vignette: this._vignette,
|
vignette: this._vignette,
|
||||||
|
@ -821,6 +821,8 @@ var EventsSection = new Lang.Class({
|
|||||||
this._desktopSettings.connect('changed', this._reloadEvents.bind(this));
|
this._desktopSettings.connect('changed', this._reloadEvents.bind(this));
|
||||||
this._eventSource = new EmptyEventSource();
|
this._eventSource = new EmptyEventSource();
|
||||||
|
|
||||||
|
this._messageById = new Map();
|
||||||
|
|
||||||
this.parent();
|
this.parent();
|
||||||
|
|
||||||
this._title = new St.Button({ style_class: 'events-section-title',
|
this._title = new St.Button({ style_class: 'events-section-title',
|
||||||
@ -875,20 +877,32 @@ var EventsSection = new Lang.Class({
|
|||||||
|
|
||||||
this._reloading = true;
|
this._reloading = true;
|
||||||
|
|
||||||
this._list.destroy_all_children();
|
|
||||||
|
|
||||||
let periodBegin = _getBeginningOfDay(this._date);
|
let periodBegin = _getBeginningOfDay(this._date);
|
||||||
let periodEnd = _getEndOfDay(this._date);
|
let periodEnd = _getEndOfDay(this._date);
|
||||||
let events = this._eventSource.getEvents(periodBegin, periodEnd);
|
let events = this._eventSource.getEvents(periodBegin, periodEnd);
|
||||||
|
|
||||||
|
let ids = events.map(e => e.id);
|
||||||
|
this._messageById.forEach((message, id) => {
|
||||||
|
if (ids.includes(id))
|
||||||
|
return;
|
||||||
|
this._messageById.delete(id);
|
||||||
|
this.removeMessage(message);
|
||||||
|
});
|
||||||
|
|
||||||
for (let i = 0; i < events.length; i++) {
|
for (let i = 0; i < events.length; i++) {
|
||||||
let event = events[i];
|
let event = events[i];
|
||||||
|
|
||||||
let message = new EventMessage(event, this._date);
|
let message = this._messageById.get(event.id);
|
||||||
message.connect('close', () => {
|
if (!message) {
|
||||||
this._ignoreEvent(event);
|
message = new EventMessage(event, this._date);
|
||||||
});
|
message.connect('close', () => {
|
||||||
this.addMessage(message, false);
|
this._ignoreEvent(event);
|
||||||
|
});
|
||||||
|
this._messageById.set(event.id, message);
|
||||||
|
this.addMessage(message, false);
|
||||||
|
} else {
|
||||||
|
this.moveMessage(message, i, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._reloading = false;
|
this._reloading = false;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
|
const GLib = imports.gi.GLib;
|
||||||
const GObject = imports.gi.GObject;
|
const GObject = imports.gi.GObject;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
@ -13,6 +14,7 @@ const Tweener = imports.ui.tweener;
|
|||||||
|
|
||||||
var FROZEN_WINDOW_BRIGHTNESS = -0.3
|
var FROZEN_WINDOW_BRIGHTNESS = -0.3
|
||||||
var DIALOG_TRANSITION_TIME = 0.15
|
var DIALOG_TRANSITION_TIME = 0.15
|
||||||
|
var ALIVE_TIMEOUT = 5000;
|
||||||
|
|
||||||
var CloseDialog = new Lang.Class({
|
var CloseDialog = new Lang.Class({
|
||||||
Name: 'CloseDialog',
|
Name: 'CloseDialog',
|
||||||
@ -26,6 +28,7 @@ var CloseDialog = new Lang.Class({
|
|||||||
this.parent();
|
this.parent();
|
||||||
this._window = window;
|
this._window = window;
|
||||||
this._dialog = null;
|
this._dialog = null;
|
||||||
|
this._timeoutId = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
get window() {
|
get window() {
|
||||||
@ -97,6 +100,14 @@ var CloseDialog = new Lang.Class({
|
|||||||
if (this._dialog != null)
|
if (this._dialog != null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
|
|
||||||
|
this._timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, ALIVE_TIMEOUT,
|
||||||
|
() => {
|
||||||
|
this._window.check_alive(global.display.get_current_time_roundtrip());
|
||||||
|
return GLib.SOURCE_CONTINUE;
|
||||||
|
});
|
||||||
|
|
||||||
this._addWindowEffect();
|
this._addWindowEffect();
|
||||||
this._initDialog();
|
this._initDialog();
|
||||||
|
|
||||||
@ -117,6 +128,11 @@ var CloseDialog = new Lang.Class({
|
|||||||
if (this._dialog == null)
|
if (this._dialog == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Meta.enable_unredirect_for_display(global.display);
|
||||||
|
|
||||||
|
GLib.source_remove(this._timeoutId);
|
||||||
|
this._timeoutId = 0;
|
||||||
|
|
||||||
let dialog = this._dialog;
|
let dialog = this._dialog;
|
||||||
this._dialog = null;
|
this._dialog = null;
|
||||||
this._removeWindowEffect();
|
this._removeWindowEffect();
|
||||||
|
@ -604,12 +604,17 @@ var NetworkAgent = new Lang.Class({
|
|||||||
|
|
||||||
this._native.connect('new-request', this._newRequest.bind(this));
|
this._native.connect('new-request', this._newRequest.bind(this));
|
||||||
this._native.connect('cancel-request', this._cancelRequest.bind(this));
|
this._native.connect('cancel-request', this._cancelRequest.bind(this));
|
||||||
try {
|
|
||||||
this._native.init(null);
|
this._initialized = false;
|
||||||
} catch(e) {
|
this._native.init_async(GLib.PRIORITY_DEFAULT, null, (o, res) => {
|
||||||
this._native = null;
|
try {
|
||||||
logError(e, 'error initializing the NetworkManager Agent');
|
this._native.init_finish(res);
|
||||||
}
|
this._initialized = true;
|
||||||
|
} catch(e) {
|
||||||
|
this._native = null;
|
||||||
|
logError(e, 'error initializing the NetworkManager Agent');
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
enable() {
|
enable() {
|
||||||
@ -617,7 +622,7 @@ var NetworkAgent = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this._native.auto_register = true;
|
this._native.auto_register = true;
|
||||||
if (!this._native.registered)
|
if (this._initialized && !this._native.registered)
|
||||||
this._native.register_async(null, null);
|
this._native.register_async(null, null);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -640,7 +645,7 @@ var NetworkAgent = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this._native.auto_register = false;
|
this._native.auto_register = false;
|
||||||
if (this._native.registered)
|
if (this._initialized && this._native.registered)
|
||||||
this._native.unregister_async(null, null);
|
this._native.unregister_async(null, null);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -655,7 +660,7 @@ var NetworkAgent = new Lang.Class({
|
|||||||
switch (connectionType) {
|
switch (connectionType) {
|
||||||
case '802-11-wireless':
|
case '802-11-wireless':
|
||||||
let wirelessSetting = connection.get_setting_wireless();
|
let wirelessSetting = connection.get_setting_wireless();
|
||||||
let ssid = NM.utils_ssid_to_utf8(wirelessSetting.get_ssid());
|
let ssid = NM.utils_ssid_to_utf8(wirelessSetting.get_ssid().get_data());
|
||||||
title = _("Authentication required by wireless network");
|
title = _("Authentication required by wireless network");
|
||||||
body = _("Passwords or encryption keys are required to access the wireless network “%s”.").format(ssid);
|
body = _("Passwords or encryption keys are required to access the wireless network “%s”.").format(ssid);
|
||||||
break;
|
break;
|
||||||
@ -765,57 +770,29 @@ var NetworkAgent = new Lang.Class({
|
|||||||
this._vpnCacheBuilt = true;
|
this._vpnCacheBuilt = true;
|
||||||
this._vpnBinaries = { };
|
this._vpnBinaries = { };
|
||||||
|
|
||||||
try {
|
NM.VpnPluginInfo.list_load().forEach(plugin => {
|
||||||
let fileEnum = this._pluginDir.enumerate_children('standard::name', Gio.FileQueryInfoFlags.NONE, null);
|
let service = plugin.get_service();
|
||||||
let info;
|
let fileName = plugin.get_auth_dialog();
|
||||||
|
let supportsHints = plugin.supports_hints();
|
||||||
|
let externalUIMode = false;
|
||||||
|
|
||||||
while ((info = fileEnum.next_file(null))) {
|
let prop = plugin.lookup_property('GNOME', 'supports-external-ui-mode');
|
||||||
let name = info.get_name();
|
if (prop) {
|
||||||
if (name.substr(-5) != '.name')
|
prop = prop.trim().toLowerCase();
|
||||||
continue;
|
externalUIMode = ['true', 'yes', 'on', '1'].includes(prop);
|
||||||
|
|
||||||
try {
|
|
||||||
let keyfile = new GLib.KeyFile();
|
|
||||||
keyfile.load_from_file(this._pluginDir.get_child(name).get_path(), GLib.KeyFileFlags.NONE);
|
|
||||||
let service = keyfile.get_string('VPN Connection', 'service');
|
|
||||||
let binary = keyfile.get_string('GNOME', 'auth-dialog');
|
|
||||||
let externalUIMode = false;
|
|
||||||
let hints = false;
|
|
||||||
|
|
||||||
try {
|
|
||||||
externalUIMode = keyfile.get_boolean('GNOME', 'supports-external-ui-mode');
|
|
||||||
} catch(e) { } // ignore errors if key does not exist
|
|
||||||
|
|
||||||
try {
|
|
||||||
hints = keyfile.get_boolean('GNOME', 'supports-hints');
|
|
||||||
} catch(e) { } // ignore errors if key does not exist
|
|
||||||
|
|
||||||
let path = binary;
|
|
||||||
if (!GLib.path_is_absolute(path)) {
|
|
||||||
path = GLib.build_filenamev([Config.LIBEXECDIR, path]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GLib.file_test(path, GLib.FileTest.IS_EXECUTABLE)) {
|
|
||||||
this._vpnBinaries[service] = { fileName: path, externalUIMode: externalUIMode, supportsHints: hints };
|
|
||||||
try {
|
|
||||||
let aliases = keyfile.get_string_list('VPN Connection', 'aliases');
|
|
||||||
|
|
||||||
for (let alias of aliases) {
|
|
||||||
this._vpnBinaries[alias] = { fileName: path, externalUIMode: externalUIMode, supportsHints: hints };
|
|
||||||
}
|
|
||||||
} catch(e) { } // ignore errors if key does not exist
|
|
||||||
} else {
|
|
||||||
throw new Error('VPN plugin at %s is not executable'.format(path));
|
|
||||||
}
|
|
||||||
} catch(e) {
|
|
||||||
log('Error \'%s\' while processing VPN keyfile \'%s\''.
|
|
||||||
format(e.message, this._pluginDir.get_child(name).get_path()));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch(e) {
|
|
||||||
logError(e, 'error while enumerating VPN auth helpers');
|
if (GLib.file_test(fileName, GLib.FileTest.IS_EXECUTABLE)) {
|
||||||
}
|
let binary = { fileName, externalUIMode, supportsHints };
|
||||||
|
this._vpnBinaries[service] = binary;
|
||||||
|
|
||||||
|
plugin.get_aliases().forEach(alias => {
|
||||||
|
this._vpnBinaries[alias] = binary;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
log('VPN plugin at %s is not executable'.format(fileName));
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var Component = NetworkAgent;
|
var Component = NetworkAgent;
|
||||||
|
@ -16,6 +16,7 @@ const PolkitAgent = imports.gi.PolkitAgent;
|
|||||||
const Animation = imports.ui.animation;
|
const Animation = imports.ui.animation;
|
||||||
const Components = imports.ui.components;
|
const Components = imports.ui.components;
|
||||||
const Dialog = imports.ui.dialog;
|
const Dialog = imports.ui.dialog;
|
||||||
|
const Main = imports.ui.main;
|
||||||
const ModalDialog = imports.ui.modalDialog;
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
const ShellEntry = imports.ui.shellEntry;
|
const ShellEntry = imports.ui.shellEntry;
|
||||||
const UserWidget = imports.ui.userWidget;
|
const UserWidget = imports.ui.userWidget;
|
||||||
@ -39,6 +40,10 @@ var AuthenticationDialog = new Lang.Class({
|
|||||||
this.userNames = userNames;
|
this.userNames = userNames;
|
||||||
this._wasDismissed = false;
|
this._wasDismissed = false;
|
||||||
|
|
||||||
|
this._sessionUpdatedId = Main.sessionMode.connect('updated', () => {
|
||||||
|
this._group.visible = !Main.sessionMode.isLocked;
|
||||||
|
});
|
||||||
|
|
||||||
let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' });
|
let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' });
|
||||||
let title = _("Authentication Required");
|
let title = _("Authentication Required");
|
||||||
|
|
||||||
@ -193,6 +198,14 @@ var AuthenticationDialog = new Lang.Class({
|
|||||||
this._session.initiate();
|
this._session.initiate();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
close(timestamp) {
|
||||||
|
this.parent(timestamp);
|
||||||
|
|
||||||
|
if (this._sessionUpdatedId)
|
||||||
|
Main.sessionMode.disconnect(this._sessionUpdatedId);
|
||||||
|
this._sessionUpdatedId = 0;
|
||||||
|
},
|
||||||
|
|
||||||
_ensureOpen() {
|
_ensureOpen() {
|
||||||
// NOTE: ModalDialog.open() is safe to call if the dialog is
|
// NOTE: ModalDialog.open() is safe to call if the dialog is
|
||||||
// already open - it just returns true without side-effects
|
// already open - it just returns true without side-effects
|
||||||
@ -348,6 +361,7 @@ var AuthenticationAgent = new Lang.Class({
|
|||||||
this._native = new Shell.PolkitAuthenticationAgent();
|
this._native = new Shell.PolkitAuthenticationAgent();
|
||||||
this._native.connect('initiate', this._onInitiate.bind(this));
|
this._native.connect('initiate', this._onInitiate.bind(this));
|
||||||
this._native.connect('cancel', this._onCancel.bind(this));
|
this._native.connect('cancel', this._onCancel.bind(this));
|
||||||
|
this._sessionUpdatedId = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
enable() {
|
enable() {
|
||||||
@ -367,6 +381,17 @@ var AuthenticationAgent = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onInitiate(nativeAgent, actionId, message, iconName, cookie, userNames) {
|
_onInitiate(nativeAgent, actionId, message, iconName, cookie, userNames) {
|
||||||
|
// Don't pop up a dialog while locked
|
||||||
|
if (Main.sessionMode.isLocked) {
|
||||||
|
this._sessionUpdatedId = Main.sessionMode.connect('updated', () => {
|
||||||
|
Main.sessionMode.disconnect(this._sessionUpdatedId);
|
||||||
|
this._sessionUpdatedId = 0;
|
||||||
|
|
||||||
|
this._onInitiate(nativeAgent, actionId, message, iconName, cookie, userNames);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._currentDialog = new AuthenticationDialog(actionId, message, cookie, userNames);
|
this._currentDialog = new AuthenticationDialog(actionId, message, cookie, userNames);
|
||||||
|
|
||||||
// We actually don't want to open the dialog until we know for
|
// We actually don't want to open the dialog until we know for
|
||||||
@ -396,6 +421,10 @@ var AuthenticationAgent = new Lang.Class({
|
|||||||
this._currentDialog.destroySession();
|
this._currentDialog.destroySession();
|
||||||
this._currentDialog = null;
|
this._currentDialog = null;
|
||||||
|
|
||||||
|
if (this._sessionUpdatedId)
|
||||||
|
Main.sessionMode.disconnect(this._sessionUpdatedId);
|
||||||
|
this._sessionUpdatedId = 0;
|
||||||
|
|
||||||
this._native.complete(dismissed);
|
this._native.complete(dismissed);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -85,9 +85,11 @@ var CtrlAltTabManager = new Lang.Class({
|
|||||||
|
|
||||||
// And add the windows metacity would show in its Ctrl-Alt-Tab list
|
// And add the windows metacity would show in its Ctrl-Alt-Tab list
|
||||||
if (Main.sessionMode.hasWindows && !Main.overview.visible) {
|
if (Main.sessionMode.hasWindows && !Main.overview.visible) {
|
||||||
let screen = global.screen;
|
let display = global.display;
|
||||||
let display = screen.get_display();
|
let workspaceManager = global.workspace_manager;
|
||||||
let windows = display.get_tab_list(Meta.TabList.DOCKS, screen.get_active_workspace ());
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
|
let windows = display.get_tab_list(Meta.TabList.DOCKS,
|
||||||
|
activeWorkspace);
|
||||||
let windowTracker = Shell.WindowTracker.get_default();
|
let windowTracker = Shell.WindowTracker.get_default();
|
||||||
let textureCache = St.TextureCache.get_default();
|
let textureCache = St.TextureCache.get_default();
|
||||||
for (let i = 0; i < windows.length; i++) {
|
for (let i = 0; i < windows.length; i++) {
|
||||||
@ -131,7 +133,7 @@ var CtrlAltTabManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_focusWindows(timestamp) {
|
_focusWindows(timestamp) {
|
||||||
global.screen.focus_default_window(timestamp);
|
global.display.focus_default_window(timestamp);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -153,8 +153,10 @@ var WorldClocksSection = new Lang.Class({
|
|||||||
for (let i = 0; i < this._locations.length; i++) {
|
for (let i = 0; i < this._locations.length; i++) {
|
||||||
let l = this._locations[i].location;
|
let l = this._locations[i].location;
|
||||||
|
|
||||||
|
let name = l.get_level() == GWeather.LocationLevel.NAMED_TIMEZONE ? l.get_name()
|
||||||
|
: l.get_city_name();
|
||||||
let label = new St.Label({ style_class: 'world-clocks-city',
|
let label = new St.Label({ style_class: 'world-clocks-city',
|
||||||
text: l.get_city_name(),
|
text: name,
|
||||||
x_align: Clutter.ActorAlign.START,
|
x_align: Clutter.ActorAlign.START,
|
||||||
x_expand: true });
|
x_expand: true });
|
||||||
|
|
||||||
|
14
js/ui/dnd.js
14
js/ui/dnd.js
@ -280,7 +280,7 @@ var _Draggable = new Lang.Class({
|
|||||||
|
|
||||||
this._touchSequence = sequence;
|
this._touchSequence = sequence;
|
||||||
this._grabEvents();
|
this._grabEvents();
|
||||||
global.screen.set_cursor(Meta.Cursor.DND_IN_DRAG);
|
global.display.set_cursor(Meta.Cursor.DND_IN_DRAG);
|
||||||
|
|
||||||
this._dragX = this._dragStartX = stageX;
|
this._dragX = this._dragStartX = stageX;
|
||||||
this._dragY = this._dragStartY = stageY;
|
this._dragY = this._dragStartY = stageY;
|
||||||
@ -412,7 +412,7 @@ var _Draggable = new Lang.Class({
|
|||||||
if (motionFunc) {
|
if (motionFunc) {
|
||||||
let result = motionFunc(dragEvent);
|
let result = motionFunc(dragEvent);
|
||||||
if (result != DragMotionResult.CONTINUE) {
|
if (result != DragMotionResult.CONTINUE) {
|
||||||
global.screen.set_cursor(DRAG_CURSOR_MAP[result]);
|
global.display.set_cursor(DRAG_CURSOR_MAP[result]);
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -430,13 +430,13 @@ var _Draggable = new Lang.Class({
|
|||||||
targY,
|
targY,
|
||||||
0);
|
0);
|
||||||
if (result != DragMotionResult.CONTINUE) {
|
if (result != DragMotionResult.CONTINUE) {
|
||||||
global.screen.set_cursor(DRAG_CURSOR_MAP[result]);
|
global.display.set_cursor(DRAG_CURSOR_MAP[result]);
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
target = target.get_parent();
|
target = target.get_parent();
|
||||||
}
|
}
|
||||||
global.screen.set_cursor(Meta.Cursor.DND_IN_DRAG);
|
global.display.set_cursor(Meta.Cursor.DND_IN_DRAG);
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -509,7 +509,7 @@ var _Draggable = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._dragInProgress = false;
|
this._dragInProgress = false;
|
||||||
global.screen.set_cursor(Meta.Cursor.DEFAULT);
|
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
||||||
this.emit('drag-end', event.get_time(), true);
|
this.emit('drag-end', event.get_time(), true);
|
||||||
this._dragComplete();
|
this._dragComplete();
|
||||||
return true;
|
return true;
|
||||||
@ -561,7 +561,7 @@ var _Draggable = new Lang.Class({
|
|||||||
let [snapBackX, snapBackY, snapBackScale] = this._getRestoreLocation();
|
let [snapBackX, snapBackY, snapBackScale] = this._getRestoreLocation();
|
||||||
|
|
||||||
if (this._actorDestroyed) {
|
if (this._actorDestroyed) {
|
||||||
global.screen.set_cursor(Meta.Cursor.DEFAULT);
|
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
||||||
if (!this._buttonDown)
|
if (!this._buttonDown)
|
||||||
this._dragComplete();
|
this._dragComplete();
|
||||||
this.emit('drag-end', eventTime, false);
|
this.emit('drag-end', eventTime, false);
|
||||||
@ -620,7 +620,7 @@ var _Draggable = new Lang.Class({
|
|||||||
if (!this._buttonDown)
|
if (!this._buttonDown)
|
||||||
this._dragComplete();
|
this._dragComplete();
|
||||||
|
|
||||||
global.screen.set_cursor(Meta.Cursor.DEFAULT);
|
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onAnimationComplete(dragActor, eventTime) {
|
_onAnimationComplete(dragActor, eventTime) {
|
||||||
|
@ -27,9 +27,9 @@ var EdgeDragAction = new Lang.Class({
|
|||||||
|
|
||||||
_getMonitorRect(x, y) {
|
_getMonitorRect(x, y) {
|
||||||
let rect = new Meta.Rectangle({ x: x - 1, y: y - 1, width: 1, height: 1 });
|
let rect = new Meta.Rectangle({ x: x - 1, y: y - 1, width: 1, height: 1 });
|
||||||
let monitorIndex = global.screen.get_monitor_index_for_rect(rect);
|
let monitorIndex = global.display.get_monitor_index_for_rect(rect);
|
||||||
|
|
||||||
return global.screen.get_monitor_geometry(monitorIndex);
|
return global.display.get_monitor_geometry(monitorIndex);
|
||||||
},
|
},
|
||||||
|
|
||||||
vfunc_gesture_prepare(action, actor) {
|
vfunc_gesture_prepare(action, actor) {
|
||||||
|
@ -697,7 +697,14 @@ var EndSessionDialog = new Lang.Class({
|
|||||||
if (proxy.State == 'closing')
|
if (proxy.State == 'closing')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (proxy.Id == GLib.getenv('XDG_SESSION_ID'))
|
let sessionId = GLib.getenv('XDG_SESSION_ID');
|
||||||
|
if (!sessionId)
|
||||||
|
this._loginManager.getCurrentSessionProxy(currentSessionProxy => {
|
||||||
|
sessionId = currentSessionProxy.Id;
|
||||||
|
log(`endSessionDialog: No XDG_SESSION_ID, fetched from logind: ${sessionId}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (proxy.Id == sessionId)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
let session = { user: this._userManager.get_user(userName),
|
let session = { user: this._userManager.get_user(userName),
|
||||||
|
@ -166,7 +166,7 @@ var CandidatePopup = new Lang.Class({
|
|||||||
this._panelService.cursor_down();
|
this._panelService.cursor_down();
|
||||||
});
|
});
|
||||||
|
|
||||||
this._candidateArea.connect('candidate-clicked', () => {
|
this._candidateArea.connect('candidate-clicked', (area, index, button, state) => {
|
||||||
this._panelService.candidate_clicked(index, button, state);
|
this._panelService.candidate_clicked(index, button, state);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
const FocusCaretTracker = imports.ui.focusCaretTracker;
|
|
||||||
const Atspi = imports.gi.Atspi;
|
const Atspi = imports.gi.Atspi;
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gdk = imports.gi.Gdk;
|
const Gdk = imports.gi.Gdk;
|
||||||
@ -13,6 +12,7 @@ const Signals = imports.signals;
|
|||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const InputSourceManager = imports.ui.status.keyboard;
|
const InputSourceManager = imports.ui.status.keyboard;
|
||||||
|
|
||||||
|
const IBusManager = imports.misc.ibusManager;
|
||||||
const BoxPointer = imports.ui.boxpointer;
|
const BoxPointer = imports.ui.boxpointer;
|
||||||
const Layout = imports.ui.layout;
|
const Layout = imports.ui.layout;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
@ -261,6 +261,7 @@ var Key = new Lang.Class({
|
|||||||
this._extended_keyboard = null;
|
this._extended_keyboard = null;
|
||||||
this._pressTimeoutId = 0;
|
this._pressTimeoutId = 0;
|
||||||
this._capturedPress = false;
|
this._capturedPress = false;
|
||||||
|
|
||||||
this._capturedEventId = 0;
|
this._capturedEventId = 0;
|
||||||
this._unmapId = 0;
|
this._unmapId = 0;
|
||||||
this._longPress = false;
|
this._longPress = false;
|
||||||
@ -484,6 +485,79 @@ var KeyboardModel = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var FocusTracker = new Lang.Class({
|
||||||
|
Name: 'FocusTracker',
|
||||||
|
|
||||||
|
_init() {
|
||||||
|
this._currentWindow = null;
|
||||||
|
this._currentWindowPositionId = 0;
|
||||||
|
|
||||||
|
global.display.connect('notify::focus-window', () => {
|
||||||
|
this._setCurrentWindow(global.display.focus_window);
|
||||||
|
this.emit('window-changed', this._currentWindow);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* Valid for wayland clients */
|
||||||
|
Main.inputMethod.connect('cursor-location-changed', (o, rect) => {
|
||||||
|
let newRect = { x: rect.get_x(), y: rect.get_y(), width: rect.get_width(), height: rect.get_height() };
|
||||||
|
this._setCurrentRect(newRect);
|
||||||
|
});
|
||||||
|
|
||||||
|
this._ibusManager = IBusManager.getIBusManager();
|
||||||
|
this._ibusManager.connect('set-cursor-location', (manager, rect) => {
|
||||||
|
/* Valid for X11 clients only */
|
||||||
|
if (Main.inputMethod.currentFocus)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._setCurrentRect(rect);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
get currentWindow() {
|
||||||
|
return this._currentWindow;
|
||||||
|
},
|
||||||
|
|
||||||
|
_setCurrentWindow(window) {
|
||||||
|
if (this._currentWindow)
|
||||||
|
this._currentWindow.disconnect(this._currentWindowPositionId);
|
||||||
|
|
||||||
|
this._currentWindow = window;
|
||||||
|
if (window) {
|
||||||
|
this._currentWindowPositionId = this._currentWindow.connect('position-changed', () => {
|
||||||
|
if (global.display.get_grab_op() == Meta.GrabOp.NONE)
|
||||||
|
this.emit('position-changed');
|
||||||
|
else
|
||||||
|
this.emit('reset');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_setCurrentRect(rect) {
|
||||||
|
if (this._currentWindow) {
|
||||||
|
let frameRect = this._currentWindow.get_frame_rect();
|
||||||
|
rect.x -= frameRect.x;
|
||||||
|
rect.y -= frameRect.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._rect = rect;
|
||||||
|
this.emit('position-changed');
|
||||||
|
},
|
||||||
|
|
||||||
|
getCurrentRect() {
|
||||||
|
let rect = { x: this._rect.x, y: this._rect.y,
|
||||||
|
width: this._rect.width, height: this._rect.height };
|
||||||
|
|
||||||
|
if (this._currentWindow) {
|
||||||
|
let frameRect = this._currentWindow.get_frame_rect();
|
||||||
|
rect.x += frameRect.x;
|
||||||
|
rect.y += frameRect.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Signals.addSignalMethods(FocusTracker.prototype);
|
||||||
|
|
||||||
var Keyboard = new Lang.Class({
|
var Keyboard = new Lang.Class({
|
||||||
Name: 'Keyboard',
|
Name: 'Keyboard',
|
||||||
|
|
||||||
@ -491,15 +565,10 @@ var Keyboard = new Lang.Class({
|
|||||||
this.actor = null;
|
this.actor = null;
|
||||||
this._focusInExtendedKeys = false;
|
this._focusInExtendedKeys = false;
|
||||||
|
|
||||||
this._focusCaretTracker = new FocusCaretTracker.FocusCaretTracker();
|
|
||||||
this._focusCaretTracker.connect('focus-changed', this._onFocusChanged.bind(this));
|
|
||||||
this._focusCaretTracker.connect('caret-moved', this._onCaretMoved.bind(this));
|
|
||||||
this._languagePopup = null;
|
this._languagePopup = null;
|
||||||
this._currentAccessible = null;
|
|
||||||
this._caretTrackingEnabled = false;
|
|
||||||
this._updateCaretPositionId = 0;
|
|
||||||
this._currentFocusWindow = null;
|
this._currentFocusWindow = null;
|
||||||
this._originalWindowY = null;
|
this._animFocusedWindow = null;
|
||||||
|
this._delayedAnimFocusWindow = null;
|
||||||
|
|
||||||
this._enableKeyboard = false; // a11y settings value
|
this._enableKeyboard = false; // a11y settings value
|
||||||
this._enabled = false; // enabled state (by setting or device type)
|
this._enabled = false; // enabled state (by setting or device type)
|
||||||
@ -510,6 +579,14 @@ var Keyboard = new Lang.Class({
|
|||||||
this._lastDeviceId = null;
|
this._lastDeviceId = null;
|
||||||
this._suggestions = null;
|
this._suggestions = null;
|
||||||
|
|
||||||
|
this._focusTracker = new FocusTracker();
|
||||||
|
this._focusTracker.connect('position-changed', this._onFocusPositionChanged.bind(this));
|
||||||
|
this._focusTracker.connect('reset', () => {
|
||||||
|
this._delayedAnimFocusWindow = null;
|
||||||
|
this._animFocusedWindow = null;
|
||||||
|
this._oskFocusWindow = null;
|
||||||
|
});
|
||||||
|
|
||||||
Meta.get_backend().connect('last-device-changed',
|
Meta.get_backend().connect('last-device-changed',
|
||||||
(backend, deviceId) => {
|
(backend, deviceId) => {
|
||||||
let manager = Clutter.DeviceManager.get_default();
|
let manager = Clutter.DeviceManager.get_default();
|
||||||
@ -532,102 +609,15 @@ var Keyboard = new Lang.Class({
|
|||||||
this._keyboardRestingId = 0;
|
this._keyboardRestingId = 0;
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed', this._relayout.bind(this));
|
Main.layoutManager.connect('monitors-changed', this._relayout.bind(this));
|
||||||
//Main.inputMethod.connect('cursor-location-changed', (o, rect) => {
|
|
||||||
// if (this._keyboardVisible) {
|
|
||||||
// let currentWindow = global.screen.get_display().focus_window;
|
|
||||||
// this.setCursorLocation(currentWindow, rect.get_x(), rect.get_y(),
|
|
||||||
// rect.get_width(), rect.get_height());
|
|
||||||
// }
|
|
||||||
//});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
get visible() {
|
get visible() {
|
||||||
return this._keyboardVisible;
|
return this._keyboardVisible;
|
||||||
},
|
},
|
||||||
|
|
||||||
_setCaretTrackerEnabled(enabled) {
|
_onFocusPositionChanged(focusTracker) {
|
||||||
if (this._caretTrackingEnabled == enabled)
|
let rect = focusTracker.getCurrentRect();
|
||||||
return;
|
this.setCursorLocation(focusTracker.currentWindow, rect.x, rect.y, rect.width, rect.height);
|
||||||
|
|
||||||
this._caretTrackingEnabled = enabled;
|
|
||||||
|
|
||||||
if (enabled) {
|
|
||||||
this._focusCaretTracker.registerFocusListener();
|
|
||||||
this._focusCaretTracker.registerCaretListener();
|
|
||||||
} else {
|
|
||||||
this._focusCaretTracker.deregisterFocusListener();
|
|
||||||
this._focusCaretTracker.deregisterCaretListener();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_updateCaretPosition(accessible) {
|
|
||||||
if (this._updateCaretPositionId)
|
|
||||||
GLib.source_remove(this._updateCaretPositionId);
|
|
||||||
if (!this._keyboardRequested)
|
|
||||||
return;
|
|
||||||
this._updateCaretPositionId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
|
|
||||||
this._updateCaretPositionId = 0;
|
|
||||||
|
|
||||||
let currentWindow = global.screen.get_display().focus_window;
|
|
||||||
if (!currentWindow) {
|
|
||||||
this.setCursorLocation(null);
|
|
||||||
return GLib.SOURCE_REMOVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
let windowRect = currentWindow.get_frame_rect();
|
|
||||||
let text = accessible.get_text_iface();
|
|
||||||
let component = accessible.get_component_iface();
|
|
||||||
|
|
||||||
try {
|
|
||||||
let caretOffset = text.get_caret_offset();
|
|
||||||
let caretRect = text.get_character_extents(caretOffset, Atspi.CoordType.WINDOW);
|
|
||||||
let focusRect = component.get_extents(Atspi.CoordType.WINDOW);
|
|
||||||
|
|
||||||
if (caretRect.width == 0 && caretRect.height == 0)
|
|
||||||
caretRect = focusRect;
|
|
||||||
|
|
||||||
this.setCursorLocation(currentWindow, caretRect.x, caretRect.y, caretRect.width, caretRect.height);
|
|
||||||
} catch (e) {
|
|
||||||
log('Error updating caret position for OSK: ' + e.message);
|
|
||||||
}
|
|
||||||
|
|
||||||
return GLib.SOURCE_REMOVE;
|
|
||||||
});
|
|
||||||
|
|
||||||
GLib.Source.set_name_by_id(this._updateCaretPositionId, '[gnome-shell] this._updateCaretPosition');
|
|
||||||
},
|
|
||||||
|
|
||||||
_focusIsTextEntry(accessible) {
|
|
||||||
try {
|
|
||||||
let role = accessible.get_role();
|
|
||||||
let stateSet = accessible.get_state_set();
|
|
||||||
return stateSet.contains(Atspi.StateType.EDITABLE) || role == Atspi.Role.TERMINAL;
|
|
||||||
} catch (e) {
|
|
||||||
log('Error determining accessible role: ' + e.message);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_onFocusChanged(caretTracker, event) {
|
|
||||||
let accessible = event.source;
|
|
||||||
if (!this._focusIsTextEntry(accessible))
|
|
||||||
return;
|
|
||||||
|
|
||||||
let focused = event.detail1 != 0;
|
|
||||||
if (focused) {
|
|
||||||
this._currentAccessible = accessible;
|
|
||||||
this._updateCaretPosition(accessible);
|
|
||||||
this.show(Main.layoutManager.focusIndex);
|
|
||||||
} else if (this._currentAccessible == accessible) {
|
|
||||||
this._currentAccessible = null;
|
|
||||||
this.hide();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_onCaretMoved(caretTracker, event) {
|
|
||||||
let accessible = event.source;
|
|
||||||
if (this._currentAccessible == accessible)
|
|
||||||
this._updateCaretPosition(accessible);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_lastDeviceIsTouchscreen() {
|
_lastDeviceIsTouchscreen() {
|
||||||
@ -650,8 +640,6 @@ var Keyboard = new Lang.Class({
|
|||||||
if (!this._enabled && !this._keyboardController)
|
if (!this._enabled && !this._keyboardController)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._setCaretTrackerEnabled(this._enabled);
|
|
||||||
|
|
||||||
if (this._enabled && !this._keyboardController)
|
if (this._enabled && !this._keyboardController)
|
||||||
this._setupKeyboard();
|
this._setupKeyboard();
|
||||||
else if (!this._enabled)
|
else if (!this._enabled)
|
||||||
@ -936,9 +924,11 @@ var Keyboard = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_relayout() {
|
_relayout() {
|
||||||
if (this.actor == null)
|
|
||||||
return;
|
|
||||||
let monitor = Main.layoutManager.keyboardMonitor;
|
let monitor = Main.layoutManager.keyboardMonitor;
|
||||||
|
|
||||||
|
if (this.actor == null || monitor == null)
|
||||||
|
return;
|
||||||
|
|
||||||
let maxHeight = monitor.height / 3;
|
let maxHeight = monitor.height / 3;
|
||||||
this.actor.width = monitor.width;
|
this.actor.width = monitor.width;
|
||||||
this.actor.height = maxHeight;
|
this.actor.height = maxHeight;
|
||||||
@ -1027,11 +1017,14 @@ var Keyboard = new Lang.Class({
|
|||||||
if (!this._keyboardRequested)
|
if (!this._keyboardRequested)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this._currentAccessible)
|
|
||||||
this._updateCaretPosition(this._currentAccessible);
|
|
||||||
Main.layoutManager.keyboardIndex = monitor;
|
Main.layoutManager.keyboardIndex = monitor;
|
||||||
this._relayout();
|
this._relayout();
|
||||||
Main.layoutManager.showKeyboard();
|
Main.layoutManager.showKeyboard();
|
||||||
|
|
||||||
|
if (this._delayedAnimFocusWindow) {
|
||||||
|
this._setAnimationWindow(this._delayedAnimFocusWindow);
|
||||||
|
this._delayedAnimFocusWindow = null;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
hide() {
|
hide() {
|
||||||
@ -1102,8 +1095,9 @@ var Keyboard = new Lang.Class({
|
|||||||
window.move_frame(true, frameRect.x, frameRect.y);
|
window.move_frame(true, frameRect.x, frameRect.y);
|
||||||
},
|
},
|
||||||
|
|
||||||
_animateWindow(window, show, deltaY) {
|
_animateWindow(window, show) {
|
||||||
let windowActor = window.get_compositor_private();
|
let windowActor = window.get_compositor_private();
|
||||||
|
let deltaY = Main.layoutManager.keyboardBox.height;
|
||||||
if (!windowActor)
|
if (!windowActor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1124,35 +1118,39 @@ var Keyboard = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setCursorLocation(window, x, y , w, h) {
|
_setAnimationWindow(window) {
|
||||||
if (window == this._oskFocusWindow)
|
if (this._animFocusedWindow == window)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this._oskFocusWindow) {
|
if (this._animFocusedWindow)
|
||||||
let display = global.screen.get_display();
|
this._animateWindow(this._animFocusedWindow, false);
|
||||||
|
if (window)
|
||||||
|
this._animateWindow(window, true);
|
||||||
|
|
||||||
if (display.get_grab_op() == Meta.GrabOp.NONE ||
|
this._animFocusedWindow = window;
|
||||||
display.get_focus_window() != this._oskFocusWindow)
|
},
|
||||||
this._animateWindow(this._oskFocusWindow, false, this._oskFocusWindowDelta);
|
|
||||||
|
|
||||||
this._oskFocusWindow = null;
|
setCursorLocation(window, x, y , w, h) {
|
||||||
this._oskFocusWindowDelta = null;
|
let monitor = Main.layoutManager.keyboardMonitor;
|
||||||
}
|
|
||||||
|
|
||||||
if (window) {
|
if (window && monitor) {
|
||||||
let monitor = Main.layoutManager.keyboardMonitor;
|
|
||||||
let keyboardHeight = Main.layoutManager.keyboardBox.height;
|
let keyboardHeight = Main.layoutManager.keyboardBox.height;
|
||||||
let frameRect = window.get_frame_rect();
|
let focusObscured = false;
|
||||||
let windowActor = window.get_compositor_private();
|
|
||||||
let delta = 0;
|
|
||||||
|
|
||||||
if (frameRect.y + y + h >= monitor.height - keyboardHeight)
|
if (y + h >= monitor.y + monitor.height - keyboardHeight) {
|
||||||
delta = keyboardHeight;
|
if (this._keyboardVisible)
|
||||||
|
this._setAnimationWindow(window);
|
||||||
this._animateWindow(window, true, delta);
|
else
|
||||||
this._oskFocusWindow = window;
|
this._delayedAnimFocusWindow = window;
|
||||||
this._oskFocusWindowDelta = delta;
|
} else if (y < keyboardHeight) {
|
||||||
|
this._delayedAnimFocusWindow = null;
|
||||||
|
this._setAnimationWindow(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this._setAnimationWindow(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._oskFocusWindow = window;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ var MonitorConstraint = new Lang.Class({
|
|||||||
|
|
||||||
if (!this._workareasChangedId) {
|
if (!this._workareasChangedId) {
|
||||||
this._workareasChangedId =
|
this._workareasChangedId =
|
||||||
global.screen.connect('workareas-changed', () => {
|
global.display.connect('workareas-changed', () => {
|
||||||
if (this._workArea)
|
if (this._workArea)
|
||||||
this.actor.queue_relayout();
|
this.actor.queue_relayout();
|
||||||
});
|
});
|
||||||
@ -120,7 +120,7 @@ var MonitorConstraint = new Lang.Class({
|
|||||||
this._monitorsChangedId = 0;
|
this._monitorsChangedId = 0;
|
||||||
|
|
||||||
if (this._workareasChangedId)
|
if (this._workareasChangedId)
|
||||||
global.screen.disconnect(this._workareasChangedId);
|
global.display.disconnect(this._workareasChangedId);
|
||||||
this._workareasChangedId = 0;
|
this._workareasChangedId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +142,8 @@ var MonitorConstraint = new Lang.Class({
|
|||||||
|
|
||||||
let rect;
|
let rect;
|
||||||
if (this._workArea) {
|
if (this._workArea) {
|
||||||
let ws = global.screen.get_workspace_by_index(0);
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let ws = workspaceManager.get_workspace_by_index(0);
|
||||||
rect = ws.get_work_area_for_monitor(index);
|
rect = ws.get_work_area_for_monitor(index);
|
||||||
} else {
|
} else {
|
||||||
rect = Main.layoutManager.monitors[index];
|
rect = Main.layoutManager.monitors[index];
|
||||||
@ -164,7 +165,7 @@ var Monitor = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
get inFullscreen() {
|
get inFullscreen() {
|
||||||
return global.screen.get_monitor_in_fullscreen(this.index);
|
return global.display.get_monitor_in_fullscreen(this.index);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -259,7 +260,7 @@ var LayoutManager = new Lang.Class({
|
|||||||
global.stage.remove_actor(global.top_window_group);
|
global.stage.remove_actor(global.top_window_group);
|
||||||
this.uiGroup.add_actor(global.top_window_group);
|
this.uiGroup.add_actor(global.top_window_group);
|
||||||
|
|
||||||
let feedbackGroup = Meta.get_feedback_group_for_screen(global.screen);
|
let feedbackGroup = Meta.get_feedback_group_for_display(global.display);
|
||||||
global.stage.remove_actor(feedbackGroup);
|
global.stage.remove_actor(feedbackGroup);
|
||||||
this.uiGroup.add_actor(feedbackGroup);
|
this.uiGroup.add_actor(feedbackGroup);
|
||||||
|
|
||||||
@ -269,14 +270,19 @@ var LayoutManager = new Lang.Class({
|
|||||||
this._bgManagers = [];
|
this._bgManagers = [];
|
||||||
|
|
||||||
// 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',
|
let workspaceManager = global.workspace_manager;
|
||||||
this._queueUpdateRegions.bind(this));
|
workspaceManager.connect('notify::n-workspaces',
|
||||||
global.screen.connect('restacked',
|
this._queueUpdateRegions.bind(this));
|
||||||
this._windowsRestacked.bind(this));
|
|
||||||
global.screen.connect('monitors-changed',
|
let display = global.display;
|
||||||
this._monitorsChanged.bind(this));
|
display.connect('restacked',
|
||||||
global.screen.connect('in-fullscreen-changed',
|
this._windowsRestacked.bind(this));
|
||||||
this._updateFullscreen.bind(this));
|
display.connect('in-fullscreen-changed',
|
||||||
|
this._updateFullscreen.bind(this));
|
||||||
|
|
||||||
|
let monitorManager = Meta.MonitorManager.get();
|
||||||
|
monitorManager.connect('monitors-changed',
|
||||||
|
this._monitorsChanged.bind(this));
|
||||||
this._monitorsChanged();
|
this._monitorsChanged();
|
||||||
|
|
||||||
// NVIDIA drivers don't preserve FBO contents across
|
// NVIDIA drivers don't preserve FBO contents across
|
||||||
@ -319,12 +325,12 @@ var LayoutManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateMonitors() {
|
_updateMonitors() {
|
||||||
let screen = global.screen;
|
let display = global.display;
|
||||||
|
|
||||||
this.monitors = [];
|
this.monitors = [];
|
||||||
let nMonitors = screen.get_n_monitors();
|
let nMonitors = display.get_n_monitors();
|
||||||
for (let i = 0; i < nMonitors; i++)
|
for (let i = 0; i < nMonitors; i++)
|
||||||
this.monitors.push(new Monitor(i, screen.get_monitor_geometry(i)));
|
this.monitors.push(new Monitor(i, display.get_monitor_geometry(i)));
|
||||||
|
|
||||||
if (nMonitors == 0) {
|
if (nMonitors == 0) {
|
||||||
this.primaryIndex = this.bottomIndex = -1;
|
this.primaryIndex = this.bottomIndex = -1;
|
||||||
@ -333,7 +339,7 @@ var LayoutManager = new Lang.Class({
|
|||||||
} else {
|
} else {
|
||||||
// If there are monitors below the primary, then we need
|
// If there are monitors below the primary, then we need
|
||||||
// to split primary from bottom.
|
// to split primary from bottom.
|
||||||
this.primaryIndex = this.bottomIndex = screen.get_primary_monitor();
|
this.primaryIndex = this.bottomIndex = display.get_primary_monitor();
|
||||||
for (let i = 0; i < this.monitors.length; i++) {
|
for (let i = 0; i < this.monitors.length; i++) {
|
||||||
let monitor = this.monitors[i];
|
let monitor = this.monitors[i];
|
||||||
if (this._isAboveOrBelowPrimary(monitor)) {
|
if (this._isAboveOrBelowPrimary(monitor)) {
|
||||||
@ -538,7 +544,7 @@ var LayoutManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
get currentMonitor() {
|
get currentMonitor() {
|
||||||
let index = global.screen.get_current_monitor();
|
let index = global.display.get_current_monitor();
|
||||||
return this.monitors[index];
|
return this.monitors[index];
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -557,6 +563,8 @@ var LayoutManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
get focusMonitor() {
|
get focusMonitor() {
|
||||||
|
if (this.focusIndex < 0)
|
||||||
|
return null;
|
||||||
return this.monitors[this.focusIndex];
|
return this.monitors[this.focusIndex];
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -909,7 +917,8 @@ var LayoutManager = new Lang.Class({
|
|||||||
getWorkAreaForMonitor(monitorIndex) {
|
getWorkAreaForMonitor(monitorIndex) {
|
||||||
// Assume that all workspaces will have the same
|
// Assume that all workspaces will have the same
|
||||||
// struts and pick the first one.
|
// struts and pick the first one.
|
||||||
let ws = global.screen.get_workspace_by_index(0);
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let ws = workspaceManager.get_workspace_by_index(0);
|
||||||
return ws.get_work_area_for_monitor(monitorIndex);
|
return ws.get_work_area_for_monitor(monitorIndex);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -919,7 +928,7 @@ var LayoutManager = new Lang.Class({
|
|||||||
let [x, y] = actor.get_transformed_position();
|
let [x, y] = actor.get_transformed_position();
|
||||||
let [w, h] = actor.get_transformed_size();
|
let [w, h] = actor.get_transformed_size();
|
||||||
let rect = new Meta.Rectangle({ x: x, y: y, width: w, height: h });
|
let rect = new Meta.Rectangle({ x: x, y: y, width: w, height: h });
|
||||||
return global.screen.get_monitor_index_for_rect(rect);
|
return global.display.get_monitor_index_for_rect(rect);
|
||||||
},
|
},
|
||||||
|
|
||||||
findMonitorForActor(actor) {
|
findMonitorForActor(actor) {
|
||||||
@ -1052,9 +1061,9 @@ var LayoutManager = new Lang.Class({
|
|||||||
global.set_stage_input_region(rects);
|
global.set_stage_input_region(rects);
|
||||||
this._isPopupWindowVisible = isPopupMenuVisible;
|
this._isPopupWindowVisible = isPopupMenuVisible;
|
||||||
|
|
||||||
let screen = global.screen;
|
let workspaceManager = global.workspace_manager;
|
||||||
for (let w = 0; w < screen.n_workspaces; w++) {
|
for (let w = 0; w < workspaceManager.n_workspaces; w++) {
|
||||||
let workspace = screen.get_workspace_by_index(w);
|
let workspace = workspaceManager.get_workspace_by_index(w);
|
||||||
workspace.set_builtin_struts(struts);
|
workspace.set_builtin_struts(struts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ const MagnifierDBus = imports.ui.magnifierDBus;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const PointerWatcher = imports.ui.pointerWatcher;
|
const PointerWatcher = imports.ui.pointerWatcher;
|
||||||
|
|
||||||
var MOUSE_POLL_FREQUENCY = 50;
|
|
||||||
var CROSSHAIRS_CLIP_SIZE = [100, 100];
|
var CROSSHAIRS_CLIP_SIZE = [100, 100];
|
||||||
var NO_CHANGE = 0.0;
|
var NO_CHANGE = 0.0;
|
||||||
|
|
||||||
@ -62,7 +61,7 @@ var Magnifier = new Lang.Class({
|
|||||||
this._zoomRegions = [];
|
this._zoomRegions = [];
|
||||||
|
|
||||||
// Create small clutter tree for the magnified mouse.
|
// Create small clutter tree for the magnified mouse.
|
||||||
let cursorTracker = Meta.CursorTracker.get_for_screen(global.screen);
|
let cursorTracker = Meta.CursorTracker.get_for_display(global.display);
|
||||||
this._mouseSprite = new Clutter.Texture();
|
this._mouseSprite = new Clutter.Texture();
|
||||||
Shell.util_cursor_tracker_to_clutter(cursorTracker, this._mouseSprite);
|
Shell.util_cursor_tracker_to_clutter(cursorTracker, this._mouseSprite);
|
||||||
this._cursorRoot = new Clutter.Actor();
|
this._cursorRoot = new Clutter.Actor();
|
||||||
@ -117,10 +116,10 @@ var Magnifier = new Lang.Class({
|
|||||||
|
|
||||||
if (isActive != activate) {
|
if (isActive != activate) {
|
||||||
if (activate) {
|
if (activate) {
|
||||||
Meta.disable_unredirect_for_screen(global.screen);
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
this.startTrackingMouse();
|
this.startTrackingMouse();
|
||||||
} else {
|
} else {
|
||||||
Meta.enable_unredirect_for_screen(global.screen);
|
Meta.enable_unredirect_for_display(global.display);
|
||||||
this.stopTrackingMouse();
|
this.stopTrackingMouse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -152,8 +151,10 @@ var Magnifier = new Lang.Class({
|
|||||||
* Turn on mouse tracking, if not already doing so.
|
* Turn on mouse tracking, if not already doing so.
|
||||||
*/
|
*/
|
||||||
startTrackingMouse() {
|
startTrackingMouse() {
|
||||||
if (!this._pointerWatch)
|
if (!this._pointerWatch) {
|
||||||
this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(MOUSE_POLL_FREQUENCY, this.scrollToMousePos.bind(this));
|
let interval = 1000 / Clutter.get_default_frame_rate();
|
||||||
|
this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(interval, this.scrollToMousePos.bind(this));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -256,6 +256,14 @@ function _getStylesheet(name) {
|
|||||||
if (stylesheet.query_exists(null))
|
if (stylesheet.query_exists(null))
|
||||||
return stylesheet;
|
return stylesheet;
|
||||||
|
|
||||||
|
let dataDirs = GLib.get_system_data_dirs();
|
||||||
|
for (let i = 0; i < dataDirs.length; i++) {
|
||||||
|
let path = GLib.build_filenamev([dataDirs[i], 'gnome-shell', 'theme', name]);
|
||||||
|
let stylesheet = Gio.file_new_for_path(path);
|
||||||
|
if (stylesheet.query_exists(null))
|
||||||
|
return stylesheet;
|
||||||
|
}
|
||||||
|
|
||||||
stylesheet = Gio.File.new_for_path(global.datadir + '/theme/' + name);
|
stylesheet = Gio.File.new_for_path(global.datadir + '/theme/' + name);
|
||||||
if (stylesheet.query_exists(null))
|
if (stylesheet.query_exists(null))
|
||||||
return stylesheet;
|
return stylesheet;
|
||||||
@ -421,7 +429,7 @@ function pushModal(actor, params) {
|
|||||||
log('pushModal: invocation of begin_modal failed');
|
log('pushModal: invocation of begin_modal failed');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Meta.disable_unredirect_for_screen(global.screen);
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
}
|
}
|
||||||
|
|
||||||
modalCount += 1;
|
modalCount += 1;
|
||||||
@ -520,7 +528,7 @@ function popModal(actor, timestamp) {
|
|||||||
|
|
||||||
layoutManager.modalEnded();
|
layoutManager.modalEnded();
|
||||||
global.end_modal(timestamp);
|
global.end_modal(timestamp);
|
||||||
Meta.enable_unredirect_for_screen(global.screen);
|
Meta.enable_unredirect_for_display(global.display);
|
||||||
actionMode = Shell.ActionMode.NORMAL;
|
actionMode = Shell.ActionMode.NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -548,14 +556,15 @@ function openRunDialog() {
|
|||||||
* and switching out of the overview if it's currently active
|
* and switching out of the overview if it's currently active
|
||||||
*/
|
*/
|
||||||
function activateWindow(window, time, workspaceNum) {
|
function activateWindow(window, time, workspaceNum) {
|
||||||
let activeWorkspaceNum = global.screen.get_active_workspace_index();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWorkspaceNum = workspaceManager.get_active_workspace_index();
|
||||||
let windowWorkspaceNum = (workspaceNum !== undefined) ? workspaceNum : window.get_workspace().index();
|
let windowWorkspaceNum = (workspaceNum !== undefined) ? workspaceNum : window.get_workspace().index();
|
||||||
|
|
||||||
if (!time)
|
if (!time)
|
||||||
time = global.get_current_time();
|
time = global.get_current_time();
|
||||||
|
|
||||||
if (windowWorkspaceNum != activeWorkspaceNum) {
|
if (windowWorkspaceNum != activeWorkspaceNum) {
|
||||||
let workspace = global.screen.get_workspace_by_index(windowWorkspaceNum);
|
let workspace = workspaceManager.get_workspace_by_index(windowWorkspaceNum);
|
||||||
workspace.activate_with_focus(window, time);
|
workspace.activate_with_focus(window, time);
|
||||||
} else {
|
} else {
|
||||||
window.activate(time);
|
window.activate(time);
|
||||||
|
@ -27,6 +27,7 @@ function _fixMarkup(text, allowMarkup) {
|
|||||||
|
|
||||||
// Support <b>, <i>, and <u>, escape anything else
|
// Support <b>, <i>, and <u>, escape anything else
|
||||||
// so it displays as raw markup.
|
// so it displays as raw markup.
|
||||||
|
// Ref: https://developer.gnome.org/notification-spec/#markup
|
||||||
_text = _text.replace(/<(?!\/?[biu]>)/g, '<');
|
_text = _text.replace(/<(?!\/?[biu]>)/g, '<');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -95,10 +96,10 @@ var URLHighlighter = new Lang.Class({
|
|||||||
|
|
||||||
let urlId = this._findUrlAtPos(event);
|
let urlId = this._findUrlAtPos(event);
|
||||||
if (urlId != -1 && !this._cursorChanged) {
|
if (urlId != -1 && !this._cursorChanged) {
|
||||||
global.screen.set_cursor(Meta.Cursor.POINTING_HAND);
|
global.display.set_cursor(Meta.Cursor.POINTING_HAND);
|
||||||
this._cursorChanged = true;
|
this._cursorChanged = true;
|
||||||
} else if (urlId == -1) {
|
} else if (urlId == -1) {
|
||||||
global.screen.set_cursor(Meta.Cursor.DEFAULT);
|
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
||||||
this._cursorChanged = false;
|
this._cursorChanged = false;
|
||||||
}
|
}
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
@ -109,7 +110,7 @@ var URLHighlighter = new Lang.Class({
|
|||||||
|
|
||||||
if (this._cursorChanged) {
|
if (this._cursorChanged) {
|
||||||
this._cursorChanged = false;
|
this._cursorChanged = false;
|
||||||
global.screen.set_cursor(Meta.Cursor.DEFAULT);
|
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
||||||
}
|
}
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
});
|
});
|
||||||
|
@ -315,10 +315,10 @@ var NotificationApplicationPolicy = new Lang.Class({
|
|||||||
// You can add a secondary icon to the banner with 'secondaryGIcon'. There
|
// You can add a secondary icon to the banner with 'secondaryGIcon'. There
|
||||||
// is no fallback for this icon.
|
// is no fallback for this icon.
|
||||||
//
|
//
|
||||||
// If @params contains 'bannerMarkup', with the value %true, then
|
// If @params contains 'bannerMarkup', with the value %true, a subset (<b>,
|
||||||
// the corresponding element is assumed to use pango markup. If the
|
// <i> and <u>) of the markup in [1] will be interpreted within @banner. If
|
||||||
// parameter is not present for an element, then anything that looks
|
// the parameter is not present, then anything that looks like markup
|
||||||
// like markup in that element will appear literally in the output.
|
// in @banner will appear literally in the output.
|
||||||
//
|
//
|
||||||
// If @params contains a 'clear' parameter with the value %true, then
|
// If @params contains a 'clear' parameter with the value %true, then
|
||||||
// the content and the action area of the notification will be cleared.
|
// the content and the action area of the notification will be cleared.
|
||||||
@ -328,6 +328,8 @@ var NotificationApplicationPolicy = new Lang.Class({
|
|||||||
// If @params contains 'soundName' or 'soundFile', the corresponding
|
// If @params contains 'soundName' or 'soundFile', the corresponding
|
||||||
// event sound is played when the notification is shown (if the policy for
|
// event sound is played when the notification is shown (if the policy for
|
||||||
// @source allows playing sounds).
|
// @source allows playing sounds).
|
||||||
|
//
|
||||||
|
// [1] https://developer.gnome.org/notification-spec/#markup
|
||||||
var Notification = new Lang.Class({
|
var Notification = new Lang.Class({
|
||||||
Name: 'Notification',
|
Name: 'Notification',
|
||||||
|
|
||||||
@ -915,7 +917,7 @@ 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', this._updateState.bind(this));
|
global.display.connect('in-fullscreen-changed', this._updateState.bind(this));
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
|
|
||||||
|
@ -100,21 +100,8 @@ var ModalDialog = new Lang.Class({
|
|||||||
setButtons(buttons) {
|
setButtons(buttons) {
|
||||||
this.clearButtons();
|
this.clearButtons();
|
||||||
|
|
||||||
for (let i = 0; i < buttons.length; i++) {
|
for (let buttonInfo of buttons)
|
||||||
let buttonInfo = buttons[i];
|
|
||||||
|
|
||||||
let x_alignment;
|
|
||||||
if (buttons.length == 1)
|
|
||||||
x_alignment = St.Align.END;
|
|
||||||
else if (i == 0)
|
|
||||||
x_alignment = St.Align.START;
|
|
||||||
else if (i == buttons.length - 1)
|
|
||||||
x_alignment = St.Align.END;
|
|
||||||
else
|
|
||||||
x_alignment = St.Align.MIDDLE;
|
|
||||||
|
|
||||||
this.addButton(buttonInfo);
|
this.addButton(buttonInfo);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
addButton(buttonInfo) {
|
addButton(buttonInfo) {
|
||||||
@ -129,7 +116,7 @@ var ModalDialog = new Lang.Class({
|
|||||||
if (onPrimary)
|
if (onPrimary)
|
||||||
this._monitorConstraint.primary = true;
|
this._monitorConstraint.primary = true;
|
||||||
else
|
else
|
||||||
this._monitorConstraint.index = global.screen.get_current_monitor();
|
this._monitorConstraint.index = global.display.get_current_monitor();
|
||||||
|
|
||||||
this.state = State.OPENING;
|
this.state = State.OPENING;
|
||||||
|
|
||||||
|
@ -831,8 +831,10 @@ var GtkNotificationDaemon = new Lang.Class({
|
|||||||
let source;
|
let source;
|
||||||
try {
|
try {
|
||||||
source = this._ensureAppSource(appId);
|
source = this._ensureAppSource(appId);
|
||||||
} catch(e if e instanceof InvalidAppError) {
|
} catch(e) {
|
||||||
return;
|
if (e instanceof InvalidAppError)
|
||||||
|
return;
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
notifications.forEach(([notificationId, notification]) => {
|
notifications.forEach(([notificationId, notification]) => {
|
||||||
@ -863,9 +865,12 @@ var GtkNotificationDaemon = new Lang.Class({
|
|||||||
let source;
|
let source;
|
||||||
try {
|
try {
|
||||||
source = this._ensureAppSource(appId);
|
source = this._ensureAppSource(appId);
|
||||||
} catch(e if e instanceof InvalidAppError) {
|
} catch(e) {
|
||||||
invocation.return_dbus_error('org.gtk.Notifications.InvalidApp', 'The app by ID "%s" could not be found'.format(appId));
|
if (e instanceof InvalidAppError) {
|
||||||
return;
|
invocation.return_dbus_error('org.gtk.Notifications.InvalidApp', 'The app by ID "%s" could not be found'.format(appId));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
let timestamp = GLib.DateTime.new_now_local().to_unix();
|
let timestamp = GLib.DateTime.new_now_local().to_unix();
|
||||||
|
@ -32,7 +32,7 @@ var OsdMonitorLabel = new Lang.Class({
|
|||||||
Main.uiGroup.set_child_above_sibling(this._actor, null);
|
Main.uiGroup.set_child_above_sibling(this._actor, null);
|
||||||
this._position();
|
this._position();
|
||||||
|
|
||||||
Meta.disable_unredirect_for_screen(global.screen);
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
},
|
},
|
||||||
|
|
||||||
_position() {
|
_position() {
|
||||||
@ -48,7 +48,7 @@ var OsdMonitorLabel = new Lang.Class({
|
|||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
this._actor.destroy();
|
this._actor.destroy();
|
||||||
Meta.enable_unredirect_for_screen(global.screen);
|
Meta.enable_unredirect_for_display(global.display);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ var OsdWindow = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!this.actor.visible) {
|
if (!this.actor.visible) {
|
||||||
Meta.disable_unredirect_for_screen(global.screen);
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
this.actor.show();
|
this.actor.show();
|
||||||
this.actor.opacity = 0;
|
this.actor.opacity = 0;
|
||||||
this.actor.get_parent().set_child_above_sibling(this.actor, null);
|
this.actor.get_parent().set_child_above_sibling(this.actor, null);
|
||||||
@ -179,7 +179,7 @@ var OsdWindow = new Lang.Class({
|
|||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
this._reset();
|
this._reset();
|
||||||
Meta.enable_unredirect_for_screen(global.screen);
|
Meta.enable_unredirect_for_display(global.display);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
@ -204,7 +204,7 @@ var OsdWindow = 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._icon.icon_size = popupSize / (2 * scaleFactor);
|
this._icon.icon_size = popupSize / (2 * scaleFactor);
|
||||||
this._box.translation_y = monitor.height / 4;
|
this._box.translation_y = Math.round(monitor.height / 4);
|
||||||
this._boxConstraint.minSize = popupSize;
|
this._boxConstraint.minSize = popupSize;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -157,7 +157,7 @@ var Overview = new Lang.Class({
|
|||||||
Main.xdndHandler.connect('drag-begin', this._onDragBegin.bind(this));
|
Main.xdndHandler.connect('drag-begin', this._onDragBegin.bind(this));
|
||||||
Main.xdndHandler.connect('drag-end', this._onDragEnd.bind(this));
|
Main.xdndHandler.connect('drag-end', this._onDragEnd.bind(this));
|
||||||
|
|
||||||
global.screen.connect('restacked', this._onRestacked.bind(this));
|
global.display.connect('restacked', this._onRestacked.bind(this));
|
||||||
|
|
||||||
this._windowSwitchTimeoutId = 0;
|
this._windowSwitchTimeoutId = 0;
|
||||||
this._windowSwitchTimestamp = 0;
|
this._windowSwitchTimestamp = 0;
|
||||||
@ -286,7 +286,8 @@ var Overview = new Lang.Class({
|
|||||||
|
|
||||||
DND.addDragMonitor(this._dragMonitor);
|
DND.addDragMonitor(this._dragMonitor);
|
||||||
// Remember the workspace we started from
|
// Remember the workspace we started from
|
||||||
this._lastActiveWorkspaceIndex = global.screen.get_active_workspace_index();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
this._lastActiveWorkspaceIndex = workspaceManager.get_active_workspace_index();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDragEnd(time) {
|
_onDragEnd(time) {
|
||||||
@ -296,7 +297,8 @@ var Overview = new Lang.Class({
|
|||||||
// we have to go back to where we started and hide
|
// we have to go back to where we started and hide
|
||||||
// the overview
|
// the overview
|
||||||
if (this._shown) {
|
if (this._shown) {
|
||||||
global.screen.get_workspace_by_index(this._lastActiveWorkspaceIndex).activate(time);
|
let workspaceManager = global.workspace_manager;
|
||||||
|
workspaceManager.get_workspace_by_index(this._lastActiveWorkspaceIndex).activate(time);
|
||||||
this.hide();
|
this.hide();
|
||||||
}
|
}
|
||||||
this._resetWindowSwitchTimeout();
|
this._resetWindowSwitchTimeout();
|
||||||
@ -317,9 +319,9 @@ var Overview = new Lang.Class({
|
|||||||
let display = Gdk.Display.get_default();
|
let display = Gdk.Display.get_default();
|
||||||
let deviceManager = display.get_device_manager();
|
let deviceManager = display.get_device_manager();
|
||||||
let pointer = deviceManager.get_client_pointer();
|
let pointer = deviceManager.get_client_pointer();
|
||||||
let [screen, pointerX, pointerY] = pointer.get_position();
|
let [gdkScreen, pointerX, pointerY] = pointer.get_position();
|
||||||
|
|
||||||
pointer.warp(screen, pointerX, pointerY);
|
pointer.warp(gdkScreen, pointerX, pointerY);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDragMotion(dragEvent) {
|
_onDragMotion(dragEvent) {
|
||||||
@ -488,7 +490,8 @@ var Overview = new Lang.Class({
|
|||||||
return false;
|
return false;
|
||||||
if (this._inItemDrag || this._inWindowDrag)
|
if (this._inItemDrag || this._inWindowDrag)
|
||||||
return false;
|
return false;
|
||||||
if (this._activationTime == 0 || Date.now() / 1000 - this._activationTime > OVERVIEW_ACTIVATION_TIMEOUT)
|
if (this._activationTime == 0 ||
|
||||||
|
GLib.get_monotonic_time() / GLib.USEC_PER_SEC - this._activationTime > OVERVIEW_ACTIVATION_TIMEOUT)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
@ -547,9 +550,9 @@ var Overview = new Lang.Class({
|
|||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.animationInProgress = true;
|
this.animationInProgress = true;
|
||||||
this.visibleTarget = true;
|
this.visibleTarget = true;
|
||||||
this._activationTime = Date.now() / 1000;
|
this._activationTime = GLib.get_monotonic_time() / GLib.USEC_PER_SEC;
|
||||||
|
|
||||||
Meta.disable_unredirect_for_screen(global.screen);
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
this.viewSelector.show();
|
this.viewSelector.show();
|
||||||
|
|
||||||
this._overview.opacity = 0;
|
this._overview.opacity = 0;
|
||||||
@ -634,7 +637,7 @@ var Overview = new Lang.Class({
|
|||||||
|
|
||||||
_hideDone() {
|
_hideDone() {
|
||||||
// Re-enable unredirection
|
// Re-enable unredirection
|
||||||
Meta.enable_unredirect_for_screen(global.screen);
|
Meta.enable_unredirect_for_display(global.display);
|
||||||
|
|
||||||
this.viewSelector.hide();
|
this.viewSelector.hide();
|
||||||
this._desktopFade.hide();
|
this._desktopFade.hide();
|
||||||
|
@ -265,7 +265,8 @@ var AppMenuButton = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_findTargetApp() {
|
_findTargetApp() {
|
||||||
let workspace = global.screen.get_active_workspace();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let workspace = workspaceManager.get_active_workspace();
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
let focusedApp = tracker.focus_app;
|
let focusedApp = tracker.focus_app;
|
||||||
if (focusedApp && focusedApp.is_on_workspace(workspace))
|
if (focusedApp && focusedApp.is_on_workspace(workspace))
|
||||||
@ -796,6 +797,7 @@ var Panel = new Lang.Class({
|
|||||||
this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||||
this.actor.connect('allocate', this._allocate.bind(this));
|
this.actor.connect('allocate', this._allocate.bind(this));
|
||||||
this.actor.connect('button-press-event', this._onButtonPress.bind(this));
|
this.actor.connect('button-press-event', this._onButtonPress.bind(this));
|
||||||
|
this.actor.connect('touch-event', this._onButtonPress.bind(this));
|
||||||
this.actor.connect('key-press-event', this._onKeyPress.bind(this));
|
this.actor.connect('key-press-event', this._onKeyPress.bind(this));
|
||||||
|
|
||||||
Main.overview.connect('showing', () => {
|
Main.overview.connect('showing', () => {
|
||||||
@ -818,7 +820,7 @@ var Panel = new Lang.Class({
|
|||||||
global.window_group.connect('actor-removed', this._onWindowActorRemoved.bind(this));
|
global.window_group.connect('actor-removed', this._onWindowActorRemoved.bind(this));
|
||||||
global.window_manager.connect('switch-workspace', this._updateSolidStyle.bind(this));
|
global.window_manager.connect('switch-workspace', this._updateSolidStyle.bind(this));
|
||||||
|
|
||||||
global.screen.connect('workareas-changed', () => { this.actor.queue_relayout(); });
|
global.display.connect('workareas-changed', () => { this.actor.queue_relayout(); });
|
||||||
this._updatePanel();
|
this._updatePanel();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -939,8 +941,13 @@ var Panel = new Lang.Class({
|
|||||||
if (event.get_source() != actor)
|
if (event.get_source() != actor)
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
let button = event.get_button();
|
let type = event.type();
|
||||||
if (button != 1)
|
let isPress = type == Clutter.EventType.BUTTON_PRESS;
|
||||||
|
if (!isPress && type != Clutter.EventType.TOUCH_BEGIN)
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
|
let button = isPress ? event.get_button() : -1;
|
||||||
|
if (isPress && button != 1)
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
let focusWindow = global.display.focus_window;
|
let focusWindow = global.display.focus_window;
|
||||||
@ -961,8 +968,7 @@ var Panel = new Lang.Class({
|
|||||||
if (!allowDrag)
|
if (!allowDrag)
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
global.display.begin_grab_op(global.screen,
|
global.display.begin_grab_op(dragWindow,
|
||||||
dragWindow,
|
|
||||||
Meta.GrabOp.MOVING,
|
Meta.GrabOp.MOVING,
|
||||||
false, /* pointer grab */
|
false, /* pointer grab */
|
||||||
true, /* frame action */
|
true, /* frame action */
|
||||||
@ -977,7 +983,7 @@ var Panel = new Lang.Class({
|
|||||||
_onKeyPress(actor, event) {
|
_onKeyPress(actor, event) {
|
||||||
let symbol = event.get_key_symbol();
|
let symbol = event.get_key_symbol();
|
||||||
if (symbol == Clutter.KEY_Escape) {
|
if (symbol == Clutter.KEY_Escape) {
|
||||||
global.screen.focus_default_window(event.get_time());
|
global.display.focus_default_window(event.get_time());
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1075,7 +1081,8 @@ var Panel = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Get all the windows in the active workspace that are in the primary monitor and visible */
|
/* Get all the windows in the active workspace that are in the primary monitor and visible */
|
||||||
let activeWorkspace = global.screen.get_active_workspace();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
let windows = activeWorkspace.list_windows().filter(metaWindow => {
|
let windows = activeWorkspace.list_windows().filter(metaWindow => {
|
||||||
return metaWindow.is_on_primary_monitor() &&
|
return metaWindow.is_on_primary_monitor() &&
|
||||||
metaWindow.showing_on_its_workspace() &&
|
metaWindow.showing_on_its_workspace() &&
|
||||||
|
@ -141,8 +141,17 @@ var PopupBaseMenuItem = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onKeyPressEvent(actor, event) {
|
_onKeyPressEvent(actor, event) {
|
||||||
let symbol = event.get_key_symbol();
|
let state = event.get_state();
|
||||||
|
|
||||||
|
// if user has a modifier down (except capslock)
|
||||||
|
// then don't handle the key press here
|
||||||
|
state &= ~Clutter.ModifierType.LOCK_MASK;
|
||||||
|
state &= Clutter.ModifierType.MODIFIER_MASK;
|
||||||
|
|
||||||
|
if (state)
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
|
let symbol = event.get_key_symbol();
|
||||||
if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) {
|
if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) {
|
||||||
this.activate(event);
|
this.activate(event);
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
@ -394,8 +403,9 @@ var PopupImageMenuItem = new Lang.Class({
|
|||||||
_init(text, icon, params) {
|
_init(text, icon, params) {
|
||||||
this.parent(params);
|
this.parent(params);
|
||||||
|
|
||||||
this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
|
this._icon = new St.Icon({ style_class: 'popup-menu-icon',
|
||||||
this.actor.add_child(this._icon, { align: St.Align.END });
|
x_align: Clutter.ActorAlign.END });
|
||||||
|
this.actor.add_child(this._icon);
|
||||||
this.label = new St.Label({ text: text });
|
this.label = new St.Label({ text: text });
|
||||||
this.actor.add_child(this.label);
|
this.actor.add_child(this.label);
|
||||||
this.actor.label_actor = this.label;
|
this.actor.label_actor = this.label;
|
||||||
|
@ -119,6 +119,9 @@ var RemoteMenuItemMapper = new Lang.Class({
|
|||||||
this._trackerItem = trackerItem;
|
this._trackerItem = trackerItem;
|
||||||
|
|
||||||
this.menuItem = new PopupMenu.PopupBaseMenuItem();
|
this.menuItem = new PopupMenu.PopupBaseMenuItem();
|
||||||
|
this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
|
||||||
|
this.menuItem.actor.add_child(this._icon);
|
||||||
|
|
||||||
this._label = new St.Label();
|
this._label = new St.Label();
|
||||||
this.menuItem.actor.add_child(this._label);
|
this.menuItem.actor.add_child(this._label);
|
||||||
this.menuItem.actor.label_actor = this._label;
|
this.menuItem.actor.label_actor = this._label;
|
||||||
@ -129,11 +132,13 @@ 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::icon', this._updateIcon.bind(this));
|
||||||
this._trackerItem.connect('notify::label', this._updateLabel.bind(this));
|
this._trackerItem.connect('notify::label', this._updateLabel.bind(this));
|
||||||
this._trackerItem.connect('notify::sensitive', this._updateSensitivity.bind(this));
|
this._trackerItem.connect('notify::sensitive', this._updateSensitivity.bind(this));
|
||||||
this._trackerItem.connect('notify::role', this._updateRole.bind(this));
|
this._trackerItem.connect('notify::role', this._updateRole.bind(this));
|
||||||
this._trackerItem.connect('notify::toggled', this._updateDecoration.bind(this));
|
this._trackerItem.connect('notify::toggled', this._updateDecoration.bind(this));
|
||||||
|
|
||||||
|
this._updateIcon();
|
||||||
this._updateLabel();
|
this._updateLabel();
|
||||||
this._updateSensitivity();
|
this._updateSensitivity();
|
||||||
this._updateRole();
|
this._updateRole();
|
||||||
@ -143,6 +148,11 @@ var RemoteMenuItemMapper = new Lang.Class({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_updateIcon() {
|
||||||
|
this._icon.gicon = this._trackerItem.icon;
|
||||||
|
this._icon.visible = (this._icon.gicon != null);
|
||||||
|
},
|
||||||
|
|
||||||
_updateLabel() {
|
_updateLabel() {
|
||||||
this._label.text = stripMnemonics(this._trackerItem.label);
|
this._label.text = stripMnemonics(this._trackerItem.label);
|
||||||
},
|
},
|
||||||
|
@ -295,7 +295,7 @@ var RemoteSearchProvider = new Lang.Class({
|
|||||||
name: metas[i]['name'],
|
name: metas[i]['name'],
|
||||||
description: metas[i]['description'],
|
description: metas[i]['description'],
|
||||||
createIcon: size => {
|
createIcon: size => {
|
||||||
this.createIcon(size, metas[i]);
|
return this.createIcon(size, metas[i]);
|
||||||
},
|
},
|
||||||
clipboardText: metas[i]['clipboardText'] });
|
clipboardText: metas[i]['clipboardText'] });
|
||||||
}
|
}
|
||||||
|
@ -172,9 +172,10 @@ var RunDialog = new Lang.Class({
|
|||||||
if (name.slice(0, text.length) == text)
|
if (name.slice(0, text.length) == text)
|
||||||
results.push(name);
|
results.push(name);
|
||||||
}
|
}
|
||||||
} catch (e if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
|
} catch (e) {
|
||||||
!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_DIRECTORY))) {
|
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
|
||||||
log(e);
|
!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_DIRECTORY))
|
||||||
|
log(e);
|
||||||
} finally {
|
} finally {
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
@ -570,7 +570,7 @@ var ScreenShield = new Lang.Class({
|
|||||||
this._shortLightbox.connect('shown', this._onShortLightboxShown.bind(this));
|
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_display(global.display);
|
||||||
|
|
||||||
this._syncInhibitor();
|
this._syncInhibitor();
|
||||||
},
|
},
|
||||||
|
@ -56,7 +56,7 @@ var ScreencastService = new Lang.Class({
|
|||||||
let recorder = this._recorders.get(sender);
|
let recorder = this._recorders.get(sender);
|
||||||
if (!recorder) {
|
if (!recorder) {
|
||||||
recorder = new Shell.Recorder({ stage: global.stage,
|
recorder = new Shell.Recorder({ stage: global.stage,
|
||||||
screen: global.screen });
|
display: global.display });
|
||||||
recorder._watchNameId =
|
recorder._watchNameId =
|
||||||
Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
|
Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
|
||||||
this._onNameVanished.bind(this));
|
this._onNameVanished.bind(this));
|
||||||
|
@ -261,7 +261,7 @@ var SelectArea = new Lang.Class({
|
|||||||
onUngrab: this._onUngrab.bind(this) }))
|
onUngrab: this._onUngrab.bind(this) }))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
global.screen.set_cursor(Meta.Cursor.CROSSHAIR);
|
global.display.set_cursor(Meta.Cursor.CROSSHAIR);
|
||||||
Main.uiGroup.set_child_above_sibling(this._group, null);
|
Main.uiGroup.set_child_above_sibling(this._group, null);
|
||||||
this._group.visible = true;
|
this._group.visible = true;
|
||||||
},
|
},
|
||||||
@ -330,7 +330,7 @@ var SelectArea = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onUngrab() {
|
_onUngrab() {
|
||||||
global.screen.set_cursor(Meta.Cursor.DEFAULT);
|
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
||||||
this.emit('finished', this._result);
|
this.emit('finished', this._result);
|
||||||
|
|
||||||
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
|
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
|
||||||
|
@ -133,7 +133,7 @@ function _callRemote(obj, method, ...args) {
|
|||||||
* because of the normal X asynchronous mapping process, to actually wait
|
* because of the normal X asynchronous mapping process, to actually wait
|
||||||
* until the window has been mapped and exposed, use waitTestWindows().
|
* until the window has been mapped and exposed, use waitTestWindows().
|
||||||
*/
|
*/
|
||||||
function createTestWindow(width, height, params) {
|
function createTestWindow(params) {
|
||||||
params = Params.parse(params, { width: 640,
|
params = Params.parse(params, { width: 640,
|
||||||
height: 480,
|
height: 480,
|
||||||
alpha: false,
|
alpha: false,
|
||||||
@ -216,12 +216,14 @@ function _step(g, finish, onError) {
|
|||||||
if (onError)
|
if (onError)
|
||||||
onError(err);
|
onError(err);
|
||||||
});
|
});
|
||||||
} catch (err if err instanceof StopIteration) {
|
|
||||||
if (finish)
|
|
||||||
finish();
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (onError)
|
if (err instanceof StopIteration) {
|
||||||
onError(err);
|
if (finish)
|
||||||
|
finish();
|
||||||
|
} else {
|
||||||
|
if (onError)
|
||||||
|
onError(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,11 +55,11 @@ var EntryMenu = new Lang.Class({
|
|||||||
|
|
||||||
if (v) {
|
if (v) {
|
||||||
this._makePasswordItem();
|
this._makePasswordItem();
|
||||||
this._entry.input_purpose = Gtk.InputPurpose.PASSWORD;
|
this._entry.input_purpose = Clutter.InputContentPurpose.PASSWORD;
|
||||||
} else {
|
} else {
|
||||||
this._passwordItem.destroy();
|
this._passwordItem.destroy();
|
||||||
this._passwordItem = null;
|
this._passwordItem = null;
|
||||||
this._entry.input_purpose = Gtk.InputPurpose.FREE_FORM;
|
this._entry.input_purpose = Clutter.InputContentPurpose.NORMAL;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ var InputSourceManager = new Lang.Class({
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
_switchInputSource(display, screen, window, binding) {
|
_switchInputSource(display, window, binding) {
|
||||||
if (this._mruSources.length < 2)
|
if (this._mruSources.length < 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -995,8 +995,16 @@ var NMWirelessDialog = new Lang.Class({
|
|||||||
else if (!oneHasConnection && twoHasConnection)
|
else if (!oneHasConnection && twoHasConnection)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
let oneStrength = one.accessPoints[0].strength;
|
let oneAp = one.accessPoints[0] || null;
|
||||||
let twoStrength = two.accessPoints[0].strength;
|
let twoAp = two.accessPoints[0] || null;
|
||||||
|
|
||||||
|
if (oneAp != null && twoAp == null)
|
||||||
|
return -1;
|
||||||
|
else if (oneAp == null && twoAp != null)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
let oneStrength = oneAp.strength;
|
||||||
|
let twoStrength = twoAp.strength;
|
||||||
|
|
||||||
// place stronger connections first
|
// place stronger connections first
|
||||||
if (oneStrength != twoStrength)
|
if (oneStrength != twoStrength)
|
||||||
@ -1156,6 +1164,11 @@ var NMWirelessDialog = new Lang.Class({
|
|||||||
Util.ensureActorVisibleInScrollView(this._scrollView, network.item.actor);
|
Util.ensureActorVisibleInScrollView(this._scrollView, network.item.actor);
|
||||||
this._selectNetwork(network);
|
this._selectNetwork(network);
|
||||||
});
|
});
|
||||||
|
network.item.actor.connect('destroy', () => {
|
||||||
|
let keyFocus = global.stage.key_focus;
|
||||||
|
if (keyFocus && keyFocus.contains(network.item.actor))
|
||||||
|
this._itemBox.grab_key_focus();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1944,6 +1957,7 @@ var NMApplet = new Lang.Class({
|
|||||||
this.indicators.visible = this._client.nm_running;
|
this.indicators.visible = this._client.nm_running;
|
||||||
this.menu.actor.visible = this._client.networking_enabled;
|
this.menu.actor.visible = this._client.networking_enabled;
|
||||||
|
|
||||||
|
this._updateIcon();
|
||||||
this._syncConnectivity();
|
this._syncConnectivity();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -49,19 +49,17 @@ const BoltDeviceInterface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
const BoltClientProxy = Gio.DBusProxy.makeProxyWrapper(BoltClientInterface);
|
|
||||||
const BoltDeviceProxy = Gio.DBusProxy.makeProxyWrapper(BoltDeviceInterface);
|
const BoltDeviceProxy = Gio.DBusProxy.makeProxyWrapper(BoltDeviceInterface);
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
var Status = {
|
var Status = {
|
||||||
DISCONNECTED: 'disconnected',
|
DISCONNECTED: 'disconnected',
|
||||||
|
CONNECTING: 'connecting',
|
||||||
CONNECTED: 'connected',
|
CONNECTED: 'connected',
|
||||||
AUTHORIZING: 'authorizing',
|
AUTHORIZING: 'authorizing',
|
||||||
AUTH_ERROR: 'auth-error',
|
AUTH_ERROR: 'auth-error',
|
||||||
AUTHORIZED: 'authorized',
|
AUTHORIZED: 'authorized'
|
||||||
AUTHORIZED_SECURE: 'authorized-secure',
|
|
||||||
AUTHORIZED_NEWKEY: 'authorized-newkey'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var Policy = {
|
var Policy = {
|
||||||
@ -70,7 +68,7 @@ var Policy = {
|
|||||||
AUTO: 'auto'
|
AUTO: 'auto'
|
||||||
};
|
};
|
||||||
|
|
||||||
var AuthFlags = {
|
var AuthCtrl = {
|
||||||
NONE: 'none',
|
NONE: 'none',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -79,6 +77,7 @@ var AuthMode = {
|
|||||||
ENABLED: 'enabled'
|
ENABLED: 'enabled'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const BOLT_DBUS_CLIENT_IFACE = 'org.freedesktop.bolt1.Manager';
|
||||||
const BOLT_DBUS_NAME = 'org.freedesktop.bolt';
|
const BOLT_DBUS_NAME = 'org.freedesktop.bolt';
|
||||||
const BOLT_DBUS_PATH = '/org/freedesktop/bolt';
|
const BOLT_DBUS_PATH = '/org/freedesktop/bolt';
|
||||||
|
|
||||||
@ -88,22 +87,26 @@ var Client = new Lang.Class({
|
|||||||
_init() {
|
_init() {
|
||||||
|
|
||||||
this._proxy = null;
|
this._proxy = null;
|
||||||
new BoltClientProxy(
|
let nodeInfo = Gio.DBusNodeInfo.new_for_xml(BoltClientInterface);
|
||||||
Gio.DBus.system,
|
Gio.DBusProxy.new(Gio.DBus.system,
|
||||||
BOLT_DBUS_NAME,
|
Gio.DBusProxyFlags.DO_NOT_AUTO_START,
|
||||||
BOLT_DBUS_PATH,
|
nodeInfo.lookup_interface(BOLT_DBUS_CLIENT_IFACE),
|
||||||
this._onProxyReady.bind(this)
|
BOLT_DBUS_NAME,
|
||||||
);
|
BOLT_DBUS_PATH,
|
||||||
|
BOLT_DBUS_CLIENT_IFACE,
|
||||||
|
null,
|
||||||
|
this._onProxyReady.bind(this));
|
||||||
|
|
||||||
this.probing = false;
|
this.probing = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onProxyReady(proxy, error) {
|
_onProxyReady(o, res) {
|
||||||
if (error !== null) {
|
try {
|
||||||
log('error creating bolt proxy: %s'.format(error.message));
|
this._proxy = Gio.DBusProxy.new_finish(res);
|
||||||
return;
|
} catch(e) {
|
||||||
}
|
log('error creating bolt proxy: %s'.format(e.message));
|
||||||
this._proxy = proxy;
|
return;
|
||||||
|
}
|
||||||
this._propsChangedId = this._proxy.connect('g-properties-changed', this._onPropertiesChanged.bind(this));
|
this._propsChangedId = this._proxy.connect('g-properties-changed', this._onPropertiesChanged.bind(this));
|
||||||
this._deviceAddedId = this._proxy.connectSignal('DeviceAdded', this._onDeviceAdded.bind(this));
|
this._deviceAddedId = this._proxy.connectSignal('DeviceAdded', this._onDeviceAdded.bind(this));
|
||||||
|
|
||||||
@ -141,9 +144,10 @@ var Client = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
enrollDevice(id, policy, callback) {
|
enrollDevice(id, policy, callback) {
|
||||||
this._proxy.EnrollDeviceRemote(id, policy, AuthFlags.NONE,
|
this._proxy.EnrollDeviceRemote(id, policy, AuthCtrl.NONE,
|
||||||
(res, error) => {
|
(res, error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
Gio.DBusError.strip_remote_error(error);
|
||||||
callback(null, error);
|
callback(null, error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -228,7 +232,7 @@ var AuthRobot = new Lang.Class({
|
|||||||
|
|
||||||
_onEnrollDone(device, error) {
|
_onEnrollDone(device, error) {
|
||||||
if (error)
|
if (error)
|
||||||
this.emit('enroll-failed', error, device);
|
this.emit('enroll-failed', device, error);
|
||||||
|
|
||||||
/* TODO: scan the list of devices to be authorized for children
|
/* TODO: scan the list of devices to be authorized for children
|
||||||
* of this device and remove them (and their children and
|
* of this device and remove them (and their children and
|
||||||
@ -354,7 +358,7 @@ var Indicator = new Lang.Class({
|
|||||||
|
|
||||||
_onEnrollFailed(obj, device, error) {
|
_onEnrollFailed(obj, device, error) {
|
||||||
const title = _('Thunderbolt authorization error');
|
const title = _('Thunderbolt authorization error');
|
||||||
const body = _('Could not authorize the thunderbolt device: %s'.format(error.message));
|
const body = _('Could not authorize the Thunderbolt device: %s'.format(error.message));
|
||||||
this._notify(title, body);
|
this._notify(title, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +192,9 @@ var SwitcherPopup = new Lang.Class({
|
|||||||
if (this._keyPressHandler(keysym, action) != Clutter.EVENT_PROPAGATE)
|
if (this._keyPressHandler(keysym, action) != Clutter.EVENT_PROPAGATE)
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
|
|
||||||
if (keysym == Clutter.Escape)
|
// Note: pressing one of the below keys will destroy the popup only if
|
||||||
|
// that key is not used by the active popup's keyboard shortcut
|
||||||
|
if (keysym == Clutter.Escape || keysym == Clutter.Tab)
|
||||||
this.destroy();
|
this.destroy();
|
||||||
|
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
|
@ -24,7 +24,7 @@ const EdgeDragAction = imports.ui.edgeDragAction;
|
|||||||
const CloseDialog = imports.ui.closeDialog;
|
const CloseDialog = imports.ui.closeDialog;
|
||||||
const SwitchMonitor = imports.ui.switchMonitor;
|
const SwitchMonitor = imports.ui.switchMonitor;
|
||||||
|
|
||||||
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
var SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
||||||
var MINIMIZE_WINDOW_ANIMATION_TIME = 0.2;
|
var MINIMIZE_WINDOW_ANIMATION_TIME = 0.2;
|
||||||
var SHOW_WINDOW_ANIMATION_TIME = 0.15;
|
var SHOW_WINDOW_ANIMATION_TIME = 0.15;
|
||||||
var DIALOG_SHOW_WINDOW_ANIMATION_TIME = 0.1;
|
var DIALOG_SHOW_WINDOW_ANIMATION_TIME = 0.1;
|
||||||
@ -200,12 +200,18 @@ var WorkspaceTracker = new Lang.Class({
|
|||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
tracker.connect('startup-sequence-changed', this._queueCheckWorkspaces.bind(this));
|
tracker.connect('startup-sequence-changed', this._queueCheckWorkspaces.bind(this));
|
||||||
|
|
||||||
global.screen.connect('notify::n-workspaces', this._nWorkspacesChanged.bind(this));
|
let workspaceManager = global.workspace_manager;
|
||||||
global.window_manager.connect('switch-workspace', this._queueCheckWorkspaces.bind(this));
|
workspaceManager.connect('notify::n-workspaces',
|
||||||
|
this._nWorkspacesChanged.bind(this));
|
||||||
|
global.window_manager.connect('switch-workspace',
|
||||||
|
this._queueCheckWorkspaces.bind(this));
|
||||||
|
|
||||||
global.screen.connect('window-entered-monitor', this._windowEnteredMonitor.bind(this));
|
global.display.connect('window-entered-monitor',
|
||||||
global.screen.connect('window-left-monitor', this._windowLeftMonitor.bind(this));
|
this._windowEnteredMonitor.bind(this));
|
||||||
global.screen.connect('restacked', this._windowsRestacked.bind(this));
|
global.display.connect('window-left-monitor',
|
||||||
|
this._windowLeftMonitor.bind(this));
|
||||||
|
global.display.connect('restacked',
|
||||||
|
this._windowsRestacked.bind(this));
|
||||||
|
|
||||||
this._workspaceSettings = this._getWorkspaceSettings();
|
this._workspaceSettings = this._getWorkspaceSettings();
|
||||||
this._workspaceSettings.connect('changed::dynamic-workspaces', this._queueCheckWorkspaces.bind(this));
|
this._workspaceSettings.connect('changed::dynamic-workspaces', this._queueCheckWorkspaces.bind(this));
|
||||||
@ -230,6 +236,7 @@ var WorkspaceTracker = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_checkWorkspaces() {
|
_checkWorkspaces() {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
let i;
|
let i;
|
||||||
let emptyWorkspaces = [];
|
let emptyWorkspaces = [];
|
||||||
|
|
||||||
@ -257,7 +264,7 @@ var WorkspaceTracker = new Lang.Class({
|
|||||||
let sequences = Shell.WindowTracker.get_default().get_startup_sequences();
|
let sequences = Shell.WindowTracker.get_default().get_startup_sequences();
|
||||||
for (i = 0; i < sequences.length; i++) {
|
for (i = 0; i < sequences.length; i++) {
|
||||||
let index = sequences[i].get_workspace();
|
let index = sequences[i].get_workspace();
|
||||||
if (index >= 0 && index <= global.screen.n_workspaces)
|
if (index >= 0 && index <= workspaceManager.n_workspaces)
|
||||||
emptyWorkspaces[index] = false;
|
emptyWorkspaces[index] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,17 +282,17 @@ var WorkspaceTracker = new Lang.Class({
|
|||||||
|
|
||||||
// If we don't have an empty workspace at the end, add one
|
// If we don't have an empty workspace at the end, add one
|
||||||
if (!emptyWorkspaces[emptyWorkspaces.length -1]) {
|
if (!emptyWorkspaces[emptyWorkspaces.length -1]) {
|
||||||
global.screen.append_new_workspace(false, global.get_current_time());
|
workspaceManager.append_new_workspace(false, global.get_current_time());
|
||||||
emptyWorkspaces.push(false);
|
emptyWorkspaces.push(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
|
let activeWorkspaceIndex = workspaceManager.get_active_workspace_index();
|
||||||
emptyWorkspaces[activeWorkspaceIndex] = false;
|
emptyWorkspaces[activeWorkspaceIndex] = false;
|
||||||
|
|
||||||
// Delete other empty workspaces; do it from the end to avoid index changes
|
// Delete other empty workspaces; do it from the end to avoid index changes
|
||||||
for (i = emptyWorkspaces.length - 2; i >= 0; i--) {
|
for (i = emptyWorkspaces.length - 2; i >= 0; i--) {
|
||||||
if (emptyWorkspaces[i])
|
if (emptyWorkspaces[i])
|
||||||
global.screen.remove_workspace(this._workspaces[i], global.get_current_time());
|
workspaceManager.remove_workspace(this._workspaces[i], global.get_current_time());
|
||||||
}
|
}
|
||||||
|
|
||||||
this._checkWorkspacesId = 0;
|
this._checkWorkspacesId = 0;
|
||||||
@ -317,14 +324,14 @@ var WorkspaceTracker = new Lang.Class({
|
|||||||
GLib.Source.set_name_by_id(id, '[gnome-shell] this._queueCheckWorkspaces');
|
GLib.Source.set_name_by_id(id, '[gnome-shell] this._queueCheckWorkspaces');
|
||||||
},
|
},
|
||||||
|
|
||||||
_windowLeftMonitor(metaScreen, monitorIndex, metaWin) {
|
_windowLeftMonitor(metaDisplay, monitorIndex, metaWin) {
|
||||||
// If the window left the primary monitor, that
|
// If the window left the primary monitor, that
|
||||||
// might make that workspace empty
|
// might make that workspace empty
|
||||||
if (monitorIndex == Main.layoutManager.primaryIndex)
|
if (monitorIndex == Main.layoutManager.primaryIndex)
|
||||||
this._queueCheckWorkspaces();
|
this._queueCheckWorkspaces();
|
||||||
},
|
},
|
||||||
|
|
||||||
_windowEnteredMonitor(metaScreen, monitorIndex, metaWin) {
|
_windowEnteredMonitor(metaDisplay, monitorIndex, metaWin) {
|
||||||
// If the window entered the primary monitor, that
|
// If the window entered the primary monitor, that
|
||||||
// might make that workspace non-empty
|
// might make that workspace non-empty
|
||||||
if (monitorIndex == Main.layoutManager.primaryIndex)
|
if (monitorIndex == Main.layoutManager.primaryIndex)
|
||||||
@ -344,8 +351,9 @@ var WorkspaceTracker = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_nWorkspacesChanged() {
|
_nWorkspacesChanged() {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
let oldNumWorkspaces = this._workspaces.length;
|
let oldNumWorkspaces = this._workspaces.length;
|
||||||
let newNumWorkspaces = global.screen.n_workspaces;
|
let newNumWorkspaces = workspaceManager.n_workspaces;
|
||||||
|
|
||||||
if (oldNumWorkspaces == newNumWorkspaces)
|
if (oldNumWorkspaces == newNumWorkspaces)
|
||||||
return false;
|
return false;
|
||||||
@ -356,7 +364,7 @@ var WorkspaceTracker = new Lang.Class({
|
|||||||
|
|
||||||
// Assume workspaces are only added at the end
|
// Assume workspaces are only added at the end
|
||||||
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++)
|
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++)
|
||||||
this._workspaces[w] = global.screen.get_workspace_by_index(w);
|
this._workspaces[w] = workspaceManager.get_workspace_by_index(w);
|
||||||
|
|
||||||
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
|
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
|
||||||
let workspace = this._workspaces[w];
|
let workspace = this._workspaces[w];
|
||||||
@ -370,7 +378,7 @@ var WorkspaceTracker = new Lang.Class({
|
|||||||
let removedIndex;
|
let removedIndex;
|
||||||
let removedNum = oldNumWorkspaces - newNumWorkspaces;
|
let removedNum = oldNumWorkspaces - newNumWorkspaces;
|
||||||
for (let w = 0; w < oldNumWorkspaces; w++) {
|
for (let w = 0; w < oldNumWorkspaces; w++) {
|
||||||
let workspace = global.screen.get_workspace_by_index(w);
|
let workspace = workspaceManager.get_workspace_by_index(w);
|
||||||
if (this._workspaces[w] != workspace) {
|
if (this._workspaces[w] != workspace) {
|
||||||
removedIndex = w;
|
removedIndex = w;
|
||||||
break;
|
break;
|
||||||
@ -714,7 +722,7 @@ var WindowManager = new Lang.Class({
|
|||||||
this._shellwm.connect('confirm-display-change', this._confirmDisplayChange.bind(this));
|
this._shellwm.connect('confirm-display-change', this._confirmDisplayChange.bind(this));
|
||||||
this._shellwm.connect('create-close-dialog', this._createCloseDialog.bind(this));
|
this._shellwm.connect('create-close-dialog', this._createCloseDialog.bind(this));
|
||||||
this._shellwm.connect('create-inhibit-shortcuts-dialog', this._createInhibitShortcutsDialog.bind(this));
|
this._shellwm.connect('create-inhibit-shortcuts-dialog', this._createInhibitShortcutsDialog.bind(this));
|
||||||
global.screen.connect('restacked', this._syncStacking.bind(this));
|
global.display.connect('restacked', this._syncStacking.bind(this));
|
||||||
|
|
||||||
this._workspaceSwitcherPopup = null;
|
this._workspaceSwitcherPopup = null;
|
||||||
this._tilePreview = null;
|
this._tilePreview = null;
|
||||||
@ -970,8 +978,8 @@ var WindowManager = new Lang.Class({
|
|||||||
if (Main.sessionMode.hasWorkspaces)
|
if (Main.sessionMode.hasWorkspaces)
|
||||||
this._workspaceTracker = new WorkspaceTracker(this);
|
this._workspaceTracker = new WorkspaceTracker(this);
|
||||||
|
|
||||||
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
|
global.workspace_manager.override_workspace_layout(Meta.DisplayCorner.TOPLEFT,
|
||||||
false, -1, 1);
|
false, -1, 1);
|
||||||
|
|
||||||
let gesture = new WorkspaceSwitchAction();
|
let gesture = new WorkspaceSwitchAction();
|
||||||
gesture.connect('activated', this._actionSwitchWorkspace.bind(this));
|
gesture.connect('activated', this._actionSwitchWorkspace.bind(this));
|
||||||
@ -1001,7 +1009,9 @@ var WindowManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_actionSwitchWorkspace(action, direction) {
|
_actionSwitchWorkspace(action, direction) {
|
||||||
let newWs = global.screen.get_active_workspace().get_neighbor(direction);
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
|
let newWs = activeWorkspace.get_neighbor(direction);
|
||||||
this.actionMoveWorkspace(newWs);
|
this.actionMoveWorkspace(newWs);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1017,8 +1027,10 @@ var WindowManager = new Lang.Class({
|
|||||||
_switchApp() {
|
_switchApp() {
|
||||||
let windows = global.get_window_actors().filter(actor => {
|
let windows = global.get_window_actors().filter(actor => {
|
||||||
let win = actor.metaWindow;
|
let win = actor.metaWindow;
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
return (!win.is_override_redirect() &&
|
return (!win.is_override_redirect() &&
|
||||||
win.located_on_workspace(global.screen.get_active_workspace()));
|
win.located_on_workspace(activeWorkspace));
|
||||||
});
|
});
|
||||||
|
|
||||||
if (windows.length == 0)
|
if (windows.length == 0)
|
||||||
@ -1042,10 +1054,12 @@ var WindowManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
insertWorkspace(pos) {
|
insertWorkspace(pos) {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
if (!Meta.prefs_get_dynamic_workspaces())
|
if (!Meta.prefs_get_dynamic_workspaces())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
global.screen.append_new_workspace(false, global.get_current_time());
|
workspaceManager.append_new_workspace(false, global.get_current_time());
|
||||||
|
|
||||||
let windows = global.get_window_actors().map(a => a.meta_window);
|
let windows = global.get_window_actors().map(a => a.meta_window);
|
||||||
|
|
||||||
@ -1069,9 +1083,9 @@ var WindowManager = new Lang.Class({
|
|||||||
|
|
||||||
// If the new workspace was inserted before the active workspace,
|
// If the new workspace was inserted before the active workspace,
|
||||||
// activate the workspace to which its windows went
|
// activate the workspace to which its windows went
|
||||||
let activeIndex = global.screen.get_active_workspace_index();
|
let activeIndex = workspaceManager.get_active_workspace_index();
|
||||||
if (activeIndex >= pos) {
|
if (activeIndex >= pos) {
|
||||||
let newWs = global.screen.get_workspace_by_index(activeIndex + 1);
|
let newWs = workspaceManager.get_workspace_by_index(activeIndex + 1);
|
||||||
this._blockAnimations = true;
|
this._blockAnimations = true;
|
||||||
newWs.activate(global.get_current_time());
|
newWs.activate(global.get_current_time());
|
||||||
this._blockAnimations = false;
|
this._blockAnimations = false;
|
||||||
@ -1173,6 +1187,10 @@ var WindowManager = new Lang.Class({
|
|||||||
yScale = geom.height / actor.height;
|
yScale = geom.height / actor.height;
|
||||||
} else {
|
} else {
|
||||||
let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
|
let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
|
||||||
|
if (!monitor) {
|
||||||
|
this._minimizeWindowDone();
|
||||||
|
return;
|
||||||
|
}
|
||||||
xDest = monitor.x;
|
xDest = monitor.x;
|
||||||
yDest = monitor.y;
|
yDest = monitor.y;
|
||||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
||||||
@ -1248,6 +1266,11 @@ var WindowManager = new Lang.Class({
|
|||||||
geom.height / actor.height);
|
geom.height / actor.height);
|
||||||
} else {
|
} else {
|
||||||
let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
|
let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
|
||||||
|
if (!monitor) {
|
||||||
|
actor.show();
|
||||||
|
this._unminimizeWindowDone();
|
||||||
|
return;
|
||||||
|
}
|
||||||
actor.set_position(monitor.x, monitor.y);
|
actor.set_position(monitor.x, monitor.y);
|
||||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
||||||
actor.x += monitor.width;
|
actor.x += monitor.width;
|
||||||
@ -1820,7 +1843,7 @@ var WindowManager = new Lang.Class({
|
|||||||
this._windowMenuManager.showWindowMenuForWindow(window, menu, rect);
|
this._windowMenuManager.showWindowMenuForWindow(window, menu, rect);
|
||||||
},
|
},
|
||||||
|
|
||||||
_startSwitcher(display, screen, window, binding) {
|
_startSwitcher(display, window, binding) {
|
||||||
let constructor = null;
|
let constructor = null;
|
||||||
switch (binding.get_name()) {
|
switch (binding.get_name()) {
|
||||||
case 'switch-applications':
|
case 'switch-applications':
|
||||||
@ -1859,15 +1882,15 @@ var WindowManager = new Lang.Class({
|
|||||||
tabPopup.destroy();
|
tabPopup.destroy();
|
||||||
},
|
},
|
||||||
|
|
||||||
_startA11ySwitcher(display, screen, window, binding) {
|
_startA11ySwitcher(display, window, binding) {
|
||||||
Main.ctrlAltTabManager.popup(binding.is_reversed(), binding.get_name(), binding.get_mask());
|
Main.ctrlAltTabManager.popup(binding.is_reversed(), binding.get_name(), binding.get_mask());
|
||||||
},
|
},
|
||||||
|
|
||||||
_toggleAppMenu(display, screen, window, event, binding) {
|
_toggleAppMenu(display, window, event, binding) {
|
||||||
Main.panel.toggleAppMenu();
|
Main.panel.toggleAppMenu();
|
||||||
},
|
},
|
||||||
|
|
||||||
_toggleCalendar(display, screen, window, event, binding) {
|
_toggleCalendar(display, window, event, binding) {
|
||||||
Main.panel.toggleCalendar();
|
Main.panel.toggleCalendar();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1880,11 +1903,13 @@ var WindowManager = new Lang.Class({
|
|||||||
OrigTweener.resumeAllTweens();
|
OrigTweener.resumeAllTweens();
|
||||||
},
|
},
|
||||||
|
|
||||||
_showWorkspaceSwitcher(display, screen, window, binding) {
|
_showWorkspaceSwitcher(display, window, binding) {
|
||||||
|
let workspaceManager = display.get_workspace_manager();
|
||||||
|
|
||||||
if (!Main.sessionMode.hasWorkspaces)
|
if (!Main.sessionMode.hasWorkspaces)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (screen.n_workspaces == 1)
|
if (workspaceManager.n_workspaces == 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let [action,,,target] = binding.get_name().split('-');
|
let [action,,,target] = binding.get_name().split('-');
|
||||||
@ -1903,22 +1928,22 @@ var WindowManager = new Lang.Class({
|
|||||||
|
|
||||||
if (target == 'last') {
|
if (target == 'last') {
|
||||||
direction = Meta.MotionDirection.DOWN;
|
direction = Meta.MotionDirection.DOWN;
|
||||||
newWs = screen.get_workspace_by_index(screen.n_workspaces - 1);
|
newWs = workspaceManager.get_workspace_by_index(workspaceManager.n_workspaces - 1);
|
||||||
} else if (isNaN(target)) {
|
} else if (isNaN(target)) {
|
||||||
// Prepend a new workspace dynamically
|
// Prepend a new workspace dynamically
|
||||||
if (screen.get_active_workspace_index() == 0 &&
|
if (workspaceManager.get_active_workspace_index() == 0 &&
|
||||||
action == 'move' && target == 'up' && this._isWorkspacePrepended == false) {
|
action == 'move' && target == 'up' && this._isWorkspacePrepended == false) {
|
||||||
this.insertWorkspace(0);
|
this.insertWorkspace(0);
|
||||||
this._isWorkspacePrepended = true;
|
this._isWorkspacePrepended = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
direction = Meta.MotionDirection[target.toUpperCase()];
|
direction = Meta.MotionDirection[target.toUpperCase()];
|
||||||
newWs = screen.get_active_workspace().get_neighbor(direction);
|
newWs = workspaceManager.get_active_workspace().get_neighbor(direction);
|
||||||
} else if (target > 0) {
|
} else if (target > 0) {
|
||||||
target--;
|
target--;
|
||||||
newWs = screen.get_workspace_by_index(target);
|
newWs = workspaceManager.get_workspace_by_index(target);
|
||||||
|
|
||||||
if (screen.get_active_workspace().index() > target)
|
if (workspaceManager.get_active_workspace().index() > target)
|
||||||
direction = Meta.MotionDirection.UP;
|
direction = Meta.MotionDirection.UP;
|
||||||
else
|
else
|
||||||
direction = Meta.MotionDirection.DOWN;
|
direction = Meta.MotionDirection.DOWN;
|
||||||
@ -1951,7 +1976,8 @@ var WindowManager = new Lang.Class({
|
|||||||
if (!Main.sessionMode.hasWorkspaces)
|
if (!Main.sessionMode.hasWorkspaces)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let activeWorkspace = global.screen.get_active_workspace();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
|
|
||||||
if (activeWorkspace != workspace)
|
if (activeWorkspace != workspace)
|
||||||
workspace.activate(global.get_current_time());
|
workspace.activate(global.get_current_time());
|
||||||
@ -1961,7 +1987,8 @@ var WindowManager = new Lang.Class({
|
|||||||
if (!Main.sessionMode.hasWorkspaces)
|
if (!Main.sessionMode.hasWorkspaces)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let activeWorkspace = global.screen.get_active_workspace();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
|
|
||||||
if (activeWorkspace != workspace) {
|
if (activeWorkspace != workspace) {
|
||||||
// This won't have any effect for "always sticky" windows
|
// This won't have any effect for "always sticky" windows
|
||||||
|
@ -126,16 +126,15 @@ var WindowMenu = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let screen = global.screen;
|
let display = global.display;
|
||||||
let nMonitors = screen.get_n_monitors();
|
let nMonitors = display.get_n_monitors();
|
||||||
if (nMonitors > 1) {
|
let monitorIndex = window.get_monitor();
|
||||||
|
if (nMonitors > 1 && monitorIndex >= 0) {
|
||||||
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
|
|
||||||
let monitorIndex = window.get_monitor();
|
|
||||||
|
|
||||||
let dir = Meta.ScreenDirection.UP;
|
let dir = Meta.ScreenDirection.UP;
|
||||||
let upMonitorIndex =
|
let upMonitorIndex =
|
||||||
screen.get_monitor_neighbor_index(monitorIndex, dir);
|
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||||
if (upMonitorIndex != -1) {
|
if (upMonitorIndex != -1) {
|
||||||
this.addAction(_("Move to Monitor Up"), () => {
|
this.addAction(_("Move to Monitor Up"), () => {
|
||||||
window.move_to_monitor(upMonitorIndex);
|
window.move_to_monitor(upMonitorIndex);
|
||||||
@ -144,7 +143,7 @@ var WindowMenu = new Lang.Class({
|
|||||||
|
|
||||||
dir = Meta.ScreenDirection.DOWN;
|
dir = Meta.ScreenDirection.DOWN;
|
||||||
let downMonitorIndex =
|
let downMonitorIndex =
|
||||||
screen.get_monitor_neighbor_index(monitorIndex, dir);
|
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||||
if (downMonitorIndex != -1) {
|
if (downMonitorIndex != -1) {
|
||||||
this.addAction(_("Move to Monitor Down"), () => {
|
this.addAction(_("Move to Monitor Down"), () => {
|
||||||
window.move_to_monitor(downMonitorIndex);
|
window.move_to_monitor(downMonitorIndex);
|
||||||
@ -153,7 +152,7 @@ var WindowMenu = new Lang.Class({
|
|||||||
|
|
||||||
dir = Meta.ScreenDirection.LEFT;
|
dir = Meta.ScreenDirection.LEFT;
|
||||||
let leftMonitorIndex =
|
let leftMonitorIndex =
|
||||||
screen.get_monitor_neighbor_index(monitorIndex, dir);
|
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||||
if (leftMonitorIndex != -1) {
|
if (leftMonitorIndex != -1) {
|
||||||
this.addAction(_("Move to Monitor Left"), () => {
|
this.addAction(_("Move to Monitor Left"), () => {
|
||||||
window.move_to_monitor(leftMonitorIndex);
|
window.move_to_monitor(leftMonitorIndex);
|
||||||
@ -162,7 +161,7 @@ var WindowMenu = new Lang.Class({
|
|||||||
|
|
||||||
dir = Meta.ScreenDirection.RIGHT;
|
dir = Meta.ScreenDirection.RIGHT;
|
||||||
let rightMonitorIndex =
|
let rightMonitorIndex =
|
||||||
screen.get_monitor_neighbor_index(monitorIndex, dir);
|
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||||
if (rightMonitorIndex != -1) {
|
if (rightMonitorIndex != -1) {
|
||||||
this.addAction(_("Move to Monitor Right"), () => {
|
this.addAction(_("Move to Monitor Right"), () => {
|
||||||
window.move_to_monitor(rightMonitorIndex);
|
window.move_to_monitor(rightMonitorIndex);
|
||||||
|
@ -447,12 +447,13 @@ var WindowOverlay = new Lang.Class({
|
|||||||
this.border = new St.Bin({ style_class: 'window-clone-border' });
|
this.border = new St.Bin({ style_class: 'window-clone-border' });
|
||||||
|
|
||||||
let title = new St.Label({ style_class: 'window-caption',
|
let title = new St.Label({ style_class: 'window-caption',
|
||||||
text: metaWindow.title });
|
text: this._getCaption() });
|
||||||
title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
|
title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
|
||||||
windowClone.actor.label_actor = title;
|
windowClone.actor.label_actor = title;
|
||||||
|
|
||||||
this._updateCaptionId = metaWindow.connect('notify::title', w => {
|
this._updateCaptionId = metaWindow.connect('notify::title', w => {
|
||||||
this.title.text = w.title;
|
this.title.text = w.title;
|
||||||
|
this.title.text = this._getCaption();
|
||||||
this.relayout(false);
|
this.relayout(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -565,6 +566,16 @@ var WindowOverlay = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_getCaption() {
|
||||||
|
let metaWindow = this._windowClone.metaWindow;
|
||||||
|
if (metaWindow.title)
|
||||||
|
return metaWindow.title;
|
||||||
|
|
||||||
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
|
let app = tracker.get_window_app(metaWindow);
|
||||||
|
return app.get_name();
|
||||||
|
},
|
||||||
|
|
||||||
_animateOverlayActor(actor, x, y, width, height) {
|
_animateOverlayActor(actor, x, y, width, height) {
|
||||||
let params = { x: x,
|
let params = { x: x,
|
||||||
y: y,
|
y: y,
|
||||||
@ -660,7 +671,6 @@ var WindowOverlay = new Lang.Class({
|
|||||||
if (this._hidden)
|
if (this._hidden)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._windowClone.actor.grab_key_focus();
|
|
||||||
this._animateVisible();
|
this._animateVisible();
|
||||||
this.emit('show-close-button');
|
this.emit('show-close-button');
|
||||||
},
|
},
|
||||||
@ -1146,10 +1156,10 @@ var Workspace = new Lang.Class({
|
|||||||
this._windowRemovedId = this.metaWorkspace.connect('window-removed',
|
this._windowRemovedId = this.metaWorkspace.connect('window-removed',
|
||||||
this._windowRemoved.bind(this));
|
this._windowRemoved.bind(this));
|
||||||
}
|
}
|
||||||
this._windowEnteredMonitorId = global.screen.connect('window-entered-monitor',
|
this._windowEnteredMonitorId = global.display.connect('window-entered-monitor',
|
||||||
this._windowEnteredMonitor.bind(this));
|
this._windowEnteredMonitor.bind(this));
|
||||||
this._windowLeftMonitorId = global.screen.connect('window-left-monitor',
|
this._windowLeftMonitorId = global.display.connect('window-left-monitor',
|
||||||
this._windowLeftMonitor.bind(this));
|
this._windowLeftMonitor.bind(this));
|
||||||
this._repositionWindowsId = 0;
|
this._repositionWindowsId = 0;
|
||||||
|
|
||||||
this.leavingOverview = false;
|
this.leavingOverview = false;
|
||||||
@ -1295,7 +1305,8 @@ var Workspace = new Lang.Class({
|
|||||||
let area = padArea(this._actualGeometry, padding);
|
let area = padArea(this._actualGeometry, padding);
|
||||||
let slots = strategy.computeWindowSlots(layout, area);
|
let slots = strategy.computeWindowSlots(layout, area);
|
||||||
|
|
||||||
let currentWorkspace = global.screen.get_active_workspace();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let currentWorkspace = workspaceManager.get_active_workspace();
|
||||||
let isOnCurrentWorkspace = this.metaWorkspace == null || this.metaWorkspace == currentWorkspace;
|
let isOnCurrentWorkspace = this.metaWorkspace == null || this.metaWorkspace == currentWorkspace;
|
||||||
|
|
||||||
for (let i = 0; i < slots.length; i++) {
|
for (let i = 0; i < slots.length; i++) {
|
||||||
@ -1432,34 +1443,26 @@ var Workspace = new Lang.Class({
|
|||||||
_doRemoveWindow(metaWin) {
|
_doRemoveWindow(metaWin) {
|
||||||
let win = metaWin.get_compositor_private();
|
let win = metaWin.get_compositor_private();
|
||||||
|
|
||||||
// find the position of the window in our list
|
let clone = this._removeWindowClone(metaWin);
|
||||||
let index = this._lookupIndex (metaWin);
|
|
||||||
|
|
||||||
if (index == -1)
|
if (clone) {
|
||||||
return;
|
// If metaWin.get_compositor_private() returned non-NULL, that
|
||||||
|
// means the window still exists (and is just being moved to
|
||||||
let clone = this._windows[index];
|
// another workspace or something), so set its overviewHint
|
||||||
|
// accordingly. (If it returned NULL, then the window is being
|
||||||
this._windows.splice(index, 1);
|
// destroyed; we'd like to animate this, but it's too late at
|
||||||
this._windowOverlays.splice(index, 1);
|
// this point.)
|
||||||
|
if (win) {
|
||||||
// If metaWin.get_compositor_private() returned non-NULL, that
|
let [stageX, stageY] = clone.actor.get_transformed_position();
|
||||||
// means the window still exists (and is just being moved to
|
let [stageWidth, stageHeight] = clone.actor.get_transformed_size();
|
||||||
// another workspace or something), so set its overviewHint
|
win._overviewHint = {
|
||||||
// accordingly. (If it returned NULL, then the window is being
|
x: stageX,
|
||||||
// destroyed; we'd like to animate this, but it's too late at
|
y: stageY,
|
||||||
// this point.)
|
scale: stageWidth / clone.actor.width
|
||||||
if (win) {
|
};
|
||||||
let [stageX, stageY] = clone.actor.get_transformed_position();
|
}
|
||||||
let [stageWidth, stageHeight] = clone.actor.get_transformed_size();
|
clone.destroy();
|
||||||
win._overviewHint = {
|
|
||||||
x: stageX,
|
|
||||||
y: stageY,
|
|
||||||
scale: stageWidth / clone.actor.width
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
clone.destroy();
|
|
||||||
|
|
||||||
|
|
||||||
// We need to reposition the windows; to avoid shuffling windows
|
// We need to reposition the windows; to avoid shuffling windows
|
||||||
// around while the user is interacting with the workspace, we delay
|
// around while the user is interacting with the workspace, we delay
|
||||||
@ -1558,13 +1561,13 @@ var Workspace = new Lang.Class({
|
|||||||
this._doRemoveWindow(metaWin);
|
this._doRemoveWindow(metaWin);
|
||||||
},
|
},
|
||||||
|
|
||||||
_windowEnteredMonitor(metaScreen, monitorIndex, metaWin) {
|
_windowEnteredMonitor(metaDisplay, monitorIndex, metaWin) {
|
||||||
if (monitorIndex == this.monitorIndex) {
|
if (monitorIndex == this.monitorIndex) {
|
||||||
this._doAddWindow(metaWin);
|
this._doAddWindow(metaWin);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_windowLeftMonitor(metaScreen, monitorIndex, metaWin) {
|
_windowLeftMonitor(metaDisplay, monitorIndex, metaWin) {
|
||||||
if (monitorIndex == this.monitorIndex) {
|
if (monitorIndex == this.monitorIndex) {
|
||||||
this._doRemoveWindow(metaWin);
|
this._doRemoveWindow(metaWin);
|
||||||
}
|
}
|
||||||
@ -1589,7 +1592,9 @@ var Workspace = new Lang.Class({
|
|||||||
if (this._windows.length == 0)
|
if (this._windows.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this.metaWorkspace != null && this.metaWorkspace != global.screen.get_active_workspace())
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
|
if (this.metaWorkspace != null && this.metaWorkspace != activeWorkspace)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Special case maximized windows, since it doesn't make sense
|
// Special case maximized windows, since it doesn't make sense
|
||||||
@ -1645,7 +1650,9 @@ var Workspace = new Lang.Class({
|
|||||||
this._repositionWindowsId = 0;
|
this._repositionWindowsId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.metaWorkspace != null && this.metaWorkspace != global.screen.get_active_workspace())
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
|
if (this.metaWorkspace != null && this.metaWorkspace != activeWorkspace)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Special case maximized windows, since it doesn't make sense
|
// Special case maximized windows, since it doesn't make sense
|
||||||
@ -1715,7 +1722,8 @@ var Workspace = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
zoomFromOverview() {
|
zoomFromOverview() {
|
||||||
let currentWorkspace = global.screen.get_active_workspace();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let currentWorkspace = workspaceManager.get_active_workspace();
|
||||||
|
|
||||||
this.leavingOverview = true;
|
this.leavingOverview = true;
|
||||||
|
|
||||||
@ -1783,8 +1791,8 @@ var Workspace = new Lang.Class({
|
|||||||
this.metaWorkspace.disconnect(this._windowAddedId);
|
this.metaWorkspace.disconnect(this._windowAddedId);
|
||||||
this.metaWorkspace.disconnect(this._windowRemovedId);
|
this.metaWorkspace.disconnect(this._windowRemovedId);
|
||||||
}
|
}
|
||||||
global.screen.disconnect(this._windowEnteredMonitorId);
|
global.display.disconnect(this._windowEnteredMonitorId);
|
||||||
global.screen.disconnect(this._windowLeftMonitorId);
|
global.display.disconnect(this._windowLeftMonitorId);
|
||||||
|
|
||||||
if (this._repositionWindowsId > 0) {
|
if (this._repositionWindowsId > 0) {
|
||||||
Mainloop.source_remove(this._repositionWindowsId);
|
Mainloop.source_remove(this._repositionWindowsId);
|
||||||
@ -1849,10 +1857,18 @@ var Workspace = new Lang.Class({
|
|||||||
clone.connect('size-changed', () => {
|
clone.connect('size-changed', () => {
|
||||||
this._recalculateWindowPositions(WindowPositionFlags.NONE);
|
this._recalculateWindowPositions(WindowPositionFlags.NONE);
|
||||||
});
|
});
|
||||||
|
clone.actor.connect('destroy', () => {
|
||||||
|
this._removeWindowClone(clone.metaWindow);
|
||||||
|
});
|
||||||
|
|
||||||
this.actor.add_actor(clone.actor);
|
this.actor.add_actor(clone.actor);
|
||||||
|
|
||||||
overlay.connect('show-close-button', this._onShowOverlayClose.bind(this));
|
overlay.connect('show-close-button', () => {
|
||||||
|
let focus = global.stage.key_focus;
|
||||||
|
if (focus == null || this.actor.contains(focus))
|
||||||
|
clone.actor.grab_key_focus();
|
||||||
|
this._onShowOverlayClose(overlay);
|
||||||
|
});
|
||||||
|
|
||||||
if (this._windows.length == 0)
|
if (this._windows.length == 0)
|
||||||
clone.setStackAbove(null);
|
clone.setStackAbove(null);
|
||||||
@ -1865,6 +1881,17 @@ var Workspace = new Lang.Class({
|
|||||||
return [clone, overlay];
|
return [clone, overlay];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_removeWindowClone(metaWin) {
|
||||||
|
// find the position of the window in our list
|
||||||
|
let index = this._lookupIndex (metaWin);
|
||||||
|
|
||||||
|
if (index == -1)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
this._windowOverlays.splice(index, 1);
|
||||||
|
return this._windows.splice(index, 1).pop();
|
||||||
|
},
|
||||||
|
|
||||||
_onShowOverlayClose(windowOverlay) {
|
_onShowOverlayClose(windowOverlay) {
|
||||||
for (let i = 0; i < this._windowOverlays.length; i++) {
|
for (let i = 0; i < this._windowOverlays.length; i++) {
|
||||||
let overlay = this._windowOverlays[i];
|
let overlay = this._windowOverlays[i];
|
||||||
@ -2000,7 +2027,8 @@ var Workspace = new Lang.Class({
|
|||||||
if (metaWindow.get_monitor() != this.monitorIndex)
|
if (metaWindow.get_monitor() != this.monitorIndex)
|
||||||
metaWindow.move_to_monitor(this.monitorIndex);
|
metaWindow.move_to_monitor(this.monitorIndex);
|
||||||
|
|
||||||
let index = this.metaWorkspace ? this.metaWorkspace.index() : global.screen.get_active_workspace_index();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let index = this.metaWorkspace ? this.metaWorkspace.index() : workspaceManager.get_active_workspace_index();
|
||||||
metaWindow.change_workspace_by_index(index, false);
|
metaWindow.change_workspace_by_index(index, false);
|
||||||
return true;
|
return true;
|
||||||
} else if (source.shellWorkspaceLaunch) {
|
} else if (source.shellWorkspaceLaunch) {
|
||||||
|
@ -47,9 +47,12 @@ var WorkspaceSwitcherPopup = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
|
|
||||||
this._globalSignals = [];
|
let workspaceManager = global.workspace_manager;
|
||||||
this._globalSignals.push(global.screen.connect('workspace-added', this._redisplay.bind(this)));
|
this._workspaceManagerSignals = [];
|
||||||
this._globalSignals.push(global.screen.connect('workspace-removed', this._redisplay.bind(this)));
|
this._workspaceManagerSignals.push(workspaceManager.connect('workspace-added',
|
||||||
|
this._redisplay.bind(this)));
|
||||||
|
this._workspaceManagerSignals.push(workspaceManager.connect('workspace-removed',
|
||||||
|
this._redisplay.bind(this)));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getPreferredHeight(actor, forWidth, alloc) {
|
_getPreferredHeight(actor, forWidth, alloc) {
|
||||||
@ -68,11 +71,12 @@ var WorkspaceSwitcherPopup = new Lang.Class({
|
|||||||
height += childNaturalHeight * workArea.width / workArea.height;
|
height += childNaturalHeight * workArea.width / workArea.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
let spacing = this._itemSpacing * (global.screen.n_workspaces - 1);
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let spacing = this._itemSpacing * (workspaceManager.n_workspaces - 1);
|
||||||
height += spacing;
|
height += spacing;
|
||||||
height = Math.min(height, availHeight);
|
height = Math.min(height, availHeight);
|
||||||
|
|
||||||
this._childHeight = (height - spacing) / global.screen.n_workspaces;
|
this._childHeight = (height - spacing) / workspaceManager.n_workspaces;
|
||||||
|
|
||||||
alloc.min_size = height;
|
alloc.min_size = height;
|
||||||
alloc.natural_size = height;
|
alloc.natural_size = height;
|
||||||
@ -104,9 +108,11 @@ var WorkspaceSwitcherPopup = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_redisplay() {
|
_redisplay() {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
this._list.destroy_all_children();
|
this._list.destroy_all_children();
|
||||||
|
|
||||||
for (let i = 0; i < global.screen.n_workspaces; i++) {
|
for (let i = 0; i < workspaceManager.n_workspaces; i++) {
|
||||||
let indicator = null;
|
let indicator = null;
|
||||||
|
|
||||||
if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.UP)
|
if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.UP)
|
||||||
@ -164,8 +170,9 @@ var WorkspaceSwitcherPopup = new Lang.Class({
|
|||||||
Mainloop.source_remove(this._timeoutId);
|
Mainloop.source_remove(this._timeoutId);
|
||||||
this._timeoutId = 0;
|
this._timeoutId = 0;
|
||||||
|
|
||||||
for (let i = 0; i < this._globalSignals.length; i++)
|
let workspaceManager = global.workspace_manager;
|
||||||
global.screen.disconnect(this._globalSignals[i]);
|
for (let i = 0; i < this._workspaceManagerSignals.length; i++)
|
||||||
|
workspaceManager.disconnect(this._workspaceManagerSignals[i]);
|
||||||
|
|
||||||
this.actor.destroy();
|
this.actor.destroy();
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ var WORKSPACE_CUT_SIZE = 10;
|
|||||||
|
|
||||||
var WORKSPACE_KEEP_ALIVE_TIME = 100;
|
var WORKSPACE_KEEP_ALIVE_TIME = 100;
|
||||||
|
|
||||||
const OVERRIDE_SCHEMA = 'org.gnome.shell.overrides';
|
var OVERRIDE_SCHEMA = 'org.gnome.shell.overrides';
|
||||||
|
|
||||||
/* A layout manager that requests size only for primary_actor, but then allocates
|
/* A layout manager that requests size only for primary_actor, but then allocates
|
||||||
all using a fixed layout */
|
all using a fixed layout */
|
||||||
@ -241,7 +241,7 @@ var WindowClone = new Lang.Class({
|
|||||||
Signals.addSignalMethods(WindowClone.prototype);
|
Signals.addSignalMethods(WindowClone.prototype);
|
||||||
|
|
||||||
|
|
||||||
const ThumbnailState = {
|
var ThumbnailState = {
|
||||||
NEW : 0,
|
NEW : 0,
|
||||||
ANIMATING_IN : 1,
|
ANIMATING_IN : 1,
|
||||||
NORMAL: 2,
|
NORMAL: 2,
|
||||||
@ -275,8 +275,8 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
|
|
||||||
this._createBackground();
|
this._createBackground();
|
||||||
|
|
||||||
let monitor = Main.layoutManager.primaryMonitor;
|
let workArea = Main.layoutManager.getWorkAreaForMonitor(this.monitorIndex);
|
||||||
this.setPorthole(monitor.x, monitor.y, monitor.width, monitor.height);
|
this.setPorthole(workArea.x, workArea.y, workArea.width, workArea.height);
|
||||||
|
|
||||||
let windows = global.get_window_actors().filter(actor => {
|
let windows = global.get_window_actors().filter(actor => {
|
||||||
let win = actor.meta_window;
|
let win = actor.meta_window;
|
||||||
@ -304,9 +304,9 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
this._windowAdded.bind(this));
|
this._windowAdded.bind(this));
|
||||||
this._windowRemovedId = this.metaWorkspace.connect('window-removed',
|
this._windowRemovedId = this.metaWorkspace.connect('window-removed',
|
||||||
this._windowRemoved.bind(this));
|
this._windowRemoved.bind(this));
|
||||||
this._windowEnteredMonitorId = global.screen.connect('window-entered-monitor',
|
this._windowEnteredMonitorId = global.display.connect('window-entered-monitor',
|
||||||
this._windowEnteredMonitor.bind(this));
|
this._windowEnteredMonitor.bind(this));
|
||||||
this._windowLeftMonitorId = global.screen.connect('window-left-monitor',
|
this._windowLeftMonitorId = global.display.connect('window-left-monitor',
|
||||||
this._windowLeftMonitor.bind(this));
|
this._windowLeftMonitor.bind(this));
|
||||||
|
|
||||||
this.state = ThumbnailState.NORMAL;
|
this.state = ThumbnailState.NORMAL;
|
||||||
@ -321,8 +321,6 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
setPorthole(x, y, width, height) {
|
setPorthole(x, y, width, height) {
|
||||||
this._portholeX = x;
|
|
||||||
this._portholeY = y;
|
|
||||||
this.actor.set_size(width, height);
|
this.actor.set_size(width, height);
|
||||||
this._contents.set_position(-x, -y);
|
this._contents.set_position(-x, -y);
|
||||||
},
|
},
|
||||||
@ -374,18 +372,9 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_doRemoveWindow(metaWin) {
|
_doRemoveWindow(metaWin) {
|
||||||
let win = metaWin.get_compositor_private();
|
let clone = this._removeWindowClone(metaWin);
|
||||||
|
if (clone)
|
||||||
// find the position of the window in our list
|
clone.destroy();
|
||||||
let index = this._lookupIndex (metaWin);
|
|
||||||
|
|
||||||
if (index == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
let clone = this._windows[index];
|
|
||||||
this._windows.splice(index, 1);
|
|
||||||
|
|
||||||
clone.destroy();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_doAddWindow(metaWin) {
|
_doAddWindow(metaWin) {
|
||||||
@ -457,13 +446,13 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
this._doRemoveWindow(metaWin);
|
this._doRemoveWindow(metaWin);
|
||||||
},
|
},
|
||||||
|
|
||||||
_windowEnteredMonitor(metaScreen, monitorIndex, metaWin) {
|
_windowEnteredMonitor(metaDisplay, monitorIndex, metaWin) {
|
||||||
if (monitorIndex == this.monitorIndex) {
|
if (monitorIndex == this.monitorIndex) {
|
||||||
this._doAddWindow(metaWin);
|
this._doAddWindow(metaWin);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_windowLeftMonitor(metaScreen, monitorIndex, metaWin) {
|
_windowLeftMonitor(metaDisplay, monitorIndex, metaWin) {
|
||||||
if (monitorIndex == this.monitorIndex) {
|
if (monitorIndex == this.monitorIndex) {
|
||||||
this._doRemoveWindow(metaWin);
|
this._doRemoveWindow(metaWin);
|
||||||
}
|
}
|
||||||
@ -489,8 +478,8 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
|
|
||||||
this.metaWorkspace.disconnect(this._windowAddedId);
|
this.metaWorkspace.disconnect(this._windowAddedId);
|
||||||
this.metaWorkspace.disconnect(this._windowRemovedId);
|
this.metaWorkspace.disconnect(this._windowRemovedId);
|
||||||
global.screen.disconnect(this._windowEnteredMonitorId);
|
global.display.disconnect(this._windowEnteredMonitorId);
|
||||||
global.screen.disconnect(this._windowLeftMonitorId);
|
global.display.disconnect(this._windowLeftMonitorId);
|
||||||
|
|
||||||
for (let i = 0; i < this._allWindows.length; i++)
|
for (let i = 0; i < this._allWindows.length; i++)
|
||||||
this._allWindows[i].disconnect(this._minimizedChangedIds[i]);
|
this._allWindows[i].disconnect(this._minimizedChangedIds[i]);
|
||||||
@ -537,6 +526,9 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
clone.connect('drag-end', () => {
|
clone.connect('drag-end', () => {
|
||||||
Main.overview.endWindowDrag(clone.metaWindow);
|
Main.overview.endWindowDrag(clone.metaWindow);
|
||||||
});
|
});
|
||||||
|
clone.actor.connect('destroy', () => {
|
||||||
|
this._removeWindowClone(clone.metaWindow);
|
||||||
|
});
|
||||||
this._contents.add_actor(clone.actor);
|
this._contents.add_actor(clone.actor);
|
||||||
|
|
||||||
if (this._windows.length == 0)
|
if (this._windows.length == 0)
|
||||||
@ -549,12 +541,24 @@ var WorkspaceThumbnail = new Lang.Class({
|
|||||||
return clone;
|
return clone;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_removeWindowClone(metaWin) {
|
||||||
|
// find the position of the window in our list
|
||||||
|
let index = this._lookupIndex (metaWin);
|
||||||
|
|
||||||
|
if (index == -1)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return this._windows.splice(index, 1).pop();
|
||||||
|
},
|
||||||
|
|
||||||
activate(time) {
|
activate(time) {
|
||||||
if (this.state > ThumbnailState.NORMAL)
|
if (this.state > ThumbnailState.NORMAL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// a click on the already current workspace should go back to the main view
|
// a click on the already current workspace should go back to the main view
|
||||||
if (this.metaWorkspace == global.screen.get_active_workspace())
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
|
if (this.metaWorkspace == activeWorkspace)
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
else
|
else
|
||||||
this.metaWorkspace.activate(time);
|
this.metaWorkspace.activate(time);
|
||||||
@ -675,17 +679,20 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
this._settings.connect('changed::dynamic-workspaces',
|
this._settings.connect('changed::dynamic-workspaces',
|
||||||
this._updateSwitcherVisibility.bind(this));
|
this._updateSwitcherVisibility.bind(this));
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed', () => {
|
Main.layoutManager.connect('monitors-changed', this._rebuildThumbnails.bind(this));
|
||||||
this._destroyThumbnails();
|
|
||||||
if (Main.overview.visible)
|
this._switchWorkspaceNotifyId = 0;
|
||||||
this._createThumbnails();
|
this._nWorkspacesNotifyId = 0;
|
||||||
});
|
this._syncStackingId = 0;
|
||||||
|
this._workareasChangedId = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateSwitcherVisibility() {
|
_updateSwitcherVisibility() {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
this.actor.visible =
|
this.actor.visible =
|
||||||
this._settings.get_boolean('dynamic-workspaces') ||
|
this._settings.get_boolean('dynamic-workspaces') ||
|
||||||
global.screen.n_workspaces > 1;
|
workspaceManager.n_workspaces > 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
_activateThumbnailAtPoint(stageX, stageY, time) {
|
_activateThumbnailAtPoint(stageX, stageY, time) {
|
||||||
@ -843,7 +850,8 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
// to open its first window within some time, as tracked by Shell.WindowTracker.
|
// to open its first window within some time, as tracked by Shell.WindowTracker.
|
||||||
// Here, we only add a very brief timeout to avoid the _immediate_ removal of the
|
// Here, we only add a very brief timeout to avoid the _immediate_ removal of the
|
||||||
// workspace while we wait for the startup sequence to load.
|
// workspace while we wait for the startup sequence to load.
|
||||||
Main.wm.keepWorkspaceAlive(global.screen.get_workspace_by_index(newWorkspaceIndex),
|
let workspaceManager = global.workspace_manager;
|
||||||
|
Main.wm.keepWorkspaceAlive(workspaceManager.get_workspace_by_index(newWorkspaceIndex),
|
||||||
WORKSPACE_KEEP_ALIVE_TIME);
|
WORKSPACE_KEEP_ALIVE_TIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -862,16 +870,22 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_createThumbnails() {
|
_createThumbnails() {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
this._switchWorkspaceNotifyId =
|
this._switchWorkspaceNotifyId =
|
||||||
global.window_manager.connect('switch-workspace',
|
global.window_manager.connect('switch-workspace',
|
||||||
this._activeWorkspaceChanged.bind(this));
|
this._activeWorkspaceChanged.bind(this));
|
||||||
this._nWorkspacesNotifyId =
|
this._nWorkspacesNotifyId =
|
||||||
global.screen.connect('notify::n-workspaces',
|
workspaceManager.connect('notify::n-workspaces',
|
||||||
this._workspacesChanged.bind(this));
|
this._workspacesChanged.bind(this));
|
||||||
this._syncStackingId =
|
this._syncStackingId =
|
||||||
Main.overview.connect('windows-restacked',
|
Main.overview.connect('windows-restacked',
|
||||||
this._syncStacking.bind(this));
|
this._syncStacking.bind(this));
|
||||||
|
|
||||||
|
this._workareasChangedId =
|
||||||
|
global.display.connect('workareas-changed',
|
||||||
|
this._rebuildThumbnails.bind(this));
|
||||||
|
|
||||||
this._targetScale = 0;
|
this._targetScale = 0;
|
||||||
this._scale = 0;
|
this._scale = 0;
|
||||||
this._pendingScaleUpdate = false;
|
this._pendingScaleUpdate = false;
|
||||||
@ -881,18 +895,22 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
for (let key in ThumbnailState)
|
for (let key in ThumbnailState)
|
||||||
this._stateCounts[ThumbnailState[key]] = 0;
|
this._stateCounts[ThumbnailState[key]] = 0;
|
||||||
|
|
||||||
this.addThumbnails(0, global.screen.n_workspaces);
|
this.addThumbnails(0, workspaceManager.n_workspaces);
|
||||||
|
|
||||||
this._updateSwitcherVisibility();
|
this._updateSwitcherVisibility();
|
||||||
},
|
},
|
||||||
|
|
||||||
_destroyThumbnails() {
|
_destroyThumbnails() {
|
||||||
|
if (this._thumbnails.length == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if (this._switchWorkspaceNotifyId > 0) {
|
if (this._switchWorkspaceNotifyId > 0) {
|
||||||
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
|
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
|
||||||
this._switchWorkspaceNotifyId = 0;
|
this._switchWorkspaceNotifyId = 0;
|
||||||
}
|
}
|
||||||
if (this._nWorkspacesNotifyId > 0) {
|
if (this._nWorkspacesNotifyId > 0) {
|
||||||
global.screen.disconnect(this._nWorkspacesNotifyId);
|
let workspaceManager = global.workspace_manager;
|
||||||
|
workspaceManager.disconnect(this._nWorkspacesNotifyId);
|
||||||
this._nWorkspacesNotifyId = 0;
|
this._nWorkspacesNotifyId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -901,18 +919,31 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
this._syncStackingId = 0;
|
this._syncStackingId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._workareasChangedId > 0) {
|
||||||
|
global.display.disconnect(this._workareasChangedId);
|
||||||
|
this._workareasChangedId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
for (let w = 0; w < this._thumbnails.length; w++)
|
for (let w = 0; w < this._thumbnails.length; w++)
|
||||||
this._thumbnails[w].destroy();
|
this._thumbnails[w].destroy();
|
||||||
this._thumbnails = [];
|
this._thumbnails = [];
|
||||||
this._porthole = null;
|
this._porthole = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_rebuildThumbnails() {
|
||||||
|
this._destroyThumbnails();
|
||||||
|
|
||||||
|
if (Main.overview.visible)
|
||||||
|
this._createThumbnails();
|
||||||
|
},
|
||||||
|
|
||||||
_workspacesChanged() {
|
_workspacesChanged() {
|
||||||
let validThumbnails =
|
let validThumbnails =
|
||||||
this._thumbnails.filter(t => t.state <= ThumbnailState.NORMAL);
|
this._thumbnails.filter(t => t.state <= ThumbnailState.NORMAL);
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
let oldNumWorkspaces = validThumbnails.length;
|
let oldNumWorkspaces = validThumbnails.length;
|
||||||
let newNumWorkspaces = global.screen.n_workspaces;
|
let newNumWorkspaces = workspaceManager.n_workspaces;
|
||||||
let active = global.screen.get_active_workspace_index();
|
let active = workspaceManager.get_active_workspace_index();
|
||||||
|
|
||||||
if (newNumWorkspaces > oldNumWorkspaces) {
|
if (newNumWorkspaces > oldNumWorkspaces) {
|
||||||
this.addThumbnails(oldNumWorkspaces, newNumWorkspaces - oldNumWorkspaces);
|
this.addThumbnails(oldNumWorkspaces, newNumWorkspaces - oldNumWorkspaces);
|
||||||
@ -920,7 +951,7 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
let removedIndex;
|
let removedIndex;
|
||||||
let removedNum = oldNumWorkspaces - newNumWorkspaces;
|
let removedNum = oldNumWorkspaces - newNumWorkspaces;
|
||||||
for (let w = 0; w < oldNumWorkspaces; w++) {
|
for (let w = 0; w < oldNumWorkspaces; w++) {
|
||||||
let metaWorkspace = global.screen.get_workspace_by_index(w);
|
let metaWorkspace = workspaceManager.get_workspace_by_index(w);
|
||||||
if (this._thumbnails[w].metaWorkspace != metaWorkspace) {
|
if (this._thumbnails[w].metaWorkspace != metaWorkspace) {
|
||||||
removedIndex = w;
|
removedIndex = w;
|
||||||
break;
|
break;
|
||||||
@ -934,10 +965,12 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
addThumbnails(start, count) {
|
addThumbnails(start, count) {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
if (!this._ensurePorthole())
|
if (!this._ensurePorthole())
|
||||||
return;
|
return;
|
||||||
for (let k = start; k < start + count; k++) {
|
for (let k = start; k < start + count; k++) {
|
||||||
let metaWorkspace = global.screen.get_workspace_by_index(k);
|
let metaWorkspace = workspaceManager.get_workspace_by_index(k);
|
||||||
let thumbnail = new WorkspaceThumbnail(metaWorkspace);
|
let thumbnail = new WorkspaceThumbnail(metaWorkspace);
|
||||||
thumbnail.setPorthole(this._porthole.x, this._porthole.y,
|
thumbnail.setPorthole(this._porthole.x, this._porthole.y,
|
||||||
this._porthole.width, this._porthole.height);
|
this._porthole.width, this._porthole.height);
|
||||||
@ -1123,10 +1156,11 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
let themeNode = this.actor.get_theme_node();
|
let themeNode = this.actor.get_theme_node();
|
||||||
|
|
||||||
let spacing = themeNode.get_length('spacing');
|
let spacing = themeNode.get_length('spacing');
|
||||||
let nWorkspaces = global.screen.n_workspaces;
|
let nWorkspaces = workspaceManager.n_workspaces;
|
||||||
let totalSpacing = (nWorkspaces - 1) * spacing;
|
let totalSpacing = (nWorkspaces - 1) * spacing;
|
||||||
|
|
||||||
alloc.min_size = totalSpacing;
|
alloc.min_size = totalSpacing;
|
||||||
@ -1140,10 +1174,11 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
let themeNode = this.actor.get_theme_node();
|
let themeNode = this.actor.get_theme_node();
|
||||||
|
|
||||||
let spacing = this.actor.get_theme_node().get_length('spacing');
|
let spacing = this.actor.get_theme_node().get_length('spacing');
|
||||||
let nWorkspaces = global.screen.n_workspaces;
|
let nWorkspaces = workspaceManager.n_workspaces;
|
||||||
let totalSpacing = (nWorkspaces - 1) * spacing;
|
let totalSpacing = (nWorkspaces - 1) * spacing;
|
||||||
|
|
||||||
let avail = forHeight - totalSpacing;
|
let avail = forHeight - totalSpacing;
|
||||||
@ -1159,7 +1194,7 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
// The "porthole" is the portion of the screen that we show in the
|
// The "porthole" is the portion of the screen that we show in the
|
||||||
// workspaces
|
// workspaces
|
||||||
_ensurePorthole() {
|
_ensurePorthole() {
|
||||||
if (!Main.layoutManager.primaryMonitor)
|
if (!Main.layoutManager.primaryMonitor || !Main.overview.visible)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!this._porthole)
|
if (!this._porthole)
|
||||||
@ -1174,6 +1209,7 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
if (this._thumbnails.length == 0) // not visible
|
if (this._thumbnails.length == 0) // not visible
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
let themeNode = this.actor.get_theme_node();
|
let themeNode = this.actor.get_theme_node();
|
||||||
|
|
||||||
let portholeWidth = this._porthole.width;
|
let portholeWidth = this._porthole.width;
|
||||||
@ -1181,7 +1217,7 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
let spacing = themeNode.get_length('spacing');
|
let spacing = themeNode.get_length('spacing');
|
||||||
|
|
||||||
// Compute the scale we'll need once everything is updated
|
// Compute the scale we'll need once everything is updated
|
||||||
let nWorkspaces = global.screen.n_workspaces;
|
let nWorkspaces = workspaceManager.n_workspaces;
|
||||||
let totalSpacing = (nWorkspaces - 1) * spacing;
|
let totalSpacing = (nWorkspaces - 1) * spacing;
|
||||||
let avail = (box.y2 - box.y1) - totalSpacing;
|
let avail = (box.y2 - box.y1) - totalSpacing;
|
||||||
|
|
||||||
@ -1215,7 +1251,8 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
let indicatorY1 = this._indicatorY;
|
let indicatorY1 = this._indicatorY;
|
||||||
let indicatorY2;
|
let indicatorY2;
|
||||||
// when not animating, the workspace position overrides this._indicatorY
|
// when not animating, the workspace position overrides this._indicatorY
|
||||||
let indicatorWorkspace = !this._animatingIndicator ? global.screen.get_active_workspace() : null;
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
|
let indicatorWorkspace = !this._animatingIndicator ? activeWorkspace : null;
|
||||||
let indicatorThemeNode = this._indicator.get_theme_node();
|
let indicatorThemeNode = this._indicator.get_theme_node();
|
||||||
|
|
||||||
let indicatorTopFullBorder = indicatorThemeNode.get_padding(St.Side.TOP) + indicatorThemeNode.get_border_width(St.Side.TOP);
|
let indicatorTopFullBorder = indicatorThemeNode.get_padding(St.Side.TOP) + indicatorThemeNode.get_border_width(St.Side.TOP);
|
||||||
@ -1306,7 +1343,8 @@ var ThumbnailsBox = new Lang.Class({
|
|||||||
|
|
||||||
_activeWorkspaceChanged(wm, from, to, direction) {
|
_activeWorkspaceChanged(wm, from, to, direction) {
|
||||||
let thumbnail;
|
let thumbnail;
|
||||||
let activeWorkspace = global.screen.get_active_workspace();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWorkspace = workspaceManager.get_active_workspace();
|
||||||
for (let i = 0; i < this._thumbnails.length; i++) {
|
for (let i = 0; i < this._thumbnails.length; i++) {
|
||||||
if (this._thumbnails[i].metaWorkspace == activeWorkspace) {
|
if (this._thumbnails[i].metaWorkspace == activeWorkspace) {
|
||||||
thumbnail = this._thumbnails[i];
|
thumbnail = this._thumbnails[i];
|
||||||
|
@ -91,25 +91,29 @@ var WorkspacesView = new Lang.Class({
|
|||||||
Extends: WorkspacesViewBase,
|
Extends: WorkspacesViewBase,
|
||||||
|
|
||||||
_init(monitorIndex) {
|
_init(monitorIndex) {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
this.parent(monitorIndex);
|
this.parent(monitorIndex);
|
||||||
|
|
||||||
this._animating = false; // tweening
|
this._animating = false; // tweening
|
||||||
this._scrolling = false; // swipe-scrolling
|
this._scrolling = false; // swipe-scrolling
|
||||||
this._animatingScroll = false; // programatically updating the adjustment
|
this._animatingScroll = false; // programatically updating the adjustment
|
||||||
|
|
||||||
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
|
let activeWorkspaceIndex = workspaceManager.get_active_workspace_index();
|
||||||
this.scrollAdjustment = new St.Adjustment({ value: activeWorkspaceIndex,
|
this.scrollAdjustment = new St.Adjustment({ value: activeWorkspaceIndex,
|
||||||
lower: 0,
|
lower: 0,
|
||||||
page_increment: 1,
|
page_increment: 1,
|
||||||
page_size: 1,
|
page_size: 1,
|
||||||
step_increment: 0,
|
step_increment: 0,
|
||||||
upper: global.screen.n_workspaces });
|
upper: workspaceManager.n_workspaces });
|
||||||
this.scrollAdjustment.connect('notify::value',
|
this.scrollAdjustment.connect('notify::value',
|
||||||
this._onScroll.bind(this));
|
this._onScroll.bind(this));
|
||||||
|
|
||||||
this._workspaces = [];
|
this._workspaces = [];
|
||||||
this._updateWorkspaces();
|
this._updateWorkspaces();
|
||||||
this._updateWorkspacesId = global.screen.connect('notify::n-workspaces', this._updateWorkspaces.bind(this));
|
this._updateWorkspacesId =
|
||||||
|
workspaceManager.connect('notify::n-workspaces',
|
||||||
|
this._updateWorkspaces.bind(this));
|
||||||
|
|
||||||
this._overviewShownId =
|
this._overviewShownId =
|
||||||
Main.overview.connect('shown', () => {
|
Main.overview.connect('shown', () => {
|
||||||
@ -138,7 +142,8 @@ var WorkspacesView = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getActiveWorkspace() {
|
getActiveWorkspace() {
|
||||||
let active = global.screen.get_active_workspace_index();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let active = workspaceManager.get_active_workspace_index();
|
||||||
return this._workspaces[active];
|
return this._workspaces[active];
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -169,7 +174,8 @@ var WorkspacesView = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_scrollToActive() {
|
_scrollToActive() {
|
||||||
let active = global.screen.get_active_workspace_index();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let active = workspaceManager.get_active_workspace_index();
|
||||||
|
|
||||||
this._updateWorkspaceActors(true);
|
this._updateWorkspaceActors(true);
|
||||||
this._updateScrollAdjustment(active);
|
this._updateScrollAdjustment(active);
|
||||||
@ -178,7 +184,8 @@ var WorkspacesView = new Lang.Class({
|
|||||||
// Update workspace actors parameters
|
// Update workspace actors parameters
|
||||||
// @showAnimation: iff %true, transition between states
|
// @showAnimation: iff %true, transition between states
|
||||||
_updateWorkspaceActors(showAnimation) {
|
_updateWorkspaceActors(showAnimation) {
|
||||||
let active = global.screen.get_active_workspace_index();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let active = workspaceManager.get_active_workspace_index();
|
||||||
|
|
||||||
this._animating = showAnimation;
|
this._animating = showAnimation;
|
||||||
|
|
||||||
@ -214,7 +221,8 @@ var WorkspacesView = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateVisibility() {
|
_updateVisibility() {
|
||||||
let active = global.screen.get_active_workspace_index();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let active = workspaceManager.get_active_workspace_index();
|
||||||
|
|
||||||
for (let w = 0; w < this._workspaces.length; w++) {
|
for (let w = 0; w < this._workspaces.length; w++) {
|
||||||
let workspace = this._workspaces[w];
|
let workspace = this._workspaces[w];
|
||||||
@ -246,13 +254,14 @@ var WorkspacesView = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateWorkspaces() {
|
_updateWorkspaces() {
|
||||||
let newNumWorkspaces = global.screen.n_workspaces;
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let newNumWorkspaces = workspaceManager.n_workspaces;
|
||||||
|
|
||||||
this.scrollAdjustment.upper = newNumWorkspaces;
|
this.scrollAdjustment.upper = newNumWorkspaces;
|
||||||
|
|
||||||
let needsUpdate = false;
|
let needsUpdate = false;
|
||||||
for (let j = 0; j < newNumWorkspaces; j++) {
|
for (let j = 0; j < newNumWorkspaces; j++) {
|
||||||
let metaWorkspace = global.screen.get_workspace_by_index(j);
|
let metaWorkspace = workspaceManager.get_workspace_by_index(j);
|
||||||
let workspace;
|
let workspace;
|
||||||
|
|
||||||
if (j >= this._workspaces.length) { /* added */
|
if (j >= this._workspaces.length) { /* added */
|
||||||
@ -290,7 +299,8 @@ var WorkspacesView = new Lang.Class({
|
|||||||
this.scrollAdjustment.run_dispose();
|
this.scrollAdjustment.run_dispose();
|
||||||
Main.overview.disconnect(this._overviewShownId);
|
Main.overview.disconnect(this._overviewShownId);
|
||||||
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
|
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
|
||||||
global.screen.disconnect(this._updateWorkspacesId);
|
let workspaceManager = global.workspace_manager;
|
||||||
|
workspaceManager.disconnect(this._updateWorkspacesId);
|
||||||
},
|
},
|
||||||
|
|
||||||
startSwipeScroll() {
|
startSwipeScroll() {
|
||||||
@ -311,7 +321,8 @@ var WorkspacesView = new Lang.Class({
|
|||||||
if (this._animatingScroll)
|
if (this._animatingScroll)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let active = global.screen.get_active_workspace_index();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let active = workspaceManager.get_active_workspace_index();
|
||||||
let current = Math.round(adj.value);
|
let current = Math.round(adj.value);
|
||||||
|
|
||||||
if (active != current) {
|
if (active != current) {
|
||||||
@ -593,7 +604,7 @@ var WorkspacesDisplay = new Lang.Class({
|
|||||||
_getMonitorIndexForEvent(event) {
|
_getMonitorIndexForEvent(event) {
|
||||||
let [x, y] = event.get_coords();
|
let [x, y] = event.get_coords();
|
||||||
let rect = new Meta.Rectangle({ x: x, y: y, width: 1, height: 1 });
|
let rect = new Meta.Rectangle({ x: x, y: y, width: 1, height: 1 });
|
||||||
return global.screen.get_monitor_index_for_rect(rect);
|
return global.display.get_monitor_index_for_rect(rect);
|
||||||
},
|
},
|
||||||
|
|
||||||
_getPrimaryView() {
|
_getPrimaryView() {
|
||||||
@ -679,7 +690,8 @@ var WorkspacesDisplay = new Lang.Class({
|
|||||||
this._getMonitorIndexForEvent(event) != this._primaryIndex)
|
this._getMonitorIndexForEvent(event) != this._primaryIndex)
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
let activeWs = global.screen.get_active_workspace();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWs = workspaceManager.get_active_workspace();
|
||||||
let ws;
|
let ws;
|
||||||
switch (event.get_scroll_direction()) {
|
switch (event.get_scroll_direction()) {
|
||||||
case Clutter.ScrollDirection.UP:
|
case Clutter.ScrollDirection.UP:
|
||||||
@ -698,7 +710,8 @@ var WorkspacesDisplay = new Lang.Class({
|
|||||||
_onKeyPressEvent(actor, event) {
|
_onKeyPressEvent(actor, event) {
|
||||||
if (!this.actor.mapped)
|
if (!this.actor.mapped)
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
let activeWs = global.screen.get_active_workspace();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let activeWs = workspaceManager.get_active_workspace();
|
||||||
let ws;
|
let ws;
|
||||||
switch (event.get_key_symbol()) {
|
switch (event.get_key_symbol()) {
|
||||||
case Clutter.KEY_Page_Up:
|
case Clutter.KEY_Page_Up:
|
||||||
|
27
meson.build
27
meson.build
@ -1,12 +1,12 @@
|
|||||||
project('gnome-shell', 'c',
|
project('gnome-shell', 'c',
|
||||||
version: '3.28.0',
|
version: '3.29.4',
|
||||||
meson_version: '>= 0.42.0',
|
meson_version: '>= 0.42.0',
|
||||||
license: 'GPLv2+'
|
license: 'GPLv2+'
|
||||||
)
|
)
|
||||||
|
|
||||||
# We depend on a specific version of the libmutter API. The mutter variants of
|
# We depend on a specific version of the libmutter API. The mutter variants of
|
||||||
# the Cogl and Clutter libraries also use this API version.
|
# the Cogl and Clutter libraries also use this API version.
|
||||||
mutter_api_version = '2'
|
mutter_api_version = '3'
|
||||||
|
|
||||||
clutter_pc = 'mutter-clutter-' + mutter_api_version
|
clutter_pc = 'mutter-clutter-' + mutter_api_version
|
||||||
cogl_pc = 'mutter-cogl-' + mutter_api_version
|
cogl_pc = 'mutter-cogl-' + mutter_api_version
|
||||||
@ -18,12 +18,12 @@ ecal_req = '>= 3.5.3'
|
|||||||
eds_req = '>= 3.17.2'
|
eds_req = '>= 3.17.2'
|
||||||
gcr_req = '>= 3.7.5'
|
gcr_req = '>= 3.7.5'
|
||||||
gdesktop_req = '>= 3.7.90'
|
gdesktop_req = '>= 3.7.90'
|
||||||
gio_req = '>= 2.53.0'
|
gio_req = '>= 2.56.0'
|
||||||
gi_req = '>= 1.49.1'
|
gi_req = '>= 1.49.1'
|
||||||
gjs_req = '>= 1.47.0'
|
gjs_req = '>= 1.47.0'
|
||||||
gtk_req = '>= 3.15.0'
|
gtk_req = '>= 3.15.0'
|
||||||
json_glib_req = '>= 0.13.2'
|
json_glib_req = '>= 0.13.2'
|
||||||
mutter_req = '>= 3.28.0'
|
mutter_req = '>= 3.29.4'
|
||||||
polkit_req = '>= 0.100'
|
polkit_req = '>= 0.100'
|
||||||
schemas_req = '>= 3.21.3'
|
schemas_req = '>= 3.21.3'
|
||||||
startup_req = '>= 0.11'
|
startup_req = '>= 0.11'
|
||||||
@ -31,7 +31,7 @@ ibus_req = '>= 1.5.2'
|
|||||||
|
|
||||||
bt_req = '>= 3.9.0'
|
bt_req = '>= 3.9.0'
|
||||||
gst_req = '>= 0.11.92'
|
gst_req = '>= 0.11.92'
|
||||||
nm_req = '>= 0.9.8'
|
nm_req = '>= 1.10.4'
|
||||||
secret_req = '>= 0.18'
|
secret_req = '>= 0.18'
|
||||||
|
|
||||||
gnome = import('gnome')
|
gnome = import('gnome')
|
||||||
@ -59,6 +59,13 @@ servicedir = join_paths(datadir, 'dbus-1', 'services')
|
|||||||
|
|
||||||
plugindir = get_variable('BROWSER_PLUGIN_DIR', mozplugindir)
|
plugindir = get_variable('BROWSER_PLUGIN_DIR', mozplugindir)
|
||||||
|
|
||||||
|
# XXX: Once https://github.com/systemd/systemd/issues/9595 is fixed and we can
|
||||||
|
# depend on this version, replace with something like:
|
||||||
|
# systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
|
||||||
|
# define_variable: ['prefix', prefix])
|
||||||
|
# and uncomment systemd_dep below
|
||||||
|
systemduserunitdir = join_paths(libdir, 'systemd', 'user')
|
||||||
|
|
||||||
keybindings_dep = dependency('gnome-keybindings', required: false)
|
keybindings_dep = dependency('gnome-keybindings', required: false)
|
||||||
if keybindings_dep.found()
|
if keybindings_dep.found()
|
||||||
keysdir = keybindings_dep.get_pkgconfig_variable('keysdir')
|
keysdir = keybindings_dep.get_pkgconfig_variable('keysdir')
|
||||||
@ -117,10 +124,12 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('systemd')
|
if get_option('systemd')
|
||||||
systemd_dep = dependency('libsystemd')
|
libsystemd_dep = dependency('libsystemd')
|
||||||
have_systemd = systemd_dep.found()
|
# XXX: see systemduserunitdir
|
||||||
|
# systemd_dep = dependency('systemd')
|
||||||
|
have_systemd = true
|
||||||
else
|
else
|
||||||
systemd_dep = []
|
libsystemd_dep = []
|
||||||
have_systemd = false
|
have_systemd = false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -189,3 +198,5 @@ subdir('tests')
|
|||||||
if get_option('gtk_doc')
|
if get_option('gtk_doc')
|
||||||
subdir('docs/reference')
|
subdir('docs/reference')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
meson.add_install_script('meson/meson-postinstall.sh')
|
||||||
|
10
meson/meson-postinstall.sh
Executable file
10
meson/meson-postinstall.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Package managers set this so we don't need to run
|
||||||
|
if [ -z "$DESTDIR" ]; then
|
||||||
|
echo Compiling GSettings schemas...
|
||||||
|
glib-compile-schemas ${MESON_INSTALL_PREFIX}/share/glib-2.0/schemas
|
||||||
|
|
||||||
|
echo Updating desktop database...
|
||||||
|
update-desktop-database -q ${MESON_INSTALL_PREFIX}/share/applications
|
||||||
|
fi
|
45
po/ca.po
45
po/ca.po
@ -10,7 +10,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: HEAD\n"
|
"Project-Id-Version: HEAD\n"
|
||||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
||||||
"POT-Creation-Date: 2018-03-10 12:32+0000\n"
|
"POT-Creation-Date: 2018-04-13 19:54+0000\n"
|
||||||
"PO-Revision-Date: 2018-03-10 21:24+0100\n"
|
"PO-Revision-Date: 2018-03-10 21:24+0100\n"
|
||||||
"Last-Translator: Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>\n"
|
"Last-Translator: Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>\n"
|
||||||
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
|
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
|
||||||
@ -349,7 +349,7 @@ msgid "There was an error loading the preferences dialog for %s:"
|
|||||||
msgstr "S'ha produït un error en carregar el diàleg de preferències de %s:"
|
msgstr "S'ha produït un error en carregar el diàleg de preferències de %s:"
|
||||||
|
|
||||||
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
||||||
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
|
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
|
||||||
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
||||||
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
@ -669,12 +669,12 @@ msgstr "Afegeix als preferits"
|
|||||||
msgid "Show Details"
|
msgid "Show Details"
|
||||||
msgstr "Mostra els detalls"
|
msgstr "Mostra els detalls"
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:138
|
#: js/ui/appFavorites.js:140
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been added to your favorites."
|
msgid "%s has been added to your favorites."
|
||||||
msgstr "S'ha afegit %s als preferits."
|
msgstr "S'ha afegit %s als preferits."
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:172
|
#: js/ui/appFavorites.js:174
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been removed from your favorites."
|
msgid "%s has been removed from your favorites."
|
||||||
msgstr "S'ha suprimit %s dels preferits."
|
msgstr "S'ha suprimit %s dels preferits."
|
||||||
@ -869,7 +869,7 @@ msgstr "S'ha desconnectat un dispositiu extern"
|
|||||||
msgid "Open with %s"
|
msgid "Open with %s"
|
||||||
msgstr "Obre amb %s"
|
msgstr "Obre amb %s"
|
||||||
|
|
||||||
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
|
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
|
||||||
msgid "Password:"
|
msgid "Password:"
|
||||||
msgstr "Contrasenya:"
|
msgstr "Contrasenya:"
|
||||||
|
|
||||||
@ -957,15 +957,15 @@ msgstr "Cal introduir una contrasenya per connectar-vos a «%s»."
|
|||||||
msgid "Network Manager"
|
msgid "Network Manager"
|
||||||
msgstr "Gestor de connexions de xarxa"
|
msgstr "Gestor de connexions de xarxa"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:43
|
#: js/ui/components/polkitAgent.js:48
|
||||||
msgid "Authentication Required"
|
msgid "Authentication Required"
|
||||||
msgstr "Cal autenticació"
|
msgstr "Cal autenticació"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:71
|
#: js/ui/components/polkitAgent.js:76
|
||||||
msgid "Administrator"
|
msgid "Administrator"
|
||||||
msgstr "Administrador"
|
msgstr "Administrador"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:151
|
#: js/ui/components/polkitAgent.js:156
|
||||||
msgid "Authenticate"
|
msgid "Authenticate"
|
||||||
msgstr "Autentica"
|
msgstr "Autentica"
|
||||||
|
|
||||||
@ -973,7 +973,7 @@ msgstr "Autentica"
|
|||||||
#. * requested authentication was not gained; this can happen
|
#. * requested authentication was not gained; this can happen
|
||||||
#. * because of an authentication error (like invalid password),
|
#. * because of an authentication error (like invalid password),
|
||||||
#. * for instance.
|
#. * for instance.
|
||||||
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
|
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
|
||||||
msgid "Sorry, that didn’t work. Please try again."
|
msgid "Sorry, that didn’t work. Please try again."
|
||||||
msgstr "No ha funcionat. Torneu-ho a provar."
|
msgstr "No ha funcionat. Torneu-ho a provar."
|
||||||
|
|
||||||
@ -1021,7 +1021,7 @@ msgstr "Afegeix rellotges del món…"
|
|||||||
msgid "World Clocks"
|
msgid "World Clocks"
|
||||||
msgstr "Rellotges del món"
|
msgstr "Rellotges del món"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:225
|
#: js/ui/dateMenu.js:227
|
||||||
msgid "Weather"
|
msgid "Weather"
|
||||||
msgstr "El temps"
|
msgstr "El temps"
|
||||||
|
|
||||||
@ -1029,7 +1029,7 @@ msgstr "El temps"
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:289
|
#: js/ui/dateMenu.js:291
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s all day."
|
msgid "%s all day."
|
||||||
msgstr "%s tot el dia."
|
msgstr "%s tot el dia."
|
||||||
@ -1038,7 +1038,7 @@ msgstr "%s tot el dia."
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:295
|
#: js/ui/dateMenu.js:297
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s later."
|
msgid "%s, then %s later."
|
||||||
msgstr "%s, llavors %s més tard."
|
msgstr "%s, llavors %s més tard."
|
||||||
@ -1047,30 +1047,30 @@ msgstr "%s, llavors %s més tard."
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:301
|
#: js/ui/dateMenu.js:303
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s, followed by %s later."
|
msgid "%s, then %s, followed by %s later."
|
||||||
msgstr "%s, llavors %s, seguit per %s més tard."
|
msgstr "%s, llavors %s, seguit per %s més tard."
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:312
|
#: js/ui/dateMenu.js:314
|
||||||
msgid "Select a location…"
|
msgid "Select a location…"
|
||||||
msgstr "Trieu una ubicació…"
|
msgstr "Trieu una ubicació…"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:315
|
#: js/ui/dateMenu.js:317
|
||||||
msgid "Loading…"
|
msgid "Loading…"
|
||||||
msgstr "S'està carregant…"
|
msgstr "S'està carregant…"
|
||||||
|
|
||||||
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
||||||
#: js/ui/dateMenu.js:321
|
#: js/ui/dateMenu.js:323
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Feels like %s."
|
msgid "Feels like %s."
|
||||||
msgstr "Sensació tèrmica de %s."
|
msgstr "Sensació tèrmica de %s."
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:324
|
#: js/ui/dateMenu.js:326
|
||||||
msgid "Go online for weather information"
|
msgid "Go online for weather information"
|
||||||
msgstr "Vés en línia per a informació sobre el temps"
|
msgstr "Vés en línia per a informació sobre el temps"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:326
|
#: js/ui/dateMenu.js:328
|
||||||
msgid "Weather information is currently unavailable"
|
msgid "Weather information is currently unavailable"
|
||||||
msgstr "La informació sobre el temps no està disponible"
|
msgstr "La informació sobre el temps no està disponible"
|
||||||
|
|
||||||
@ -1990,16 +1990,17 @@ msgid ""
|
|||||||
"New device has been detected while you were away. Please disconnect and "
|
"New device has been detected while you were away. Please disconnect and "
|
||||||
"reconnect the device to start using it."
|
"reconnect the device to start using it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"El nou dispositiu s'ha detectat mentre estàveu absents. Desconnecteu i torneu a connectar el dispositiu per a començar a utilitzar-lo."
|
"El nou dispositiu s'ha detectat mentre estàveu absents. Desconnecteu i "
|
||||||
|
"torneu a connectar el dispositiu per a començar a utilitzar-lo."
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:356
|
#: js/ui/status/thunderbolt.js:356
|
||||||
msgid "Thunderbolt authorization error"
|
msgid "Thunderbolt authorization error"
|
||||||
msgstr "S'ha produït un error d'autorització a Thunderbolt"
|
msgstr "S'ha produït un error d'autorització a Thunderbolt"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:357
|
#: js/ui/status/thunderbolt.js:357
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Could not authorize the thunderbolt device: %s"
|
msgid "Could not authorize the Thunderbolt device: %s"
|
||||||
msgstr "No s'ha pogut autoritzar el dispositiu thunderbolt: %s"
|
msgstr "No s'ha pogut autoritzar el dispositiu Thunderbolt: %s"
|
||||||
|
|
||||||
#: js/ui/status/volume.js:128
|
#: js/ui/status/volume.js:128
|
||||||
msgid "Volume changed"
|
msgid "Volume changed"
|
||||||
|
62
po/cs.po
62
po/cs.po
@ -11,8 +11,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: gnome-shell\n"
|
"Project-Id-Version: gnome-shell\n"
|
||||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
||||||
"POT-Creation-Date: 2018-02-26 12:57+0000\n"
|
"POT-Creation-Date: 2018-04-13 19:54+0000\n"
|
||||||
"PO-Revision-Date: 2018-02-26 17:57+0100\n"
|
"PO-Revision-Date: 2018-04-24 17:32+0200\n"
|
||||||
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
|
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
|
||||||
"Language-Team: čeština <gnome-cs-list@gnome.org>\n"
|
"Language-Team: čeština <gnome-cs-list@gnome.org>\n"
|
||||||
"Language: cs\n"
|
"Language: cs\n"
|
||||||
@ -332,7 +332,7 @@ msgstr ""
|
|||||||
"Nastala chyba při načítání dialogového okna předvoleb pro rozšíření %s:"
|
"Nastala chyba při načítání dialogového okna předvoleb pro rozšíření %s:"
|
||||||
|
|
||||||
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
||||||
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
|
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
|
||||||
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
||||||
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
@ -667,12 +667,12 @@ msgstr "Přidat mezi oblíbené"
|
|||||||
msgid "Show Details"
|
msgid "Show Details"
|
||||||
msgstr "Zobrazit podrobnosti"
|
msgstr "Zobrazit podrobnosti"
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:138
|
#: js/ui/appFavorites.js:140
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been added to your favorites."
|
msgid "%s has been added to your favorites."
|
||||||
msgstr "%s byl přidán mezi oblíbené."
|
msgstr "%s byl přidán mezi oblíbené."
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:172
|
#: js/ui/appFavorites.js:174
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been removed from your favorites."
|
msgid "%s has been removed from your favorites."
|
||||||
msgstr "%s byl odstraněn z oblíbených."
|
msgstr "%s byl odstraněn z oblíbených."
|
||||||
@ -867,7 +867,7 @@ msgstr "Externí svazek odpojen"
|
|||||||
msgid "Open with %s"
|
msgid "Open with %s"
|
||||||
msgstr "Otevřít pomocí %s"
|
msgstr "Otevřít pomocí %s"
|
||||||
|
|
||||||
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
|
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
|
||||||
msgid "Password:"
|
msgid "Password:"
|
||||||
msgstr "Heslo:"
|
msgstr "Heslo:"
|
||||||
|
|
||||||
@ -955,15 +955,15 @@ msgstr "Pro připojení k „%s“ je vyžadováno heslo."
|
|||||||
msgid "Network Manager"
|
msgid "Network Manager"
|
||||||
msgstr "Network Manager"
|
msgstr "Network Manager"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:43
|
#: js/ui/components/polkitAgent.js:48
|
||||||
msgid "Authentication Required"
|
msgid "Authentication Required"
|
||||||
msgstr "Je vyžadováno ověření"
|
msgstr "Je vyžadováno ověření"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:71
|
#: js/ui/components/polkitAgent.js:76
|
||||||
msgid "Administrator"
|
msgid "Administrator"
|
||||||
msgstr "Správce"
|
msgstr "Správce"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:151
|
#: js/ui/components/polkitAgent.js:156
|
||||||
msgid "Authenticate"
|
msgid "Authenticate"
|
||||||
msgstr "Ověřit"
|
msgstr "Ověřit"
|
||||||
|
|
||||||
@ -971,7 +971,7 @@ msgstr "Ověřit"
|
|||||||
#. * requested authentication was not gained; this can happen
|
#. * requested authentication was not gained; this can happen
|
||||||
#. * because of an authentication error (like invalid password),
|
#. * because of an authentication error (like invalid password),
|
||||||
#. * for instance.
|
#. * for instance.
|
||||||
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
|
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
|
||||||
msgid "Sorry, that didn’t work. Please try again."
|
msgid "Sorry, that didn’t work. Please try again."
|
||||||
msgstr "Ověření bohužel nebylo úspěšné. Zkuste to prosím znovu."
|
msgstr "Ověření bohužel nebylo úspěšné. Zkuste to prosím znovu."
|
||||||
|
|
||||||
@ -1021,7 +1021,7 @@ msgstr "Přidat světový čas…"
|
|||||||
msgid "World Clocks"
|
msgid "World Clocks"
|
||||||
msgstr "Světové hodiny"
|
msgstr "Světové hodiny"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:225
|
#: js/ui/dateMenu.js:227
|
||||||
msgid "Weather"
|
msgid "Weather"
|
||||||
msgstr "Počasí"
|
msgstr "Počasí"
|
||||||
|
|
||||||
@ -1029,7 +1029,7 @@ msgstr "Počasí"
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:289
|
#: js/ui/dateMenu.js:291
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s all day."
|
msgid "%s all day."
|
||||||
msgstr "%s celý den."
|
msgstr "%s celý den."
|
||||||
@ -1038,7 +1038,7 @@ msgstr "%s celý den."
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:295
|
#: js/ui/dateMenu.js:297
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s later."
|
msgid "%s, then %s later."
|
||||||
msgstr "%s, později %s."
|
msgstr "%s, později %s."
|
||||||
@ -1047,30 +1047,30 @@ msgstr "%s, později %s."
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:301
|
#: js/ui/dateMenu.js:303
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s, followed by %s later."
|
msgid "%s, then %s, followed by %s later."
|
||||||
msgstr "%s, pak %s a později %s."
|
msgstr "%s, pak %s a později %s."
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:312
|
#: js/ui/dateMenu.js:314
|
||||||
msgid "Select a location…"
|
msgid "Select a location…"
|
||||||
msgstr "Vybrat místo…"
|
msgstr "Vybrat místo…"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:315
|
#: js/ui/dateMenu.js:317
|
||||||
msgid "Loading…"
|
msgid "Loading…"
|
||||||
msgstr "Načítá se…"
|
msgstr "Načítá se…"
|
||||||
|
|
||||||
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
||||||
#: js/ui/dateMenu.js:321
|
#: js/ui/dateMenu.js:323
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Feels like %s."
|
msgid "Feels like %s."
|
||||||
msgstr "Pocitově jako %s."
|
msgstr "Pocitově jako %s."
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:324
|
#: js/ui/dateMenu.js:326
|
||||||
msgid "Go online for weather information"
|
msgid "Go online for weather information"
|
||||||
msgstr "Připojit se kvůli informacím o počasí"
|
msgstr "Připojit se kvůli informacím o počasí"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:326
|
#: js/ui/dateMenu.js:328
|
||||||
msgid "Weather information is currently unavailable"
|
msgid "Weather information is currently unavailable"
|
||||||
msgstr "Informace o počasí nejsou nyní dostupné"
|
msgstr "Informace o počasí nejsou nyní dostupné"
|
||||||
|
|
||||||
@ -1986,16 +1986,16 @@ msgstr "Uspat do paměti"
|
|||||||
msgid "Power Off"
|
msgid "Power Off"
|
||||||
msgstr "Vypnout"
|
msgstr "Vypnout"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:272
|
#: js/ui/status/thunderbolt.js:294
|
||||||
msgid "Thunderbolt"
|
msgid "Thunderbolt"
|
||||||
msgstr "Thunderbolt"
|
msgstr "Thunderbolt"
|
||||||
|
|
||||||
#. we are done
|
#. we are done
|
||||||
#: js/ui/status/thunderbolt.js:328
|
#: js/ui/status/thunderbolt.js:350
|
||||||
msgid "Unknown Thunderbolt device"
|
msgid "Unknown Thunderbolt device"
|
||||||
msgstr "Neznámé zařízení Thunderbolt"
|
msgstr "Neznámé zařízení Thunderbolt"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:329
|
#: js/ui/status/thunderbolt.js:351
|
||||||
msgid ""
|
msgid ""
|
||||||
"New device has been detected while you were away. Please disconnect and "
|
"New device has been detected while you were away. Please disconnect and "
|
||||||
"reconnect the device to start using it."
|
"reconnect the device to start using it."
|
||||||
@ -2003,13 +2003,13 @@ msgstr ""
|
|||||||
"Zatímco jste byli pryč, bylo nalezeno nové zařízení. Odpojte jej prosím a "
|
"Zatímco jste byli pryč, bylo nalezeno nové zařízení. Odpojte jej prosím a "
|
||||||
"znovu připojte, abyste jej mohli používat."
|
"znovu připojte, abyste jej mohli používat."
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:334
|
#: js/ui/status/thunderbolt.js:356
|
||||||
msgid "Thunderbolt authorization error"
|
msgid "Thunderbolt authorization error"
|
||||||
msgstr "Chyba ověření Thunderbolt"
|
msgstr "Chyba ověření Thunderbolt"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:335
|
#: js/ui/status/thunderbolt.js:357
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Could not authorize the thunderbolt device: %s"
|
msgid "Could not authorize the Thunderbolt device: %s"
|
||||||
msgstr "Nezdařilo se provést ověření zařízení Thunderbolt: %s"
|
msgstr "Nezdařilo se provést ověření zařízení Thunderbolt: %s"
|
||||||
|
|
||||||
#: js/ui/status/volume.js:128
|
#: js/ui/status/volume.js:128
|
||||||
@ -2233,15 +2233,3 @@ msgstr[2] "%u vstupů"
|
|||||||
#: subprojects/gvc/gvc-mixer-control.c:2738
|
#: subprojects/gvc/gvc-mixer-control.c:2738
|
||||||
msgid "System Sounds"
|
msgid "System Sounds"
|
||||||
msgstr "Systémové zvuky"
|
msgstr "Systémové zvuky"
|
||||||
|
|
||||||
#~ msgctxt "search-result"
|
|
||||||
#~ msgid "Power off"
|
|
||||||
#~ msgstr "Vypnout"
|
|
||||||
|
|
||||||
#~ msgctxt "search-result"
|
|
||||||
#~ msgid "Log out"
|
|
||||||
#~ msgstr "Odhlásit se"
|
|
||||||
|
|
||||||
#~ msgctxt "search-result"
|
|
||||||
#~ msgid "Switch user"
|
|
||||||
#~ msgstr "Přepnout uživatele"
|
|
||||||
|
51
po/es.po
51
po/es.po
@ -9,8 +9,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: gnome-shell.master\n"
|
"Project-Id-Version: gnome-shell.master\n"
|
||||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
||||||
"POT-Creation-Date: 2018-02-22 09:24+0000\n"
|
"POT-Creation-Date: 2018-04-13 19:54+0000\n"
|
||||||
"PO-Revision-Date: 2018-02-23 08:26+0100\n"
|
"PO-Revision-Date: 2018-04-25 12:54+0200\n"
|
||||||
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
|
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
|
||||||
"Language-Team: es <gnome-es-list@gnome.org>\n"
|
"Language-Team: es <gnome-es-list@gnome.org>\n"
|
||||||
"Language: es\n"
|
"Language: es\n"
|
||||||
@ -346,7 +346,7 @@ msgid "There was an error loading the preferences dialog for %s:"
|
|||||||
msgstr "Hubo un error al lanzar el diálogo de preferencias para %s:"
|
msgstr "Hubo un error al lanzar el diálogo de preferencias para %s:"
|
||||||
|
|
||||||
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
||||||
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
|
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
|
||||||
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
||||||
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
@ -665,12 +665,12 @@ msgstr "Añadir a los favoritos"
|
|||||||
msgid "Show Details"
|
msgid "Show Details"
|
||||||
msgstr "Mostrar detalles"
|
msgstr "Mostrar detalles"
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:138
|
#: js/ui/appFavorites.js:140
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been added to your favorites."
|
msgid "%s has been added to your favorites."
|
||||||
msgstr "Se ha añadido %s a sus favoritos."
|
msgstr "Se ha añadido %s a sus favoritos."
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:172
|
#: js/ui/appFavorites.js:174
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been removed from your favorites."
|
msgid "%s has been removed from your favorites."
|
||||||
msgstr "Se ha quitado %s de sus favoritos."
|
msgstr "Se ha quitado %s de sus favoritos."
|
||||||
@ -865,7 +865,7 @@ msgstr "Dispositivo externo desconectado"
|
|||||||
msgid "Open with %s"
|
msgid "Open with %s"
|
||||||
msgstr "Abrir con %s"
|
msgstr "Abrir con %s"
|
||||||
|
|
||||||
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
|
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
|
||||||
msgid "Password:"
|
msgid "Password:"
|
||||||
msgstr "Contraseña:"
|
msgstr "Contraseña:"
|
||||||
|
|
||||||
@ -953,15 +953,15 @@ msgstr "Se requiere una contraseña para conectarse a «%s»."
|
|||||||
msgid "Network Manager"
|
msgid "Network Manager"
|
||||||
msgstr "Gestor de la red"
|
msgstr "Gestor de la red"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:43
|
#: js/ui/components/polkitAgent.js:48
|
||||||
msgid "Authentication Required"
|
msgid "Authentication Required"
|
||||||
msgstr "Se necesita autenticación"
|
msgstr "Se necesita autenticación"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:71
|
#: js/ui/components/polkitAgent.js:76
|
||||||
msgid "Administrator"
|
msgid "Administrator"
|
||||||
msgstr "Administrador"
|
msgstr "Administrador"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:151
|
#: js/ui/components/polkitAgent.js:156
|
||||||
msgid "Authenticate"
|
msgid "Authenticate"
|
||||||
msgstr "Autenticar"
|
msgstr "Autenticar"
|
||||||
|
|
||||||
@ -969,7 +969,7 @@ msgstr "Autenticar"
|
|||||||
#. * requested authentication was not gained; this can happen
|
#. * requested authentication was not gained; this can happen
|
||||||
#. * because of an authentication error (like invalid password),
|
#. * because of an authentication error (like invalid password),
|
||||||
#. * for instance.
|
#. * for instance.
|
||||||
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
|
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
|
||||||
msgid "Sorry, that didn’t work. Please try again."
|
msgid "Sorry, that didn’t work. Please try again."
|
||||||
msgstr "Eso no ha funcionado. Inténtelo de nuevo."
|
msgstr "Eso no ha funcionado. Inténtelo de nuevo."
|
||||||
|
|
||||||
@ -1017,7 +1017,7 @@ msgstr "Añadir relojes del mundo…"
|
|||||||
msgid "World Clocks"
|
msgid "World Clocks"
|
||||||
msgstr "Relojes del mundo"
|
msgstr "Relojes del mundo"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:225
|
#: js/ui/dateMenu.js:227
|
||||||
msgid "Weather"
|
msgid "Weather"
|
||||||
msgstr "Meteorología"
|
msgstr "Meteorología"
|
||||||
|
|
||||||
@ -1025,7 +1025,7 @@ msgstr "Meteorología"
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:289
|
#: js/ui/dateMenu.js:291
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s all day."
|
msgid "%s all day."
|
||||||
msgstr "%s todo el día."
|
msgstr "%s todo el día."
|
||||||
@ -1034,7 +1034,7 @@ msgstr "%s todo el día."
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:295
|
#: js/ui/dateMenu.js:297
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s later."
|
msgid "%s, then %s later."
|
||||||
msgstr "%s, luego %s."
|
msgstr "%s, luego %s."
|
||||||
@ -1043,30 +1043,30 @@ msgstr "%s, luego %s."
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:301
|
#: js/ui/dateMenu.js:303
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s, followed by %s later."
|
msgid "%s, then %s, followed by %s later."
|
||||||
msgstr "%s, luego %s seguido de %s."
|
msgstr "%s, luego %s seguido de %s."
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:312
|
#: js/ui/dateMenu.js:314
|
||||||
msgid "Select a location…"
|
msgid "Select a location…"
|
||||||
msgstr "Seleccionar ubicación…"
|
msgstr "Seleccionar ubicación…"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:315
|
#: js/ui/dateMenu.js:317
|
||||||
msgid "Loading…"
|
msgid "Loading…"
|
||||||
msgstr "Cargando…"
|
msgstr "Cargando…"
|
||||||
|
|
||||||
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
||||||
#: js/ui/dateMenu.js:321
|
#: js/ui/dateMenu.js:323
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Feels like %s."
|
msgid "Feels like %s."
|
||||||
msgstr "Sensación térmica de %s."
|
msgstr "Sensación térmica de %s."
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:324
|
#: js/ui/dateMenu.js:326
|
||||||
msgid "Go online for weather information"
|
msgid "Go online for weather information"
|
||||||
msgstr "Conectarse para obtener la información meteorológica"
|
msgstr "Conectarse para obtener la información meteorológica"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:326
|
#: js/ui/dateMenu.js:328
|
||||||
msgid "Weather information is currently unavailable"
|
msgid "Weather information is currently unavailable"
|
||||||
msgstr "La información meteorológica no está disponible actualmente."
|
msgstr "La información meteorológica no está disponible actualmente."
|
||||||
|
|
||||||
@ -1968,16 +1968,16 @@ msgstr "Suspender"
|
|||||||
msgid "Power Off"
|
msgid "Power Off"
|
||||||
msgstr "Apagar"
|
msgstr "Apagar"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:272
|
#: js/ui/status/thunderbolt.js:294
|
||||||
msgid "Thunderbolt"
|
msgid "Thunderbolt"
|
||||||
msgstr "Thunderbolt"
|
msgstr "Thunderbolt"
|
||||||
|
|
||||||
#. we are done
|
#. we are done
|
||||||
#: js/ui/status/thunderbolt.js:328
|
#: js/ui/status/thunderbolt.js:350
|
||||||
msgid "Unknown Thunderbolt device"
|
msgid "Unknown Thunderbolt device"
|
||||||
msgstr "Dispositivo Thunderbolt desconocido"
|
msgstr "Dispositivo Thunderbolt desconocido"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:329
|
#: js/ui/status/thunderbolt.js:351
|
||||||
msgid ""
|
msgid ""
|
||||||
"New device has been detected while you were away. Please disconnect and "
|
"New device has been detected while you were away. Please disconnect and "
|
||||||
"reconnect the device to start using it."
|
"reconnect the device to start using it."
|
||||||
@ -1985,13 +1985,14 @@ msgstr ""
|
|||||||
"Se ha detectado un dispositivo nuevo mientras estaba fuera. Desconéctelo y "
|
"Se ha detectado un dispositivo nuevo mientras estaba fuera. Desconéctelo y "
|
||||||
"vuélvalo a conectar para empezar a usarlo."
|
"vuélvalo a conectar para empezar a usarlo."
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:334
|
#: js/ui/status/thunderbolt.js:356
|
||||||
msgid "Thunderbolt authorization error"
|
msgid "Thunderbolt authorization error"
|
||||||
msgstr "Error de autorización de Thunderbolt"
|
msgstr "Error de autorización de Thunderbolt"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:335
|
#: js/ui/status/thunderbolt.js:357
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Could not authorize the thunderbolt device: %s"
|
#| msgid "Could not authorize the thunderbolt device: %s"
|
||||||
|
msgid "Could not authorize the Thunderbolt device: %s"
|
||||||
msgstr "No se pudo autorizar el dispositivo Thunderbolt: %s"
|
msgstr "No se pudo autorizar el dispositivo Thunderbolt: %s"
|
||||||
|
|
||||||
#: js/ui/status/volume.js:128
|
#: js/ui/status/volume.js:128
|
||||||
|
54
po/hr.po
54
po/hr.po
@ -7,8 +7,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: gnome-shell master\n"
|
"Project-Id-Version: gnome-shell master\n"
|
||||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
||||||
"POT-Creation-Date: 2018-02-26 17:00+0000\n"
|
"POT-Creation-Date: 2018-04-13 19:54+0000\n"
|
||||||
"PO-Revision-Date: 2018-03-07 22:46+0100\n"
|
"PO-Revision-Date: 2018-04-16 14:30+0200\n"
|
||||||
"Last-Translator: gogo <trebelnik2@gmail.com>\n"
|
"Last-Translator: gogo <trebelnik2@gmail.com>\n"
|
||||||
"Language-Team: Croatian <hr@li.org>\n"
|
"Language-Team: Croatian <hr@li.org>\n"
|
||||||
"Language: hr\n"
|
"Language: hr\n"
|
||||||
@ -337,7 +337,7 @@ msgid "There was an error loading the preferences dialog for %s:"
|
|||||||
msgstr "Dogodila se greška učitavanja dijaloga osobitosti za %s:"
|
msgstr "Dogodila se greška učitavanja dijaloga osobitosti za %s:"
|
||||||
|
|
||||||
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
||||||
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
|
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
|
||||||
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
||||||
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
@ -663,12 +663,12 @@ msgstr "Dodaj u omiljene"
|
|||||||
msgid "Show Details"
|
msgid "Show Details"
|
||||||
msgstr "Prikaži pojedinosti"
|
msgstr "Prikaži pojedinosti"
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:138
|
#: js/ui/appFavorites.js:140
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been added to your favorites."
|
msgid "%s has been added to your favorites."
|
||||||
msgstr "%s je dodan u omiljene."
|
msgstr "%s je dodan u omiljene."
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:172
|
#: js/ui/appFavorites.js:174
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been removed from your favorites."
|
msgid "%s has been removed from your favorites."
|
||||||
msgstr "%s je uklonjen iz omiljenih."
|
msgstr "%s je uklonjen iz omiljenih."
|
||||||
@ -863,7 +863,7 @@ msgstr "Vanjski uređaj odspojen"
|
|||||||
msgid "Open with %s"
|
msgid "Open with %s"
|
||||||
msgstr "Otvori s(a) %s"
|
msgstr "Otvori s(a) %s"
|
||||||
|
|
||||||
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
|
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
|
||||||
msgid "Password:"
|
msgid "Password:"
|
||||||
msgstr "Lozinka:"
|
msgstr "Lozinka:"
|
||||||
|
|
||||||
@ -950,15 +950,15 @@ msgstr "Potrebna je lozinka za povezivanje s “%s”."
|
|||||||
msgid "Network Manager"
|
msgid "Network Manager"
|
||||||
msgstr "Mrežni upravitelj"
|
msgstr "Mrežni upravitelj"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:43
|
#: js/ui/components/polkitAgent.js:48
|
||||||
msgid "Authentication Required"
|
msgid "Authentication Required"
|
||||||
msgstr "Potrebna je ovjera"
|
msgstr "Potrebna je ovjera"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:71
|
#: js/ui/components/polkitAgent.js:76
|
||||||
msgid "Administrator"
|
msgid "Administrator"
|
||||||
msgstr "Administrator"
|
msgstr "Administrator"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:151
|
#: js/ui/components/polkitAgent.js:156
|
||||||
msgid "Authenticate"
|
msgid "Authenticate"
|
||||||
msgstr "Ovjeri"
|
msgstr "Ovjeri"
|
||||||
|
|
||||||
@ -966,7 +966,7 @@ msgstr "Ovjeri"
|
|||||||
#. * requested authentication was not gained; this can happen
|
#. * requested authentication was not gained; this can happen
|
||||||
#. * because of an authentication error (like invalid password),
|
#. * because of an authentication error (like invalid password),
|
||||||
#. * for instance.
|
#. * for instance.
|
||||||
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
|
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
|
||||||
msgid "Sorry, that didn’t work. Please try again."
|
msgid "Sorry, that didn’t work. Please try again."
|
||||||
msgstr "Nažalost, to ne radi. Pokušajte ponovno."
|
msgstr "Nažalost, to ne radi. Pokušajte ponovno."
|
||||||
|
|
||||||
@ -1014,7 +1014,7 @@ msgstr "Dodaj satove iz svijeta…"
|
|||||||
msgid "World Clocks"
|
msgid "World Clocks"
|
||||||
msgstr "Svjetski satovi"
|
msgstr "Svjetski satovi"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:225
|
#: js/ui/dateMenu.js:227
|
||||||
msgid "Weather"
|
msgid "Weather"
|
||||||
msgstr "Vrijeme"
|
msgstr "Vrijeme"
|
||||||
|
|
||||||
@ -1022,7 +1022,7 @@ msgstr "Vrijeme"
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:289
|
#: js/ui/dateMenu.js:291
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s all day."
|
msgid "%s all day."
|
||||||
msgstr "%s cijeli dan."
|
msgstr "%s cijeli dan."
|
||||||
@ -1031,7 +1031,7 @@ msgstr "%s cijeli dan."
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:295
|
#: js/ui/dateMenu.js:297
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s later."
|
msgid "%s, then %s later."
|
||||||
msgstr "%s, zatim %s kasnije."
|
msgstr "%s, zatim %s kasnije."
|
||||||
@ -1040,30 +1040,30 @@ msgstr "%s, zatim %s kasnije."
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:301
|
#: js/ui/dateMenu.js:303
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s, followed by %s later."
|
msgid "%s, then %s, followed by %s later."
|
||||||
msgstr "%s, zatim %s, praćena s %s kasnije."
|
msgstr "%s, zatim %s, praćena s %s kasnije."
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:312
|
#: js/ui/dateMenu.js:314
|
||||||
msgid "Select a location…"
|
msgid "Select a location…"
|
||||||
msgstr "Odaberi lokaciju…"
|
msgstr "Odaberi lokaciju…"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:315
|
#: js/ui/dateMenu.js:317
|
||||||
msgid "Loading…"
|
msgid "Loading…"
|
||||||
msgstr "Pretraživanje…"
|
msgstr "Pretraživanje…"
|
||||||
|
|
||||||
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
||||||
#: js/ui/dateMenu.js:321
|
#: js/ui/dateMenu.js:323
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Feels like %s."
|
msgid "Feels like %s."
|
||||||
msgstr "Kao da je %s."
|
msgstr "Kao da je %s."
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:324
|
#: js/ui/dateMenu.js:326
|
||||||
msgid "Go online for weather information"
|
msgid "Go online for weather information"
|
||||||
msgstr "Posjetite za opširnije vremenske informacije"
|
msgstr "Posjetite za opširnije vremenske informacije"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:326
|
#: js/ui/dateMenu.js:328
|
||||||
msgid "Weather information is currently unavailable"
|
msgid "Weather information is currently unavailable"
|
||||||
msgstr "Vremenske informacije su trenutno nedostupne"
|
msgstr "Vremenske informacije su trenutno nedostupne"
|
||||||
|
|
||||||
@ -1977,16 +1977,16 @@ msgstr "Suspendiraj"
|
|||||||
msgid "Power Off"
|
msgid "Power Off"
|
||||||
msgstr "Isključivanje"
|
msgstr "Isključivanje"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:272
|
#: js/ui/status/thunderbolt.js:294
|
||||||
msgid "Thunderbolt"
|
msgid "Thunderbolt"
|
||||||
msgstr "Thunderbolt"
|
msgstr "Thunderbolt"
|
||||||
|
|
||||||
#. we are done
|
#. we are done
|
||||||
#: js/ui/status/thunderbolt.js:328
|
#: js/ui/status/thunderbolt.js:350
|
||||||
msgid "Unknown Thunderbolt device"
|
msgid "Unknown Thunderbolt device"
|
||||||
msgstr "Nepoznati Thunderbolt uređaj"
|
msgstr "Nepoznati Thunderbolt uređaj"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:329
|
#: js/ui/status/thunderbolt.js:351
|
||||||
msgid ""
|
msgid ""
|
||||||
"New device has been detected while you were away. Please disconnect and "
|
"New device has been detected while you were away. Please disconnect and "
|
||||||
"reconnect the device to start using it."
|
"reconnect the device to start using it."
|
||||||
@ -1994,14 +1994,14 @@ msgstr ""
|
|||||||
"Otkriven je novi uređaj dok ste bili odsutni. Odspojite i ponovno spojite "
|
"Otkriven je novi uređaj dok ste bili odsutni. Odspojite i ponovno spojite "
|
||||||
"uređaj kako bi ga mogli koristiti."
|
"uređaj kako bi ga mogli koristiti."
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:334
|
#: js/ui/status/thunderbolt.js:356
|
||||||
msgid "Thunderbolt authorization error"
|
msgid "Thunderbolt authorization error"
|
||||||
msgstr "Greška Thunderbolt ovjere"
|
msgstr "Greška Thunderbolt odobravanja"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:335
|
#: js/ui/status/thunderbolt.js:357
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Could not authorize the thunderbolt device: %s"
|
msgid "Could not authorize the Thunderbolt device: %s"
|
||||||
msgstr "Nemoguća ovjera Thunderbolt uređaja: %s"
|
msgstr "Nemoguće odobravanje Thunderbolt uređaja: %s"
|
||||||
|
|
||||||
#: js/ui/status/volume.js:128
|
#: js/ui/status/volume.js:128
|
||||||
msgid "Volume changed"
|
msgid "Volume changed"
|
||||||
|
36
po/nl.po
36
po/nl.po
@ -8,22 +8,22 @@
|
|||||||
# Wouter Bolsterlee <wbolster@gnome.org>, 2011–2014.
|
# Wouter Bolsterlee <wbolster@gnome.org>, 2011–2014.
|
||||||
# Erwin Poeze <donnut@outlook.com>, 2013.
|
# Erwin Poeze <donnut@outlook.com>, 2013.
|
||||||
# Nathan Follens <nthn@unseen.is>, 2015-2018.
|
# Nathan Follens <nthn@unseen.is>, 2015-2018.
|
||||||
# Hannie Dumoleyn <hannie@ubuntu-nl.org>, 2015, 2017.
|
# Hannie Dumoleyn <hannie@ubuntu-nl.org>, 2015, 2017, 2018.
|
||||||
# Justin van Steijn <jvs@fsfe.org>, 2016, 2018.
|
# Justin van Steijn <jvs@fsfe.org>, 2016, 2018.
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: gnome-shell\n"
|
"Project-Id-Version: gnome-shell\n"
|
||||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
||||||
"POT-Creation-Date: 2018-02-21 14:13+0000\n"
|
"POT-Creation-Date: 2018-03-19 21:43+0000\n"
|
||||||
"PO-Revision-Date: 2018-02-21 22:05+0100\n"
|
"PO-Revision-Date: 2018-03-23 10:09+0100\n"
|
||||||
"Last-Translator: Justin van Steijn <jvs@fsfe.org>\n"
|
"Last-Translator: Hannie Dumoleyn <hannie@ubuntu-nl.org>\n"
|
||||||
"Language-Team: Dutch <gnome-nl-list@gnome.org>\n"
|
"Language-Team: Dutch <gnome-nl-list@gnome.org>\n"
|
||||||
"Language: nl\n"
|
"Language: nl\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
"X-Generator: Poedit 1.8.11\n"
|
"X-Generator: Lokalize 2.0\n"
|
||||||
"X-Project-Style: gnome\n"
|
"X-Project-Style: gnome\n"
|
||||||
|
|
||||||
#: data/50-gnome-shell-system.xml:6
|
#: data/50-gnome-shell-system.xml:6
|
||||||
@ -283,7 +283,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Geeft aan hoe vensters in het overzicht getoond worden. Geldige waarden zijn "
|
"Geeft aan hoe vensters in het overzicht getoond worden. Geldige waarden zijn "
|
||||||
"‘thumbnail-only’ (alleen een miniatuur tonen), ‘app-icon-only’ (alleen het "
|
"‘thumbnail-only’ (alleen een miniatuur tonen), ‘app-icon-only’ (alleen het "
|
||||||
"pictogram van de toepassing tonen) of “both” (beide tonen)."
|
"pictogram van de toepassing tonen) of ‘both’ (beide tonen)."
|
||||||
|
|
||||||
#: data/org.gnome.shell.gschema.xml.in:186
|
#: data/org.gnome.shell.gschema.xml.in:186
|
||||||
msgid ""
|
msgid ""
|
||||||
@ -470,7 +470,7 @@ msgstr "Oriëntatievergrendeling"
|
|||||||
msgid "lock orientation;screen;rotation"
|
msgid "lock orientation;screen;rotation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"lock orientation;screen;rotation;oriëntatievergrendeling;scherm;draaiing;"
|
"lock orientation;screen;rotation;oriëntatievergrendeling;scherm;draaiing;"
|
||||||
"rotatie;"
|
"rotatie"
|
||||||
|
|
||||||
#: js/misc/util.js:122
|
#: js/misc/util.js:122
|
||||||
msgid "Command not found"
|
msgid "Command not found"
|
||||||
@ -1232,11 +1232,11 @@ msgstr "‘%s’ downloaden van extensions.gnome.org en daarna installeren?"
|
|||||||
#: js/ui/inhibitShortcutsDialog.js:59
|
#: js/ui/inhibitShortcutsDialog.js:59
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s wants to inhibit shortcuts"
|
msgid "%s wants to inhibit shortcuts"
|
||||||
msgstr "%s wil sneltoetsen inhiberen"
|
msgstr "%s wil sneltoetsen blokkeren"
|
||||||
|
|
||||||
#: js/ui/inhibitShortcutsDialog.js:60
|
#: js/ui/inhibitShortcutsDialog.js:60
|
||||||
msgid "Application wants to inhibit shortcuts"
|
msgid "Application wants to inhibit shortcuts"
|
||||||
msgstr "Toepassing wil sneltoetsen inhiberen"
|
msgstr "Toepassing wil sneltoetsen blokkeren"
|
||||||
|
|
||||||
#. Translators: %s is a keyboard shortcut like "Super+x"
|
#. Translators: %s is a keyboard shortcut like "Super+x"
|
||||||
#: js/ui/inhibitShortcutsDialog.js:69
|
#: js/ui/inhibitShortcutsDialog.js:69
|
||||||
@ -1655,7 +1655,7 @@ msgstr "Locatie ingeschakeld"
|
|||||||
|
|
||||||
#: js/ui/status/location.js:90 js/ui/status/location.js:198
|
#: js/ui/status/location.js:90 js/ui/status/location.js:198
|
||||||
msgid "Disable"
|
msgid "Disable"
|
||||||
msgstr "Uischakelen"
|
msgstr "Uitschakelen"
|
||||||
|
|
||||||
#: js/ui/status/location.js:91
|
#: js/ui/status/location.js:91
|
||||||
msgid "Privacy Settings"
|
msgid "Privacy Settings"
|
||||||
@ -1823,7 +1823,7 @@ msgstr "Wifi-instellingen"
|
|||||||
#: js/ui/status/network.js:1298
|
#: js/ui/status/network.js:1298
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s Hotspot Active"
|
msgid "%s Hotspot Active"
|
||||||
msgstr "%s hotspot actief"
|
msgstr "%s-hotspot actief"
|
||||||
|
|
||||||
#. Translators: %s is a network identifier
|
#. Translators: %s is a network identifier
|
||||||
#: js/ui/status/network.js:1313
|
#: js/ui/status/network.js:1313
|
||||||
@ -1967,16 +1967,16 @@ msgstr "Pauzestand"
|
|||||||
msgid "Power Off"
|
msgid "Power Off"
|
||||||
msgstr "Uitschakelen"
|
msgstr "Uitschakelen"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:272
|
#: js/ui/status/thunderbolt.js:294
|
||||||
msgid "Thunderbolt"
|
msgid "Thunderbolt"
|
||||||
msgstr "Thunderbolt"
|
msgstr "Thunderbolt"
|
||||||
|
|
||||||
#. we are done
|
#. we are done
|
||||||
#: js/ui/status/thunderbolt.js:328
|
#: js/ui/status/thunderbolt.js:350
|
||||||
msgid "Unknown Thunderbolt device"
|
msgid "Unknown Thunderbolt device"
|
||||||
msgstr "Onbekend Thunderbolt-apparaat"
|
msgstr "Onbekend Thunderbolt-apparaat"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:329
|
#: js/ui/status/thunderbolt.js:351
|
||||||
msgid ""
|
msgid ""
|
||||||
"New device has been detected while you were away. Please disconnect and "
|
"New device has been detected while you were away. Please disconnect and "
|
||||||
"reconnect the device to start using it."
|
"reconnect the device to start using it."
|
||||||
@ -1984,11 +1984,11 @@ msgstr ""
|
|||||||
"Terwijl u weg was is er een nieuw apparaat gedetecteerd. Koppel het apparaat "
|
"Terwijl u weg was is er een nieuw apparaat gedetecteerd. Koppel het apparaat "
|
||||||
"los en verbind het opnieuw om het te gebruiken."
|
"los en verbind het opnieuw om het te gebruiken."
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:334
|
#: js/ui/status/thunderbolt.js:356
|
||||||
msgid "Thunderbolt authorization error"
|
msgid "Thunderbolt authorization error"
|
||||||
msgstr "Thunderbolt-autorisatiefout"
|
msgstr "Thunderbolt-autorisatiefout"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:335
|
#: js/ui/status/thunderbolt.js:357
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Could not authorize the thunderbolt device: %s"
|
msgid "Could not authorize the thunderbolt device: %s"
|
||||||
msgstr "Kon het Thunderbolt-apparaat niet autoriseren: %s"
|
msgstr "Kon het Thunderbolt-apparaat niet autoriseren: %s"
|
||||||
@ -2162,7 +2162,7 @@ msgstr "De modus die door GDM voor het aanmeldscherm gebruikt wordt"
|
|||||||
|
|
||||||
#: src/main.c:444
|
#: src/main.c:444
|
||||||
msgid "Use a specific mode, e.g. “gdm” for login screen"
|
msgid "Use a specific mode, e.g. “gdm” for login screen"
|
||||||
msgstr "Specifieke modus gebruiken, bijv. “gdm” voor het aanmeldscherm"
|
msgstr "Specifieke modus gebruiken, bijv. ‘gdm’ voor het aanmeldscherm"
|
||||||
|
|
||||||
#: src/main.c:450
|
#: src/main.c:450
|
||||||
msgid "List possible modes"
|
msgid "List possible modes"
|
||||||
@ -2176,7 +2176,7 @@ msgstr "Onbekend"
|
|||||||
#: src/shell-app.c:511
|
#: src/shell-app.c:511
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Failed to launch “%s”"
|
msgid "Failed to launch “%s”"
|
||||||
msgstr "Kon “%s” niet starten"
|
msgstr "Kon ‘%s’ niet starten"
|
||||||
|
|
||||||
#: src/shell-keyring-prompt.c:730
|
#: src/shell-keyring-prompt.c:730
|
||||||
msgid "Passwords do not match."
|
msgid "Passwords do not match."
|
||||||
|
376
po/pt_BR.po
376
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
52
po/sv.po
52
po/sv.po
@ -11,8 +11,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: gnome-shell\n"
|
"Project-Id-Version: gnome-shell\n"
|
||||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
||||||
"POT-Creation-Date: 2018-02-21 14:13+0000\n"
|
"POT-Creation-Date: 2018-04-13 19:54+0000\n"
|
||||||
"PO-Revision-Date: 2018-02-22 15:56+0100\n"
|
"PO-Revision-Date: 2018-05-20 19:24+0200\n"
|
||||||
"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
|
"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
|
||||||
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
|
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
|
||||||
"Language: sv\n"
|
"Language: sv\n"
|
||||||
@ -20,7 +20,7 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
"X-Generator: Poedit 2.0.6\n"
|
"X-Generator: Poedit 2.0.7\n"
|
||||||
|
|
||||||
#: data/50-gnome-shell-system.xml:6
|
#: data/50-gnome-shell-system.xml:6
|
||||||
msgid "System"
|
msgid "System"
|
||||||
@ -332,7 +332,7 @@ msgid "There was an error loading the preferences dialog for %s:"
|
|||||||
msgstr "Det uppstod ett fel vid inläsning av inställningsdialogen för %s:"
|
msgstr "Det uppstod ett fel vid inläsning av inställningsdialogen för %s:"
|
||||||
|
|
||||||
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
||||||
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
|
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
|
||||||
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
||||||
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
@ -652,12 +652,12 @@ msgstr "Lägg till som favorit"
|
|||||||
msgid "Show Details"
|
msgid "Show Details"
|
||||||
msgstr "Visa detaljer"
|
msgstr "Visa detaljer"
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:138
|
#: js/ui/appFavorites.js:140
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been added to your favorites."
|
msgid "%s has been added to your favorites."
|
||||||
msgstr "%s har lagts till i dina favoriter."
|
msgstr "%s har lagts till i dina favoriter."
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:172
|
#: js/ui/appFavorites.js:174
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been removed from your favorites."
|
msgid "%s has been removed from your favorites."
|
||||||
msgstr "%s har tagits bort från dina favoriter."
|
msgstr "%s har tagits bort från dina favoriter."
|
||||||
@ -852,7 +852,7 @@ msgstr "Extern disk frånkopplad"
|
|||||||
msgid "Open with %s"
|
msgid "Open with %s"
|
||||||
msgstr "Öppna med %s"
|
msgstr "Öppna med %s"
|
||||||
|
|
||||||
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
|
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
|
||||||
msgid "Password:"
|
msgid "Password:"
|
||||||
msgstr "Lösenord:"
|
msgstr "Lösenord:"
|
||||||
|
|
||||||
@ -940,15 +940,15 @@ msgstr "Ett lösenord krävs för att ansluta till ”%s”."
|
|||||||
msgid "Network Manager"
|
msgid "Network Manager"
|
||||||
msgstr "Nätverkshanterare"
|
msgstr "Nätverkshanterare"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:43
|
#: js/ui/components/polkitAgent.js:48
|
||||||
msgid "Authentication Required"
|
msgid "Authentication Required"
|
||||||
msgstr "Autentisering krävs"
|
msgstr "Autentisering krävs"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:71
|
#: js/ui/components/polkitAgent.js:76
|
||||||
msgid "Administrator"
|
msgid "Administrator"
|
||||||
msgstr "Administratör"
|
msgstr "Administratör"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:151
|
#: js/ui/components/polkitAgent.js:156
|
||||||
msgid "Authenticate"
|
msgid "Authenticate"
|
||||||
msgstr "Autentisera"
|
msgstr "Autentisera"
|
||||||
|
|
||||||
@ -956,7 +956,7 @@ msgstr "Autentisera"
|
|||||||
#. * requested authentication was not gained; this can happen
|
#. * requested authentication was not gained; this can happen
|
||||||
#. * because of an authentication error (like invalid password),
|
#. * because of an authentication error (like invalid password),
|
||||||
#. * for instance.
|
#. * for instance.
|
||||||
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
|
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
|
||||||
msgid "Sorry, that didn’t work. Please try again."
|
msgid "Sorry, that didn’t work. Please try again."
|
||||||
msgstr "Tyvärr, det fungerade inte. Försök igen."
|
msgstr "Tyvärr, det fungerade inte. Försök igen."
|
||||||
|
|
||||||
@ -1004,7 +1004,7 @@ msgstr "Lägg till världsklockor…"
|
|||||||
msgid "World Clocks"
|
msgid "World Clocks"
|
||||||
msgstr "Världsklockor"
|
msgstr "Världsklockor"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:225
|
#: js/ui/dateMenu.js:227
|
||||||
msgid "Weather"
|
msgid "Weather"
|
||||||
msgstr "Väder"
|
msgstr "Väder"
|
||||||
|
|
||||||
@ -1012,7 +1012,7 @@ msgstr "Väder"
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:289
|
#: js/ui/dateMenu.js:291
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s all day."
|
msgid "%s all day."
|
||||||
msgstr "%s hela dagen."
|
msgstr "%s hela dagen."
|
||||||
@ -1021,7 +1021,7 @@ msgstr "%s hela dagen."
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:295
|
#: js/ui/dateMenu.js:297
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s later."
|
msgid "%s, then %s later."
|
||||||
msgstr "%s, sedan %s senare."
|
msgstr "%s, sedan %s senare."
|
||||||
@ -1030,30 +1030,30 @@ msgstr "%s, sedan %s senare."
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:301
|
#: js/ui/dateMenu.js:303
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s, followed by %s later."
|
msgid "%s, then %s, followed by %s later."
|
||||||
msgstr "%s, sedan %s, följt av %s senare."
|
msgstr "%s, sedan %s, följt av %s senare."
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:312
|
#: js/ui/dateMenu.js:314
|
||||||
msgid "Select a location…"
|
msgid "Select a location…"
|
||||||
msgstr "Välj en plats…"
|
msgstr "Välj en plats…"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:315
|
#: js/ui/dateMenu.js:317
|
||||||
msgid "Loading…"
|
msgid "Loading…"
|
||||||
msgstr "Läser in…"
|
msgstr "Läser in…"
|
||||||
|
|
||||||
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
||||||
#: js/ui/dateMenu.js:321
|
#: js/ui/dateMenu.js:323
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Feels like %s."
|
msgid "Feels like %s."
|
||||||
msgstr "Känns som %s."
|
msgstr "Känns som %s."
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:324
|
#: js/ui/dateMenu.js:326
|
||||||
msgid "Go online for weather information"
|
msgid "Go online for weather information"
|
||||||
msgstr "Anslut till nätet för väderinformation"
|
msgstr "Anslut till nätet för väderinformation"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:326
|
#: js/ui/dateMenu.js:328
|
||||||
msgid "Weather information is currently unavailable"
|
msgid "Weather information is currently unavailable"
|
||||||
msgstr "Väderinformation är för närvarande inte tillgänglig"
|
msgstr "Väderinformation är för närvarande inte tillgänglig"
|
||||||
|
|
||||||
@ -1953,16 +1953,16 @@ msgstr "Vänteläge"
|
|||||||
msgid "Power Off"
|
msgid "Power Off"
|
||||||
msgstr "Stäng av"
|
msgstr "Stäng av"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:272
|
#: js/ui/status/thunderbolt.js:294
|
||||||
msgid "Thunderbolt"
|
msgid "Thunderbolt"
|
||||||
msgstr "Thunderbolt"
|
msgstr "Thunderbolt"
|
||||||
|
|
||||||
#. we are done
|
#. we are done
|
||||||
#: js/ui/status/thunderbolt.js:328
|
#: js/ui/status/thunderbolt.js:350
|
||||||
msgid "Unknown Thunderbolt device"
|
msgid "Unknown Thunderbolt device"
|
||||||
msgstr "Okänd Thunderbolt-enhet"
|
msgstr "Okänd Thunderbolt-enhet"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:329
|
#: js/ui/status/thunderbolt.js:351
|
||||||
msgid ""
|
msgid ""
|
||||||
"New device has been detected while you were away. Please disconnect and "
|
"New device has been detected while you were away. Please disconnect and "
|
||||||
"reconnect the device to start using it."
|
"reconnect the device to start using it."
|
||||||
@ -1970,13 +1970,13 @@ msgstr ""
|
|||||||
"En ny enhet har upptäckts medan du var borta. Koppla från och anslut enheten "
|
"En ny enhet har upptäckts medan du var borta. Koppla från och anslut enheten "
|
||||||
"igen för att börja använda den."
|
"igen för att börja använda den."
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:334
|
#: js/ui/status/thunderbolt.js:356
|
||||||
msgid "Thunderbolt authorization error"
|
msgid "Thunderbolt authorization error"
|
||||||
msgstr "Thunderbolt-auktoriseringsfel"
|
msgstr "Thunderbolt-auktoriseringsfel"
|
||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:335
|
#: js/ui/status/thunderbolt.js:357
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Could not authorize the thunderbolt device: %s"
|
msgid "Could not authorize the Thunderbolt device: %s"
|
||||||
msgstr "Kunde inte auktorisera Thunderbolt-enheten: %s"
|
msgstr "Kunde inte auktorisera Thunderbolt-enheten: %s"
|
||||||
|
|
||||||
#: js/ui/status/volume.js:128
|
#: js/ui/status/volume.js:128
|
||||||
|
577
po/zh_CN.po
577
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
134
po/zh_TW.po
134
po/zh_TW.po
@ -8,8 +8,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: gnome-shell 3.3.90\n"
|
"Project-Id-Version: gnome-shell 3.3.90\n"
|
||||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
||||||
"POT-Creation-Date: 2018-03-05 21:11+0000\n"
|
"POT-Creation-Date: 2018-06-08 17:30+0000\n"
|
||||||
"PO-Revision-Date: 2018-03-10 20:30+0800\n"
|
"PO-Revision-Date: 2018-06-09 11:17+0800\n"
|
||||||
"Last-Translator: Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>\n"
|
"Last-Translator: Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>\n"
|
||||||
"Language-Team: Chinese (Taiwan) <zh-l10n@lists.linux.org.tw>\n"
|
"Language-Team: Chinese (Taiwan) <zh-l10n@lists.linux.org.tw>\n"
|
||||||
"Language: zh_TW\n"
|
"Language: zh_TW\n"
|
||||||
@ -17,7 +17,7 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
"X-Generator: Poedit 2.0.6\n"
|
"X-Generator: Poedit 2.0.8\n"
|
||||||
|
|
||||||
#: data/50-gnome-shell-system.xml:6
|
#: data/50-gnome-shell-system.xml:6
|
||||||
msgid "System"
|
msgid "System"
|
||||||
@ -308,7 +308,7 @@ msgid "There was an error loading the preferences dialog for %s:"
|
|||||||
msgstr "載入 %s 的偏好設定對話盒時發生錯誤:"
|
msgstr "載入 %s 的偏好設定對話盒時發生錯誤:"
|
||||||
|
|
||||||
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
|
||||||
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
|
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
|
||||||
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
|
||||||
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
@ -328,20 +328,20 @@ msgctxt "button"
|
|||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr "登入"
|
msgstr "登入"
|
||||||
|
|
||||||
#: js/gdm/loginDialog.js:315
|
#: js/gdm/loginDialog.js:319
|
||||||
msgid "Choose Session"
|
msgid "Choose Session"
|
||||||
msgstr "選擇工作階段"
|
msgstr "選擇工作階段"
|
||||||
|
|
||||||
#. translators: this message is shown below the user list on the
|
#. translators: this message is shown below the user list on the
|
||||||
#. login screen. It can be activated to reveal an entry for
|
#. login screen. It can be activated to reveal an entry for
|
||||||
#. manually entering the username.
|
#. manually entering the username.
|
||||||
#: js/gdm/loginDialog.js:458
|
#: js/gdm/loginDialog.js:462
|
||||||
msgid "Not listed?"
|
msgid "Not listed?"
|
||||||
msgstr "沒有列出來?"
|
msgstr "沒有列出來?"
|
||||||
|
|
||||||
#. Translators: this message is shown below the username entry field
|
#. Translators: this message is shown below the username entry field
|
||||||
#. to clue the user in on how to login to the local network realm
|
#. to clue the user in on how to login to the local network realm
|
||||||
#: js/gdm/loginDialog.js:887
|
#: js/gdm/loginDialog.js:891
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "(e.g., user or %s)"
|
msgid "(e.g., user or %s)"
|
||||||
msgstr "(例如: user 或 %s)"
|
msgstr "(例如: user 或 %s)"
|
||||||
@ -349,12 +349,12 @@ msgstr "(例如: user 或 %s)"
|
|||||||
#. TTLS and PEAP are actually much more complicated, but this complication
|
#. TTLS and PEAP are actually much more complicated, but this complication
|
||||||
#. is not visible here since we only care about phase2 authentication
|
#. is not visible here since we only care about phase2 authentication
|
||||||
#. (and don't even care of which one)
|
#. (and don't even care of which one)
|
||||||
#: js/gdm/loginDialog.js:892 js/ui/components/networkAgent.js:243
|
#: js/gdm/loginDialog.js:896 js/ui/components/networkAgent.js:243
|
||||||
#: js/ui/components/networkAgent.js:261
|
#: js/ui/components/networkAgent.js:261
|
||||||
msgid "Username: "
|
msgid "Username: "
|
||||||
msgstr "使用者名稱:"
|
msgstr "使用者名稱:"
|
||||||
|
|
||||||
#: js/gdm/loginDialog.js:1228
|
#: js/gdm/loginDialog.js:1234
|
||||||
msgid "Login Window"
|
msgid "Login Window"
|
||||||
msgstr "登入視窗"
|
msgstr "登入視窗"
|
||||||
|
|
||||||
@ -601,32 +601,32 @@ msgstr "常用"
|
|||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr "全部"
|
msgstr "全部"
|
||||||
|
|
||||||
#: js/ui/appDisplay.js:1886
|
#: js/ui/appDisplay.js:1889
|
||||||
msgid "New Window"
|
msgid "New Window"
|
||||||
msgstr "新視窗"
|
msgstr "新視窗"
|
||||||
|
|
||||||
#: js/ui/appDisplay.js:1900
|
#: js/ui/appDisplay.js:1903
|
||||||
msgid "Launch using Dedicated Graphics Card"
|
msgid "Launch using Dedicated Graphics Card"
|
||||||
msgstr "使用獨立顯卡啟動"
|
msgstr "使用獨立顯卡啟動"
|
||||||
|
|
||||||
#: js/ui/appDisplay.js:1927 js/ui/dash.js:285
|
#: js/ui/appDisplay.js:1930 js/ui/dash.js:285
|
||||||
msgid "Remove from Favorites"
|
msgid "Remove from Favorites"
|
||||||
msgstr "自喜好中移除"
|
msgstr "自喜好中移除"
|
||||||
|
|
||||||
#: js/ui/appDisplay.js:1933
|
#: js/ui/appDisplay.js:1936
|
||||||
msgid "Add to Favorites"
|
msgid "Add to Favorites"
|
||||||
msgstr "加入喜好"
|
msgstr "加入喜好"
|
||||||
|
|
||||||
#: js/ui/appDisplay.js:1943
|
#: js/ui/appDisplay.js:1946
|
||||||
msgid "Show Details"
|
msgid "Show Details"
|
||||||
msgstr "顯示詳細資訊"
|
msgstr "顯示詳細資訊"
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:138
|
#: js/ui/appFavorites.js:140
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been added to your favorites."
|
msgid "%s has been added to your favorites."
|
||||||
msgstr "%s 已加入您的喜好中。"
|
msgstr "%s 已加入您的喜好中。"
|
||||||
|
|
||||||
#: js/ui/appFavorites.js:172
|
#: js/ui/appFavorites.js:174
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been removed from your favorites."
|
msgid "%s has been removed from your favorites."
|
||||||
msgstr "%s 已經從您的喜好中移除。"
|
msgstr "%s 已經從您的喜好中移除。"
|
||||||
@ -787,22 +787,22 @@ msgid "Clear All"
|
|||||||
msgstr "全部清除"
|
msgstr "全部清除"
|
||||||
|
|
||||||
#. Translators: %s is an application name
|
#. Translators: %s is an application name
|
||||||
#: js/ui/closeDialog.js:44
|
#: js/ui/closeDialog.js:47
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "“%s” is not responding."
|
msgid "“%s” is not responding."
|
||||||
msgstr "「%s」沒有回應。"
|
msgstr "「%s」沒有回應。"
|
||||||
|
|
||||||
#: js/ui/closeDialog.js:45
|
#: js/ui/closeDialog.js:48
|
||||||
msgid ""
|
msgid ""
|
||||||
"You may choose to wait a short while for it to continue or force the "
|
"You may choose to wait a short while for it to continue or force the "
|
||||||
"application to quit entirely."
|
"application to quit entirely."
|
||||||
msgstr "您可以選擇再等一下讓它繼續,或是強制讓應用程式立刻退出。"
|
msgstr "您可以選擇再等一下讓它繼續,或是強制讓應用程式立刻退出。"
|
||||||
|
|
||||||
#: js/ui/closeDialog.js:61
|
#: js/ui/closeDialog.js:64
|
||||||
msgid "Force Quit"
|
msgid "Force Quit"
|
||||||
msgstr "強制退出"
|
msgstr "強制退出"
|
||||||
|
|
||||||
#: js/ui/closeDialog.js:64
|
#: js/ui/closeDialog.js:67
|
||||||
msgid "Wait"
|
msgid "Wait"
|
||||||
msgstr "等待"
|
msgstr "等待"
|
||||||
|
|
||||||
@ -819,7 +819,7 @@ msgstr "外部裝置已拔除"
|
|||||||
msgid "Open with %s"
|
msgid "Open with %s"
|
||||||
msgstr "用 %s 開啟"
|
msgstr "用 %s 開啟"
|
||||||
|
|
||||||
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
|
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:297
|
||||||
msgid "Password:"
|
msgid "Password:"
|
||||||
msgstr "密碼: "
|
msgstr "密碼: "
|
||||||
|
|
||||||
@ -856,18 +856,18 @@ msgstr "私密金鑰密碼:"
|
|||||||
msgid "Service: "
|
msgid "Service: "
|
||||||
msgstr "服務:"
|
msgstr "服務:"
|
||||||
|
|
||||||
#: js/ui/components/networkAgent.js:292 js/ui/components/networkAgent.js:659
|
#: js/ui/components/networkAgent.js:292 js/ui/components/networkAgent.js:664
|
||||||
msgid "Authentication required by wireless network"
|
msgid "Authentication required by wireless network"
|
||||||
msgstr "無線網路所需要的核對"
|
msgstr "無線網路所需要的核對"
|
||||||
|
|
||||||
#: js/ui/components/networkAgent.js:293 js/ui/components/networkAgent.js:660
|
#: js/ui/components/networkAgent.js:293 js/ui/components/networkAgent.js:665
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Passwords or encryption keys are required to access the wireless network "
|
"Passwords or encryption keys are required to access the wireless network "
|
||||||
"“%s”."
|
"“%s”."
|
||||||
msgstr "需要密碼或是加密金鑰來存取無線網路「%s」。"
|
msgstr "需要密碼或是加密金鑰來存取無線網路「%s」。"
|
||||||
|
|
||||||
#: js/ui/components/networkAgent.js:297 js/ui/components/networkAgent.js:663
|
#: js/ui/components/networkAgent.js:297 js/ui/components/networkAgent.js:668
|
||||||
msgid "Wired 802.1X authentication"
|
msgid "Wired 802.1X authentication"
|
||||||
msgstr "有線網路 802.1X 核對"
|
msgstr "有線網路 802.1X 核對"
|
||||||
|
|
||||||
@ -875,15 +875,15 @@ msgstr "有線網路 802.1X 核對"
|
|||||||
msgid "Network name: "
|
msgid "Network name: "
|
||||||
msgstr "網路名稱:"
|
msgstr "網路名稱:"
|
||||||
|
|
||||||
#: js/ui/components/networkAgent.js:304 js/ui/components/networkAgent.js:667
|
#: js/ui/components/networkAgent.js:304 js/ui/components/networkAgent.js:672
|
||||||
msgid "DSL authentication"
|
msgid "DSL authentication"
|
||||||
msgstr "DSL 核對"
|
msgstr "DSL 核對"
|
||||||
|
|
||||||
#: js/ui/components/networkAgent.js:311 js/ui/components/networkAgent.js:673
|
#: js/ui/components/networkAgent.js:311 js/ui/components/networkAgent.js:678
|
||||||
msgid "PIN code required"
|
msgid "PIN code required"
|
||||||
msgstr "需要 PIN 碼"
|
msgstr "需要 PIN 碼"
|
||||||
|
|
||||||
#: js/ui/components/networkAgent.js:312 js/ui/components/networkAgent.js:674
|
#: js/ui/components/networkAgent.js:312 js/ui/components/networkAgent.js:679
|
||||||
msgid "PIN code is needed for the mobile broadband device"
|
msgid "PIN code is needed for the mobile broadband device"
|
||||||
msgstr "這個行動寬頻裝置需要 PIN 碼"
|
msgstr "這個行動寬頻裝置需要 PIN 碼"
|
||||||
|
|
||||||
@ -891,29 +891,29 @@ msgstr "這個行動寬頻裝置需要 PIN 碼"
|
|||||||
msgid "PIN: "
|
msgid "PIN: "
|
||||||
msgstr "PIN: "
|
msgstr "PIN: "
|
||||||
|
|
||||||
#: js/ui/components/networkAgent.js:320 js/ui/components/networkAgent.js:680
|
#: js/ui/components/networkAgent.js:320 js/ui/components/networkAgent.js:685
|
||||||
msgid "Mobile broadband network password"
|
msgid "Mobile broadband network password"
|
||||||
msgstr "行動寬頻網路密碼"
|
msgstr "行動寬頻網路密碼"
|
||||||
|
|
||||||
#: js/ui/components/networkAgent.js:321 js/ui/components/networkAgent.js:664
|
#: js/ui/components/networkAgent.js:321 js/ui/components/networkAgent.js:669
|
||||||
#: js/ui/components/networkAgent.js:668 js/ui/components/networkAgent.js:681
|
#: js/ui/components/networkAgent.js:673 js/ui/components/networkAgent.js:686
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "A password is required to connect to “%s”."
|
msgid "A password is required to connect to “%s”."
|
||||||
msgstr "連線至「%s」需要密碼。"
|
msgstr "連線至「%s」需要密碼。"
|
||||||
|
|
||||||
#: js/ui/components/networkAgent.js:648 js/ui/status/network.js:1691
|
#: js/ui/components/networkAgent.js:653 js/ui/status/network.js:1704
|
||||||
msgid "Network Manager"
|
msgid "Network Manager"
|
||||||
msgstr "網路管理員"
|
msgstr "網路管理員"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:43
|
#: js/ui/components/polkitAgent.js:48
|
||||||
msgid "Authentication Required"
|
msgid "Authentication Required"
|
||||||
msgstr "要求核對"
|
msgstr "要求核對"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:71
|
#: js/ui/components/polkitAgent.js:76
|
||||||
msgid "Administrator"
|
msgid "Administrator"
|
||||||
msgstr "管理員"
|
msgstr "管理員"
|
||||||
|
|
||||||
#: js/ui/components/polkitAgent.js:151
|
#: js/ui/components/polkitAgent.js:156
|
||||||
msgid "Authenticate"
|
msgid "Authenticate"
|
||||||
msgstr "核對"
|
msgstr "核對"
|
||||||
|
|
||||||
@ -921,7 +921,7 @@ msgstr "核對"
|
|||||||
#. * requested authentication was not gained; this can happen
|
#. * requested authentication was not gained; this can happen
|
||||||
#. * because of an authentication error (like invalid password),
|
#. * because of an authentication error (like invalid password),
|
||||||
#. * for instance.
|
#. * for instance.
|
||||||
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
|
#: js/ui/components/polkitAgent.js:283 js/ui/shellMountOperation.js:327
|
||||||
msgid "Sorry, that didn’t work. Please try again."
|
msgid "Sorry, that didn’t work. Please try again."
|
||||||
msgstr "抱歉,那沒有作用。請再試一次。"
|
msgstr "抱歉,那沒有作用。請再試一次。"
|
||||||
|
|
||||||
@ -969,7 +969,7 @@ msgstr "加入世界時鐘…"
|
|||||||
msgid "World Clocks"
|
msgid "World Clocks"
|
||||||
msgstr "世界時鐘"
|
msgstr "世界時鐘"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:225
|
#: js/ui/dateMenu.js:227
|
||||||
msgid "Weather"
|
msgid "Weather"
|
||||||
msgstr "天氣"
|
msgstr "天氣"
|
||||||
|
|
||||||
@ -977,7 +977,7 @@ msgstr "天氣"
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:289
|
#: js/ui/dateMenu.js:291
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s all day."
|
msgid "%s all day."
|
||||||
msgstr "全天%s。"
|
msgstr "全天%s。"
|
||||||
@ -986,7 +986,7 @@ msgstr "全天%s。"
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:295
|
#: js/ui/dateMenu.js:297
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s later."
|
msgid "%s, then %s later."
|
||||||
msgstr "%s,較晚%s。"
|
msgstr "%s,較晚%s。"
|
||||||
@ -995,30 +995,30 @@ msgstr "%s,較晚%s。"
|
|||||||
#. libgweather for the possible condition strings. If at all
|
#. libgweather for the possible condition strings. If at all
|
||||||
#. possible, the sentence should match the grammatical case etc. of
|
#. possible, the sentence should match the grammatical case etc. of
|
||||||
#. the inserted conditions.
|
#. the inserted conditions.
|
||||||
#: js/ui/dateMenu.js:301
|
#: js/ui/dateMenu.js:303
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s, then %s, followed by %s later."
|
msgid "%s, then %s, followed by %s later."
|
||||||
msgstr "%s,然後%s,接著較晚%s。"
|
msgstr "%s,然後%s,接著較晚%s。"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:312
|
#: js/ui/dateMenu.js:314
|
||||||
msgid "Select a location…"
|
msgid "Select a location…"
|
||||||
msgstr "選擇位置…"
|
msgstr "選擇位置…"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:315
|
#: js/ui/dateMenu.js:317
|
||||||
msgid "Loading…"
|
msgid "Loading…"
|
||||||
msgstr "載入中…"
|
msgstr "載入中…"
|
||||||
|
|
||||||
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
#. Translators: %s is a temperature with unit, e.g. "23℃"
|
||||||
#: js/ui/dateMenu.js:321
|
#: js/ui/dateMenu.js:323
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Feels like %s."
|
msgid "Feels like %s."
|
||||||
msgstr "體感溫度 %s。"
|
msgstr "體感溫度 %s。"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:324
|
#: js/ui/dateMenu.js:326
|
||||||
msgid "Go online for weather information"
|
msgid "Go online for weather information"
|
||||||
msgstr "上線以取得天氣資訊"
|
msgstr "上線以取得天氣資訊"
|
||||||
|
|
||||||
#: js/ui/dateMenu.js:326
|
#: js/ui/dateMenu.js:328
|
||||||
msgid "Weather information is currently unavailable"
|
msgid "Weather information is currently unavailable"
|
||||||
msgstr "天氣資訊目前不可使用"
|
msgstr "天氣資訊目前不可使用"
|
||||||
|
|
||||||
@ -1239,13 +1239,13 @@ msgid "Leave On"
|
|||||||
msgstr "離開"
|
msgstr "離開"
|
||||||
|
|
||||||
#: js/ui/kbdA11yDialog.js:59 js/ui/status/bluetooth.js:143
|
#: js/ui/kbdA11yDialog.js:59 js/ui/status/bluetooth.js:143
|
||||||
#: js/ui/status/network.js:1281
|
#: js/ui/status/network.js:1294
|
||||||
msgid "Turn On"
|
msgid "Turn On"
|
||||||
msgstr "開啟"
|
msgstr "開啟"
|
||||||
|
|
||||||
#: js/ui/kbdA11yDialog.js:67 js/ui/status/bluetooth.js:143
|
#: js/ui/kbdA11yDialog.js:67 js/ui/status/bluetooth.js:143
|
||||||
#: js/ui/status/network.js:154 js/ui/status/network.js:337
|
#: js/ui/status/network.js:154 js/ui/status/network.js:337
|
||||||
#: js/ui/status/network.js:1281 js/ui/status/network.js:1396
|
#: js/ui/status/network.js:1294 js/ui/status/network.js:1409
|
||||||
#: js/ui/status/nightLight.js:47 js/ui/status/rfkill.js:90
|
#: js/ui/status/nightLight.js:47 js/ui/status/rfkill.js:90
|
||||||
#: js/ui/status/rfkill.js:117
|
#: js/ui/status/rfkill.js:117
|
||||||
msgid "Turn Off"
|
msgid "Turn Off"
|
||||||
@ -1307,7 +1307,7 @@ msgstr "檢示來源"
|
|||||||
msgid "Web Page"
|
msgid "Web Page"
|
||||||
msgstr "網頁"
|
msgstr "網頁"
|
||||||
|
|
||||||
#: js/ui/messageTray.js:1493
|
#: js/ui/messageTray.js:1495
|
||||||
msgid "System Information"
|
msgid "System Information"
|
||||||
msgstr "系統資訊"
|
msgstr "系統資訊"
|
||||||
|
|
||||||
@ -1622,7 +1622,7 @@ msgid "<unknown>"
|
|||||||
msgstr "<不明>"
|
msgstr "<不明>"
|
||||||
|
|
||||||
#. Translators: %s is a network identifier
|
#. Translators: %s is a network identifier
|
||||||
#: js/ui/status/network.js:441 js/ui/status/network.js:1310
|
#: js/ui/status/network.js:441 js/ui/status/network.js:1323
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s Off"
|
msgid "%s Off"
|
||||||
msgstr "%s 關閉"
|
msgstr "%s 關閉"
|
||||||
@ -1648,7 +1648,7 @@ msgid "%s Disconnecting"
|
|||||||
msgstr "%s 正在斷線"
|
msgstr "%s 正在斷線"
|
||||||
|
|
||||||
#. Translators: %s is a network identifier
|
#. Translators: %s is a network identifier
|
||||||
#: js/ui/status/network.js:459 js/ui/status/network.js:1302
|
#: js/ui/status/network.js:459 js/ui/status/network.js:1315
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s Connecting"
|
msgid "%s Connecting"
|
||||||
msgstr "正連線到 %s"
|
msgstr "正連線到 %s"
|
||||||
@ -1688,7 +1688,7 @@ msgid "Mobile Broadband Settings"
|
|||||||
msgstr "行動寬頻設定值"
|
msgstr "行動寬頻設定值"
|
||||||
|
|
||||||
#. Translators: %s is a network identifier
|
#. Translators: %s is a network identifier
|
||||||
#: js/ui/status/network.js:578 js/ui/status/network.js:1307
|
#: js/ui/status/network.js:578 js/ui/status/network.js:1320
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s Hardware Disabled"
|
msgid "%s Hardware Disabled"
|
||||||
msgstr "%s 硬體已停用"
|
msgstr "%s 硬體已停用"
|
||||||
@ -1744,78 +1744,78 @@ msgstr "沒有網路"
|
|||||||
msgid "Use hardware switch to turn off"
|
msgid "Use hardware switch to turn off"
|
||||||
msgstr "使用硬體開關來關閉"
|
msgstr "使用硬體開關來關閉"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1173
|
#: js/ui/status/network.js:1186
|
||||||
msgid "Select Network"
|
msgid "Select Network"
|
||||||
msgstr "選擇網路"
|
msgstr "選擇網路"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1179
|
#: js/ui/status/network.js:1192
|
||||||
msgid "Wi-Fi Settings"
|
msgid "Wi-Fi Settings"
|
||||||
msgstr "Wi-Fi 設定值"
|
msgstr "Wi-Fi 設定值"
|
||||||
|
|
||||||
#. Translators: %s is a network identifier
|
#. Translators: %s is a network identifier
|
||||||
#: js/ui/status/network.js:1298
|
#: js/ui/status/network.js:1311
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s Hotspot Active"
|
msgid "%s Hotspot Active"
|
||||||
msgstr "%s 熱點有效"
|
msgstr "%s 熱點有效"
|
||||||
|
|
||||||
#. Translators: %s is a network identifier
|
#. Translators: %s is a network identifier
|
||||||
#: js/ui/status/network.js:1313
|
#: js/ui/status/network.js:1326
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s Not Connected"
|
msgid "%s Not Connected"
|
||||||
msgstr "%s 未連線"
|
msgstr "%s 未連線"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1413
|
#: js/ui/status/network.js:1426
|
||||||
msgid "connecting…"
|
msgid "connecting…"
|
||||||
msgstr "連線中…"
|
msgstr "連線中…"
|
||||||
|
|
||||||
#. Translators: this is for network connections that require some kind of key or password
|
#. Translators: this is for network connections that require some kind of key or password
|
||||||
#: js/ui/status/network.js:1416
|
#: js/ui/status/network.js:1429
|
||||||
msgid "authentication required"
|
msgid "authentication required"
|
||||||
msgstr "要求核對"
|
msgstr "要求核對"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1418
|
#: js/ui/status/network.js:1431
|
||||||
msgid "connection failed"
|
msgid "connection failed"
|
||||||
msgstr "連線失敗"
|
msgstr "連線失敗"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1472
|
#: js/ui/status/network.js:1485
|
||||||
msgid "VPN Settings"
|
msgid "VPN Settings"
|
||||||
msgstr "VPN 設定值"
|
msgstr "VPN 設定值"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1485
|
#: js/ui/status/network.js:1498
|
||||||
msgid "VPN"
|
msgid "VPN"
|
||||||
msgstr "VPN"
|
msgstr "VPN"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1495
|
#: js/ui/status/network.js:1508
|
||||||
msgid "VPN Off"
|
msgid "VPN Off"
|
||||||
msgstr "VPN 關閉"
|
msgstr "VPN 關閉"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1559 js/ui/status/rfkill.js:93
|
#: js/ui/status/network.js:1572 js/ui/status/rfkill.js:93
|
||||||
msgid "Network Settings"
|
msgid "Network Settings"
|
||||||
msgstr "網路設定值"
|
msgstr "網路設定值"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1588
|
#: js/ui/status/network.js:1601
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s Wired Connection"
|
msgid "%s Wired Connection"
|
||||||
msgid_plural "%s Wired Connections"
|
msgid_plural "%s Wired Connections"
|
||||||
msgstr[0] "%s 個有線網路連線"
|
msgstr[0] "%s 個有線網路連線"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1592
|
#: js/ui/status/network.js:1605
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s Wi-Fi Connection"
|
msgid "%s Wi-Fi Connection"
|
||||||
msgid_plural "%s Wi-Fi Connections"
|
msgid_plural "%s Wi-Fi Connections"
|
||||||
msgstr[0] "%s 個 Wi-Fi 連線"
|
msgstr[0] "%s 個 Wi-Fi 連線"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1596
|
#: js/ui/status/network.js:1609
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s Modem Connection"
|
msgid "%s Modem Connection"
|
||||||
msgid_plural "%s Modem Connections"
|
msgid_plural "%s Modem Connections"
|
||||||
msgstr[0] "%s 個數據機連線"
|
msgstr[0] "%s 個數據機連線"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1728
|
#: js/ui/status/network.js:1741
|
||||||
msgid "Connection failed"
|
msgid "Connection failed"
|
||||||
msgstr "連線失敗"
|
msgstr "連線失敗"
|
||||||
|
|
||||||
#: js/ui/status/network.js:1729
|
#: js/ui/status/network.js:1742
|
||||||
msgid "Activation of network connection failed"
|
msgid "Activation of network connection failed"
|
||||||
msgstr "啟動網路連線失敗"
|
msgstr "啟動網路連線失敗"
|
||||||
|
|
||||||
@ -1918,7 +1918,7 @@ msgstr "Thunderbolt 授權錯誤"
|
|||||||
|
|
||||||
#: js/ui/status/thunderbolt.js:357
|
#: js/ui/status/thunderbolt.js:357
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Could not authorize the thunderbolt device: %s"
|
msgid "Could not authorize the Thunderbolt device: %s"
|
||||||
msgstr "無法授權該 Thunderbolt 裝置:%s"
|
msgstr "無法授權該 Thunderbolt 裝置:%s"
|
||||||
|
|
||||||
#: js/ui/status/volume.js:128
|
#: js/ui/status/volume.js:128
|
||||||
|
@ -590,6 +590,11 @@ app_load_events (App *app)
|
|||||||
g_list_free (app->live_views);
|
g_list_free (app->live_views);
|
||||||
app->live_views = NULL;
|
app->live_views = NULL;
|
||||||
|
|
||||||
|
if (!app->since || !app->until)
|
||||||
|
{
|
||||||
|
print_debug ("Skipping load of events, no time interval set yet");
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* timezone could have changed */
|
/* timezone could have changed */
|
||||||
app_update_timezone (app);
|
app_update_timezone (app);
|
||||||
|
|
||||||
|
@ -347,10 +347,10 @@ if options.perf == None:
|
|||||||
options.perf = 'core'
|
options.perf = 'core'
|
||||||
|
|
||||||
if options.extra_filter is None:
|
if options.extra_filter is None:
|
||||||
if options.hwtest:
|
options.extra_filter = []
|
||||||
options.extra_filter = ['Gedit']
|
|
||||||
else:
|
if options.perf == 'hwtest':
|
||||||
options.extra_filter = []
|
options.extra_filter.append('Gedit')
|
||||||
|
|
||||||
if args:
|
if args:
|
||||||
parser.print_usage()
|
parser.print_usage()
|
||||||
|
@ -167,22 +167,19 @@ gnome_shell_plugin_init (GnomeShellPlugin *shell_plugin)
|
|||||||
static gboolean
|
static gboolean
|
||||||
gnome_shell_plugin_has_swap_event (GnomeShellPlugin *shell_plugin)
|
gnome_shell_plugin_has_swap_event (GnomeShellPlugin *shell_plugin)
|
||||||
{
|
{
|
||||||
MetaPlugin *plugin = META_PLUGIN (shell_plugin);
|
|
||||||
CoglDisplay *cogl_display =
|
CoglDisplay *cogl_display =
|
||||||
cogl_context_get_display (shell_plugin->cogl_context);
|
cogl_context_get_display (shell_plugin->cogl_context);
|
||||||
CoglRenderer *renderer = cogl_display_get_renderer (cogl_display);
|
CoglRenderer *renderer = cogl_display_get_renderer (cogl_display);
|
||||||
const char * (* query_extensions_string) (Display *dpy, int screen);
|
const char * (* query_extensions_string) (Display *dpy, int screen);
|
||||||
Bool (* query_extension) (Display *dpy, int *error, int *event);
|
Bool (* query_extension) (Display *dpy, int *error, int *event);
|
||||||
MetaScreen *screen;
|
|
||||||
Display *xdisplay;
|
Display *xdisplay;
|
||||||
|
int screen_number;
|
||||||
const char *glx_extensions;
|
const char *glx_extensions;
|
||||||
|
|
||||||
/* We will only get swap events if Cogl is using GLX */
|
/* We will only get swap events if Cogl is using GLX */
|
||||||
if (cogl_renderer_get_winsys_id (renderer) != COGL_WINSYS_ID_GLX)
|
if (cogl_renderer_get_winsys_id (renderer) != COGL_WINSYS_ID_GLX)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
screen = meta_plugin_get_screen (plugin);
|
|
||||||
|
|
||||||
xdisplay = clutter_x11_get_default_display ();
|
xdisplay = clutter_x11_get_default_display ();
|
||||||
|
|
||||||
query_extensions_string =
|
query_extensions_string =
|
||||||
@ -194,9 +191,8 @@ gnome_shell_plugin_has_swap_event (GnomeShellPlugin *shell_plugin)
|
|||||||
&shell_plugin->glx_error_base,
|
&shell_plugin->glx_error_base,
|
||||||
&shell_plugin->glx_event_base);
|
&shell_plugin->glx_event_base);
|
||||||
|
|
||||||
glx_extensions =
|
screen_number = XDefaultScreen (xdisplay);
|
||||||
query_extensions_string (xdisplay,
|
glx_extensions = query_extensions_string (xdisplay, screen_number);
|
||||||
meta_screen_get_screen_number (screen));
|
|
||||||
|
|
||||||
return strstr (glx_extensions, "GLX_INTEL_swap_event") != NULL;
|
return strstr (glx_extensions, "GLX_INTEL_swap_event") != NULL;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ gnome_shell_deps = [
|
|||||||
canberra_dep, canberra_gtk_dep,
|
canberra_dep, canberra_gtk_dep,
|
||||||
polkit_dep,
|
polkit_dep,
|
||||||
gcr_dep,
|
gcr_dep,
|
||||||
systemd_dep
|
libsystemd_dep
|
||||||
]
|
]
|
||||||
|
|
||||||
gnome_shell_deps += nm_deps
|
gnome_shell_deps += nm_deps
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#include <glib/gi18n-lib.h>
|
#include <glib/gi18n-lib.h>
|
||||||
|
|
||||||
#include <meta/display.h>
|
#include <meta/display.h>
|
||||||
|
#include <meta/meta-workspace-manager.h>
|
||||||
|
#include <meta/meta-x11-display.h>
|
||||||
|
|
||||||
#include "shell-app-private.h"
|
#include "shell-app-private.h"
|
||||||
#include "shell-enum-types.h"
|
#include "shell-enum-types.h"
|
||||||
@ -358,6 +360,17 @@ find_most_recent_transient_on_same_workspace (MetaDisplay *display,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static MetaWorkspace *
|
||||||
|
get_active_workspace (void)
|
||||||
|
{
|
||||||
|
ShellGlobal *global = shell_global_get ();
|
||||||
|
MetaDisplay *display = shell_global_get_display (global);
|
||||||
|
MetaWorkspaceManager *workspace_manager =
|
||||||
|
meta_display_get_workspace_manager (display);
|
||||||
|
|
||||||
|
return meta_workspace_manager_get_active_workspace (workspace_manager);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shell_app_activate_window:
|
* shell_app_activate_window:
|
||||||
* @app: a #ShellApp
|
* @app: a #ShellApp
|
||||||
@ -391,9 +404,8 @@ shell_app_activate_window (ShellApp *app,
|
|||||||
{
|
{
|
||||||
GSList *windows_reversed, *iter;
|
GSList *windows_reversed, *iter;
|
||||||
ShellGlobal *global = shell_global_get ();
|
ShellGlobal *global = shell_global_get ();
|
||||||
MetaScreen *screen = shell_global_get_screen (global);
|
MetaDisplay *display = shell_global_get_display (global);
|
||||||
MetaDisplay *display = meta_screen_get_display (screen);
|
MetaWorkspace *active = get_active_workspace ();
|
||||||
MetaWorkspace *active = meta_screen_get_active_workspace (screen);
|
|
||||||
MetaWorkspace *workspace = meta_window_get_workspace (window);
|
MetaWorkspace *workspace = meta_window_get_workspace (window);
|
||||||
guint32 last_user_timestamp = meta_display_get_last_user_time (display);
|
guint32 last_user_timestamp = meta_display_get_last_user_time (display);
|
||||||
MetaWindow *most_recent_transient;
|
MetaWindow *most_recent_transient;
|
||||||
@ -686,7 +698,7 @@ shell_app_get_windows (ShellApp *app)
|
|||||||
{
|
{
|
||||||
CompareWindowsData data;
|
CompareWindowsData data;
|
||||||
data.app = app;
|
data.app = app;
|
||||||
data.active_workspace = meta_screen_get_active_workspace (shell_global_get_screen (shell_global_get ()));
|
data.active_workspace = get_active_workspace ();
|
||||||
app->running_state->windows = g_slist_sort_with_data (app->running_state->windows, shell_app_compare_windows, &data);
|
app->running_state->windows = g_slist_sort_with_data (app->running_state->windows, shell_app_compare_windows, &data);
|
||||||
app->running_state->window_sort_stale = FALSE;
|
app->running_state->window_sort_stale = FALSE;
|
||||||
}
|
}
|
||||||
@ -922,11 +934,11 @@ shell_app_on_skip_taskbar_changed (MetaWindow *window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
shell_app_on_ws_switch (MetaScreen *screen,
|
shell_app_on_ws_switch (MetaWorkspaceManager *workspace_manager,
|
||||||
int from,
|
int from,
|
||||||
int to,
|
int to,
|
||||||
MetaMotionDirection direction,
|
MetaMotionDirection direction,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
ShellApp *app = SHELL_APP (data);
|
ShellApp *app = SHELL_APP (data);
|
||||||
|
|
||||||
@ -1115,12 +1127,12 @@ _shell_app_handle_startup_sequence (ShellApp *app,
|
|||||||
*/
|
*/
|
||||||
if (starting && shell_app_get_state (app) == SHELL_APP_STATE_STOPPED)
|
if (starting && shell_app_get_state (app) == SHELL_APP_STATE_STOPPED)
|
||||||
{
|
{
|
||||||
MetaScreen *screen = shell_global_get_screen (shell_global_get ());
|
MetaDisplay *display = shell_global_get_display (shell_global_get ());
|
||||||
MetaDisplay *display = meta_screen_get_display (screen);
|
MetaX11Display *x11_display = meta_display_get_x11_display (display);
|
||||||
|
|
||||||
shell_app_state_transition (app, SHELL_APP_STATE_STARTING);
|
shell_app_state_transition (app, SHELL_APP_STATE_STARTING);
|
||||||
meta_display_focus_the_no_focus_window (display, screen,
|
meta_x11_display_focus_the_no_focus_window (x11_display,
|
||||||
sn_startup_sequence_get_timestamp (sequence));
|
sn_startup_sequence_get_timestamp (sequence));
|
||||||
app->started_on_workspace = sn_startup_sequence_get_workspace (sequence);
|
app->started_on_workspace = sn_startup_sequence_get_workspace (sequence);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1290,15 +1302,17 @@ shell_app_get_app_info (ShellApp *app)
|
|||||||
static void
|
static void
|
||||||
create_running_state (ShellApp *app)
|
create_running_state (ShellApp *app)
|
||||||
{
|
{
|
||||||
MetaScreen *screen;
|
MetaDisplay *display = shell_global_get_display (shell_global_get ());
|
||||||
|
MetaWorkspaceManager *workspace_manager =
|
||||||
|
meta_display_get_workspace_manager (display);
|
||||||
|
|
||||||
g_assert (app->running_state == NULL);
|
g_assert (app->running_state == NULL);
|
||||||
|
|
||||||
screen = shell_global_get_screen (shell_global_get ());
|
|
||||||
app->running_state = g_slice_new0 (ShellAppRunningState);
|
app->running_state = g_slice_new0 (ShellAppRunningState);
|
||||||
app->running_state->refcount = 1;
|
app->running_state->refcount = 1;
|
||||||
app->running_state->workspace_switch_id =
|
app->running_state->workspace_switch_id =
|
||||||
g_signal_connect (screen, "workspace-switched", G_CALLBACK(shell_app_on_ws_switch), app);
|
g_signal_connect (workspace_manager, "workspace-switched",
|
||||||
|
G_CALLBACK (shell_app_on_ws_switch), app);
|
||||||
|
|
||||||
app->running_state->session = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
|
app->running_state->session = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
|
||||||
g_assert (app->running_state->session != NULL);
|
g_assert (app->running_state->session != NULL);
|
||||||
@ -1349,7 +1363,9 @@ shell_app_update_app_menu (ShellApp *app,
|
|||||||
static void
|
static void
|
||||||
unref_running_state (ShellAppRunningState *state)
|
unref_running_state (ShellAppRunningState *state)
|
||||||
{
|
{
|
||||||
MetaScreen *screen;
|
MetaDisplay *display = shell_global_get_display (shell_global_get ());
|
||||||
|
MetaWorkspaceManager *workspace_manager =
|
||||||
|
meta_display_get_workspace_manager (display);
|
||||||
|
|
||||||
g_assert (state->refcount > 0);
|
g_assert (state->refcount > 0);
|
||||||
|
|
||||||
@ -1357,8 +1373,7 @@ unref_running_state (ShellAppRunningState *state)
|
|||||||
if (state->refcount > 0)
|
if (state->refcount > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
screen = shell_global_get_screen (shell_global_get ());
|
g_signal_handler_disconnect (workspace_manager, state->workspace_switch_id);
|
||||||
g_signal_handler_disconnect (screen, state->workspace_switch_id);
|
|
||||||
|
|
||||||
g_clear_object (&state->application_proxy);
|
g_clear_object (&state->application_proxy);
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
#include <meta/meta-shaped-texture.h>
|
#include <meta/meta-shaped-texture.h>
|
||||||
#include <meta/meta-cursor-tracker.h>
|
#include <meta/meta-cursor-tracker.h>
|
||||||
#include <meta/meta-settings.h>
|
#include <meta/meta-settings.h>
|
||||||
|
#include <meta/meta-workspace-manager.h>
|
||||||
|
#include <meta/meta-x11-display.h>
|
||||||
|
|
||||||
#ifdef HAVE_SYSTEMD
|
#ifdef HAVE_SYSTEMD
|
||||||
#include <systemd/sd-journal.h>
|
#include <systemd/sd-journal.h>
|
||||||
@ -60,9 +62,10 @@ struct _ShellGlobal {
|
|||||||
Window stage_xwindow;
|
Window stage_xwindow;
|
||||||
|
|
||||||
MetaDisplay *meta_display;
|
MetaDisplay *meta_display;
|
||||||
|
MetaWorkspaceManager *workspace_manager;
|
||||||
GdkDisplay *gdk_display;
|
GdkDisplay *gdk_display;
|
||||||
|
MetaX11Display *x11_display;
|
||||||
Display *xdisplay;
|
Display *xdisplay;
|
||||||
MetaScreen *meta_screen;
|
|
||||||
|
|
||||||
char *session_mode;
|
char *session_mode;
|
||||||
|
|
||||||
@ -73,8 +76,8 @@ struct _ShellGlobal {
|
|||||||
ShellWM *wm;
|
ShellWM *wm;
|
||||||
GSettings *settings;
|
GSettings *settings;
|
||||||
const char *datadir;
|
const char *datadir;
|
||||||
const char *imagedir;
|
char *imagedir;
|
||||||
const char *userdatadir;
|
char *userdatadir;
|
||||||
GFile *userdatadir_path;
|
GFile *userdatadir_path;
|
||||||
GFile *runtime_state_path;
|
GFile *runtime_state_path;
|
||||||
|
|
||||||
@ -96,8 +99,8 @@ enum {
|
|||||||
PROP_0,
|
PROP_0,
|
||||||
|
|
||||||
PROP_SESSION_MODE,
|
PROP_SESSION_MODE,
|
||||||
PROP_SCREEN,
|
|
||||||
PROP_DISPLAY,
|
PROP_DISPLAY,
|
||||||
|
PROP_WORKSPACE_MANAGER,
|
||||||
PROP_SCREEN_WIDTH,
|
PROP_SCREEN_WIDTH,
|
||||||
PROP_SCREEN_HEIGHT,
|
PROP_SCREEN_HEIGHT,
|
||||||
PROP_STAGE,
|
PROP_STAGE,
|
||||||
@ -163,17 +166,17 @@ shell_global_get_property(GObject *object,
|
|||||||
case PROP_SESSION_MODE:
|
case PROP_SESSION_MODE:
|
||||||
g_value_set_string (value, shell_global_get_session_mode (global));
|
g_value_set_string (value, shell_global_get_session_mode (global));
|
||||||
break;
|
break;
|
||||||
case PROP_SCREEN:
|
|
||||||
g_value_set_object (value, global->meta_screen);
|
|
||||||
break;
|
|
||||||
case PROP_DISPLAY:
|
case PROP_DISPLAY:
|
||||||
g_value_set_object (value, global->meta_display);
|
g_value_set_object (value, global->meta_display);
|
||||||
break;
|
break;
|
||||||
|
case PROP_WORKSPACE_MANAGER:
|
||||||
|
g_value_set_object (value, global->workspace_manager);
|
||||||
|
break;
|
||||||
case PROP_SCREEN_WIDTH:
|
case PROP_SCREEN_WIDTH:
|
||||||
{
|
{
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
meta_screen_get_size (global->meta_screen, &width, &height);
|
meta_display_get_size (global->meta_display, &width, &height);
|
||||||
g_value_set_int (value, width);
|
g_value_set_int (value, width);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -181,7 +184,7 @@ shell_global_get_property(GObject *object,
|
|||||||
{
|
{
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
meta_screen_get_size (global->meta_screen, &width, &height);
|
meta_display_get_size (global->meta_display, &width, &height);
|
||||||
g_value_set_int (value, height);
|
g_value_set_int (value, height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -189,10 +192,10 @@ shell_global_get_property(GObject *object,
|
|||||||
g_value_set_object (value, global->stage);
|
g_value_set_object (value, global->stage);
|
||||||
break;
|
break;
|
||||||
case PROP_WINDOW_GROUP:
|
case PROP_WINDOW_GROUP:
|
||||||
g_value_set_object (value, meta_get_window_group_for_screen (global->meta_screen));
|
g_value_set_object (value, meta_get_window_group_for_display (global->meta_display));
|
||||||
break;
|
break;
|
||||||
case PROP_TOP_WINDOW_GROUP:
|
case PROP_TOP_WINDOW_GROUP:
|
||||||
g_value_set_object (value, meta_get_top_window_group_for_screen (global->meta_screen));
|
g_value_set_object (value, meta_get_top_window_group_for_display (global->meta_display));
|
||||||
break;
|
break;
|
||||||
case PROP_WINDOW_MANAGER:
|
case PROP_WINDOW_MANAGER:
|
||||||
g_value_set_object (value, global->wm);
|
g_value_set_object (value, global->wm);
|
||||||
@ -337,6 +340,10 @@ shell_global_finalize (GObject *object)
|
|||||||
g_clear_object (&global->userdatadir_path);
|
g_clear_object (&global->userdatadir_path);
|
||||||
g_clear_object (&global->runtime_state_path);
|
g_clear_object (&global->runtime_state_path);
|
||||||
|
|
||||||
|
g_free (global->session_mode);
|
||||||
|
g_free (global->imagedir);
|
||||||
|
g_free (global->userdatadir);
|
||||||
|
|
||||||
G_OBJECT_CLASS(shell_global_parent_class)->finalize (object);
|
G_OBJECT_CLASS(shell_global_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,13 +373,6 @@ shell_global_class_init (ShellGlobalClass *klass)
|
|||||||
"The session mode to use",
|
"The session mode to use",
|
||||||
"user",
|
"user",
|
||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||||
g_object_class_install_property (gobject_class,
|
|
||||||
PROP_SCREEN,
|
|
||||||
g_param_spec_object ("screen",
|
|
||||||
"Screen",
|
|
||||||
"Metacity screen object for the shell",
|
|
||||||
META_TYPE_SCREEN,
|
|
||||||
G_PARAM_READABLE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_SCREEN_WIDTH,
|
PROP_SCREEN_WIDTH,
|
||||||
@ -397,6 +397,14 @@ shell_global_class_init (ShellGlobalClass *klass)
|
|||||||
META_TYPE_DISPLAY,
|
META_TYPE_DISPLAY,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_WORKSPACE_MANAGER,
|
||||||
|
g_param_spec_object ("workspace-manager",
|
||||||
|
"Workspace manager",
|
||||||
|
"Workspace manager",
|
||||||
|
META_TYPE_WORKSPACE_MANAGER,
|
||||||
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_STAGE,
|
PROP_STAGE,
|
||||||
g_param_spec_object ("stage",
|
g_param_spec_object ("stage",
|
||||||
@ -560,7 +568,7 @@ focus_window_changed (MetaDisplay *display,
|
|||||||
|
|
||||||
/* If the stage window became unfocused, drop the key focus
|
/* If the stage window became unfocused, drop the key focus
|
||||||
* on Clutter's side. */
|
* on Clutter's side. */
|
||||||
if (!meta_stage_is_focused (global->meta_screen))
|
if (!meta_stage_is_focused (global->meta_display))
|
||||||
clutter_stage_set_key_focus (global->stage, NULL);
|
clutter_stage_set_key_focus (global->stage, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -590,14 +598,14 @@ sync_stage_window_focus (ShellGlobal *global)
|
|||||||
actor = get_key_focused_actor (global);
|
actor = get_key_focused_actor (global);
|
||||||
|
|
||||||
/* An actor got key focus and the stage needs to be focused. */
|
/* An actor got key focus and the stage needs to be focused. */
|
||||||
if (actor != NULL && !meta_stage_is_focused (global->meta_screen))
|
if (actor != NULL && !meta_stage_is_focused (global->meta_display))
|
||||||
meta_focus_stage_window (global->meta_screen,
|
meta_focus_stage_window (global->meta_display,
|
||||||
get_current_time_maybe_roundtrip (global));
|
get_current_time_maybe_roundtrip (global));
|
||||||
|
|
||||||
/* An actor dropped key focus. Focus the default window. */
|
/* An actor dropped key focus. Focus the default window. */
|
||||||
else if (actor == NULL && meta_stage_is_focused (global->meta_screen))
|
else if (actor == NULL && meta_stage_is_focused (global->meta_display))
|
||||||
meta_screen_focus_default_window (global->meta_screen,
|
meta_display_focus_default_window (global->meta_display,
|
||||||
get_current_time_maybe_roundtrip (global));
|
get_current_time_maybe_roundtrip (global));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -612,12 +620,12 @@ focus_actor_changed (ClutterStage *stage,
|
|||||||
static void
|
static void
|
||||||
sync_input_region (ShellGlobal *global)
|
sync_input_region (ShellGlobal *global)
|
||||||
{
|
{
|
||||||
MetaScreen *screen = global->meta_screen;
|
MetaDisplay *display = global->meta_display;
|
||||||
|
|
||||||
if (global->has_modal)
|
if (global->has_modal)
|
||||||
meta_set_stage_input_region (screen, None);
|
meta_set_stage_input_region (display, None);
|
||||||
else
|
else
|
||||||
meta_set_stage_input_region (screen, global->input_region);
|
meta_set_stage_input_region (display, global->input_region);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -671,17 +679,6 @@ shell_global_get_stage (ShellGlobal *global)
|
|||||||
return global->stage;
|
return global->stage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* shell_global_get_screen:
|
|
||||||
*
|
|
||||||
* Return value: (transfer none): The default #MetaScreen
|
|
||||||
*/
|
|
||||||
MetaScreen *
|
|
||||||
shell_global_get_screen (ShellGlobal *global)
|
|
||||||
{
|
|
||||||
return global->meta_screen;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shell_global_get_display:
|
* shell_global_get_display:
|
||||||
*
|
*
|
||||||
@ -708,7 +705,7 @@ shell_global_get_window_actors (ShellGlobal *global)
|
|||||||
|
|
||||||
g_return_val_if_fail (SHELL_IS_GLOBAL (global), NULL);
|
g_return_val_if_fail (SHELL_IS_GLOBAL (global), NULL);
|
||||||
|
|
||||||
for (l = meta_get_window_actors (global->meta_screen); l; l = l->next)
|
for (l = meta_get_window_actors (global->meta_display); l; l = l->next)
|
||||||
if (!meta_window_actor_is_destroyed (l->data))
|
if (!meta_window_actor_is_destroyed (l->data))
|
||||||
filtered = g_list_prepend (filtered, l->data);
|
filtered = g_list_prepend (filtered, l->data);
|
||||||
|
|
||||||
@ -834,13 +831,15 @@ entry_cursor_func (StEntry *entry,
|
|||||||
{
|
{
|
||||||
ShellGlobal *global = user_data;
|
ShellGlobal *global = user_data;
|
||||||
|
|
||||||
meta_screen_set_cursor (global->meta_screen, use_ibeam ? META_CURSOR_IBEAM : META_CURSOR_DEFAULT);
|
meta_display_set_cursor (global->meta_display,
|
||||||
|
use_ibeam ? META_CURSOR_IBEAM : META_CURSOR_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_shell_global_set_plugin (ShellGlobal *global,
|
_shell_global_set_plugin (ShellGlobal *global,
|
||||||
MetaPlugin *plugin)
|
MetaPlugin *plugin)
|
||||||
{
|
{
|
||||||
|
MetaDisplay *display;
|
||||||
MetaBackend *backend;
|
MetaBackend *backend;
|
||||||
MetaSettings *settings;
|
MetaSettings *settings;
|
||||||
|
|
||||||
@ -850,13 +849,15 @@ _shell_global_set_plugin (ShellGlobal *global,
|
|||||||
global->plugin = plugin;
|
global->plugin = plugin;
|
||||||
global->wm = shell_wm_new (plugin);
|
global->wm = shell_wm_new (plugin);
|
||||||
|
|
||||||
global->meta_screen = meta_plugin_get_screen (plugin);
|
display = meta_plugin_get_display (plugin);
|
||||||
global->meta_display = meta_screen_get_display (global->meta_screen);
|
global->meta_display = display;
|
||||||
global->xdisplay = meta_display_get_xdisplay (global->meta_display);
|
global->workspace_manager = meta_display_get_workspace_manager (display);
|
||||||
|
global->x11_display = meta_display_get_x11_display (display);
|
||||||
|
global->xdisplay = meta_x11_display_get_xdisplay (global->x11_display);
|
||||||
|
|
||||||
global->gdk_display = gdk_x11_lookup_xdisplay (global->xdisplay);
|
global->gdk_display = gdk_x11_lookup_xdisplay (global->xdisplay);
|
||||||
|
|
||||||
global->stage = CLUTTER_STAGE (meta_get_stage_for_screen (global->meta_screen));
|
global->stage = CLUTTER_STAGE (meta_get_stage_for_display (display));
|
||||||
|
|
||||||
if (meta_is_wayland_compositor ())
|
if (meta_is_wayland_compositor ())
|
||||||
{
|
{
|
||||||
@ -968,13 +969,13 @@ shell_global_end_modal (ShellGlobal *global,
|
|||||||
|
|
||||||
/* If the stage window is unfocused, ensure that there's no
|
/* If the stage window is unfocused, ensure that there's no
|
||||||
* actor focused on Clutter's side. */
|
* actor focused on Clutter's side. */
|
||||||
if (!meta_stage_is_focused (global->meta_screen))
|
if (!meta_stage_is_focused (global->meta_display))
|
||||||
clutter_stage_set_key_focus (global->stage, NULL);
|
clutter_stage_set_key_focus (global->stage, NULL);
|
||||||
|
|
||||||
/* An actor dropped key focus. Focus the default window. */
|
/* An actor dropped key focus. Focus the default window. */
|
||||||
else if (get_key_focused_actor (global) && meta_stage_is_focused (global->meta_screen))
|
else if (get_key_focused_actor (global) && meta_stage_is_focused (global->meta_display))
|
||||||
meta_screen_focus_default_window (global->meta_screen,
|
meta_display_focus_default_window (global->meta_display,
|
||||||
get_current_time_maybe_roundtrip (global));
|
get_current_time_maybe_roundtrip (global));
|
||||||
|
|
||||||
sync_input_region (global);
|
sync_input_region (global);
|
||||||
}
|
}
|
||||||
@ -1155,9 +1156,8 @@ shell_global_reexec_self (ShellGlobal *global)
|
|||||||
*/
|
*/
|
||||||
pre_exec_close_fds ();
|
pre_exec_close_fds ();
|
||||||
|
|
||||||
meta_display_unmanage_screen (shell_global_get_display (global),
|
meta_display_close (shell_global_get_display (global),
|
||||||
shell_global_get_screen (global),
|
shell_global_get_current_time (global));
|
||||||
shell_global_get_current_time (global));
|
|
||||||
|
|
||||||
execvp (arr->pdata[0], (char**)arr->pdata);
|
execvp (arr->pdata[0], (char**)arr->pdata);
|
||||||
g_warning ("failed to reexec: %s", g_strerror (errno));
|
g_warning ("failed to reexec: %s", g_strerror (errno));
|
||||||
@ -1242,7 +1242,7 @@ shell_global_notify_error (ShellGlobal *global,
|
|||||||
*/
|
*/
|
||||||
void shell_global_init_xdnd (ShellGlobal *global)
|
void shell_global_init_xdnd (ShellGlobal *global)
|
||||||
{
|
{
|
||||||
Window output_window = meta_get_overlay_window (global->meta_screen);
|
Window output_window = meta_get_overlay_window (global->meta_display);
|
||||||
long xdnd_version = 5;
|
long xdnd_version = 5;
|
||||||
|
|
||||||
XChangeProperty (global->xdisplay, global->stage_xwindow,
|
XChangeProperty (global->xdisplay, global->stage_xwindow,
|
||||||
@ -1280,7 +1280,7 @@ shell_global_get_pointer (ShellGlobal *global,
|
|||||||
ClutterModifierType raw_mods;
|
ClutterModifierType raw_mods;
|
||||||
MetaCursorTracker *tracker;
|
MetaCursorTracker *tracker;
|
||||||
|
|
||||||
tracker = meta_cursor_tracker_get_for_screen (global->meta_screen);
|
tracker = meta_cursor_tracker_get_for_display (global->meta_display);
|
||||||
meta_cursor_tracker_get_pointer (tracker, x, y, &raw_mods);
|
meta_cursor_tracker_get_pointer (tracker, x, y, &raw_mods);
|
||||||
|
|
||||||
*mods = raw_mods & CLUTTER_MODIFIER_MASK;
|
*mods = raw_mods & CLUTTER_MODIFIER_MASK;
|
||||||
@ -1428,7 +1428,12 @@ shell_global_create_app_launch_context (ShellGlobal *global,
|
|||||||
gdk_app_launch_context_set_timestamp (context, timestamp);
|
gdk_app_launch_context_set_timestamp (context, timestamp);
|
||||||
|
|
||||||
if (workspace < 0)
|
if (workspace < 0)
|
||||||
workspace = meta_screen_get_active_workspace_index (global->meta_screen);
|
{
|
||||||
|
MetaWorkspaceManager *workspace_manager = global->workspace_manager;
|
||||||
|
|
||||||
|
workspace =
|
||||||
|
meta_workspace_manager_get_active_workspace_index (workspace_manager);
|
||||||
|
}
|
||||||
gdk_app_launch_context_set_desktop (context, workspace);
|
gdk_app_launch_context_set_desktop (context, workspace);
|
||||||
|
|
||||||
return (GAppLaunchContext *)context;
|
return (GAppLaunchContext *)context;
|
||||||
|
@ -16,7 +16,6 @@ G_DECLARE_FINAL_TYPE (ShellGlobal, shell_global, SHELL, GLOBAL, GObject)
|
|||||||
ShellGlobal *shell_global_get (void);
|
ShellGlobal *shell_global_get (void);
|
||||||
|
|
||||||
ClutterStage *shell_global_get_stage (ShellGlobal *global);
|
ClutterStage *shell_global_get_stage (ShellGlobal *global);
|
||||||
MetaScreen *shell_global_get_screen (ShellGlobal *global);
|
|
||||||
MetaDisplay *shell_global_get_display (ShellGlobal *global);
|
MetaDisplay *shell_global_get_display (ShellGlobal *global);
|
||||||
GList *shell_global_get_window_actors (ShellGlobal *global);
|
GList *shell_global_get_window_actors (ShellGlobal *global);
|
||||||
GSettings *shell_global_get_settings (ShellGlobal *global);
|
GSettings *shell_global_get_settings (ShellGlobal *global);
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
|
|
||||||
#include <cogl/cogl.h>
|
#include <cogl/cogl.h>
|
||||||
#include <meta/screen.h>
|
|
||||||
#include <meta/meta-cursor-tracker.h>
|
#include <meta/meta-cursor-tracker.h>
|
||||||
|
#include <meta/display.h>
|
||||||
#include <meta/compositor-mutter.h>
|
#include <meta/compositor-mutter.h>
|
||||||
|
|
||||||
#include "shell-global.h"
|
#include "shell-global.h"
|
||||||
@ -112,7 +112,7 @@ static void recorder_remove_redraw_timeout (ShellRecorder *recorder);
|
|||||||
|
|
||||||
enum {
|
enum {
|
||||||
PROP_0,
|
PROP_0,
|
||||||
PROP_SCREEN,
|
PROP_DISPLAY,
|
||||||
PROP_STAGE,
|
PROP_STAGE,
|
||||||
PROP_FRAMERATE,
|
PROP_FRAMERATE,
|
||||||
PROP_PIPELINE,
|
PROP_PIPELINE,
|
||||||
@ -670,12 +670,12 @@ recorder_set_stage (ShellRecorder *recorder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
recorder_set_screen (ShellRecorder *recorder,
|
recorder_set_display (ShellRecorder *recorder,
|
||||||
MetaScreen *screen)
|
MetaDisplay *display)
|
||||||
{
|
{
|
||||||
MetaCursorTracker *tracker;
|
MetaCursorTracker *tracker;
|
||||||
|
|
||||||
tracker = meta_cursor_tracker_get_for_screen (screen);
|
tracker = meta_cursor_tracker_get_for_display (display);
|
||||||
|
|
||||||
if (tracker == recorder->cursor_tracker)
|
if (tracker == recorder->cursor_tracker)
|
||||||
return;
|
return;
|
||||||
@ -760,8 +760,8 @@ shell_recorder_set_property (GObject *object,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_SCREEN:
|
case PROP_DISPLAY:
|
||||||
recorder_set_screen (recorder, g_value_get_object (value));
|
recorder_set_display (recorder, g_value_get_object (value));
|
||||||
break;
|
break;
|
||||||
case PROP_STAGE:
|
case PROP_STAGE:
|
||||||
recorder_set_stage (recorder, g_value_get_object (value));
|
recorder_set_stage (recorder, g_value_get_object (value));
|
||||||
@ -825,11 +825,11 @@ shell_recorder_class_init (ShellRecorderClass *klass)
|
|||||||
gobject_class->set_property = shell_recorder_set_property;
|
gobject_class->set_property = shell_recorder_set_property;
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_SCREEN,
|
PROP_DISPLAY,
|
||||||
g_param_spec_object ("screen",
|
g_param_spec_object ("display",
|
||||||
"Screen",
|
"Display",
|
||||||
"Screen to record",
|
"Display to record",
|
||||||
META_TYPE_SCREEN,
|
META_TYPE_DISPLAY,
|
||||||
G_PARAM_WRITABLE));
|
G_PARAM_WRITABLE));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
@ -1551,7 +1551,7 @@ shell_recorder_record (ShellRecorder *recorder,
|
|||||||
recorder_add_update_pointer_timeout (recorder);
|
recorder_add_update_pointer_timeout (recorder);
|
||||||
|
|
||||||
/* Disable unredirection while we are recoring */
|
/* Disable unredirection while we are recoring */
|
||||||
meta_disable_unredirect_for_screen (shell_global_get_screen (shell_global_get ()));
|
meta_disable_unredirect_for_display (shell_global_get_display (shell_global_get ()));
|
||||||
|
|
||||||
/* Set up repaint hook */
|
/* Set up repaint hook */
|
||||||
recorder->repaint_hook_id = clutter_threads_add_repaint_func(recorder_repaint_hook, recorder->stage, NULL);
|
recorder->repaint_hook_id = clutter_threads_add_repaint_func(recorder_repaint_hook, recorder->stage, NULL);
|
||||||
@ -1602,7 +1602,7 @@ shell_recorder_close (ShellRecorder *recorder)
|
|||||||
recorder->state = RECORDER_STATE_CLOSED;
|
recorder->state = RECORDER_STATE_CLOSED;
|
||||||
|
|
||||||
/* Reenable after the recording */
|
/* Reenable after the recording */
|
||||||
meta_enable_unredirect_for_screen (shell_global_get_screen (shell_global_get ()));
|
meta_enable_unredirect_for_display (shell_global_get_display (shell_global_get ()));
|
||||||
|
|
||||||
/* Release the refcount we took when we started recording */
|
/* Release the refcount we took when we started recording */
|
||||||
g_object_unref (recorder);
|
g_object_unref (recorder);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user