Compare commits
	
		
			2 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					969db82f5a | ||
| 
						 | 
					6ee13ff685 | 
@@ -1,16 +1,19 @@
 | 
			
		||||
# Coding guide
 | 
			
		||||
Coding guide
 | 
			
		||||
============
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
(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
 | 
			
		||||
restrictive while you're coding, ignore it, and let the patch reviewer decide
 | 
			
		||||
what to do.
 | 
			
		||||
 | 
			
		||||
## Indentation and whitespace
 | 
			
		||||
Indentation and whitespace
 | 
			
		||||
--------------------------
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
@@ -19,7 +22,7 @@ on one line.
 | 
			
		||||
* 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`
 | 
			
		||||
* statements, or `while`, or `for` loops.
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    function foo(a, b) {
 | 
			
		||||
        let bar;
 | 
			
		||||
 | 
			
		||||
@@ -36,20 +39,22 @@ on one line.
 | 
			
		||||
            print(20);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Semicolons
 | 
			
		||||
Semicolons
 | 
			
		||||
----------
 | 
			
		||||
 | 
			
		||||
JavaScript allows omitting semicolons at the end of lines, but don't. Always
 | 
			
		||||
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
 | 
			
		||||
while. emacs now has a built-in JavaScript mode, js-mode, based on
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
@@ -62,13 +67,14 @@ 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
 | 
			
		||||
library. These headers are not installed, distributed or introspected.
 | 
			
		||||
 | 
			
		||||
## Imports
 | 
			
		||||
Imports
 | 
			
		||||
-------
 | 
			
		||||
 | 
			
		||||
Use UpperCamelCase when importing modules to distinguish them from ordinary
 | 
			
		||||
variables, e.g.
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    const GLib = imports.gi.GLib;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Imports should be categorized into one of two places. The top-most import block
 | 
			
		||||
should contain only "environment imports". These are either modules from
 | 
			
		||||
gobject-introspection or modules added by gjs itself.
 | 
			
		||||
@@ -79,7 +85,7 @@ e.g. `imports.ui.popupMenu`.
 | 
			
		||||
 | 
			
		||||
Each import block should be sorted alphabetically. Don't import modules you
 | 
			
		||||
don't use.
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    const GLib = imports.gi.GLib;
 | 
			
		||||
    const Gio = imports.gi.Gio;
 | 
			
		||||
    const Lang = imports.lang;
 | 
			
		||||
@@ -89,22 +95,23 @@ don't use.
 | 
			
		||||
    const Params = imports.misc.params;
 | 
			
		||||
    const Tweener = imports.ui.tweener;
 | 
			
		||||
    const Util = imports.misc.util;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The alphabetical ordering should be done independently of the location of the
 | 
			
		||||
location. Never reference `imports` in actual code.
 | 
			
		||||
 | 
			
		||||
## Constants
 | 
			
		||||
Constants
 | 
			
		||||
---------
 | 
			
		||||
 | 
			
		||||
We use CONSTANTS_CASE to define constants. All constants should be directly
 | 
			
		||||
under the imports:
 | 
			
		||||
```javascript
 | 
			
		||||
    const MY_DBUS_INTERFACE = 'org.my.Interface';
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Variable declaration
 | 
			
		||||
    const MY_DBUS_INTERFACE = 'org.my.Interface';
 | 
			
		||||
 | 
			
		||||
Variable declaration
 | 
			
		||||
--------------------
 | 
			
		||||
 | 
			
		||||
Always use either `const` or `let` when defining a variable.
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    // Iterating over an array
 | 
			
		||||
    for (let i = 0; i < arr.length; ++i) {
 | 
			
		||||
        let item = arr[i];
 | 
			
		||||
@@ -114,17 +121,17 @@ Always use either `const` or `let` when defining a variable.
 | 
			
		||||
    for (let prop in someobj) {
 | 
			
		||||
        ...
 | 
			
		||||
    }
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
## Classes
 | 
			
		||||
Classes
 | 
			
		||||
-------
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
GObjects, although this feature isn't used very often in the Shell itself.
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    var IconLabelMenuItem = new Lang.Class({
 | 
			
		||||
        Name: 'IconLabelMenuItem',
 | 
			
		||||
        Extends: PopupMenu.PopupMenuBaseItem,
 | 
			
		||||
@@ -139,7 +146,6 @@ GObjects, although this feature isn't used very often in the Shell itself.
 | 
			
		||||
            log("menu opened!");
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
* 'Name' is required. 'Extends' is optional. If you leave it out, you will
 | 
			
		||||
  automatically inherit from Object.
 | 
			
		||||
@@ -156,12 +162,13 @@ 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
 | 
			
		||||
  conventional syntax.
 | 
			
		||||
 | 
			
		||||
## GObject Introspection
 | 
			
		||||
GObject Introspection
 | 
			
		||||
---------------------
 | 
			
		||||
 | 
			
		||||
GObject Introspection is a powerful feature that allows us to have native
 | 
			
		||||
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:
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    var MyClutterActor = new Lang.Class({
 | 
			
		||||
        Name: 'MyClutterActor',
 | 
			
		||||
        Extends: Clutter.Actor,
 | 
			
		||||
@@ -181,9 +188,9 @@ you to inherit from a type to use it, you can do so:
 | 
			
		||||
                            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
 | 
			
		||||
supports. The `gettext` function is aliased globally as `_`, you do not need to
 | 
			
		||||
@@ -197,7 +204,8 @@ and "double quotes" for strings that the user may see. This allows us to
 | 
			
		||||
quickly find untranslated or mistranslated strings by grepping through the
 | 
			
		||||
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,
 | 
			
		||||
allowing us to treat them like any other. Because the Shell was built before
 | 
			
		||||
@@ -206,7 +214,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
 | 
			
		||||
the actor itself:
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    var MyClass = new Lang.Class({
 | 
			
		||||
        Name: 'MyClass',
 | 
			
		||||
 | 
			
		||||
@@ -221,7 +229,6 @@ the actor itself:
 | 
			
		||||
            actor.set_label("You clicked the button!");
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The 'delegate' property is important for anything which trying to get the
 | 
			
		||||
delegate object from an associated actor. For instance, the drag and drop
 | 
			
		||||
@@ -229,14 +236,16 @@ 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`
 | 
			
		||||
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
 | 
			
		||||
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
 | 
			
		||||
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
 | 
			
		||||
invoked, not to the value of this where the closure is created, because "this"
 | 
			
		||||
@@ -245,16 +254,15 @@ variable that can be captured in closures.
 | 
			
		||||
 | 
			
		||||
All closures should be wrapped with Function.prototype.bind or use arrow
 | 
			
		||||
notation.
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    const Lang = imports.lang;
 | 
			
		||||
 | 
			
		||||
    let closure1 = () => { this._fnorbate(); };
 | 
			
		||||
    let closure2 = this._fnorbate.bind(this);
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
A more realistic example would be connecting to a signal on a method of a
 | 
			
		||||
prototype:
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    const Lang = imports.lang;
 | 
			
		||||
    const FnorbLib = imports.fborbLib;
 | 
			
		||||
 | 
			
		||||
@@ -268,21 +276,19 @@ prototype:
 | 
			
		||||
            this._updateFnorb();
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Object literal syntax
 | 
			
		||||
Object literal syntax
 | 
			
		||||
---------------------
 | 
			
		||||
 | 
			
		||||
In JavaScript, these are equivalent:
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    foo = { 'bar': 42 };
 | 
			
		||||
    foo = { bar: 42 };
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
and so are these:
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    var b = foo['bar'];
 | 
			
		||||
    var b = foo.bar;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
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:
 | 
			
		||||
@@ -292,13 +298,14 @@ 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
 | 
			
		||||
}`, `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
 | 
			
		||||
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
 | 
			
		||||
property.
 | 
			
		||||
```javascript
 | 
			
		||||
 | 
			
		||||
    var ANIMATION_TIME = 2000;
 | 
			
		||||
 | 
			
		||||
    var MyClass = new Lang.Class({
 | 
			
		||||
@@ -324,4 +331,3 @@ property.
 | 
			
		||||
                     { position: 100,
 | 
			
		||||
                       time: ANIMATION_TIME,
 | 
			
		||||
                       transition: 'easeOutQuad' });
 | 
			
		||||
```
 | 
			
		||||
							
								
								
									
										7
									
								
								MAINTAINERS
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								MAINTAINERS
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
Owen Taylor
 | 
			
		||||
E-mail: otaylor@redhat.com
 | 
			
		||||
Userid: otaylor
 | 
			
		||||
 | 
			
		||||
Colin Walters
 | 
			
		||||
E-mail: walters@verbum.org
 | 
			
		||||
Userid: walters
 | 
			
		||||
							
								
								
									
										103
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										103
									
								
								NEWS
									
									
									
									
									
								
							@@ -1,106 +1,3 @@
 | 
			
		||||
3.29.92
 | 
			
		||||
=======
 | 
			
		||||
* Choose some actors to cache on the GPU [Daniel; #792633]
 | 
			
		||||
* inputMethod: Hide preedit text if requested [Takao; #431]
 | 
			
		||||
* Fix forced fallback app-menus on wayland [Jonas; #276]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Jonas Ådahl, Takao Fujiwara, Mohammed Sadiq, Marco Trevisan (Treviño),
 | 
			
		||||
  Daniel van Vugt
 | 
			
		||||
 | 
			
		||||
Translators:
 | 
			
		||||
  Baurzhan Muftakhidinov [kk], Kukuh Syafaat [id], Milo Casagrande [it],
 | 
			
		||||
  Changwoo Ryu [ko], Marek Cernocky [cs]
 | 
			
		||||
 | 
			
		||||
3.29.91
 | 
			
		||||
=======
 | 
			
		||||
* Fix handling of 0/false options in ShowOSD D-Bus API [Florian; #791669]
 | 
			
		||||
* overview: Fix handling of confirmation dialogs on wayland [verdre; !180]
 | 
			
		||||
* Avoid some full relayout/redraws [Carlos; !197]
 | 
			
		||||
* Keep workspace switcher slid out when workspaces are in use [Florian; !161]
 | 
			
		||||
* Ignore auto-repeat for some keybindings [Andrea; #373]
 | 
			
		||||
* Misc. bug fixes [Carlos, Florian, Pascal; #464, !189, !191, !192, !162]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Andrea Azzarone, Olivier Blin, Carlos Garnacho, Florian Müllner,
 | 
			
		||||
  Pascal Nowack, verdre
 | 
			
		||||
 | 
			
		||||
Translators:
 | 
			
		||||
  Bruno Lopes da Silva [pt_BR], Matej Urbančič [sl], Piotr Drąg [pl],
 | 
			
		||||
  Aurimas Černius [lt], Emin Tufan Çetin [tr], Fabio Tomat [fur],
 | 
			
		||||
  Alexandre Franke [fr], Yi-Jyun Pan [zh_TW], Bernd Homuth [de],
 | 
			
		||||
  Andre Klapper [cs], Jordi Mas [ca], Daniel Șerbănescu [ro],
 | 
			
		||||
  Bruce Cowan [en_GB]
 | 
			
		||||
 | 
			
		||||
3.29.90
 | 
			
		||||
=======
 | 
			
		||||
* Add remote access indication on wayland [Jonas; !160]
 | 
			
		||||
* Fix wrong window positions in overview on wayland [Marco; #776588]
 | 
			
		||||
* Add gesture to unfullscreen a window [Jan-Michael; !123]
 | 
			
		||||
* Add PickColor method to screenshot D-Bus interface [Florian; #286]
 | 
			
		||||
* Consider "new-window" action when opening new windows [Florian; #756844]
 | 
			
		||||
* Make workspace switching gestures follow motion [Carlos; #788994]
 | 
			
		||||
* Support audio volumes above 100% [Didier; #790280]
 | 
			
		||||
* Misc. bug fixes [Florian, Daniel; #424, !132, !182, #433, !179, #786496]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Jonas Ådahl, Jan-Michael Brummer, Piotr Drąg, Daniel Drake, Carlos Garnacho,
 | 
			
		||||
  Florian Müllner, Georges Basile Stavracas Neto, Didier Roche, Jakub Steiner,
 | 
			
		||||
  Marco Trevisan (Treviño)
 | 
			
		||||
 | 
			
		||||
Translators:
 | 
			
		||||
  Charles Monzat [fr], Daniel Mustieles [es]
 | 
			
		||||
 | 
			
		||||
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]
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,3 @@
 | 
			
		||||
# GNOME Shell
 | 
			
		||||
GNOME Shell provides core user interface functions for the GNOME 3 desktop,
 | 
			
		||||
like switching to windows and launching applications. GNOME Shell takes
 | 
			
		||||
advantage of the capabilities of modern graphics hardware and introduces
 | 
			
		||||
@@ -7,14 +6,15 @@ easy to use experience.
 | 
			
		||||
 | 
			
		||||
For more information about GNOME Shell, including instructions on how
 | 
			
		||||
to build GNOME Shell from source and how to get involved with the project,
 | 
			
		||||
see the [project wiki][wiki]
 | 
			
		||||
see:
 | 
			
		||||
 | 
			
		||||
Bugs should be reported to the GNOME [bug tracking system][bug-tracker].
 | 
			
		||||
 https://wiki.gnome.org/Projects/GnomeShell
 | 
			
		||||
 | 
			
		||||
## License
 | 
			
		||||
Bugs should be reported at http://bugzilla.gnome.org against the 'gnome-shell'
 | 
			
		||||
product.
 | 
			
		||||
 | 
			
		||||
License
 | 
			
		||||
=======
 | 
			
		||||
GNOME Shell is distributed under the terms of the GNU General Public License,
 | 
			
		||||
version 2 or later. See the [COPYING][license] file for details.
 | 
			
		||||
version 2 or later. See the COPYING 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
 | 
			
		||||
enable, disable and install them.
 | 
			
		||||
 | 
			
		||||
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'
 | 
			
		||||
product.
 | 
			
		||||
 | 
			
		||||
## License
 | 
			
		||||
License
 | 
			
		||||
=======
 | 
			
		||||
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
 | 
			
		||||
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:
 | 
			
		||||
 | 
			
		||||
  http://code.google.com/p/npapi-sdk/
 | 
			
		||||
 | 
			
		||||
[bug-tracker]: https://gitlab.gnome.org/GNOME/gnome-shell/issues
 | 
			
		||||
@@ -24,9 +24,3 @@
 | 
			
		||||
 | 
			
		||||
/* Define if _NL_TIME_FIRST_WEEKDATE is available */
 | 
			
		||||
#mesondefine HAVE__NL_TIME_FIRST_WEEKDAY
 | 
			
		||||
 | 
			
		||||
/* Define if you have the `g_desktop_app_info_launch_uris_as_manager_with_fds` function */
 | 
			
		||||
#mesondefine HAVE_GIO_DESKTOP_LAUNCH_URIS_WITH_FDS
 | 
			
		||||
 | 
			
		||||
/* Define if fdwalk is available in libc */
 | 
			
		||||
#mesondefine HAVE_FDWALK
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
[org.gnome.mutter:GNOME]
 | 
			
		||||
attach-modal-dialogs=true
 | 
			
		||||
edge-tiling=true
 | 
			
		||||
dynamic-workspaces=true
 | 
			
		||||
workspaces-only-on-primary=true
 | 
			
		||||
focus-change-on-pointer-rest=true
 | 
			
		||||
@@ -22,7 +22,6 @@
 | 
			
		||||
    <file>id.json</file>
 | 
			
		||||
    <file>il.json</file>
 | 
			
		||||
    <file>in+bolnagri.json</file>
 | 
			
		||||
    <file>in+mal.json</file>
 | 
			
		||||
    <file>ir.json</file>
 | 
			
		||||
    <file>is.json</file>
 | 
			
		||||
    <file>it.json</file>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +0,0 @@
 | 
			
		||||
[Desktop Entry]
 | 
			
		||||
Type=Application
 | 
			
		||||
Name=GNOME settings overrides migration
 | 
			
		||||
NoDisplay=true
 | 
			
		||||
Exec=@libexecdir@/gnome-shell-overrides-migration.sh
 | 
			
		||||
@@ -1,5 +0,0 @@
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=GNOME Shell (wayland sync point)
 | 
			
		||||
After=gnome-shell.service
 | 
			
		||||
BindsTo=gnome-shell.service
 | 
			
		||||
Conflicts=gnome-shell-x11.target
 | 
			
		||||
@@ -1,5 +0,0 @@
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=GNOME Shell (x11 sync point)
 | 
			
		||||
After=gnome-shell.service
 | 
			
		||||
BindsTo=gnome-shell.service
 | 
			
		||||
Conflicts=gnome-shell-wayland.target
 | 
			
		||||
@@ -1,11 +0,0 @@
 | 
			
		||||
[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
 | 
			
		||||
@@ -92,33 +92,6 @@ schema = configure_file(
 | 
			
		||||
  configuration: schemaconf,
 | 
			
		||||
  install_dir: schemadir
 | 
			
		||||
)
 | 
			
		||||
install_data('00_org.gnome.shell.gschema.override', install_dir: schemadir)
 | 
			
		||||
 | 
			
		||||
overrides_migration_conf = configuration_data()
 | 
			
		||||
overrides_migration_conf.set('libexecdir', libexecdir)
 | 
			
		||||
overrides_migration = configure_file(
 | 
			
		||||
  input: 'gnome-shell-overrides-migration.desktop.in',
 | 
			
		||||
  output: 'gnome-shell-overrides-migration.desktop',
 | 
			
		||||
  configuration: overrides_migration_conf,
 | 
			
		||||
  install_dir: autostartdir
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
custom_target('compile-schemas',
 | 
			
		||||
 
 | 
			
		||||
@@ -91,23 +91,6 @@
 | 
			
		||||
      <arg type="s" direction="out" name="filename_used"/>
 | 
			
		||||
    </method>
 | 
			
		||||
 | 
			
		||||
    <!--
 | 
			
		||||
        PickColor:
 | 
			
		||||
 | 
			
		||||
        Picks a color and returns the result.
 | 
			
		||||
 | 
			
		||||
        The @result vardict contains:
 | 
			
		||||
        <variablelist>
 | 
			
		||||
          <varlistentry>
 | 
			
		||||
            <term>color (ddd)</term>
 | 
			
		||||
            <listitem><para>The color, RGB values in the range [0,1].</para></listitem>
 | 
			
		||||
          </varlistentry>
 | 
			
		||||
        </variablelist>
 | 
			
		||||
    -->
 | 
			
		||||
    <method name="PickColor">
 | 
			
		||||
      <arg type="a{sv}" direction="out" name="result"/>
 | 
			
		||||
    </method>
 | 
			
		||||
 | 
			
		||||
    <!--
 | 
			
		||||
        FlashArea:
 | 
			
		||||
        @x: the X coordinate of the area to flash
 | 
			
		||||
 
 | 
			
		||||
@@ -190,7 +190,6 @@
 | 
			
		||||
    </key>
 | 
			
		||||
  </schema>
 | 
			
		||||
 | 
			
		||||
  <!-- unused, change 00_org.gnome.shell.gschema.override instead -->
 | 
			
		||||
  <schema id="org.gnome.shell.overrides" path="/org/gnome/shell/overrides/"
 | 
			
		||||
	  gettext-domain="@GETTEXT_PACKAGE@">
 | 
			
		||||
    <key name="attach-modal-dialogs" type="b">
 | 
			
		||||
 
 | 
			
		||||
@@ -1,559 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "levels": [
 | 
			
		||||
    {
 | 
			
		||||
      "level": "",
 | 
			
		||||
      "mode": "default",
 | 
			
		||||
      "rows": [
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "െ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ൌ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ൈ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ാ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ീ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ൂ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ബ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഹ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഗ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ദ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ജ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഡ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ""
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "ോ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "േ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "്"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ി"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ു"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "പ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ര"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ക"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ത"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ച"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ട"
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "െ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ം"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "മ",
 | 
			
		||||
            "ç"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ന"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "വ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ല",
 | 
			
		||||
            "ñ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "സ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഷ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "യ"
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            ","
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            " "
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ".",
 | 
			
		||||
            "#",
 | 
			
		||||
            "!",
 | 
			
		||||
            ",",
 | 
			
		||||
            "?",
 | 
			
		||||
            "-",
 | 
			
		||||
            ":",
 | 
			
		||||
            "'",
 | 
			
		||||
            "@"
 | 
			
		||||
          ]
 | 
			
		||||
        ]
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "level": "shift",
 | 
			
		||||
      "mode": "latched",
 | 
			
		||||
      "rows": [
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "ഔ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഐ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ആ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഈ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഊ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഭ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ങ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഘ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ധ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഝ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഢ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഞ"
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "ഓ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഏ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "അ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഇ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഉ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഫ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "റ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഖ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഥ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഛ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഠ"
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "എ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ""
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ണ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ന"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഴ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ള"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ശ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "ഷ"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "യ"
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            ","
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            " "
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ".",
 | 
			
		||||
            "#",
 | 
			
		||||
            "!",
 | 
			
		||||
            ",",
 | 
			
		||||
            "?",
 | 
			
		||||
            "-",
 | 
			
		||||
            ":",
 | 
			
		||||
            "'",
 | 
			
		||||
            "@"
 | 
			
		||||
          ]
 | 
			
		||||
        ]
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "level": "opt",
 | 
			
		||||
      "mode": "locked",
 | 
			
		||||
      "rows": [
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "൧",
 | 
			
		||||
            "1",
 | 
			
		||||
            "¹",
 | 
			
		||||
            "½",
 | 
			
		||||
            "⅓",
 | 
			
		||||
            "¼",
 | 
			
		||||
            "⅛"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "൨",
 | 
			
		||||
            "2",
 | 
			
		||||
            "²",
 | 
			
		||||
            "⅔"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "൩",
 | 
			
		||||
            "3",
 | 
			
		||||
            "³",
 | 
			
		||||
            "¾",
 | 
			
		||||
            "⅜"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "൪",
 | 
			
		||||
            "4",
 | 
			
		||||
            "⁴"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "൫",
 | 
			
		||||
            "5",
 | 
			
		||||
            "⅝"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "൬",
 | 
			
		||||
            "6"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "൭",
 | 
			
		||||
            "7",
 | 
			
		||||
            "⅞"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "൮",
 | 
			
		||||
            "8"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "൯",
 | 
			
		||||
            "9"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "൦",
 | 
			
		||||
            "0",
 | 
			
		||||
            "ⁿ",
 | 
			
		||||
            "∅"
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "@"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "#"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "₹",
 | 
			
		||||
            "$",
 | 
			
		||||
            "¢",
 | 
			
		||||
            "£",
 | 
			
		||||
            "€",
 | 
			
		||||
            "¥",
 | 
			
		||||
            "₱"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "%",
 | 
			
		||||
            "‰"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "&"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "-",
 | 
			
		||||
            "_",
 | 
			
		||||
            "–",
 | 
			
		||||
            "—",
 | 
			
		||||
            "·"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "+",
 | 
			
		||||
            "±"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "(",
 | 
			
		||||
            "<",
 | 
			
		||||
            "{",
 | 
			
		||||
            "["
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ")",
 | 
			
		||||
            ">",
 | 
			
		||||
            "}",
 | 
			
		||||
            "]"
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "*",
 | 
			
		||||
            "†",
 | 
			
		||||
            "‡",
 | 
			
		||||
            "★"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "\"",
 | 
			
		||||
            "“",
 | 
			
		||||
            "”",
 | 
			
		||||
            "«",
 | 
			
		||||
            "»"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "'",
 | 
			
		||||
            "‘",
 | 
			
		||||
            "’",
 | 
			
		||||
            "‹",
 | 
			
		||||
            "›"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ":"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ";"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "!",
 | 
			
		||||
            "¡"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "?",
 | 
			
		||||
            "¿"
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "_"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "/"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            " "
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ","
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ".",
 | 
			
		||||
            "…"
 | 
			
		||||
          ]
 | 
			
		||||
        ]
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "level": "opt+shift",
 | 
			
		||||
      "mode": "locked",
 | 
			
		||||
      "rows": [
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "~"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "`"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "|"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "•",
 | 
			
		||||
            "♪",
 | 
			
		||||
            "♥",
 | 
			
		||||
            "♠",
 | 
			
		||||
            "♦",
 | 
			
		||||
            "♣"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "√"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "Π",
 | 
			
		||||
            "π"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "÷"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "×"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "¶",
 | 
			
		||||
            "§"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "∆"
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "£"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "¢"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "€"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "¥"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "^",
 | 
			
		||||
            "↑",
 | 
			
		||||
            "↓",
 | 
			
		||||
            "←",
 | 
			
		||||
            "→"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "°",
 | 
			
		||||
            "′",
 | 
			
		||||
            "″"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "=",
 | 
			
		||||
            "≠",
 | 
			
		||||
            "≈",
 | 
			
		||||
            "∞"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "{"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "}"
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "\\"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "©"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "®"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "™"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "℅"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "["
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            "]"
 | 
			
		||||
          ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          [
 | 
			
		||||
            "<",
 | 
			
		||||
            "‹",
 | 
			
		||||
            "≤",
 | 
			
		||||
            "«"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ">",
 | 
			
		||||
            "›",
 | 
			
		||||
            "≥",
 | 
			
		||||
            "»"
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            " "
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ","
 | 
			
		||||
          ],
 | 
			
		||||
          [
 | 
			
		||||
            ".",
 | 
			
		||||
            "…"
 | 
			
		||||
          ]
 | 
			
		||||
        ]
 | 
			
		||||
      ]
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "locale": "ml",
 | 
			
		||||
  "name": "Malayalam"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										3
									
								
								data/theme/HACKING
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								data/theme/HACKING
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
To generate the css files, from the project directory:
 | 
			
		||||
 | 
			
		||||
sass --sourcemap=none --update .
 | 
			
		||||
							
								
								
									
										31
									
								
								data/theme/README
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								data/theme/README
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
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.
 | 
			
		||||
@@ -1,32 +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][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/
 | 
			
		||||
							
								
								
									
										6
									
								
								data/theme/gnome-shell-sass/HACKING
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								data/theme/gnome-shell-sass/HACKING
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
--- 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 ./
 | 
			
		||||
							
								
								
									
										7
									
								
								data/theme/gnome-shell-sass/README
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								data/theme/gnome-shell-sass/README
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
@@ -1,16 +0,0 @@
 | 
			
		||||
# 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
 | 
			
		||||
@@ -128,15 +128,12 @@ StScrollBar {
 | 
			
		||||
 | 
			
		||||
.slider {
 | 
			
		||||
  height: 1em;
 | 
			
		||||
  -barlevel-height: 0.3em;
 | 
			
		||||
  -barlevel-background-color: $insensitive_bg_color; //background of the trough
 | 
			
		||||
  -barlevel-border-color: $borders_color; //trough border color
 | 
			
		||||
  -barlevel-active-background-color: $selected_bg_color; //active trough fill
 | 
			
		||||
  -barlevel-active-border-color: darken($selected_bg_color,10%); //active trough border
 | 
			
		||||
  -barlevel-overdrive-color: $destructive_color;
 | 
			
		||||
  -barlevel-overdrive-border-color: darken($destructive_color,10%);
 | 
			
		||||
  -barlevel-overdrive-separator-width: 0.2em;
 | 
			
		||||
  -barlevel-border-width: 1px;
 | 
			
		||||
  -slider-height: 0.3em;
 | 
			
		||||
  -slider-background-color: $insensitive_bg_color; //background of the trough
 | 
			
		||||
  -slider-border-color: $borders_color; //trough border color
 | 
			
		||||
  -slider-active-background-color: $selected_bg_color; //active trough fill
 | 
			
		||||
  -slider-active-border-color: darken($selected_bg_color,10%); //active trough border
 | 
			
		||||
  -slider-border-width: 1px;
 | 
			
		||||
  -slider-handle-radius: 6px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -588,11 +585,13 @@ StScrollBar {
 | 
			
		||||
  .osd-monitor-label { font-size: 3em; }
 | 
			
		||||
  .level {
 | 
			
		||||
    height: 0.6em;
 | 
			
		||||
    -barlevel-height: 0.6em;
 | 
			
		||||
    -barlevel-background-color: transparentize(darken($osd_bg_color,15%),0.5);
 | 
			
		||||
    -barlevel-active-background-color: $osd_fg_color;
 | 
			
		||||
    -barlevel-overdrive-color: $destructive_color;
 | 
			
		||||
    -barlevel-overdrive-separator-width: 0.2em;
 | 
			
		||||
    border-radius: 0.3em;
 | 
			
		||||
    background-color: transparentize(darken($osd_bg_color,15%),0.5);
 | 
			
		||||
    color: $osd_fg_color;
 | 
			
		||||
  }
 | 
			
		||||
  .level-bar {
 | 
			
		||||
    background-color: $osd_fg_color;
 | 
			
		||||
    border-radius: 0.3em;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -734,7 +733,6 @@ StScrollBar {
 | 
			
		||||
  transition-duration: 500ms;
 | 
			
		||||
  font-weight: bold;
 | 
			
		||||
  height: 1.86em;
 | 
			
		||||
  font-feature-settings: "tnum";
 | 
			
		||||
 | 
			
		||||
  &.unlock-screen,
 | 
			
		||||
  &.login-screen,
 | 
			
		||||
@@ -826,8 +824,6 @@ StScrollBar {
 | 
			
		||||
 | 
			
		||||
  .screencast-indicator { color: $warning_color; }
 | 
			
		||||
 | 
			
		||||
  .remote-access-indicator { color: $warning_color; }
 | 
			
		||||
 | 
			
		||||
  &.solid {
 | 
			
		||||
    background-color: black;
 | 
			
		||||
    /* transition from transparent to solid */
 | 
			
		||||
@@ -962,7 +958,6 @@ StScrollBar {
 | 
			
		||||
      padding: 0.1em;
 | 
			
		||||
      margin: 2px;
 | 
			
		||||
      border-radius: 1.4em;
 | 
			
		||||
      font-feature-settings: "tnum";
 | 
			
		||||
      &:hover,&:focus { background-color: lighten($bg_color,5%); }
 | 
			
		||||
      &:active,&:selected {
 | 
			
		||||
        color: lighten($selected_fg_color,5%);
 | 
			
		||||
@@ -1125,7 +1120,6 @@ StScrollBar {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .system-menu-action {
 | 
			
		||||
    -st-icon-style: symbolic;
 | 
			
		||||
    color: $fg_color;
 | 
			
		||||
    border-radius: 32px; /* wish we could do 50% */
 | 
			
		||||
    padding: 13px;
 | 
			
		||||
@@ -1873,7 +1867,6 @@ StScrollBar {
 | 
			
		||||
.screen-shield-clock-time {
 | 
			
		||||
  font-size: 72pt;
 | 
			
		||||
  text-shadow: 0px 2px 2px rgba(0,0,0,0.4);
 | 
			
		||||
  font-feature-settings: "tnum";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.screen-shield-clock-date { 
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@
 | 
			
		||||
   id="svg7384"
 | 
			
		||||
   height="32"
 | 
			
		||||
   sodipodi:docname="key-layout.svg"
 | 
			
		||||
   inkscape:version="0.92.3 (2405546, 2018-03-11)">
 | 
			
		||||
   inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
 | 
			
		||||
  <sodipodi:namedview
 | 
			
		||||
     pagecolor="#ffffff"
 | 
			
		||||
     bordercolor="#666666"
 | 
			
		||||
@@ -24,21 +24,17 @@
 | 
			
		||||
     guidetolerance="10"
 | 
			
		||||
     inkscape:pageopacity="0"
 | 
			
		||||
     inkscape:pageshadow="2"
 | 
			
		||||
     inkscape:window-width="3440"
 | 
			
		||||
     inkscape:window-height="1376"
 | 
			
		||||
     inkscape:window-width="1919"
 | 
			
		||||
     inkscape:window-height="1011"
 | 
			
		||||
     id="namedview19"
 | 
			
		||||
     showgrid="false"
 | 
			
		||||
     inkscape:zoom="1"
 | 
			
		||||
     inkscape:cx="46.246852"
 | 
			
		||||
     inkscape:cy="17.474578"
 | 
			
		||||
     inkscape:zoom="14.75"
 | 
			
		||||
     inkscape:cx="1.220339"
 | 
			
		||||
     inkscape:cy="11.842802"
 | 
			
		||||
     inkscape:window-x="0"
 | 
			
		||||
     inkscape:window-y="27"
 | 
			
		||||
     inkscape:window-maximized="1"
 | 
			
		||||
     inkscape:current-layer="svg7384">
 | 
			
		||||
    <inkscape:grid
 | 
			
		||||
       type="xygrid"
 | 
			
		||||
       id="grid861" />
 | 
			
		||||
  </sodipodi:namedview>
 | 
			
		||||
     inkscape:window-y="55"
 | 
			
		||||
     inkscape:window-maximized="0"
 | 
			
		||||
     inkscape:current-layer="svg7384" />
 | 
			
		||||
  <metadata
 | 
			
		||||
     id="metadata90">
 | 
			
		||||
    <rdf:RDF>
 | 
			
		||||
@@ -96,34 +92,23 @@
 | 
			
		||||
     style="display:inline"
 | 
			
		||||
     id="g4953" />
 | 
			
		||||
  <g
 | 
			
		||||
     style="stroke-width:0.5;enable-background:new"
 | 
			
		||||
     id="g3561"
 | 
			
		||||
     inkscape:label="preferences-desktop-locale"
 | 
			
		||||
     transform="matrix(2,0,0,2,135.99464,-895.9793)">
 | 
			
		||||
    <path
 | 
			
		||||
       sodipodi:nodetypes="cc"
 | 
			
		||||
       inkscape:connector-curvature="0"
 | 
			
		||||
       id="path3535"
 | 
			
		||||
       d="m -65,450 v 12"
 | 
			
		||||
       style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:#e5e5e5;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
 | 
			
		||||
    <path
 | 
			
		||||
       sodipodi:nodetypes="ccccccccc"
 | 
			
		||||
       inkscape:connector-curvature="0"
 | 
			
		||||
       id="path3537"
 | 
			
		||||
       d="m -65,456 h 4 l 1,2 h 5 v -6 h -4 l -1,-2 h -5 z"
 | 
			
		||||
       style="fill:none;fill-rule:evenodd;stroke:#e5e5e5;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
 | 
			
		||||
    <path
 | 
			
		||||
       style="opacity:1;vector-effect:none;fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 | 
			
		||||
       d="m -65,456 h 4 l 1,2 h 5 v -6 h -4 l -1,-2 h -5 z"
 | 
			
		||||
       id="path3539"
 | 
			
		||||
       inkscape:connector-curvature="0"
 | 
			
		||||
       sodipodi:nodetypes="ccccccccc" />
 | 
			
		||||
     id="g11728"
 | 
			
		||||
     transform="matrix(2,0,0,2,-522.0004,-1086)"
 | 
			
		||||
     style="display:inline;stroke-width:1">
 | 
			
		||||
    <rect
 | 
			
		||||
       style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:none;stroke:none;stroke-width:0.89050001;marker:none;enable-background:new"
 | 
			
		||||
       id="rect3543"
 | 
			
		||||
       y="448"
 | 
			
		||||
       x="-68"
 | 
			
		||||
       style="fill:none;stroke:none;stroke-width:1"
 | 
			
		||||
       id="rect11724"
 | 
			
		||||
       width="16"
 | 
			
		||||
       height="16"
 | 
			
		||||
       width="16" />
 | 
			
		||||
       x="20"
 | 
			
		||||
       y="326"
 | 
			
		||||
       transform="translate(241.0002,217)" />
 | 
			
		||||
    <path
 | 
			
		||||
       style="fill:#e5e5e5;fill-opacity:1;stroke:none;stroke-width:1"
 | 
			
		||||
       d="m 265.69612,545.23396 c -3.58218,0 -4.66582,1.39975 -4.66582,1.39975 v 10.04946 c 0,0 1.08364,-1.07673 4.66582,-1.07673 2.9161,0 4.47225,1.07673 7.17818,1.07673 2.08923,0 3.19429,-1.39975 3.19429,-1.39975 v -10.04946 c 0,0 -1.14095,1.04084 -3.23018,1.04084 -3.3734,0 -3.97619,-1.04084 -7.14229,-1.04084 z m 2.93145,2.77148 c 1.32876,0 2.375,1.08037 2.375,2.4375 0,1.35713 -1.04624,2.46875 -2.375,2.46875 -1.32876,0 -2.40625,-1.11162 -2.40625,-2.46875 0,-1.35713 1.07749,-2.4375 2.40625,-2.4375 z m -4.5625,0.96875 0.96875,1.03125 -0.9375,-0.0312 0.9375,1 -0.96875,-0.0312 0.96875,1.03125 -1,-0.0312 0.0312,-1 h -0.0312 l 0.0312,-0.9688 h -0.0312 z m 4.5625,0 c -0.794,0 -1.46875,0.6578 -1.46875,1.46875 0,0.81095 0.67475,1.46875 1.46875,1.46875 0.79399,0 1.4375,-0.6578 1.4375,-1.46875 0,-0.81095 -0.64351,-1.46875 -1.4375,-1.46875 z m 4.375,0 v 1 l 0.0312,0.96875 h -0.0312 l 0.0312,1 -1,0.0312 0.96875,-1.03125 -0.96875,0.0312 0.9375,-1 -0.9375,0.0312 z m -7.9375,2.96875 0.96875,1.03125 -1,-0.0312 z m 6.9375,0 0.0312,1 -1,0.0312 z m -5.9375,1 0.96875,1.03125 -1,-0.0312 z m 4.9375,0 0.0312,1 -1,0.0312 z"
 | 
			
		||||
       id="path11726"
 | 
			
		||||
       inkscape:connector-curvature="0"
 | 
			
		||||
       sodipodi:nodetypes="sccssccsssssssccccccccccccsssssccccccccccccccccccccccccccc" />
 | 
			
		||||
  </g>
 | 
			
		||||
</svg>
 | 
			
		||||
 
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.3 KiB  | 
@@ -13,102 +13,10 @@
 | 
			
		||||
   height="64px"
 | 
			
		||||
   id="svg3393"
 | 
			
		||||
   version="1.1"
 | 
			
		||||
   inkscape:version="0.92.3 (2405546, 2018-03-11)"
 | 
			
		||||
   sodipodi:docname="no-notifications.svg">
 | 
			
		||||
   inkscape:version="0.48.5 r10040"
 | 
			
		||||
   sodipodi:docname="New document 2">
 | 
			
		||||
  <defs
 | 
			
		||||
     id="defs3395">
 | 
			
		||||
    <clipPath
 | 
			
		||||
       id="clipPath6262-0"
 | 
			
		||||
       clipPathUnits="userSpaceOnUse">
 | 
			
		||||
      <rect
 | 
			
		||||
         style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none"
 | 
			
		||||
         id="rect6264-6"
 | 
			
		||||
         width="3.8250003"
 | 
			
		||||
         height="6.3750005"
 | 
			
		||||
         x="26.849981"
 | 
			
		||||
         y="220.75" />
 | 
			
		||||
    </clipPath>
 | 
			
		||||
    <clipPath
 | 
			
		||||
       id="clipPath6258-0"
 | 
			
		||||
       clipPathUnits="userSpaceOnUse">
 | 
			
		||||
      <rect
 | 
			
		||||
         style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none"
 | 
			
		||||
         id="rect6260-6"
 | 
			
		||||
         width="2.8977275"
 | 
			
		||||
         height="5.3129687"
 | 
			
		||||
         x="26.965673"
 | 
			
		||||
         y="221.28162" />
 | 
			
		||||
    </clipPath>
 | 
			
		||||
    <clipPath
 | 
			
		||||
       id="clipPath6254-6"
 | 
			
		||||
       clipPathUnits="userSpaceOnUse">
 | 
			
		||||
      <rect
 | 
			
		||||
         style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;marker:none"
 | 
			
		||||
         id="rect6256-6"
 | 
			
		||||
         width="1.876245"
 | 
			
		||||
         height="4.8783236"
 | 
			
		||||
         x="26.998718"
 | 
			
		||||
         y="221.50153" />
 | 
			
		||||
    </clipPath>
 | 
			
		||||
    <clipPath
 | 
			
		||||
       id="clipPath8028-3"
 | 
			
		||||
       clipPathUnits="userSpaceOnUse">
 | 
			
		||||
      <path
 | 
			
		||||
         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 | 
			
		||||
         d="m -73,-30 -7,-7 v -4.5 h 16.5 v 4.5 l -7.5,7 z"
 | 
			
		||||
         id="path8030-6"
 | 
			
		||||
         inkscape:connector-curvature="0"
 | 
			
		||||
         sodipodi:nodetypes="ccccccc" />
 | 
			
		||||
    </clipPath>
 | 
			
		||||
    <clipPath
 | 
			
		||||
       clipPathUnits="userSpaceOnUse"
 | 
			
		||||
       id="clipPath6810-7-87-7">
 | 
			
		||||
      <rect
 | 
			
		||||
         style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none"
 | 
			
		||||
         id="rect6812-2-4-5"
 | 
			
		||||
         width="14"
 | 
			
		||||
         height="11"
 | 
			
		||||
         x="21"
 | 
			
		||||
         y="281" />
 | 
			
		||||
    </clipPath>
 | 
			
		||||
    <clipPath
 | 
			
		||||
       id="clipPath6262"
 | 
			
		||||
       clipPathUnits="userSpaceOnUse">
 | 
			
		||||
      <rect
 | 
			
		||||
         style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none"
 | 
			
		||||
         id="rect6264"
 | 
			
		||||
         width="3.8250003"
 | 
			
		||||
         height="6.3750005"
 | 
			
		||||
         x="26.849981"
 | 
			
		||||
         y="220.75" />
 | 
			
		||||
    </clipPath>
 | 
			
		||||
    <clipPath
 | 
			
		||||
       id="clipPath6258"
 | 
			
		||||
       clipPathUnits="userSpaceOnUse">
 | 
			
		||||
      <rect
 | 
			
		||||
         style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none"
 | 
			
		||||
         id="rect6260"
 | 
			
		||||
         width="2.8977275"
 | 
			
		||||
         height="5.3129687"
 | 
			
		||||
         x="26.965673"
 | 
			
		||||
         y="221.28162" />
 | 
			
		||||
    </clipPath>
 | 
			
		||||
    <clipPath
 | 
			
		||||
       id="clipPath6254"
 | 
			
		||||
       clipPathUnits="userSpaceOnUse">
 | 
			
		||||
      <rect
 | 
			
		||||
         style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;marker:none"
 | 
			
		||||
         id="rect6256"
 | 
			
		||||
         width="1.876245"
 | 
			
		||||
         height="4.8783236"
 | 
			
		||||
         x="26.998718"
 | 
			
		||||
         y="221.50153" />
 | 
			
		||||
    </clipPath>
 | 
			
		||||
    <inkscape:path-effect
 | 
			
		||||
       effect="spiro"
 | 
			
		||||
       id="path-effect3951"
 | 
			
		||||
       is_visible="true" />
 | 
			
		||||
  </defs>
 | 
			
		||||
     id="defs3395" />
 | 
			
		||||
  <sodipodi:namedview
 | 
			
		||||
     id="base"
 | 
			
		||||
     pagecolor="#ffffff"
 | 
			
		||||
@@ -116,17 +24,17 @@
 | 
			
		||||
     borderopacity="1.0"
 | 
			
		||||
     inkscape:pageopacity="0.0"
 | 
			
		||||
     inkscape:pageshadow="2"
 | 
			
		||||
     inkscape:zoom="1"
 | 
			
		||||
     inkscape:cx="125.08157"
 | 
			
		||||
     inkscape:cy="-13.805087"
 | 
			
		||||
     inkscape:zoom="5.5"
 | 
			
		||||
     inkscape:cx="32"
 | 
			
		||||
     inkscape:cy="32"
 | 
			
		||||
     inkscape:current-layer="layer1"
 | 
			
		||||
     showgrid="true"
 | 
			
		||||
     inkscape:document-units="px"
 | 
			
		||||
     inkscape:grid-bbox="true"
 | 
			
		||||
     inkscape:window-width="1664"
 | 
			
		||||
     inkscape:window-height="1034"
 | 
			
		||||
     inkscape:window-x="1479"
 | 
			
		||||
     inkscape:window-y="252"
 | 
			
		||||
     inkscape:window-width="697"
 | 
			
		||||
     inkscape:window-height="613"
 | 
			
		||||
     inkscape:window-x="100"
 | 
			
		||||
     inkscape:window-y="77"
 | 
			
		||||
     inkscape:window-maximized="0" />
 | 
			
		||||
  <metadata
 | 
			
		||||
     id="metadata3398">
 | 
			
		||||
@@ -146,7 +54,7 @@
 | 
			
		||||
     inkscape:groupmode="layer">
 | 
			
		||||
    <g
 | 
			
		||||
       style="display:inline"
 | 
			
		||||
       transform="matrix(4,0,0,4,-79.702662,-0.35415646)"
 | 
			
		||||
       transform="matrix(4,0,0,4,0.29733827,-0.35415646)"
 | 
			
		||||
       id="g19245">
 | 
			
		||||
      <g
 | 
			
		||||
         id="g19247"
 | 
			
		||||
@@ -163,15 +71,15 @@
 | 
			
		||||
         transform="translate(-323.02908,-649.02581)">
 | 
			
		||||
        <path
 | 
			
		||||
           inkscape:connector-curvature="0"
 | 
			
		||||
           d="m 331.9377,653 c 0.0187,0.16677 0.0625,0.32822 0.0625,0.5 0,2.48528 -2.01472,4.5 -4.5,4.5 -0.11769,0 -0.22834,-0.0224 -0.34375,-0.0312 v 2.21875 c 0,1.00412 0.80838,1.8125 1.8125,1.8125 l 1.54511,-5e-5 2,2.04688 2.0625,-2.04688 h 1.61114 c 1.00413,0 1.8125,-0.80838 1.8125,-1.8125 v -5.375 c 0,-1.00412 -0.80837,-1.8125 -1.8125,-1.8125 z"
 | 
			
		||||
           d="m 331.9377,653 c 0.0187,0.16677 0.0625,0.32822 0.0625,0.5 0,2.48528 -2.01472,4.5 -4.5,4.5 -0.11769,0 -0.22834,-0.0224 -0.34375,-0.0312 l 0,2.21875 c 0,1.00412 0.80838,1.8125 1.8125,1.8125 l 1.54511,-5e-5 2,2.04688 2.0625,-2.04688 1.61114,0 c 1.00413,0 1.8125,-0.80838 1.8125,-1.8125 l 0,-5.375 c 0,-1.00412 -0.80837,-1.8125 -1.8125,-1.8125 z"
 | 
			
		||||
           id="path19253"
 | 
			
		||||
           sodipodi:nodetypes="csscsscccssssc"
 | 
			
		||||
           style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.5;fill:#c3c3c3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;enable-background:accumulate" />
 | 
			
		||||
           style="opacity:0.5;color:#000000;fill:#c3c3c3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
 | 
			
		||||
        <path
 | 
			
		||||
           inkscape:connector-curvature="0"
 | 
			
		||||
           d="m 327.5002,650 c -1.933,0 -3.5,1.567 -3.5,3.5 0,1.933 1.567,3.5 3.5,3.5 1.933,0 3.5,-1.567 3.5,-3.5 0,-1.933 -1.567,-3.5 -3.5,-3.5 z m -0.53125,1 h 1.03125 l -0.0625,1.375 a 0.19951718,0.19951718 0 0 0 0,0.0625 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0.125,0.125 0.19951718,0.19951718 0 0 0 0.0312,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 l 1.15625,-0.75 0.5,0.90625 -1.21875,0.625 a 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0312,0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0.0937 0.19951718,0.19951718 0 0 0 0,0.0625 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0.0312,0.0625 0.19951718,0.19951718 0 0 0 0.0312,0.0312 0.19951718,0.19951718 0 0 0 0.0312,0.0312 l 1.25,0.625 -0.53125,0.90625 -1.15625,-0.781 a 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0625,0 0.19951718,0.19951718 0 0 0 -0.125,0.0937 0.19951718,0.19951718 0 0 0 -0.0312,0.0312 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0,0.0625 L 328.0002,656 h -1.03125 l 0.0937,-1.375 a 0.19951718,0.19951718 0 0 0 -0.0312,-0.0937 0.19951718,0.19951718 0 0 0 -0.0312,-0.0625 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0937,0.0312 l -1.1875,0.78125 -0.5,-0.90625 1.25,-0.625 a 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 0,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,-0.0625 0.19951718,0.19951718 0 0 0 -0.0312,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0 l -1.25,-0.625 0.5,-0.90625 1.1875,0.75 a 0.19951718,0.19951718 0 0 0 0.0312,0.0312 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0312,0 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 z"
 | 
			
		||||
           d="m 327.5002,650 c -1.933,0 -3.5,1.567 -3.5,3.5 0,1.933 1.567,3.5 3.5,3.5 1.933,0 3.5,-1.567 3.5,-3.5 0,-1.933 -1.567,-3.5 -3.5,-3.5 z m -0.53125,1 1.03125,0 -0.0625,1.375 a 0.19951718,0.19951718 0 0 0 0,0.0625 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0.125,0.125 0.19951718,0.19951718 0 0 0 0.0312,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 l 1.15625,-0.75 0.5,0.90625 -1.21875,0.625 a 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0312,0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0.0937 0.19951718,0.19951718 0 0 0 0,0.0625 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0.0312,0.0625 0.19951718,0.19951718 0 0 0 0.0312,0.0312 0.19951718,0.19951718 0 0 0 0.0312,0.0312 l 1.25,0.625 -0.53125,0.90625 -1.15625,-0.781 a 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0625,0 0.19951718,0.19951718 0 0 0 -0.125,0.0937 0.19951718,0.19951718 0 0 0 -0.0312,0.0312 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0,0.0625 l 0.0625,1.3751 -1.03125,0 0.0937,-1.375 a 0.19951718,0.19951718 0 0 0 -0.0312,-0.0937 0.19951718,0.19951718 0 0 0 -0.0312,-0.0625 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0937,0.0312 l -1.1875,0.78125 -0.5,-0.90625 1.25,-0.625 a 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 0,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,-0.0625 0.19951718,0.19951718 0 0 0 -0.0312,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0 l -1.25,-0.625 0.5,-0.90625 1.1875,0.75 a 0.19951718,0.19951718 0 0 0 0.0312,0.0312 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0312,0 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 L 326.96895,651 z"
 | 
			
		||||
           id="path19255"
 | 
			
		||||
           style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;marker:none;enable-background:accumulate" />
 | 
			
		||||
           style="color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
 | 
			
		||||
      </g>
 | 
			
		||||
      <g
 | 
			
		||||
         id="g19257"
 | 
			
		||||
@@ -202,22 +110,5 @@
 | 
			
		||||
         style="display:inline"
 | 
			
		||||
         transform="translate(-323.02908,-649.02581)" />
 | 
			
		||||
    </g>
 | 
			
		||||
    <g
 | 
			
		||||
       style="opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:new"
 | 
			
		||||
       inkscape:label="preferences-system-notifications"
 | 
			
		||||
       id="g13967"
 | 
			
		||||
       transform="matrix(4,0,0,4,-1044.0008,-2172)">
 | 
			
		||||
      <path
 | 
			
		||||
         inkscape:connector-curvature="0"
 | 
			
		||||
         d="m 268.94244,544.94838 c -2.20914,0 -3.33013,1.5 -4,4 l -1,5 c -0.10831,0.54156 -0.44772,1 -1,1 v 1 h 12 v -1 c -0.55229,0 -0.89169,-0.45844 -1,-1 l -1,-5 c -0.53033,-2.5 -1.79086,-4 -4,-4 z"
 | 
			
		||||
         id="path40220"
 | 
			
		||||
         sodipodi:nodetypes="ccsccccscc"
 | 
			
		||||
         style="opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal" />
 | 
			
		||||
      <path
 | 
			
		||||
         inkscape:connector-curvature="0"
 | 
			
		||||
         d="m 269.11822,556.94838 a 1.5,1.5 0 0 0 1.41211,1 1.5,1.5 0 0 0 1.41211,-1 z"
 | 
			
		||||
         id="path40774"
 | 
			
		||||
         style="opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal" />
 | 
			
		||||
    </g>
 | 
			
		||||
  </g>
 | 
			
		||||
</svg>
 | 
			
		||||
 
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 6.1 KiB  | 
@@ -50,7 +50,8 @@ gnome.gtkdoc('shell',
 | 
			
		||||
    join_paths(meson.build_root(), 'src')
 | 
			
		||||
  ],
 | 
			
		||||
  scan_args: [
 | 
			
		||||
    '--ignore-headers=' + ' '.join(private_headers + exclude_directories)
 | 
			
		||||
    '--ignore-headers=' + ' '.join(private_headers + exclude_directories),
 | 
			
		||||
    '--rebuild-types'
 | 
			
		||||
  ],
 | 
			
		||||
  install: true
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,8 @@ gnome.gtkdoc('st',
 | 
			
		||||
  ],
 | 
			
		||||
  scan_args: [
 | 
			
		||||
    '--ignore-headers=' + ' '.join(private_headers),
 | 
			
		||||
    '--rebuild-sections'
 | 
			
		||||
    '--rebuild-sections',
 | 
			
		||||
    '--rebuild-types'
 | 
			
		||||
  ],
 | 
			
		||||
  install: true
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -14,16 +14,15 @@ const _ = Gettext.gettext;
 | 
			
		||||
const Config = imports.misc.config;
 | 
			
		||||
const ExtensionUtils = imports.misc.extensionUtils;
 | 
			
		||||
 | 
			
		||||
const GnomeShellIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.Extensions">
 | 
			
		||||
<signal name="ExtensionStatusChanged">
 | 
			
		||||
    <arg type="s" name="uuid"/>
 | 
			
		||||
    <arg type="i" name="state"/>
 | 
			
		||||
    <arg type="s" name="error"/>
 | 
			
		||||
</signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const GnomeShellIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.Extensions"> \
 | 
			
		||||
<signal name="ExtensionStatusChanged"> \
 | 
			
		||||
    <arg type="s" name="uuid"/> \
 | 
			
		||||
    <arg type="i" name="state"/> \
 | 
			
		||||
    <arg type="s" name="error"/> \
 | 
			
		||||
</signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const GnomeShellProxy = Gio.DBusProxy.makeProxyWrapper(GnomeShellIface);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -242,11 +242,11 @@ var AuthPrompt = new Lang.Class({
 | 
			
		||||
        this.emit('prompted');
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onVerificationFailed(userVerifier, canRetry) {
 | 
			
		||||
    _onVerificationFailed() {
 | 
			
		||||
        this._queryingService = null;
 | 
			
		||||
        this.clear();
 | 
			
		||||
 | 
			
		||||
        this.updateSensitivity(canRetry);
 | 
			
		||||
        this.updateSensitivity(true);
 | 
			
		||||
        this.setActorInDefaultButtonWell(null);
 | 
			
		||||
        this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
 | 
			
		||||
    },
 | 
			
		||||
@@ -439,7 +439,6 @@ var AuthPrompt = new Lang.Class({
 | 
			
		||||
        this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
 | 
			
		||||
        this.cancelButton.reactive = true;
 | 
			
		||||
        this.nextButton.label = _("Next");
 | 
			
		||||
        this._preemptiveAnswer = null;
 | 
			
		||||
 | 
			
		||||
        if (this._userVerifier)
 | 
			
		||||
            this._userVerifier.cancel();
 | 
			
		||||
 
 | 
			
		||||
@@ -5,14 +5,13 @@ const Lang = imports.lang;
 | 
			
		||||
const Shell = imports.gi.Shell;
 | 
			
		||||
const Signals = imports.signals;
 | 
			
		||||
 | 
			
		||||
const FprintManagerIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="net.reactivated.Fprint.Manager">
 | 
			
		||||
<method name="GetDefaultDevice">
 | 
			
		||||
    <arg type="o" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const FprintManagerIface = '<node> \
 | 
			
		||||
<interface name="net.reactivated.Fprint.Manager"> \
 | 
			
		||||
<method name="GetDefaultDevice"> \
 | 
			
		||||
    <arg type="o" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const FprintManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(FprintManagerIface);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,13 +4,13 @@ const Gio = imports.gi.Gio;
 | 
			
		||||
const Lang = imports.lang;
 | 
			
		||||
const Signals = imports.signals;
 | 
			
		||||
 | 
			
		||||
const OVirtCredentialsIface =`<node>
 | 
			
		||||
<interface name="org.ovirt.vdsm.Credentials">
 | 
			
		||||
<signal name="UserAuthenticated">
 | 
			
		||||
    <arg type="s" name="token"/>
 | 
			
		||||
</signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const OVirtCredentialsIface = '<node> \
 | 
			
		||||
<interface name="org.ovirt.vdsm.Credentials"> \
 | 
			
		||||
<signal name="UserAuthenticated"> \
 | 
			
		||||
    <arg type="s" name="token"/> \
 | 
			
		||||
</signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const OVirtCredentialsInfo = Gio.DBusInterfaceInfo.new_for_xml(OVirtCredentialsIface);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,61 +5,58 @@ const Lang = imports.lang;
 | 
			
		||||
const Shell = imports.gi.Shell;
 | 
			
		||||
const Signals = imports.signals;
 | 
			
		||||
 | 
			
		||||
const ProviderIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.realmd.Provider">
 | 
			
		||||
    <property name="Name" type="s" access="read"/>
 | 
			
		||||
    <property name="Version" type="s" access="read"/>
 | 
			
		||||
    <property name="Realms" type="ao" access="read"/>
 | 
			
		||||
    <method name="Discover">
 | 
			
		||||
        <arg name="string" type="s" direction="in"/>
 | 
			
		||||
        <arg name="options" type="a{sv}" direction="in"/>
 | 
			
		||||
        <arg name="relevance" type="i" direction="out"/>
 | 
			
		||||
        <arg name="realm" type="ao" direction="out"/>
 | 
			
		||||
    </method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const ProviderIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.realmd.Provider"> \
 | 
			
		||||
    <property name="Name" type="s" access="read"/> \
 | 
			
		||||
    <property name="Version" type="s" access="read"/> \
 | 
			
		||||
    <property name="Realms" type="ao" access="read"/> \
 | 
			
		||||
    <method name="Discover"> \
 | 
			
		||||
        <arg name="string" type="s" direction="in"/> \
 | 
			
		||||
        <arg name="options" type="a{sv}" direction="in"/> \
 | 
			
		||||
        <arg name="relevance" type="i" direction="out"/> \
 | 
			
		||||
        <arg name="realm" type="ao" direction="out"/> \
 | 
			
		||||
    </method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
const Provider = Gio.DBusProxy.makeProxyWrapper(ProviderIface);
 | 
			
		||||
 | 
			
		||||
const ServiceIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.realmd.Service">
 | 
			
		||||
    <method name="Cancel">
 | 
			
		||||
        <arg name="operation" type="s" direction="in"/>
 | 
			
		||||
    </method>
 | 
			
		||||
    <method name="Release" />
 | 
			
		||||
    <method name="SetLocale">
 | 
			
		||||
        <arg name="locale" type="s" direction="in"/>
 | 
			
		||||
    </method>
 | 
			
		||||
    <signal name="Diagnostics">
 | 
			
		||||
        <arg name="data" type="s"/>
 | 
			
		||||
        <arg name="operation" type="s"/>
 | 
			
		||||
    </signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const ServiceIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.realmd.Service"> \
 | 
			
		||||
    <method name="Cancel"> \
 | 
			
		||||
        <arg name="operation" type="s" direction="in"/> \
 | 
			
		||||
    </method> \
 | 
			
		||||
    <method name="Release" /> \
 | 
			
		||||
    <method name="SetLocale"> \
 | 
			
		||||
        <arg name="locale" type="s" direction="in"/> \
 | 
			
		||||
    </method> \
 | 
			
		||||
    <signal name="Diagnostics"> \
 | 
			
		||||
        <arg name="data" type="s"/> \
 | 
			
		||||
        <arg name="operation" type="s"/> \
 | 
			
		||||
    </signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
const Service = Gio.DBusProxy.makeProxyWrapper(ServiceIface);
 | 
			
		||||
 | 
			
		||||
const RealmIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.realmd.Realm">
 | 
			
		||||
    <property name="Name" type="s" access="read"/>
 | 
			
		||||
    <property name="Configured" type="s" access="read"/>
 | 
			
		||||
    <property name="Details" type="a(ss)" access="read"/>
 | 
			
		||||
    <property name="LoginFormats" type="as" access="read"/>
 | 
			
		||||
    <property name="LoginPolicy" type="s" access="read"/>
 | 
			
		||||
    <property name="PermittedLogins" type="as" access="read"/>
 | 
			
		||||
    <property name="SupportedInterfaces" type="as" access="read"/>
 | 
			
		||||
    <method name="ChangeLoginPolicy">
 | 
			
		||||
        <arg name="login_policy" type="s" direction="in"/>
 | 
			
		||||
        <arg name="permitted_add" type="as" direction="in"/>
 | 
			
		||||
        <arg name="permitted_remove" type="as" direction="in"/>
 | 
			
		||||
        <arg name="options" type="a{sv}" direction="in"/>
 | 
			
		||||
    </method>
 | 
			
		||||
    <method name="Deconfigure">
 | 
			
		||||
        <arg name="options" type="a{sv}" direction="in"/>
 | 
			
		||||
    </method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const RealmIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.realmd.Realm"> \
 | 
			
		||||
    <property name="Name" type="s" access="read"/> \
 | 
			
		||||
    <property name="Configured" type="s" access="read"/> \
 | 
			
		||||
    <property name="Details" type="a(ss)" access="read"/> \
 | 
			
		||||
    <property name="LoginFormats" type="as" access="read"/> \
 | 
			
		||||
    <property name="LoginPolicy" type="s" access="read"/> \
 | 
			
		||||
    <property name="PermittedLogins" type="as" access="read"/> \
 | 
			
		||||
    <property name="SupportedInterfaces" type="as" access="read"/> \
 | 
			
		||||
    <method name="ChangeLoginPolicy"> \
 | 
			
		||||
        <arg name="login_policy" type="s" direction="in"/> \
 | 
			
		||||
        <arg name="permitted_add" type="as" direction="in"/> \
 | 
			
		||||
        <arg name="permitted_remove" type="as" direction="in"/> \
 | 
			
		||||
        <arg name="options" type="a{sv}" direction="in"/> \
 | 
			
		||||
    </method> \
 | 
			
		||||
    <method name="Deconfigure"> \
 | 
			
		||||
        <arg name="options" type="a{sv}" direction="in"/> \
 | 
			
		||||
    </method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
const Realm = Gio.DBusProxy.makeProxyWrapper(RealmIface);
 | 
			
		||||
 | 
			
		||||
var Manager = new Lang.Class({
 | 
			
		||||
 
 | 
			
		||||
@@ -350,19 +350,16 @@ var ShellUserVerifier = new Lang.Class({
 | 
			
		||||
        try {
 | 
			
		||||
            this._clearUserVerifier();
 | 
			
		||||
            this._userVerifier = client.open_reauthentication_channel_finish(result);
 | 
			
		||||
        } catch(e) {
 | 
			
		||||
            if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
 | 
			
		||||
                return;
 | 
			
		||||
            if (e.matches(Gio.DBusError, Gio.DBusError.ACCESS_DENIED) &&
 | 
			
		||||
        } 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;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // 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) {
 | 
			
		||||
            this._reportInitError('Failed to open reauthentication channel', e);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
@@ -377,9 +374,9 @@ var ShellUserVerifier = new Lang.Class({
 | 
			
		||||
        try {
 | 
			
		||||
            this._clearUserVerifier();
 | 
			
		||||
            this._userVerifier = client.get_user_verifier_finish(result);
 | 
			
		||||
        } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
 | 
			
		||||
            return;
 | 
			
		||||
        } catch(e) {
 | 
			
		||||
            if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
 | 
			
		||||
                return;
 | 
			
		||||
            this._reportInitError('Failed to obtain user verifier', e);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
@@ -437,9 +434,9 @@ var ShellUserVerifier = new Lang.Class({
 | 
			
		||||
                                                               (obj, result) => {
 | 
			
		||||
               try {
 | 
			
		||||
                   obj.call_begin_verification_for_user_finish(result);
 | 
			
		||||
               } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
 | 
			
		||||
                   return;
 | 
			
		||||
               } catch(e) {
 | 
			
		||||
                   if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
 | 
			
		||||
                       return;
 | 
			
		||||
                   this._reportInitError('Failed to start verification for user', e);
 | 
			
		||||
                   return;
 | 
			
		||||
               }
 | 
			
		||||
@@ -452,9 +449,9 @@ var ShellUserVerifier = new Lang.Class({
 | 
			
		||||
                                                      (obj, result) => {
 | 
			
		||||
               try {
 | 
			
		||||
                   obj.call_begin_verification_finish(result);
 | 
			
		||||
               } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
 | 
			
		||||
                   return;
 | 
			
		||||
               } catch(e) {
 | 
			
		||||
                   if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
 | 
			
		||||
                       return;
 | 
			
		||||
                   this._reportInitError('Failed to start verification', e);
 | 
			
		||||
                   return;
 | 
			
		||||
               }
 | 
			
		||||
@@ -537,13 +534,12 @@ var ShellUserVerifier = new Lang.Class({
 | 
			
		||||
    _verificationFailed(retry) {
 | 
			
		||||
        // For Not Listed / enterprise logins, immediately reset
 | 
			
		||||
        // the dialog
 | 
			
		||||
        // Otherwise, when in login mode we allow ALLOWED_FAILURES attempts.
 | 
			
		||||
        // After that, we go back to the welcome screen.
 | 
			
		||||
        // Otherwise, we allow ALLOWED_FAILURES attempts. After that, we
 | 
			
		||||
        // go back to the welcome screen.
 | 
			
		||||
 | 
			
		||||
        this._failCounter++;
 | 
			
		||||
        let canRetry = retry && this._userName &&
 | 
			
		||||
            (this._reauthOnly ||
 | 
			
		||||
             this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY));
 | 
			
		||||
            this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY);
 | 
			
		||||
 | 
			
		||||
        if (canRetry) {
 | 
			
		||||
            if (!this.hasPendingMessages) {
 | 
			
		||||
@@ -566,7 +562,7 @@ var ShellUserVerifier = new Lang.Class({
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this.emit('verification-failed', canRetry);
 | 
			
		||||
        this.emit('verification-failed');
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onConversationStopped(client, serviceName) {
 | 
			
		||||
 
 | 
			
		||||
@@ -9,6 +9,8 @@
 | 
			
		||||
    <file>gdm/realmd.js</file>
 | 
			
		||||
    <file>gdm/util.js</file>
 | 
			
		||||
 | 
			
		||||
    <file>extensionPrefs/main.js</file>
 | 
			
		||||
 | 
			
		||||
    <file>misc/config.js</file>
 | 
			
		||||
    <file>misc/extensionUtils.js</file>
 | 
			
		||||
    <file>misc/fileUtils.js</file>
 | 
			
		||||
@@ -31,6 +33,8 @@
 | 
			
		||||
    <file>perf/core.js</file>
 | 
			
		||||
    <file>perf/hwtest.js</file>
 | 
			
		||||
 | 
			
		||||
    <file>portalHelper/main.js</file>
 | 
			
		||||
 | 
			
		||||
    <file>ui/accessDialog.js</file>
 | 
			
		||||
    <file>ui/altTab.js</file>
 | 
			
		||||
    <file>ui/animation.js</file>
 | 
			
		||||
@@ -39,7 +43,6 @@
 | 
			
		||||
    <file>ui/audioDeviceSelection.js</file>
 | 
			
		||||
    <file>ui/backgroundMenu.js</file>
 | 
			
		||||
    <file>ui/background.js</file>
 | 
			
		||||
    <file>ui/barLevel.js</file>
 | 
			
		||||
    <file>ui/boxpointer.js</file>
 | 
			
		||||
    <file>ui/calendar.js</file>
 | 
			
		||||
    <file>ui/checkBox.js</file>
 | 
			
		||||
@@ -127,7 +130,6 @@
 | 
			
		||||
    <file>ui/status/rfkill.js</file>
 | 
			
		||||
    <file>ui/status/volume.js</file>
 | 
			
		||||
    <file>ui/status/bluetooth.js</file>
 | 
			
		||||
    <file>ui/status/remoteAccess.js</file>
 | 
			
		||||
    <file>ui/status/screencast.js</file>
 | 
			
		||||
    <file>ui/status/system.js</file>
 | 
			
		||||
    <file>ui/status/thunderbolt.js</file>
 | 
			
		||||
 
 | 
			
		||||
@@ -6,17 +6,3 @@ js_resources = gnome.compile_resources(
 | 
			
		||||
  c_name: 'shell_js_resources',
 | 
			
		||||
  dependencies: [config_js]
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
portal_resources = gnome.compile_resources(
 | 
			
		||||
  'portal-resources', 'portal-resources.gresource.xml',
 | 
			
		||||
  source_dir: ['.', meson.current_build_dir()],
 | 
			
		||||
  c_name: 'portal_js_resources',
 | 
			
		||||
  dependencies: [config_js]
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
prefs_resources = gnome.compile_resources(
 | 
			
		||||
  'prefs-resources', 'prefs-resources.gresource.xml',
 | 
			
		||||
  source_dir: ['.', meson.current_build_dir()],
 | 
			
		||||
  c_name: 'prefs_js_resources',
 | 
			
		||||
  dependencies: [config_js]
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -112,8 +112,6 @@ function createExtensionObject(uuid, dir, type) {
 | 
			
		||||
    let metadataContents, success, tag;
 | 
			
		||||
    try {
 | 
			
		||||
        [success, metadataContents, tag] = metadataFile.load_contents(null);
 | 
			
		||||
        if (metadataContents instanceof Uint8Array)
 | 
			
		||||
            metadataContents = imports.byteArray.toString(metadataContents);
 | 
			
		||||
    } catch (e) {
 | 
			
		||||
        throw new Error('Failed to load metadata.json: ' + e);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -4,18 +4,17 @@ const Gio = imports.gi.Gio;
 | 
			
		||||
const Lang = imports.lang;
 | 
			
		||||
const Signals = imports.signals;
 | 
			
		||||
 | 
			
		||||
const PresenceIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.SessionManager.Presence">
 | 
			
		||||
<method name="SetStatus">
 | 
			
		||||
    <arg type="u" direction="in"/>
 | 
			
		||||
</method>
 | 
			
		||||
<property name="status" type="u" access="readwrite"/>
 | 
			
		||||
<signal name="StatusChanged">
 | 
			
		||||
    <arg type="u" direction="out"/>
 | 
			
		||||
</signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const PresenceIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.SessionManager.Presence"> \
 | 
			
		||||
<method name="SetStatus"> \
 | 
			
		||||
    <arg type="u" direction="in"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<property name="status" type="u" access="readwrite"/> \
 | 
			
		||||
<signal name="StatusChanged"> \
 | 
			
		||||
    <arg type="u" direction="out"/> \
 | 
			
		||||
</signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var PresenceStatus = {
 | 
			
		||||
    AVAILABLE: 0,
 | 
			
		||||
@@ -33,17 +32,16 @@ function Presence(initCallback, cancellable) {
 | 
			
		||||
// Note inhibitors are immutable objects, so they don't
 | 
			
		||||
// change at runtime (changes always come in the form
 | 
			
		||||
// of new inhibitors)
 | 
			
		||||
const InhibitorIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.SessionManager.Inhibitor">
 | 
			
		||||
<method name="GetAppId">
 | 
			
		||||
    <arg type="s" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetReason">
 | 
			
		||||
    <arg type="s" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const InhibitorIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.SessionManager.Inhibitor"> \
 | 
			
		||||
<method name="GetAppId"> \
 | 
			
		||||
    <arg type="s" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetReason"> \
 | 
			
		||||
    <arg type="s" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var InhibitorProxy = Gio.DBusProxy.makeProxyWrapper(InhibitorIface);
 | 
			
		||||
function Inhibitor(objectPath, initCallback, cancellable) {
 | 
			
		||||
@@ -51,30 +49,29 @@ function Inhibitor(objectPath, initCallback, cancellable) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Not the full interface, only the methods we use
 | 
			
		||||
const SessionManagerIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.SessionManager">
 | 
			
		||||
<method name="Logout">
 | 
			
		||||
    <arg type="u" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="Shutdown" />
 | 
			
		||||
<method name="Reboot" />
 | 
			
		||||
<method name="CanShutdown">
 | 
			
		||||
    <arg type="b" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="IsInhibited">
 | 
			
		||||
    <arg type="u" direction="in" />
 | 
			
		||||
    <arg type="b" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<property name="SessionIsActive" type="b" access="read"/>
 | 
			
		||||
<signal name="InhibitorAdded">
 | 
			
		||||
    <arg type="o" direction="out"/>
 | 
			
		||||
</signal>
 | 
			
		||||
<signal name="InhibitorRemoved">
 | 
			
		||||
    <arg type="o" direction="out"/>
 | 
			
		||||
</signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const SessionManagerIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.SessionManager"> \
 | 
			
		||||
<method name="Logout"> \
 | 
			
		||||
    <arg type="u" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="Shutdown" /> \
 | 
			
		||||
<method name="Reboot" /> \
 | 
			
		||||
<method name="CanShutdown"> \
 | 
			
		||||
    <arg type="b" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="IsInhibited"> \
 | 
			
		||||
    <arg type="u" direction="in" /> \
 | 
			
		||||
    <arg type="b" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<property name="SessionIsActive" type="b" access="read"/> \
 | 
			
		||||
<signal name="InhibitorAdded"> \
 | 
			
		||||
    <arg type="o" direction="out"/> \
 | 
			
		||||
</signal> \
 | 
			
		||||
<signal name="InhibitorRemoved"> \
 | 
			
		||||
    <arg type="o" direction="out"/> \
 | 
			
		||||
</signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var SessionManagerProxy = Gio.DBusProxy.makeProxyWrapper(SessionManagerIface);
 | 
			
		||||
function SessionManager(initCallback, cancellable) {
 | 
			
		||||
 
 | 
			
		||||
@@ -115,11 +115,6 @@ var IBusManager = new Lang.Class({
 | 
			
		||||
                                                         object_path: IBus.PATH_PANEL });
 | 
			
		||||
            this._candidatePopup.setPanelService(this._panelService);
 | 
			
		||||
            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 {
 | 
			
		||||
                // IBus versions older than 1.5.10 have a bug which
 | 
			
		||||
                // causes spurious set-content-type emissions when
 | 
			
		||||
 
 | 
			
		||||
@@ -15,10 +15,6 @@ var InputMethod = new Lang.Class({
 | 
			
		||||
        this._purpose = 0;
 | 
			
		||||
        this._enabled = true;
 | 
			
		||||
        this._currentFocus = null;
 | 
			
		||||
        this._currentEvent = null;
 | 
			
		||||
        this._doForwardEvent = false;
 | 
			
		||||
        this._preeditStr = '';
 | 
			
		||||
        this._preeditPos = 0;
 | 
			
		||||
        this._ibus = IBus.Bus.new_async();
 | 
			
		||||
        this._ibus.connect('connected', this._onConnected.bind(this));
 | 
			
		||||
        this._ibus.connect('disconnected', this._clear.bind(this));
 | 
			
		||||
@@ -29,9 +25,6 @@ var InputMethod = new Lang.Class({
 | 
			
		||||
                                                                 this._onSourceChanged.bind(this));
 | 
			
		||||
        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())
 | 
			
		||||
            this._onConnected();
 | 
			
		||||
    },
 | 
			
		||||
@@ -71,9 +64,6 @@ var InputMethod = new Lang.Class({
 | 
			
		||||
        this._context.connect('commit-text', this._onCommitText.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('show-preedit-text', this._onShowPreeditText.bind(this));
 | 
			
		||||
        this._context.connect('hide-preedit-text', this._onHidePreeditText.bind(this));
 | 
			
		||||
        this._context.connect('forward-key-event', this._onForwardKeyEvent.bind(this));
 | 
			
		||||
 | 
			
		||||
        this._updateCapabilities();
 | 
			
		||||
    },
 | 
			
		||||
@@ -83,8 +73,6 @@ var InputMethod = new Lang.Class({
 | 
			
		||||
        this._hints = 0;
 | 
			
		||||
        this._purpose = 0;
 | 
			
		||||
        this._enabled = false;
 | 
			
		||||
        this._preeditStr = ''
 | 
			
		||||
        this._preeditPos = 0;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _emitRequestSurrounding() {
 | 
			
		||||
@@ -101,40 +89,11 @@ var InputMethod = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onUpdatePreeditText(context, text, pos, visible) {
 | 
			
		||||
        if (text == null)
 | 
			
		||||
            return;
 | 
			
		||||
        this._preeditStr = text.get_text();
 | 
			
		||||
        this._preeditPos = pos;
 | 
			
		||||
        if (visible)
 | 
			
		||||
            this.set_preedit_text(this._preeditStr, pos);
 | 
			
		||||
        else
 | 
			
		||||
            this.set_preedit_text(null, pos);
 | 
			
		||||
    },
 | 
			
		||||
        let str = null;
 | 
			
		||||
        if (visible && text != null)
 | 
			
		||||
            str = text.get_text();
 | 
			
		||||
 | 
			
		||||
    _onShowPreeditText(context) {
 | 
			
		||||
        this.set_preedit_text(this._preeditStr, this._preeditPos);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onHidePreeditText(context) {
 | 
			
		||||
        this.set_preedit_text(null, this._preeditPos);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _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);
 | 
			
		||||
        this.set_preedit_text(str, pos);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    vfunc_focus_in(focus) {
 | 
			
		||||
@@ -238,23 +197,13 @@ var InputMethod = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        if (event.type() == Clutter.EventType.KEY_RELEASE)
 | 
			
		||||
            state |= IBus.ModifierType.RELEASE_MASK;
 | 
			
		||||
 | 
			
		||||
        this._currentEvent = event;
 | 
			
		||||
        this._doForwardEvent = false;
 | 
			
		||||
 | 
			
		||||
        this._context.process_key_event_async(event.get_key_symbol(),
 | 
			
		||||
                                              event.get_key_code() - 8, // Convert XKB keycodes to evcodes
 | 
			
		||||
                                              state, -1, null,
 | 
			
		||||
                                              (context, res) => {
 | 
			
		||||
                                                  try {
 | 
			
		||||
                                                      let retval = context.process_key_event_async_finish(res);
 | 
			
		||||
 | 
			
		||||
                                                      if (this._doForwardEvent)
 | 
			
		||||
                                                          retval = false;
 | 
			
		||||
 | 
			
		||||
                                                      this.notify_key_event(event, retval);
 | 
			
		||||
                                                      this._doForwardEvent = false;
 | 
			
		||||
                                                      this._currentEvent = null;
 | 
			
		||||
                                                  } catch (e) {
 | 
			
		||||
                                                      log('Error processing key on IM: ' + e.message);
 | 
			
		||||
                                                  }
 | 
			
		||||
 
 | 
			
		||||
@@ -7,60 +7,47 @@ const Mainloop = imports.mainloop;
 | 
			
		||||
const Shell = imports.gi.Shell;
 | 
			
		||||
const Signals = imports.signals;
 | 
			
		||||
 | 
			
		||||
const SystemdLoginManagerIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.login1.Manager">
 | 
			
		||||
<method name="Suspend">
 | 
			
		||||
    <arg type="b" direction="in"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="CanSuspend">
 | 
			
		||||
    <arg type="s" direction="out"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="Inhibit">
 | 
			
		||||
    <arg type="s" direction="in"/>
 | 
			
		||||
    <arg type="s" direction="in"/>
 | 
			
		||||
    <arg type="s" direction="in"/>
 | 
			
		||||
    <arg type="s" direction="in"/>
 | 
			
		||||
    <arg type="h" direction="out"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetSession">
 | 
			
		||||
    <arg type="s" direction="in"/>
 | 
			
		||||
    <arg type="o" direction="out"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="ListSessions">
 | 
			
		||||
    <arg name="sessions" type="a(susso)" direction="out"/>
 | 
			
		||||
</method>
 | 
			
		||||
<signal name="PrepareForSleep">
 | 
			
		||||
    <arg type="b" direction="out"/>
 | 
			
		||||
</signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const SystemdLoginManagerIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.login1.Manager"> \
 | 
			
		||||
<method name="Suspend"> \
 | 
			
		||||
    <arg type="b" direction="in"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="CanSuspend"> \
 | 
			
		||||
    <arg type="s" direction="out"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="Inhibit"> \
 | 
			
		||||
    <arg type="s" direction="in"/> \
 | 
			
		||||
    <arg type="s" direction="in"/> \
 | 
			
		||||
    <arg type="s" direction="in"/> \
 | 
			
		||||
    <arg type="s" direction="in"/> \
 | 
			
		||||
    <arg type="h" direction="out"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetSession"> \
 | 
			
		||||
    <arg type="s" direction="in"/> \
 | 
			
		||||
    <arg type="o" direction="out"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="ListSessions"> \
 | 
			
		||||
    <arg name="sessions" type="a(susso)" direction="out"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<signal name="PrepareForSleep"> \
 | 
			
		||||
    <arg type="b" direction="out"/> \
 | 
			
		||||
</signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const SystemdLoginSessionIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.login1.Session">
 | 
			
		||||
<signal name="Lock" />
 | 
			
		||||
<signal name="Unlock" />
 | 
			
		||||
<property name="Active" type="b" access="read" />
 | 
			
		||||
<property name="Class" type="s" access="read" />
 | 
			
		||||
<property name="Id" type="s" access="read" />
 | 
			
		||||
<method name="SetLockedHint">
 | 
			
		||||
    <arg type="b" direction="in"/>
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</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 SystemdLoginSessionIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.login1.Session"> \
 | 
			
		||||
<signal name="Lock" /> \
 | 
			
		||||
<signal name="Unlock" /> \
 | 
			
		||||
<property name="Active" type="b" access="read" /> \
 | 
			
		||||
<method name="SetLockedHint"> \
 | 
			
		||||
    <arg type="b" direction="in"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const SystemdLoginManager = Gio.DBusProxy.makeProxyWrapper(SystemdLoginManagerIface);
 | 
			
		||||
const SystemdLoginSession = Gio.DBusProxy.makeProxyWrapper(SystemdLoginSessionIface);
 | 
			
		||||
const SystemdLoginUser = Gio.DBusProxy.makeProxyWrapper(SystemdLoginUserIface);
 | 
			
		||||
 | 
			
		||||
function haveSystemd() {
 | 
			
		||||
    return GLib.access("/run/systemd/seats", 0) >= 0;
 | 
			
		||||
@@ -122,9 +109,6 @@ var LoginManagerSystemd = new Lang.Class({
 | 
			
		||||
        this._proxy = new SystemdLoginManager(Gio.DBus.system,
 | 
			
		||||
                                              '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._prepareForSleep.bind(this));
 | 
			
		||||
    },
 | 
			
		||||
@@ -137,31 +121,8 @@ var LoginManagerSystemd = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        let sessionId = GLib.getenv('XDG_SESSION_ID');
 | 
			
		||||
        if (!sessionId) {
 | 
			
		||||
            log('Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.');
 | 
			
		||||
            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;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            log('Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session.');
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this._proxy.GetSessionRemote(sessionId, (result, error) => {
 | 
			
		||||
 
 | 
			
		||||
@@ -92,43 +92,41 @@ function _findProviderForSid(sid) {
 | 
			
		||||
// The following are not the complete interfaces, just the methods we need
 | 
			
		||||
// (or may need in the future)
 | 
			
		||||
 | 
			
		||||
const ModemGsmNetworkInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.ModemManager.Modem.Gsm.Network">
 | 
			
		||||
<method name="GetRegistrationInfo">
 | 
			
		||||
    <arg type="(uss)" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetSignalQuality">
 | 
			
		||||
    <arg type="u" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<property name="AccessTechnology" type="u" access="read" />
 | 
			
		||||
<signal name="SignalQuality">
 | 
			
		||||
    <arg type="u" direction="out" />
 | 
			
		||||
</signal>
 | 
			
		||||
<signal name="RegistrationInfo">
 | 
			
		||||
    <arg type="u" direction="out" />
 | 
			
		||||
    <arg type="s" direction="out" />
 | 
			
		||||
    <arg type="s" direction="out" />
 | 
			
		||||
</signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const ModemGsmNetworkInterface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.ModemManager.Modem.Gsm.Network"> \
 | 
			
		||||
<method name="GetRegistrationInfo"> \
 | 
			
		||||
    <arg type="(uss)" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetSignalQuality"> \
 | 
			
		||||
    <arg type="u" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<property name="AccessTechnology" type="u" access="read" /> \
 | 
			
		||||
<signal name="SignalQuality"> \
 | 
			
		||||
    <arg type="u" direction="out" /> \
 | 
			
		||||
</signal> \
 | 
			
		||||
<signal name="RegistrationInfo"> \
 | 
			
		||||
    <arg type="u" direction="out" /> \
 | 
			
		||||
    <arg type="s" direction="out" /> \
 | 
			
		||||
    <arg type="s" direction="out" /> \
 | 
			
		||||
</signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const ModemGsmNetworkProxy = Gio.DBusProxy.makeProxyWrapper(ModemGsmNetworkInterface);
 | 
			
		||||
 | 
			
		||||
const ModemCdmaInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.ModemManager.Modem.Cdma">
 | 
			
		||||
<method name="GetSignalQuality">
 | 
			
		||||
    <arg type="u" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetServingSystem">
 | 
			
		||||
    <arg type="(usu)" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<signal name="SignalQuality">
 | 
			
		||||
    <arg type="u" direction="out" />
 | 
			
		||||
</signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const ModemCdmaInterface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.ModemManager.Modem.Cdma"> \
 | 
			
		||||
<method name="GetSignalQuality"> \
 | 
			
		||||
    <arg type="u" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetServingSystem"> \
 | 
			
		||||
    <arg type="(usu)" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<signal name="SignalQuality"> \
 | 
			
		||||
    <arg type="u" direction="out" /> \
 | 
			
		||||
</signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface);
 | 
			
		||||
 | 
			
		||||
@@ -224,29 +222,26 @@ Signals.addSignalMethods(ModemCdma.prototype);
 | 
			
		||||
// Support for the new ModemManager1 interface (MM >= 0.7)
 | 
			
		||||
//------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
const BroadbandModemInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.ModemManager1.Modem">
 | 
			
		||||
<property name="SignalQuality" type="(ub)" access="read" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const BroadbandModemInterface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.ModemManager1.Modem"> \
 | 
			
		||||
<property name="SignalQuality" type="(ub)" access="read" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
const BroadbandModemProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemInterface);
 | 
			
		||||
 | 
			
		||||
const BroadbandModem3gppInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.ModemManager1.Modem.Modem3gpp">
 | 
			
		||||
<property name="OperatorCode" type="s" access="read" />
 | 
			
		||||
<property name="OperatorName" type="s" access="read" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const BroadbandModem3gppInterface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.ModemManager1.Modem.Modem3gpp"> \
 | 
			
		||||
<property name="OperatorCode" type="s" access="read" /> \
 | 
			
		||||
<property name="OperatorName" type="s" access="read" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
const BroadbandModem3gppProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModem3gppInterface);
 | 
			
		||||
 | 
			
		||||
const BroadbandModemCdmaInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.ModemManager1.Modem.ModemCdma">
 | 
			
		||||
<property name="Sid" type="u" access="read" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const BroadbandModemCdmaInterface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.ModemManager1.Modem.ModemCdma"> \
 | 
			
		||||
<property name="Sid" type="u" access="read" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
const BroadbandModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemCdmaInterface);
 | 
			
		||||
 | 
			
		||||
var BroadbandModem = new Lang.Class({
 | 
			
		||||
 
 | 
			
		||||
@@ -8,22 +8,21 @@ const Signals = imports.signals;
 | 
			
		||||
 | 
			
		||||
// Specified in the D-Bus specification here:
 | 
			
		||||
// http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager
 | 
			
		||||
const ObjectManagerIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.DBus.ObjectManager">
 | 
			
		||||
  <method name="GetManagedObjects">
 | 
			
		||||
    <arg name="objects" type="a{oa{sa{sv}}}" direction="out"/>
 | 
			
		||||
  </method>
 | 
			
		||||
  <signal name="InterfacesAdded">
 | 
			
		||||
    <arg name="objectPath" type="o"/>
 | 
			
		||||
    <arg name="interfaces" type="a{sa{sv}}" />
 | 
			
		||||
  </signal>
 | 
			
		||||
  <signal name="InterfacesRemoved">
 | 
			
		||||
    <arg name="objectPath" type="o"/>
 | 
			
		||||
    <arg name="interfaces" type="as" />
 | 
			
		||||
  </signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const ObjectManagerIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.DBus.ObjectManager"> \
 | 
			
		||||
  <method name="GetManagedObjects"> \
 | 
			
		||||
    <arg name="objects" type="a{oa{sa{sv}}}" direction="out"/> \
 | 
			
		||||
  </method> \
 | 
			
		||||
  <signal name="InterfacesAdded"> \
 | 
			
		||||
    <arg name="objectPath" type="o"/> \
 | 
			
		||||
    <arg name="interfaces" type="a{sa{sv}}" /> \
 | 
			
		||||
  </signal> \
 | 
			
		||||
  <signal name="InterfacesRemoved"> \
 | 
			
		||||
    <arg name="objectPath" type="o"/> \
 | 
			
		||||
    <arg name="interfaces" type="as" /> \
 | 
			
		||||
  </signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const ObjectManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(ObjectManagerIface);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,31 +2,30 @@
 | 
			
		||||
 | 
			
		||||
const Gio = imports.gi.Gio;
 | 
			
		||||
 | 
			
		||||
const PermissionStoreIface = `
 | 
			
		||||
<node>
 | 
			
		||||
  <interface name="org.freedesktop.impl.portal.PermissionStore">
 | 
			
		||||
    <method name="Lookup">
 | 
			
		||||
      <arg name="table" type="s" direction="in"/>
 | 
			
		||||
      <arg name="id" type="s" direction="in"/>
 | 
			
		||||
      <arg name="permissions" type="a{sas}" direction="out"/>
 | 
			
		||||
      <arg name="data" type="v" direction="out"/>
 | 
			
		||||
    </method>
 | 
			
		||||
    <method name="Set">
 | 
			
		||||
      <arg name="table" type="s" direction="in"/>
 | 
			
		||||
      <arg name="create" type="b" direction="in"/>
 | 
			
		||||
      <arg name="id" type="s" direction="in"/>
 | 
			
		||||
      <arg name="app_permissions" type="a{sas}" direction="in"/>
 | 
			
		||||
      <arg name="data" type="v" direction="in"/>
 | 
			
		||||
    </method>
 | 
			
		||||
    <signal name="Changed">
 | 
			
		||||
      <arg name="table" type="s" direction="out"/>
 | 
			
		||||
      <arg name="id" type="s" direction="out"/>
 | 
			
		||||
      <arg name="deleted" type="b" direction="out"/>
 | 
			
		||||
      <arg name="data" type="v" direction="out"/>
 | 
			
		||||
      <arg name="permissions" type="a{sas}" direction="out"/>
 | 
			
		||||
    </signal>
 | 
			
		||||
  </interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const PermissionStoreIface = '<node> \
 | 
			
		||||
  <interface name="org.freedesktop.impl.portal.PermissionStore"> \
 | 
			
		||||
    <method name="Lookup"> \
 | 
			
		||||
      <arg name="table" type="s" direction="in"/> \
 | 
			
		||||
      <arg name="id" type="s" direction="in"/> \
 | 
			
		||||
      <arg name="permissions" type="a{sas}" direction="out"/> \
 | 
			
		||||
      <arg name="data" type="v" direction="out"/> \
 | 
			
		||||
    </method> \
 | 
			
		||||
    <method name="Set"> \
 | 
			
		||||
      <arg name="table" type="s" direction="in"/> \
 | 
			
		||||
      <arg name="create" type="b" direction="in"/> \
 | 
			
		||||
      <arg name="id" type="s" direction="in"/> \
 | 
			
		||||
      <arg name="app_permissions" type="a{sas}" direction="in"/> \
 | 
			
		||||
      <arg name="data" type="v" direction="in"/> \
 | 
			
		||||
    </method> \
 | 
			
		||||
    <signal name="Changed"> \
 | 
			
		||||
      <arg name="table" type="s" direction="out"/> \
 | 
			
		||||
      <arg name="id" type="s" direction="out"/> \
 | 
			
		||||
      <arg name="deleted" type="b" direction="out"/> \
 | 
			
		||||
      <arg name="data" type="v" direction="out"/> \
 | 
			
		||||
      <arg name="permissions" type="a{sas}" direction="out"/> \
 | 
			
		||||
    </signal> \
 | 
			
		||||
  </interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const PermissionStoreProxy = Gio.DBusProxy.makeProxyWrapper(PermissionStoreIface);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7,15 +7,14 @@ const Signals = imports.signals;
 | 
			
		||||
 | 
			
		||||
const ObjectManager = imports.misc.objectManager;
 | 
			
		||||
 | 
			
		||||
const SmartcardTokenIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.SettingsDaemon.Smartcard.Token">
 | 
			
		||||
  <property name="Name" type="s" access="read"/>
 | 
			
		||||
  <property name="Driver" type="o" access="read"/>
 | 
			
		||||
  <property name="IsInserted" type="b" access="read"/>
 | 
			
		||||
  <property name="UsedToLogin" type="b" access="read"/>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const SmartcardTokenIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.SettingsDaemon.Smartcard.Token"> \
 | 
			
		||||
  <property name="Name" type="s" access="read"/> \
 | 
			
		||||
  <property name="Driver" type="o" access="read"/> \
 | 
			
		||||
  <property name="IsInserted" type="b" access="read"/> \
 | 
			
		||||
  <property name="UsedToLogin" type="b" access="read"/> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
let _smartcardManager = null;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -22,12 +22,11 @@ const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out';
 | 
			
		||||
const SENSOR_BUS_NAME = 'net.hadess.SensorProxy';
 | 
			
		||||
const SENSOR_OBJECT_PATH = '/net/hadess/SensorProxy';
 | 
			
		||||
 | 
			
		||||
const SensorProxyInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="net.hadess.SensorProxy">
 | 
			
		||||
  <property name="HasAccelerometer" type="b" access="read"/>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const SensorProxyInterface = '<node> \
 | 
			
		||||
<interface name="net.hadess.SensorProxy"> \
 | 
			
		||||
  <property name="HasAccelerometer" type="b" access="read"/> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const POWER_OFF_ACTION_ID        = 'power-off';
 | 
			
		||||
const LOCK_SCREEN_ACTION_ID      = 'lock-screen';
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<gresources>
 | 
			
		||||
  <gresource prefix="/org/gnome/shell">
 | 
			
		||||
    <file>misc/config.js</file>
 | 
			
		||||
    <file>portalHelper/main.js</file>
 | 
			
		||||
  </gresource>
 | 
			
		||||
</gresources>
 | 
			
		||||
@@ -30,26 +30,25 @@ const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org';
 | 
			
		||||
const CONNECTIVITY_CHECK_URI = 'http://' + CONNECTIVITY_CHECK_HOST;
 | 
			
		||||
const CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT = 30 * GLib.USEC_PER_SEC;
 | 
			
		||||
 | 
			
		||||
const HelperDBusInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.PortalHelper">
 | 
			
		||||
<method name="Authenticate">
 | 
			
		||||
    <arg type="o" direction="in" name="connection" />
 | 
			
		||||
    <arg type="s" direction="in" name="url" />
 | 
			
		||||
    <arg type="u" direction="in" name="timestamp" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="Close">
 | 
			
		||||
    <arg type="o" direction="in" name="connection" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="Refresh">
 | 
			
		||||
    <arg type="o" direction="in" name="connection" />
 | 
			
		||||
</method>
 | 
			
		||||
<signal name="Done">
 | 
			
		||||
    <arg type="o" name="connection" />
 | 
			
		||||
    <arg type="u" name="result" />
 | 
			
		||||
</signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const HelperDBusInterface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.PortalHelper"> \
 | 
			
		||||
<method name="Authenticate"> \
 | 
			
		||||
    <arg type="o" direction="in" name="connection" /> \
 | 
			
		||||
    <arg type="s" direction="in" name="url" /> \
 | 
			
		||||
    <arg type="u" direction="in" name="timestamp" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="Close"> \
 | 
			
		||||
    <arg type="o" direction="in" name="connection" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="Refresh"> \
 | 
			
		||||
    <arg type="o" direction="in" name="connection" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<signal name="Done"> \
 | 
			
		||||
    <arg type="o" name="connection" /> \
 | 
			
		||||
    <arg type="u" name="result" /> \
 | 
			
		||||
</signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var PortalHeaderBar = new Lang.Class({
 | 
			
		||||
    Name: 'PortalHeaderBar',
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<gresources>
 | 
			
		||||
  <gresource prefix="/org/gnome/shell">
 | 
			
		||||
    <file>extensionPrefs/main.js</file>
 | 
			
		||||
 | 
			
		||||
    <file>misc/config.js</file>
 | 
			
		||||
    <file>misc/extensionUtils.js</file>
 | 
			
		||||
    <file>misc/fileUtils.js</file>
 | 
			
		||||
    <file>misc/params.js</file>
 | 
			
		||||
  </gresource>
 | 
			
		||||
</gresources>
 | 
			
		||||
@@ -10,29 +10,27 @@ const CheckBox = imports.ui.checkBox;
 | 
			
		||||
const Dialog = imports.ui.dialog;
 | 
			
		||||
const ModalDialog = imports.ui.modalDialog;
 | 
			
		||||
 | 
			
		||||
const RequestIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.impl.portal.Request">
 | 
			
		||||
<method name="Close"/>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const RequestIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.impl.portal.Request"> \
 | 
			
		||||
<method name="Close"/> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const AccessIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.impl.portal.Access">
 | 
			
		||||
<method name="AccessDialog">
 | 
			
		||||
  <arg type="o" name="handle" direction="in"/>
 | 
			
		||||
  <arg type="s" name="app_id" direction="in"/>
 | 
			
		||||
  <arg type="s" name="parent_window" direction="in"/>
 | 
			
		||||
  <arg type="s" name="title" direction="in"/>
 | 
			
		||||
  <arg type="s" name="subtitle" direction="in"/>
 | 
			
		||||
  <arg type="s" name="body" direction="in"/>
 | 
			
		||||
  <arg type="a{sv}" name="options" direction="in"/>
 | 
			
		||||
  <arg type="u" name="response" direction="out"/>
 | 
			
		||||
  <arg type="a{sv}" name="results" direction="out"/>
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const AccessIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.impl.portal.Access"> \
 | 
			
		||||
<method name="AccessDialog"> \
 | 
			
		||||
  <arg type="o" name="handle" direction="in"/> \
 | 
			
		||||
  <arg type="s" name="app_id" direction="in"/> \
 | 
			
		||||
  <arg type="s" name="parent_window" direction="in"/> \
 | 
			
		||||
  <arg type="s" name="title" direction="in"/> \
 | 
			
		||||
  <arg type="s" name="subtitle" direction="in"/> \
 | 
			
		||||
  <arg type="s" name="body" direction="in"/> \
 | 
			
		||||
  <arg type="a{sv}" name="options" direction="in"/> \
 | 
			
		||||
  <arg type="u" name="response" direction="out"/> \
 | 
			
		||||
  <arg type="a{sv}" name="results" direction="out"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var DialogResponse = {
 | 
			
		||||
    OK: 0,
 | 
			
		||||
 
 | 
			
		||||
@@ -502,8 +502,7 @@ var CyclerPopup = new Lang.Class({
 | 
			
		||||
    _finish() {
 | 
			
		||||
        let window = this._items[this._selectedIndex];
 | 
			
		||||
        let ws = window.get_workspace();
 | 
			
		||||
        let workspaceManager = global.workspace_manager;
 | 
			
		||||
        let activeWs = workspaceManager.get_active_workspace();
 | 
			
		||||
        let activeWs = global.screen.get_active_workspace();
 | 
			
		||||
 | 
			
		||||
        if (window.minimized) {
 | 
			
		||||
            Main.wm.skipNextEffect(window.get_compositor_private());
 | 
			
		||||
@@ -573,14 +572,7 @@ var WindowSwitcherPopup = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getWindowList() {
 | 
			
		||||
        let workspace = null;
 | 
			
		||||
 | 
			
		||||
        if (this._settings.get_boolean('current-workspace-only')) {
 | 
			
		||||
            let workspaceManager = global.workspace_manager;
 | 
			
		||||
 | 
			
		||||
            workspace = workspaceManager.get_active_workspace();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        let workspace = this._settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace() : null;
 | 
			
		||||
        return getWindows(workspace);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@@ -628,14 +620,7 @@ var WindowCyclerPopup = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getWindows() {
 | 
			
		||||
        let workspace = null;
 | 
			
		||||
 | 
			
		||||
        if (this._settings.get_boolean('current-workspace-only')) {
 | 
			
		||||
            let workspaceManager = global.workspace_manager;
 | 
			
		||||
 | 
			
		||||
            workspace = workspaceManager.get_active_workspace();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        let workspace = this._settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace() : null;
 | 
			
		||||
        return getWindows(workspace);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@@ -684,14 +669,8 @@ var AppSwitcher = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        let windowTracker = Shell.WindowTracker.get_default();
 | 
			
		||||
        let settings = new Gio.Settings({ schema_id: 'org.gnome.shell.app-switcher' });
 | 
			
		||||
 | 
			
		||||
        let workspace = null;
 | 
			
		||||
        if (settings.get_boolean('current-workspace-only')) {
 | 
			
		||||
            let workspaceManager = global.workspace_manager;
 | 
			
		||||
 | 
			
		||||
            workspace = workspaceManager.get_active_workspace();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        let workspace = settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace()
 | 
			
		||||
                                                                       : null;
 | 
			
		||||
        let allWindows = global.display.get_tab_list(Meta.TabList.NORMAL, workspace);
 | 
			
		||||
 | 
			
		||||
        // Construct the AppIcons, add to the popup
 | 
			
		||||
 
 | 
			
		||||
@@ -66,12 +66,11 @@ var PAGE_SWITCH_TIME = 0.3;
 | 
			
		||||
const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl';
 | 
			
		||||
const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl';
 | 
			
		||||
 | 
			
		||||
const SwitcherooProxyInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="net.hadess.SwitcherooControl">
 | 
			
		||||
  <property name="HasDualGpu" type="b" access="read"/>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const SwitcherooProxyInterface = '<node> \
 | 
			
		||||
<interface name="net.hadess.SwitcherooControl"> \
 | 
			
		||||
  <property name="HasDualGpu" type="b" access="read"/> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const SwitcherooProxy = Gio.DBusProxy.makeProxyWrapper(SwitcherooProxyInterface);
 | 
			
		||||
let discreteGpuAvailable = false;
 | 
			
		||||
@@ -1779,11 +1778,10 @@ var AppIcon = new Lang.Class({
 | 
			
		||||
    activate(button) {
 | 
			
		||||
        let event = Clutter.get_current_event();
 | 
			
		||||
        let modifiers = event ? event.get_state() : 0;
 | 
			
		||||
        let isMiddleButton = button && button == Clutter.BUTTON_MIDDLE;
 | 
			
		||||
        let isCtrlPressed = (modifiers & Clutter.ModifierType.CONTROL_MASK) != 0;
 | 
			
		||||
        let openNewWindow = this.app.can_open_new_window() &&
 | 
			
		||||
                            this.app.state == Shell.AppState.RUNNING &&
 | 
			
		||||
                            (isCtrlPressed || isMiddleButton);
 | 
			
		||||
        let openNewWindow = this.app.can_open_new_window () &&
 | 
			
		||||
                            modifiers & Clutter.ModifierType.CONTROL_MASK &&
 | 
			
		||||
                            this.app.state == Shell.AppState.RUNNING ||
 | 
			
		||||
                            button && button == 2;
 | 
			
		||||
 | 
			
		||||
        if (this.app.state == Shell.AppState.STOPPED || openNewWindow)
 | 
			
		||||
            this.animateLaunch();
 | 
			
		||||
@@ -1863,8 +1861,7 @@ var AppIconMenu = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        // Display the app windows menu items and the separator between windows
 | 
			
		||||
        // of the current desktop and other windows.
 | 
			
		||||
        let workspaceManager = global.workspace_manager;
 | 
			
		||||
        let activeWorkspace = workspaceManager.get_active_workspace();
 | 
			
		||||
        let activeWorkspace = global.screen.get_active_workspace();
 | 
			
		||||
        let separatorShown = windows.length > 0 && windows[0].get_workspace() != activeWorkspace;
 | 
			
		||||
 | 
			
		||||
        for (let i = 0; i < windows.length; i++) {
 | 
			
		||||
@@ -1873,9 +1870,7 @@ var AppIconMenu = new Lang.Class({
 | 
			
		||||
                this._appendSeparator();
 | 
			
		||||
                separatorShown = true;
 | 
			
		||||
            }
 | 
			
		||||
            let title = window.title ? window.title
 | 
			
		||||
                                     : this._source.app.get_name();
 | 
			
		||||
            let item = this._appendMenuItem(title);
 | 
			
		||||
            let item = this._appendMenuItem(window.title);
 | 
			
		||||
            item.connect('activate', () => {
 | 
			
		||||
                this.emit('activate-window', window);
 | 
			
		||||
            });
 | 
			
		||||
 
 | 
			
		||||
@@ -15,19 +15,18 @@ var AudioDevice = {
 | 
			
		||||
    MICROPHONE: 1 << 2
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const AudioDeviceSelectionIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.AudioDeviceSelection">
 | 
			
		||||
<method name="Open">
 | 
			
		||||
    <arg name="devices" direction="in" type="as" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="Close">
 | 
			
		||||
</method>
 | 
			
		||||
<signal name="DeviceSelected">
 | 
			
		||||
    <arg name="device" type="s" />
 | 
			
		||||
</signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const AudioDeviceSelectionIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.AudioDeviceSelection"> \
 | 
			
		||||
<method name="Open"> \
 | 
			
		||||
    <arg name="devices" direction="in" type="as" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="Close"> \
 | 
			
		||||
</method> \
 | 
			
		||||
<signal name="DeviceSelected"> \
 | 
			
		||||
    <arg name="device" type="s" /> \
 | 
			
		||||
</signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var AudioDeviceSelectionDialog = new Lang.Class({
 | 
			
		||||
    Name: 'AudioDeviceSelectionDialog',
 | 
			
		||||
 
 | 
			
		||||
@@ -240,7 +240,7 @@ var Background = new Lang.Class({
 | 
			
		||||
                                        file: null,
 | 
			
		||||
                                        style: null });
 | 
			
		||||
 | 
			
		||||
        this.background = new Meta.Background({ meta_display: global.display });
 | 
			
		||||
        this.background = new Meta.Background({ meta_screen: global.screen });
 | 
			
		||||
        this.background._delegate = this;
 | 
			
		||||
 | 
			
		||||
        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');
 | 
			
		||||
 | 
			
		||||
        if (_systemBackground == null) {
 | 
			
		||||
            _systemBackground = new Meta.Background({ meta_display: global.display });
 | 
			
		||||
            _systemBackground = new Meta.Background({ meta_screen: global.screen });
 | 
			
		||||
            _systemBackground.set_color(DEFAULT_BACKGROUND_COLOR);
 | 
			
		||||
            _systemBackground.set_file(file, GDesktopEnums.BackgroundStyle.WALLPAPER);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this.actor = new Meta.BackgroundActor({ meta_display: global.display,
 | 
			
		||||
        this.actor = new Meta.BackgroundActor({ meta_screen: global.screen,
 | 
			
		||||
                                                monitor: 0,
 | 
			
		||||
                                                background: _systemBackground });
 | 
			
		||||
 | 
			
		||||
@@ -538,10 +538,8 @@ var BackgroundSource = new Lang.Class({
 | 
			
		||||
        this._settings = new Gio.Settings({ schema_id: settingsSchema });
 | 
			
		||||
        this._backgrounds = [];
 | 
			
		||||
 | 
			
		||||
        let monitorManager = Meta.MonitorManager.get();
 | 
			
		||||
        this._monitorsChangedId =
 | 
			
		||||
            monitorManager.connect('monitors-changed',
 | 
			
		||||
                                   this._onMonitorsChanged.bind(this));
 | 
			
		||||
        this._monitorsChangedId = global.screen.connect('monitors-changed',
 | 
			
		||||
                                                        this._onMonitorsChanged.bind(this));
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onMonitorsChanged() {
 | 
			
		||||
@@ -606,8 +604,7 @@ var BackgroundSource = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    destroy() {
 | 
			
		||||
        let monitorManager = Meta.MonitorManager.get();
 | 
			
		||||
        monitorManager.disconnect(this._monitorsChangedId);
 | 
			
		||||
        global.screen.disconnect(this._monitorsChangedId);
 | 
			
		||||
 | 
			
		||||
        for (let monitorIndex in this._backgrounds) {
 | 
			
		||||
            let background = this._backgrounds[monitorIndex];
 | 
			
		||||
@@ -754,7 +751,7 @@ var BackgroundManager = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
    _createBackgroundActor() {
 | 
			
		||||
        let background = this._backgroundSource.getBackground(this._monitorIndex);
 | 
			
		||||
        let backgroundActor = new Meta.BackgroundActor({ meta_display: global.display,
 | 
			
		||||
        let backgroundActor = new Meta.BackgroundActor({ meta_screen: global.screen,
 | 
			
		||||
                                                         monitor: this._monitorIndex,
 | 
			
		||||
                                                         background: background.background,
 | 
			
		||||
                                                         vignette: this._vignette,
 | 
			
		||||
 
 | 
			
		||||
@@ -1,210 +0,0 @@
 | 
			
		||||
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
 | 
			
		||||
 | 
			
		||||
const Atk = imports.gi.Atk;
 | 
			
		||||
const Cairo = imports.cairo;
 | 
			
		||||
const Clutter = imports.gi.Clutter;
 | 
			
		||||
const Lang = imports.lang;
 | 
			
		||||
const St = imports.gi.St;
 | 
			
		||||
const Signals = imports.signals;
 | 
			
		||||
 | 
			
		||||
var BarLevel = new Lang.Class({
 | 
			
		||||
    Name: "BarLevel",
 | 
			
		||||
 | 
			
		||||
    _init(value, params) {
 | 
			
		||||
        if (isNaN(value))
 | 
			
		||||
            // Avoid spreading NaNs around
 | 
			
		||||
            throw TypeError('The bar level value must be a number');
 | 
			
		||||
        this._maxValue = 1;
 | 
			
		||||
        this._value = Math.max(Math.min(value, this._maxValue), 0);
 | 
			
		||||
        this._overdriveStart = 1;
 | 
			
		||||
        this._barLevelWidth = 0;
 | 
			
		||||
 | 
			
		||||
        if (params == undefined)
 | 
			
		||||
            params = {}
 | 
			
		||||
 | 
			
		||||
        this.actor = new St.DrawingArea({ styleClass: params['styleClass'] || 'barlevel',
 | 
			
		||||
                                          can_focus: params['canFocus'] || false,
 | 
			
		||||
                                          reactive: params['reactive'] || false,
 | 
			
		||||
                                          accessible_role: params['accessibleRole'] || Atk.Role.LEVEL_BAR });
 | 
			
		||||
        this.actor.connect('repaint', this._barLevelRepaint.bind(this));
 | 
			
		||||
        this.actor.connect('allocation-changed', (actor, box) => {
 | 
			
		||||
            this._barLevelWidth = box.get_width();
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        this._customAccessible = St.GenericAccessible.new_for_actor(this.actor);
 | 
			
		||||
        this.actor.set_accessible(this._customAccessible);
 | 
			
		||||
 | 
			
		||||
        this._customAccessible.connect('get-current-value', this._getCurrentValue.bind(this));
 | 
			
		||||
        this._customAccessible.connect('get-minimum-value', this._getMinimumValue.bind(this));
 | 
			
		||||
        this._customAccessible.connect('get-maximum-value', this._getMaximumValue.bind(this));
 | 
			
		||||
        this._customAccessible.connect('set-current-value', this._setCurrentValue.bind(this));
 | 
			
		||||
 | 
			
		||||
        this.connect('value-changed', this._valueChanged.bind(this));
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    setValue(value) {
 | 
			
		||||
        if (isNaN(value))
 | 
			
		||||
            throw TypeError('The bar level value must be a number');
 | 
			
		||||
 | 
			
		||||
        this._value = Math.max(Math.min(value, this._maxValue), 0);
 | 
			
		||||
        this.actor.queue_repaint();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    setMaximumValue(value) {
 | 
			
		||||
        if (isNaN(value))
 | 
			
		||||
            throw TypeError('The bar level max value must be a number');
 | 
			
		||||
 | 
			
		||||
        this._maxValue = Math.max(value, 1);
 | 
			
		||||
        this._overdriveStart = Math.min(this._overdriveStart, this._maxValue);
 | 
			
		||||
        this.actor.queue_repaint();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    setOverdriveStart(value) {
 | 
			
		||||
        if (isNaN(value))
 | 
			
		||||
            throw TypeError('The overdrive limit value must be a number');
 | 
			
		||||
        if (value > this._maxValue)
 | 
			
		||||
            throw new Error(`Tried to set overdrive value to ${value}, ` +
 | 
			
		||||
                `which is a number greater than the maximum allowed value ${this._maxValue}`);
 | 
			
		||||
 | 
			
		||||
        this._overdriveStart = value;
 | 
			
		||||
        this._value = Math.max(Math.min(value, this._maxValue), 0);
 | 
			
		||||
        this.actor.queue_repaint();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _barLevelRepaint(area) {
 | 
			
		||||
        let cr = area.get_context();
 | 
			
		||||
        let themeNode = area.get_theme_node();
 | 
			
		||||
        let [width, height] = area.get_surface_size();
 | 
			
		||||
 | 
			
		||||
        let barLevelHeight = themeNode.get_length('-barlevel-height');
 | 
			
		||||
        let barLevelBorderRadius = Math.min(width, barLevelHeight) / 2;
 | 
			
		||||
        let fgColor = themeNode.get_foreground_color();
 | 
			
		||||
 | 
			
		||||
        let barLevelColor = themeNode.get_color('-barlevel-background-color');
 | 
			
		||||
        let barLevelActiveColor = themeNode.get_color('-barlevel-active-background-color');
 | 
			
		||||
        let barLevelOverdriveColor = themeNode.get_color('-barlevel-overdrive-color');
 | 
			
		||||
 | 
			
		||||
        let barLevelBorderWidth = Math.min(themeNode.get_length('-barlevel-border-width'), 1);
 | 
			
		||||
        let [hasBorderColor, barLevelBorderColor] =
 | 
			
		||||
            themeNode.lookup_color('-barlevel-border-color', false);
 | 
			
		||||
        if (!hasBorderColor)
 | 
			
		||||
            barLevelBorderColor = barLevelColor;
 | 
			
		||||
        let [hasActiveBorderColor, barLevelActiveBorderColor] =
 | 
			
		||||
            themeNode.lookup_color('-barlevel-active-border-color', false);
 | 
			
		||||
        if (!hasActiveBorderColor)
 | 
			
		||||
            barLevelActiveBorderColor = barLevelActiveColor;
 | 
			
		||||
        let [hasOverdriveBorderColor, barLevelOverdriveBorderColor] =
 | 
			
		||||
            themeNode.lookup_color('-barlevel-overdrive-border-color', false);
 | 
			
		||||
        if (!hasOverdriveBorderColor)
 | 
			
		||||
            barLevelOverdriveBorderColor = barLevelOverdriveColor;
 | 
			
		||||
 | 
			
		||||
        const TAU = Math.PI * 2;
 | 
			
		||||
 | 
			
		||||
        let endX = 0;
 | 
			
		||||
        if (this._maxValue > 0)
 | 
			
		||||
            endX = barLevelBorderRadius + (width - 2 * barLevelBorderRadius) * this._value / this._maxValue;
 | 
			
		||||
 | 
			
		||||
        let overdriveSeparatorX = barLevelBorderRadius + (width - 2 * barLevelBorderRadius) * this._overdriveStart / this._maxValue;
 | 
			
		||||
        let overdriveActive = this._overdriveStart !== this._maxValue;
 | 
			
		||||
        let overdriveSeparatorWidth = 0;
 | 
			
		||||
        if (overdriveActive)
 | 
			
		||||
            overdriveSeparatorWidth = themeNode.get_length('-barlevel-overdrive-separator-width');
 | 
			
		||||
 | 
			
		||||
        /* background bar */
 | 
			
		||||
        cr.arc(width - barLevelBorderRadius - barLevelBorderWidth, height / 2, barLevelBorderRadius, TAU * 3 / 4, TAU * 1 / 4);
 | 
			
		||||
        cr.lineTo(endX, (height + barLevelHeight) / 2);
 | 
			
		||||
        cr.lineTo(endX, (height - barLevelHeight) / 2);
 | 
			
		||||
        cr.lineTo(width - barLevelBorderRadius - barLevelBorderWidth, (height - barLevelHeight) / 2);
 | 
			
		||||
        Clutter.cairo_set_source_color(cr, barLevelColor);
 | 
			
		||||
        cr.fillPreserve();
 | 
			
		||||
        Clutter.cairo_set_source_color(cr, barLevelBorderColor);
 | 
			
		||||
        cr.setLineWidth(barLevelBorderWidth);
 | 
			
		||||
        cr.stroke();
 | 
			
		||||
 | 
			
		||||
        /* normal progress bar */
 | 
			
		||||
        let x = Math.min(endX, overdriveSeparatorX - overdriveSeparatorWidth / 2);
 | 
			
		||||
        cr.arc(barLevelBorderRadius + barLevelBorderWidth, height / 2, barLevelBorderRadius, TAU * 1 / 4, TAU * 3 / 4);
 | 
			
		||||
        cr.lineTo(x, (height - barLevelHeight) / 2);
 | 
			
		||||
        cr.lineTo(x, (height + barLevelHeight) / 2);
 | 
			
		||||
        cr.lineTo(barLevelBorderRadius + barLevelBorderWidth, (height + barLevelHeight) / 2);
 | 
			
		||||
        Clutter.cairo_set_source_color(cr, barLevelActiveColor);
 | 
			
		||||
        cr.fillPreserve();
 | 
			
		||||
        Clutter.cairo_set_source_color(cr, barLevelActiveBorderColor);
 | 
			
		||||
        cr.setLineWidth(barLevelBorderWidth);
 | 
			
		||||
        cr.stroke();
 | 
			
		||||
 | 
			
		||||
        /* overdrive progress barLevel */
 | 
			
		||||
        x = Math.min(endX, overdriveSeparatorX) + overdriveSeparatorWidth / 2;
 | 
			
		||||
        if (this._value > this._overdriveStart) {
 | 
			
		||||
            cr.moveTo(x, (height - barLevelHeight) / 2);
 | 
			
		||||
            cr.lineTo(endX, (height - barLevelHeight) / 2);
 | 
			
		||||
            cr.lineTo(endX, (height + barLevelHeight) / 2);
 | 
			
		||||
            cr.lineTo(x, (height + barLevelHeight) / 2);
 | 
			
		||||
            cr.lineTo(x, (height - barLevelHeight) / 2);
 | 
			
		||||
            Clutter.cairo_set_source_color(cr, barLevelOverdriveColor);
 | 
			
		||||
            cr.fillPreserve();
 | 
			
		||||
            Clutter.cairo_set_source_color(cr, barLevelOverdriveBorderColor);
 | 
			
		||||
            cr.setLineWidth(barLevelBorderWidth);
 | 
			
		||||
            cr.stroke();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* end progress bar arc */
 | 
			
		||||
        if (this._value <= this._overdriveStart)
 | 
			
		||||
            Clutter.cairo_set_source_color(cr, barLevelActiveColor);
 | 
			
		||||
        else
 | 
			
		||||
            Clutter.cairo_set_source_color(cr, barLevelOverdriveColor);
 | 
			
		||||
        cr.arc(endX, height / 2, barLevelBorderRadius, TAU * 3 / 4, TAU * 1 / 4);
 | 
			
		||||
        cr.lineTo(Math.floor(endX), (height + barLevelHeight) / 2);
 | 
			
		||||
        cr.lineTo(Math.floor(endX), (height - barLevelHeight) / 2);
 | 
			
		||||
        cr.lineTo(endX, (height - barLevelHeight) / 2);
 | 
			
		||||
        cr.fillPreserve();
 | 
			
		||||
        cr.setLineWidth(barLevelBorderWidth);
 | 
			
		||||
        cr.stroke();
 | 
			
		||||
 | 
			
		||||
        /* draw overdrive separator */
 | 
			
		||||
        if (overdriveActive) {
 | 
			
		||||
            cr.moveTo(overdriveSeparatorX - overdriveSeparatorWidth / 2, (height - barLevelHeight) / 2);
 | 
			
		||||
            cr.lineTo(overdriveSeparatorX + overdriveSeparatorWidth / 2, (height - barLevelHeight) / 2);
 | 
			
		||||
            cr.lineTo(overdriveSeparatorX + overdriveSeparatorWidth / 2, (height + barLevelHeight) / 2);
 | 
			
		||||
            cr.lineTo(overdriveSeparatorX - overdriveSeparatorWidth / 2, (height + barLevelHeight) / 2);
 | 
			
		||||
            cr.lineTo(overdriveSeparatorX - overdriveSeparatorWidth / 2, (height - barLevelHeight) / 2);
 | 
			
		||||
            if (this._value <= this._overdriveStart)
 | 
			
		||||
                Clutter.cairo_set_source_color(cr, fgColor);
 | 
			
		||||
            else
 | 
			
		||||
                Clutter.cairo_set_source_color(cr, barLevelColor);
 | 
			
		||||
            cr.fill();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        cr.$dispose();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getCurrentValue(actor) {
 | 
			
		||||
        return this._value;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getOverdriveStart(actor) {
 | 
			
		||||
        return this._overdriveStart;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getMinimumValue(actor) {
 | 
			
		||||
        return 0;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getMaximumValue(actor) {
 | 
			
		||||
        return this._maxValue;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _setCurrentValue(actor, value) {
 | 
			
		||||
        this._value = value;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _valueChanged(barLevel, value, property) {
 | 
			
		||||
        this._customAccessible.notify("accessible-value");
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    get value() {
 | 
			
		||||
        return this._value;
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
Signals.addSignalMethods(BarLevel.prototype);
 | 
			
		||||
@@ -44,7 +44,6 @@ var BoxPointer = new Lang.Class({
 | 
			
		||||
                                  y_fill: true });
 | 
			
		||||
        this._container = new Shell.GenericContainer();
 | 
			
		||||
        this.actor.set_child(this._container);
 | 
			
		||||
        this.actor.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
 | 
			
		||||
        this._container.connect('get-preferred-width', this._getPreferredWidth.bind(this));
 | 
			
		||||
        this._container.connect('get-preferred-height', this._getPreferredHeight.bind(this));
 | 
			
		||||
        this._container.connect('allocate', this._allocate.bind(this));
 | 
			
		||||
 
 | 
			
		||||
@@ -134,19 +134,18 @@ var EmptyEventSource = new Lang.Class({
 | 
			
		||||
});
 | 
			
		||||
Signals.addSignalMethods(EmptyEventSource.prototype);
 | 
			
		||||
 | 
			
		||||
const CalendarServerIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.CalendarServer">
 | 
			
		||||
<method name="GetEvents">
 | 
			
		||||
    <arg type="x" direction="in" />
 | 
			
		||||
    <arg type="x" direction="in" />
 | 
			
		||||
    <arg type="b" direction="in" />
 | 
			
		||||
    <arg type="a(sssbxxa{sv})" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<property name="HasCalendars" type="b" access="read" />
 | 
			
		||||
<signal name="Changed" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const CalendarServerIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.CalendarServer"> \
 | 
			
		||||
<method name="GetEvents"> \
 | 
			
		||||
    <arg type="x" direction="in" /> \
 | 
			
		||||
    <arg type="x" direction="in" /> \
 | 
			
		||||
    <arg type="b" direction="in" /> \
 | 
			
		||||
    <arg type="a(sssbxxa{sv})" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<property name="HasCalendars" type="b" access="read" /> \
 | 
			
		||||
<signal name="Changed" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const CalendarServerInfo  = Gio.DBusInterfaceInfo.new_for_xml(CalendarServerIface);
 | 
			
		||||
 | 
			
		||||
@@ -822,8 +821,6 @@ var EventsSection = new Lang.Class({
 | 
			
		||||
        this._desktopSettings.connect('changed', this._reloadEvents.bind(this));
 | 
			
		||||
        this._eventSource = new EmptyEventSource();
 | 
			
		||||
 | 
			
		||||
        this._messageById = new Map();
 | 
			
		||||
 | 
			
		||||
        this.parent();
 | 
			
		||||
 | 
			
		||||
        this._title = new St.Button({ style_class: 'events-section-title',
 | 
			
		||||
@@ -878,32 +875,20 @@ var EventsSection = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        this._reloading = true;
 | 
			
		||||
 | 
			
		||||
        this._list.destroy_all_children();
 | 
			
		||||
 | 
			
		||||
        let periodBegin = _getBeginningOfDay(this._date);
 | 
			
		||||
        let periodEnd = _getEndOfDay(this._date);
 | 
			
		||||
        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++) {
 | 
			
		||||
            let event = events[i];
 | 
			
		||||
 | 
			
		||||
            let message = this._messageById.get(event.id);
 | 
			
		||||
            if (!message) {
 | 
			
		||||
                message = new EventMessage(event, this._date);
 | 
			
		||||
                message.connect('close', () => {
 | 
			
		||||
                    this._ignoreEvent(event);
 | 
			
		||||
                });
 | 
			
		||||
                this._messageById.set(event.id, message);
 | 
			
		||||
                this.addMessage(message, false);
 | 
			
		||||
            } else {
 | 
			
		||||
                this.moveMessage(message, i, false);
 | 
			
		||||
            }
 | 
			
		||||
            let message = new EventMessage(event, this._date);
 | 
			
		||||
            message.connect('close', () => {
 | 
			
		||||
                this._ignoreEvent(event);
 | 
			
		||||
            });
 | 
			
		||||
            this.addMessage(message, false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this._reloading = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,6 @@
 | 
			
		||||
 | 
			
		||||
const Clutter = imports.gi.Clutter;
 | 
			
		||||
const Gio = imports.gi.Gio;
 | 
			
		||||
const GLib = imports.gi.GLib;
 | 
			
		||||
const GObject = imports.gi.GObject;
 | 
			
		||||
const Lang = imports.lang;
 | 
			
		||||
const Meta = imports.gi.Meta;
 | 
			
		||||
@@ -14,7 +13,6 @@ const Tweener = imports.ui.tweener;
 | 
			
		||||
 | 
			
		||||
var FROZEN_WINDOW_BRIGHTNESS = -0.3
 | 
			
		||||
var DIALOG_TRANSITION_TIME = 0.15
 | 
			
		||||
var ALIVE_TIMEOUT = 5000;
 | 
			
		||||
 | 
			
		||||
var CloseDialog = new Lang.Class({
 | 
			
		||||
    Name: 'CloseDialog',
 | 
			
		||||
@@ -28,7 +26,6 @@ var CloseDialog = new Lang.Class({
 | 
			
		||||
        this.parent();
 | 
			
		||||
        this._window = window;
 | 
			
		||||
        this._dialog = null;
 | 
			
		||||
        this._timeoutId = 0;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    get window() {
 | 
			
		||||
@@ -100,14 +97,6 @@ var CloseDialog = new Lang.Class({
 | 
			
		||||
        if (this._dialog != null)
 | 
			
		||||
            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._initDialog();
 | 
			
		||||
 | 
			
		||||
@@ -128,11 +117,6 @@ var CloseDialog = new Lang.Class({
 | 
			
		||||
        if (this._dialog == null)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        Meta.enable_unredirect_for_display(global.display);
 | 
			
		||||
 | 
			
		||||
        GLib.source_remove(this._timeoutId);
 | 
			
		||||
        this._timeoutId = 0;
 | 
			
		||||
 | 
			
		||||
        let dialog = this._dialog;
 | 
			
		||||
        this._dialog = null;
 | 
			
		||||
        this._removeWindowEffect();
 | 
			
		||||
 
 | 
			
		||||
@@ -74,15 +74,14 @@ function startAppForMount(app, mount) {
 | 
			
		||||
 | 
			
		||||
/******************************************/
 | 
			
		||||
 | 
			
		||||
const HotplugSnifferIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.HotplugSniffer">
 | 
			
		||||
<method name="SniffURI">
 | 
			
		||||
    <arg type="s" direction="in" />
 | 
			
		||||
    <arg type="as" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const HotplugSnifferIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.HotplugSniffer"> \
 | 
			
		||||
<method name="SniffURI"> \
 | 
			
		||||
    <arg type="s" direction="in" /> \
 | 
			
		||||
    <arg type="as" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface);
 | 
			
		||||
function HotplugSniffer() {
 | 
			
		||||
 
 | 
			
		||||
@@ -506,12 +506,8 @@ var VPNRequestHandler = new Lang.Class({
 | 
			
		||||
        try {
 | 
			
		||||
            data = this._dataStdout.peek_buffer();
 | 
			
		||||
 | 
			
		||||
            if (data instanceof Uint8Array)
 | 
			
		||||
                data = imports.byteArray.toGBytes(data);
 | 
			
		||||
            else
 | 
			
		||||
                data = data.toGBytes();
 | 
			
		||||
 | 
			
		||||
            keyfile.load_from_bytes(data, GLib.KeyFileFlags.NONE);
 | 
			
		||||
            keyfile.load_from_data(data.toString(), data.length,
 | 
			
		||||
                                   GLib.KeyFileFlags.NONE);
 | 
			
		||||
 | 
			
		||||
            if (keyfile.get_integer(VPN_UI_GROUP, 'Version') != 2)
 | 
			
		||||
                throw new Error('Invalid plugin keyfile version, is %d');
 | 
			
		||||
 
 | 
			
		||||
@@ -85,11 +85,9 @@ var CtrlAltTabManager = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        // And add the windows metacity would show in its Ctrl-Alt-Tab list
 | 
			
		||||
        if (Main.sessionMode.hasWindows && !Main.overview.visible) {
 | 
			
		||||
            let display = global.display;
 | 
			
		||||
            let workspaceManager = global.workspace_manager;
 | 
			
		||||
            let activeWorkspace = workspaceManager.get_active_workspace();
 | 
			
		||||
            let windows = display.get_tab_list(Meta.TabList.DOCKS,
 | 
			
		||||
                                               activeWorkspace);
 | 
			
		||||
            let screen = global.screen;
 | 
			
		||||
            let display = screen.get_display();
 | 
			
		||||
            let windows = display.get_tab_list(Meta.TabList.DOCKS, screen.get_active_workspace ());
 | 
			
		||||
            let windowTracker = Shell.WindowTracker.get_default();
 | 
			
		||||
            let textureCache = St.TextureCache.get_default();
 | 
			
		||||
            for (let i = 0; i < windows.length; i++) {
 | 
			
		||||
@@ -133,7 +131,7 @@ var CtrlAltTabManager = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _focusWindows(timestamp) {
 | 
			
		||||
        global.display.focus_default_window(timestamp);
 | 
			
		||||
        global.screen.focus_default_window(timestamp);
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -402,7 +402,6 @@ var Dash = new Lang.Class({
 | 
			
		||||
                                       clip_to_allocation: true });
 | 
			
		||||
        this._box._delegate = this;
 | 
			
		||||
        this._container.add_actor(this._box);
 | 
			
		||||
        this._container.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
 | 
			
		||||
 | 
			
		||||
        this._showAppsIcon = new ShowAppsIcon();
 | 
			
		||||
        this._showAppsIcon.childScale = 1;
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,6 @@ var Dialog = new Lang.Class({
 | 
			
		||||
        // mode accordingly so wrapped labels are handled correctly during
 | 
			
		||||
        // size requests.
 | 
			
		||||
        this._dialog.request_mode = Clutter.RequestMode.HEIGHT_FOR_WIDTH;
 | 
			
		||||
        this._dialog.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
 | 
			
		||||
 | 
			
		||||
        this.contentLayout = new St.BoxLayout({ vertical: true,
 | 
			
		||||
                                                style_class: "modal-dialog-content-box" });
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								js/ui/dnd.js
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								js/ui/dnd.js
									
									
									
									
									
								
							@@ -280,7 +280,7 @@ var _Draggable = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        this._touchSequence = sequence;
 | 
			
		||||
        this._grabEvents();
 | 
			
		||||
        global.display.set_cursor(Meta.Cursor.DND_IN_DRAG);
 | 
			
		||||
        global.screen.set_cursor(Meta.Cursor.DND_IN_DRAG);
 | 
			
		||||
 | 
			
		||||
        this._dragX = this._dragStartX = stageX;
 | 
			
		||||
        this._dragY = this._dragStartY = stageY;
 | 
			
		||||
@@ -412,7 +412,7 @@ var _Draggable = new Lang.Class({
 | 
			
		||||
            if (motionFunc) {
 | 
			
		||||
                let result = motionFunc(dragEvent);
 | 
			
		||||
                if (result != DragMotionResult.CONTINUE) {
 | 
			
		||||
                    global.display.set_cursor(DRAG_CURSOR_MAP[result]);
 | 
			
		||||
                    global.screen.set_cursor(DRAG_CURSOR_MAP[result]);
 | 
			
		||||
                    return GLib.SOURCE_REMOVE;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
@@ -430,13 +430,13 @@ var _Draggable = new Lang.Class({
 | 
			
		||||
                                                             targY,
 | 
			
		||||
                                                             0);
 | 
			
		||||
                if (result != DragMotionResult.CONTINUE) {
 | 
			
		||||
                    global.display.set_cursor(DRAG_CURSOR_MAP[result]);
 | 
			
		||||
                    global.screen.set_cursor(DRAG_CURSOR_MAP[result]);
 | 
			
		||||
                    return GLib.SOURCE_REMOVE;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            target = target.get_parent();
 | 
			
		||||
        }
 | 
			
		||||
        global.display.set_cursor(Meta.Cursor.DND_IN_DRAG);
 | 
			
		||||
        global.screen.set_cursor(Meta.Cursor.DND_IN_DRAG);
 | 
			
		||||
        return GLib.SOURCE_REMOVE;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@@ -509,7 +509,7 @@ var _Draggable = new Lang.Class({
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    this._dragInProgress = false;
 | 
			
		||||
                    global.display.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
                    global.screen.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
                    this.emit('drag-end', event.get_time(), true);
 | 
			
		||||
                    this._dragComplete();
 | 
			
		||||
                    return true;
 | 
			
		||||
@@ -561,7 +561,7 @@ var _Draggable = new Lang.Class({
 | 
			
		||||
        let [snapBackX, snapBackY, snapBackScale] = this._getRestoreLocation();
 | 
			
		||||
 | 
			
		||||
        if (this._actorDestroyed) {
 | 
			
		||||
            global.display.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
            global.screen.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
            if (!this._buttonDown)
 | 
			
		||||
                this._dragComplete();
 | 
			
		||||
            this.emit('drag-end', eventTime, false);
 | 
			
		||||
@@ -620,7 +620,7 @@ var _Draggable = new Lang.Class({
 | 
			
		||||
        if (!this._buttonDown)
 | 
			
		||||
            this._dragComplete();
 | 
			
		||||
 | 
			
		||||
        global.display.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
        global.screen.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onAnimationComplete(dragActor, eventTime) {
 | 
			
		||||
 
 | 
			
		||||
@@ -27,9 +27,9 @@ var EdgeDragAction = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
    _getMonitorRect(x, y) {
 | 
			
		||||
        let rect = new Meta.Rectangle({ x: x - 1, y: y - 1, width: 1, height: 1 });
 | 
			
		||||
        let monitorIndex = global.display.get_monitor_index_for_rect(rect);
 | 
			
		||||
        let monitorIndex = global.screen.get_monitor_index_for_rect(rect);
 | 
			
		||||
 | 
			
		||||
        return global.display.get_monitor_geometry(monitorIndex);
 | 
			
		||||
        return global.screen.get_monitor_geometry(monitorIndex);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    vfunc_gesture_prepare(action, actor) {
 | 
			
		||||
 
 | 
			
		||||
@@ -43,23 +43,22 @@ const _DIALOG_ICON_SIZE = 48;
 | 
			
		||||
 | 
			
		||||
var GSM_SESSION_MANAGER_LOGOUT_FORCE = 2;
 | 
			
		||||
 | 
			
		||||
const EndSessionDialogIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.SessionManager.EndSessionDialog">
 | 
			
		||||
<method name="Open">
 | 
			
		||||
    <arg type="u" direction="in" />
 | 
			
		||||
    <arg type="u" direction="in" />
 | 
			
		||||
    <arg type="u" direction="in" />
 | 
			
		||||
    <arg type="ao" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="Close" />
 | 
			
		||||
<signal name="ConfirmedLogout" />
 | 
			
		||||
<signal name="ConfirmedReboot" />
 | 
			
		||||
<signal name="ConfirmedShutdown" />
 | 
			
		||||
<signal name="Canceled" />
 | 
			
		||||
<signal name="Closed" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const EndSessionDialogIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.SessionManager.EndSessionDialog"> \
 | 
			
		||||
<method name="Open"> \
 | 
			
		||||
    <arg type="u" direction="in" /> \
 | 
			
		||||
    <arg type="u" direction="in" /> \
 | 
			
		||||
    <arg type="u" direction="in" /> \
 | 
			
		||||
    <arg type="ao" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="Close" /> \
 | 
			
		||||
<signal name="ConfirmedLogout" /> \
 | 
			
		||||
<signal name="ConfirmedReboot" /> \
 | 
			
		||||
<signal name="ConfirmedShutdown" /> \
 | 
			
		||||
<signal name="Canceled" /> \
 | 
			
		||||
<signal name="Closed" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const logoutDialogContent = {
 | 
			
		||||
    subjectWithUser: C_("title", "Log Out %s"),
 | 
			
		||||
@@ -169,42 +168,39 @@ const DialogContent = {
 | 
			
		||||
 | 
			
		||||
var MAX_USERS_IN_SESSION_DIALOG = 5;
 | 
			
		||||
 | 
			
		||||
const LogindSessionIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.login1.Session">
 | 
			
		||||
    <property name="Id" type="s" access="read"/>
 | 
			
		||||
    <property name="Remote" type="b" access="read"/>
 | 
			
		||||
    <property name="Class" type="s" access="read"/>
 | 
			
		||||
    <property name="Type" type="s" access="read"/>
 | 
			
		||||
    <property name="State" type="s" access="read"/>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const LogindSessionIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.login1.Session"> \
 | 
			
		||||
    <property name="Id" type="s" access="read"/> \
 | 
			
		||||
    <property name="Remote" type="b" access="read"/> \
 | 
			
		||||
    <property name="Class" type="s" access="read"/> \
 | 
			
		||||
    <property name="Type" type="s" access="read"/> \
 | 
			
		||||
    <property name="State" type="s" access="read"/> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const LogindSession = Gio.DBusProxy.makeProxyWrapper(LogindSessionIface);
 | 
			
		||||
 | 
			
		||||
const PkOfflineIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.PackageKit.Offline">
 | 
			
		||||
    <property name="UpdatePrepared" type="b" access="read"/>
 | 
			
		||||
    <property name="UpdateTriggered" type="b" access="read"/>
 | 
			
		||||
    <property name="UpgradePrepared" type="b" access="read"/>
 | 
			
		||||
    <property name="UpgradeTriggered" type="b" access="read"/>
 | 
			
		||||
    <property name="PreparedUpgrade" type="a{sv}" access="read"/>
 | 
			
		||||
    <method name="Trigger">
 | 
			
		||||
        <arg type="s" name="action" direction="in"/>
 | 
			
		||||
    </method>
 | 
			
		||||
    <method name="Cancel"/>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const PkOfflineIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.PackageKit.Offline"> \
 | 
			
		||||
    <property name="UpdatePrepared" type="b" access="read"/> \
 | 
			
		||||
    <property name="UpdateTriggered" type="b" access="read"/> \
 | 
			
		||||
    <property name="UpgradePrepared" type="b" access="read"/> \
 | 
			
		||||
    <property name="UpgradeTriggered" type="b" access="read"/> \
 | 
			
		||||
    <property name="PreparedUpgrade" type="a{sv}" access="read"/> \
 | 
			
		||||
    <method name="Trigger"> \
 | 
			
		||||
        <arg type="s" name="action" direction="in"/> \
 | 
			
		||||
    </method> \
 | 
			
		||||
    <method name="Cancel"/> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const PkOfflineProxy = Gio.DBusProxy.makeProxyWrapper(PkOfflineIface);
 | 
			
		||||
 | 
			
		||||
const UPowerIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.UPower">
 | 
			
		||||
    <property name="OnBattery" type="b" access="read"/>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const UPowerIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.UPower"> \
 | 
			
		||||
    <property name="OnBattery" type="b" access="read"/> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const UPowerProxy = Gio.DBusProxy.makeProxyWrapper(UPowerIface);
 | 
			
		||||
 | 
			
		||||
@@ -701,14 +697,7 @@ var EndSessionDialog = new Lang.Class({
 | 
			
		||||
                if (proxy.State == 'closing')
 | 
			
		||||
                    continue;
 | 
			
		||||
 | 
			
		||||
                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)
 | 
			
		||||
                if (proxy.Id == GLib.getenv('XDG_SESSION_ID'))
 | 
			
		||||
                    continue;
 | 
			
		||||
 | 
			
		||||
                let session = { user: this._userManager.get_user(userName),
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 | 
			
		||||
 | 
			
		||||
const FocusCaretTracker = imports.ui.focusCaretTracker;
 | 
			
		||||
const Atspi = imports.gi.Atspi;
 | 
			
		||||
const Clutter = imports.gi.Clutter;
 | 
			
		||||
const Gdk = imports.gi.Gdk;
 | 
			
		||||
@@ -12,7 +13,6 @@ const Signals = imports.signals;
 | 
			
		||||
const St = imports.gi.St;
 | 
			
		||||
const InputSourceManager = imports.ui.status.keyboard;
 | 
			
		||||
 | 
			
		||||
const IBusManager = imports.misc.ibusManager;
 | 
			
		||||
const BoxPointer = imports.ui.boxpointer;
 | 
			
		||||
const Layout = imports.ui.layout;
 | 
			
		||||
const Main = imports.ui.main;
 | 
			
		||||
@@ -261,7 +261,6 @@ var Key = new Lang.Class({
 | 
			
		||||
        this._extended_keyboard = null;
 | 
			
		||||
        this._pressTimeoutId = 0;
 | 
			
		||||
        this._capturedPress = false;
 | 
			
		||||
 | 
			
		||||
        this._capturedEventId = 0;
 | 
			
		||||
        this._unmapId = 0;
 | 
			
		||||
        this._longPress = false;
 | 
			
		||||
@@ -472,8 +471,6 @@ var KeyboardModel = new Lang.Class({
 | 
			
		||||
    _loadModel(groupName) {
 | 
			
		||||
        let file = Gio.File.new_for_uri('resource:///org/gnome/shell/osk-layouts/%s.json'.format(groupName));
 | 
			
		||||
        let [success, contents] = file.load_contents(null);
 | 
			
		||||
        if (contents instanceof Uint8Array)
 | 
			
		||||
            contents = imports.byteArray.toString(contents);
 | 
			
		||||
 | 
			
		||||
        return JSON.parse(contents);
 | 
			
		||||
    },
 | 
			
		||||
@@ -487,73 +484,6 @@ var KeyboardModel = new Lang.Class({
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
var FocusTracker = new Lang.Class({
 | 
			
		||||
    Name: 'FocusTracker',
 | 
			
		||||
 | 
			
		||||
    _init() {
 | 
			
		||||
        this._currentWindow = null;
 | 
			
		||||
 | 
			
		||||
        global.display.connect('notify::focus-window', () => {
 | 
			
		||||
            this._setCurrentWindow(global.display.focus_window);
 | 
			
		||||
            this.emit('window-changed', this._currentWindow);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        global.display.connect('grab-op-begin', (display, window, op) => {
 | 
			
		||||
            if (window == this._currentWindow &&
 | 
			
		||||
                (op == Meta.GrabOp.MOVING || op == Meta.GrabOp.KEYBOARD_MOVING))
 | 
			
		||||
                this.emit('reset');
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        /* 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) {
 | 
			
		||||
        this._currentWindow = window;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _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({
 | 
			
		||||
    Name: 'Keyboard',
 | 
			
		||||
 | 
			
		||||
@@ -561,10 +491,15 @@ var Keyboard = new Lang.Class({
 | 
			
		||||
        this.actor = null;
 | 
			
		||||
        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._currentAccessible = null;
 | 
			
		||||
        this._caretTrackingEnabled = false;
 | 
			
		||||
        this._updateCaretPositionId = 0;
 | 
			
		||||
        this._currentFocusWindow = null;
 | 
			
		||||
        this._animFocusedWindow = null;
 | 
			
		||||
        this._delayedAnimFocusWindow = null;
 | 
			
		||||
        this._originalWindowY = null;
 | 
			
		||||
 | 
			
		||||
        this._enableKeyboard = false; // a11y settings value
 | 
			
		||||
        this._enabled = false; // enabled state (by setting or device type)
 | 
			
		||||
@@ -575,14 +510,6 @@ var Keyboard = new Lang.Class({
 | 
			
		||||
        this._lastDeviceId = 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', 
 | 
			
		||||
            (backend, deviceId) => {
 | 
			
		||||
                let manager = Clutter.DeviceManager.get_default();
 | 
			
		||||
@@ -605,15 +532,102 @@ var Keyboard = new Lang.Class({
 | 
			
		||||
        this._keyboardRestingId = 0;
 | 
			
		||||
 | 
			
		||||
        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() {
 | 
			
		||||
        return this._keyboardVisible;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onFocusPositionChanged(focusTracker) {
 | 
			
		||||
        let rect = focusTracker.getCurrentRect();
 | 
			
		||||
        this.setCursorLocation(focusTracker.currentWindow, rect.x, rect.y, rect.width, rect.height);
 | 
			
		||||
    _setCaretTrackerEnabled(enabled) {
 | 
			
		||||
        if (this._caretTrackingEnabled == enabled)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        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() {
 | 
			
		||||
@@ -636,6 +650,8 @@ var Keyboard = new Lang.Class({
 | 
			
		||||
        if (!this._enabled && !this._keyboardController)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        this._setCaretTrackerEnabled(this._enabled);
 | 
			
		||||
 | 
			
		||||
        if (this._enabled && !this._keyboardController)
 | 
			
		||||
            this._setupKeyboard();
 | 
			
		||||
        else if (!this._enabled)
 | 
			
		||||
@@ -920,11 +936,9 @@ var Keyboard = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _relayout() {
 | 
			
		||||
        let monitor = Main.layoutManager.keyboardMonitor;
 | 
			
		||||
 | 
			
		||||
        if (this.actor == null || monitor == null)
 | 
			
		||||
        if (this.actor == null)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        let monitor = Main.layoutManager.keyboardMonitor;
 | 
			
		||||
        let maxHeight = monitor.height / 3;
 | 
			
		||||
        this.actor.width = monitor.width;
 | 
			
		||||
        this.actor.height = maxHeight;
 | 
			
		||||
@@ -1013,14 +1027,11 @@ var Keyboard = new Lang.Class({
 | 
			
		||||
        if (!this._keyboardRequested)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        if (this._currentAccessible)
 | 
			
		||||
            this._updateCaretPosition(this._currentAccessible);
 | 
			
		||||
        Main.layoutManager.keyboardIndex = monitor;
 | 
			
		||||
        this._relayout();
 | 
			
		||||
        Main.layoutManager.showKeyboard();
 | 
			
		||||
 | 
			
		||||
        if (this._delayedAnimFocusWindow) {
 | 
			
		||||
            this._setAnimationWindow(this._delayedAnimFocusWindow);
 | 
			
		||||
            this._delayedAnimFocusWindow = null;
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    hide() {
 | 
			
		||||
@@ -1091,9 +1102,8 @@ var Keyboard = new Lang.Class({
 | 
			
		||||
        window.move_frame(true, frameRect.x, frameRect.y);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _animateWindow(window, show) {
 | 
			
		||||
    _animateWindow(window, show, deltaY) {
 | 
			
		||||
        let windowActor = window.get_compositor_private();
 | 
			
		||||
        let deltaY = Main.layoutManager.keyboardBox.height;
 | 
			
		||||
        if (!windowActor)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
@@ -1114,39 +1124,35 @@ var Keyboard = new Lang.Class({
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _setAnimationWindow(window) {
 | 
			
		||||
        if (this._animFocusedWindow == window)
 | 
			
		||||
    setCursorLocation(window, x, y , w, h) {
 | 
			
		||||
        if (window == this._oskFocusWindow)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        if (this._animFocusedWindow)
 | 
			
		||||
            this._animateWindow(this._animFocusedWindow, false);
 | 
			
		||||
        if (window)
 | 
			
		||||
            this._animateWindow(window, true);
 | 
			
		||||
        if (this._oskFocusWindow) {
 | 
			
		||||
            let display = global.screen.get_display();
 | 
			
		||||
 | 
			
		||||
        this._animFocusedWindow = window;
 | 
			
		||||
    },
 | 
			
		||||
            if (display.get_grab_op() == Meta.GrabOp.NONE ||
 | 
			
		||||
                display.get_focus_window() != this._oskFocusWindow)
 | 
			
		||||
                this._animateWindow(this._oskFocusWindow, false, this._oskFocusWindowDelta);
 | 
			
		||||
 | 
			
		||||
    setCursorLocation(window, x, y , w, h) {
 | 
			
		||||
        let monitor = Main.layoutManager.keyboardMonitor;
 | 
			
		||||
 | 
			
		||||
        if (window && monitor) {
 | 
			
		||||
            let keyboardHeight = Main.layoutManager.keyboardBox.height;
 | 
			
		||||
            let focusObscured = false;
 | 
			
		||||
 | 
			
		||||
            if (y + h >= monitor.y + monitor.height - keyboardHeight) {
 | 
			
		||||
                if (this._keyboardVisible)
 | 
			
		||||
                    this._setAnimationWindow(window);
 | 
			
		||||
                else
 | 
			
		||||
                    this._delayedAnimFocusWindow = window;
 | 
			
		||||
            } else if (y < keyboardHeight) {
 | 
			
		||||
                this._delayedAnimFocusWindow = null;
 | 
			
		||||
                this._setAnimationWindow(null);
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            this._setAnimationWindow(null);
 | 
			
		||||
            this._oskFocusWindow = null;
 | 
			
		||||
            this._oskFocusWindowDelta = null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this._oskFocusWindow = window;
 | 
			
		||||
        if (window) {
 | 
			
		||||
            let monitor = Main.layoutManager.keyboardMonitor;
 | 
			
		||||
            let keyboardHeight = Main.layoutManager.keyboardBox.height;
 | 
			
		||||
            let frameRect = window.get_frame_rect();
 | 
			
		||||
            let windowActor = window.get_compositor_private();
 | 
			
		||||
            let delta = 0;
 | 
			
		||||
 | 
			
		||||
            if (frameRect.y + y + h >= monitor.height - keyboardHeight)
 | 
			
		||||
                delta = keyboardHeight;
 | 
			
		||||
 | 
			
		||||
            this._animateWindow(window, true, delta);
 | 
			
		||||
            this._oskFocusWindow = window;
 | 
			
		||||
            this._oskFocusWindowDelta = delta;
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -109,7 +109,7 @@ var MonitorConstraint = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
            if (!this._workareasChangedId) {
 | 
			
		||||
                this._workareasChangedId =
 | 
			
		||||
                    global.display.connect('workareas-changed', () => {
 | 
			
		||||
                    global.screen.connect('workareas-changed', () => {
 | 
			
		||||
                        if (this._workArea)
 | 
			
		||||
                            this.actor.queue_relayout();
 | 
			
		||||
                    });
 | 
			
		||||
@@ -120,7 +120,7 @@ var MonitorConstraint = new Lang.Class({
 | 
			
		||||
            this._monitorsChangedId = 0;
 | 
			
		||||
 | 
			
		||||
            if (this._workareasChangedId)
 | 
			
		||||
                global.display.disconnect(this._workareasChangedId);
 | 
			
		||||
                global.screen.disconnect(this._workareasChangedId);
 | 
			
		||||
            this._workareasChangedId = 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -142,8 +142,7 @@ var MonitorConstraint = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        let rect;
 | 
			
		||||
        if (this._workArea) {
 | 
			
		||||
            let workspaceManager = global.workspace_manager;
 | 
			
		||||
            let ws = workspaceManager.get_workspace_by_index(0);
 | 
			
		||||
            let ws = global.screen.get_workspace_by_index(0);
 | 
			
		||||
            rect = ws.get_work_area_for_monitor(index);
 | 
			
		||||
        } else {
 | 
			
		||||
            rect = Main.layoutManager.monitors[index];
 | 
			
		||||
@@ -165,7 +164,7 @@ var Monitor = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    get inFullscreen() {
 | 
			
		||||
        return global.display.get_monitor_in_fullscreen(this.index);
 | 
			
		||||
        return global.screen.get_monitor_in_fullscreen(this.index);
 | 
			
		||||
    }
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
@@ -204,7 +203,6 @@ var LayoutManager = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        // Set up stage hierarchy to group all UI actors under one container.
 | 
			
		||||
        this.uiGroup = new Shell.GenericContainer({ name: 'uiGroup' });
 | 
			
		||||
        this.uiGroup.set_flags(Clutter.ActorFlags.NO_LAYOUT);
 | 
			
		||||
        this.uiGroup.connect('allocate', (actor, box, flags) => {
 | 
			
		||||
            let children = actor.get_children();
 | 
			
		||||
            for (let i = 0; i < children.length; i++)
 | 
			
		||||
@@ -261,7 +259,7 @@ var LayoutManager = new Lang.Class({
 | 
			
		||||
        global.stage.remove_actor(global.top_window_group);
 | 
			
		||||
        this.uiGroup.add_actor(global.top_window_group);
 | 
			
		||||
 | 
			
		||||
        let feedbackGroup = Meta.get_feedback_group_for_display(global.display);
 | 
			
		||||
        let feedbackGroup = Meta.get_feedback_group_for_screen(global.screen);
 | 
			
		||||
        global.stage.remove_actor(feedbackGroup);
 | 
			
		||||
        this.uiGroup.add_actor(feedbackGroup);
 | 
			
		||||
 | 
			
		||||
@@ -271,19 +269,14 @@ var LayoutManager = new Lang.Class({
 | 
			
		||||
        this._bgManagers = [];
 | 
			
		||||
 | 
			
		||||
        // Need to update struts on new workspaces when they are added
 | 
			
		||||
        let workspaceManager = global.workspace_manager;
 | 
			
		||||
        workspaceManager.connect('notify::n-workspaces',
 | 
			
		||||
                                 this._queueUpdateRegions.bind(this));
 | 
			
		||||
 | 
			
		||||
        let display = global.display;
 | 
			
		||||
        display.connect('restacked',
 | 
			
		||||
                        this._windowsRestacked.bind(this));
 | 
			
		||||
        display.connect('in-fullscreen-changed',
 | 
			
		||||
                        this._updateFullscreen.bind(this));
 | 
			
		||||
 | 
			
		||||
        let monitorManager = Meta.MonitorManager.get();
 | 
			
		||||
        monitorManager.connect('monitors-changed',
 | 
			
		||||
                               this._monitorsChanged.bind(this));
 | 
			
		||||
        global.screen.connect('notify::n-workspaces',
 | 
			
		||||
                              this._queueUpdateRegions.bind(this));
 | 
			
		||||
        global.screen.connect('restacked',
 | 
			
		||||
                              this._windowsRestacked.bind(this));
 | 
			
		||||
        global.screen.connect('monitors-changed',
 | 
			
		||||
                              this._monitorsChanged.bind(this));
 | 
			
		||||
        global.screen.connect('in-fullscreen-changed',
 | 
			
		||||
                              this._updateFullscreen.bind(this));
 | 
			
		||||
        this._monitorsChanged();
 | 
			
		||||
 | 
			
		||||
        // NVIDIA drivers don't preserve FBO contents across
 | 
			
		||||
@@ -326,12 +319,12 @@ var LayoutManager = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _updateMonitors() {
 | 
			
		||||
        let display = global.display;
 | 
			
		||||
        let screen = global.screen;
 | 
			
		||||
 | 
			
		||||
        this.monitors = [];
 | 
			
		||||
        let nMonitors = display.get_n_monitors();
 | 
			
		||||
        let nMonitors = screen.get_n_monitors();
 | 
			
		||||
        for (let i = 0; i < nMonitors; i++)
 | 
			
		||||
            this.monitors.push(new Monitor(i, display.get_monitor_geometry(i)));
 | 
			
		||||
            this.monitors.push(new Monitor(i, screen.get_monitor_geometry(i)));
 | 
			
		||||
 | 
			
		||||
        if (nMonitors == 0) {
 | 
			
		||||
            this.primaryIndex = this.bottomIndex = -1;
 | 
			
		||||
@@ -340,7 +333,7 @@ var LayoutManager = new Lang.Class({
 | 
			
		||||
        } else {
 | 
			
		||||
            // If there are monitors below the primary, then we need
 | 
			
		||||
            // to split primary from bottom.
 | 
			
		||||
            this.primaryIndex = this.bottomIndex = display.get_primary_monitor();
 | 
			
		||||
            this.primaryIndex = this.bottomIndex = screen.get_primary_monitor();
 | 
			
		||||
            for (let i = 0; i < this.monitors.length; i++) {
 | 
			
		||||
                let monitor = this.monitors[i];
 | 
			
		||||
                if (this._isAboveOrBelowPrimary(monitor)) {
 | 
			
		||||
@@ -545,7 +538,7 @@ var LayoutManager = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    get currentMonitor() {
 | 
			
		||||
        let index = global.display.get_current_monitor();
 | 
			
		||||
        let index = global.screen.get_current_monitor();
 | 
			
		||||
        return this.monitors[index];
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@@ -564,8 +557,6 @@ var LayoutManager = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    get focusMonitor() {
 | 
			
		||||
        if (this.focusIndex < 0)
 | 
			
		||||
            return null;
 | 
			
		||||
        return this.monitors[this.focusIndex];
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@@ -918,8 +909,7 @@ var LayoutManager = new Lang.Class({
 | 
			
		||||
    getWorkAreaForMonitor(monitorIndex) {
 | 
			
		||||
        // Assume that all workspaces will have the same
 | 
			
		||||
        // struts and pick the first one.
 | 
			
		||||
        let workspaceManager = global.workspace_manager;
 | 
			
		||||
        let ws = workspaceManager.get_workspace_by_index(0);
 | 
			
		||||
        let ws = global.screen.get_workspace_by_index(0);
 | 
			
		||||
        return ws.get_work_area_for_monitor(monitorIndex);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@@ -929,7 +919,7 @@ var LayoutManager = new Lang.Class({
 | 
			
		||||
        let [x, y] = actor.get_transformed_position();
 | 
			
		||||
        let [w, h] = actor.get_transformed_size();
 | 
			
		||||
        let rect = new Meta.Rectangle({ x: x, y: y, width: w, height: h });
 | 
			
		||||
        return global.display.get_monitor_index_for_rect(rect);
 | 
			
		||||
        return global.screen.get_monitor_index_for_rect(rect);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    findMonitorForActor(actor) {
 | 
			
		||||
@@ -1062,9 +1052,9 @@ var LayoutManager = new Lang.Class({
 | 
			
		||||
        global.set_stage_input_region(rects);
 | 
			
		||||
        this._isPopupWindowVisible = isPopupMenuVisible;
 | 
			
		||||
 | 
			
		||||
        let workspaceManager = global.workspace_manager;
 | 
			
		||||
        for (let w = 0; w < workspaceManager.n_workspaces; w++) {
 | 
			
		||||
            let workspace = workspaceManager.get_workspace_by_index(w);
 | 
			
		||||
        let screen = global.screen;
 | 
			
		||||
        for (let w = 0; w < screen.n_workspaces; w++) {
 | 
			
		||||
            let workspace = screen.get_workspace_by_index(w);
 | 
			
		||||
            workspace.set_builtin_struts(struts);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,7 @@ const MagnifierDBus = imports.ui.magnifierDBus;
 | 
			
		||||
const Params = imports.misc.params;
 | 
			
		||||
const PointerWatcher = imports.ui.pointerWatcher;
 | 
			
		||||
 | 
			
		||||
var MOUSE_POLL_FREQUENCY = 50;
 | 
			
		||||
var CROSSHAIRS_CLIP_SIZE = [100, 100];
 | 
			
		||||
var NO_CHANGE = 0.0;
 | 
			
		||||
 | 
			
		||||
@@ -61,7 +62,7 @@ var Magnifier = new Lang.Class({
 | 
			
		||||
        this._zoomRegions = [];
 | 
			
		||||
 | 
			
		||||
        // Create small clutter tree for the magnified mouse.
 | 
			
		||||
        let cursorTracker = Meta.CursorTracker.get_for_display(global.display);
 | 
			
		||||
        let cursorTracker = Meta.CursorTracker.get_for_screen(global.screen);
 | 
			
		||||
        this._mouseSprite = new Clutter.Texture();
 | 
			
		||||
        Shell.util_cursor_tracker_to_clutter(cursorTracker, this._mouseSprite);
 | 
			
		||||
        this._cursorRoot = new Clutter.Actor();
 | 
			
		||||
@@ -116,10 +117,10 @@ var Magnifier = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        if (isActive != activate) {
 | 
			
		||||
            if (activate) {
 | 
			
		||||
                Meta.disable_unredirect_for_display(global.display);
 | 
			
		||||
                Meta.disable_unredirect_for_screen(global.screen);
 | 
			
		||||
                this.startTrackingMouse();
 | 
			
		||||
            } else {
 | 
			
		||||
                Meta.enable_unredirect_for_display(global.display);
 | 
			
		||||
                Meta.enable_unredirect_for_screen(global.screen);
 | 
			
		||||
                this.stopTrackingMouse();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@@ -151,10 +152,8 @@ var Magnifier = new Lang.Class({
 | 
			
		||||
     * Turn on mouse tracking, if not already doing so.
 | 
			
		||||
     */
 | 
			
		||||
    startTrackingMouse() {
 | 
			
		||||
        if (!this._pointerWatch) {
 | 
			
		||||
            let interval = 1000 / Clutter.get_default_frame_rate();
 | 
			
		||||
            this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(interval, this.scrollToMousePos.bind(this));
 | 
			
		||||
        }
 | 
			
		||||
        if (!this._pointerWatch)
 | 
			
		||||
            this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(MOUSE_POLL_FREQUENCY, this.scrollToMousePos.bind(this));
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -9,91 +9,89 @@ const ZOOM_SERVICE_PATH = '/org/gnome/Magnifier/ZoomRegion';
 | 
			
		||||
 | 
			
		||||
// Subset of gnome-mag's Magnifier dbus interface -- to be expanded.  See:
 | 
			
		||||
// http://git.gnome.org/browse/gnome-mag/tree/xml/...Magnifier.xml
 | 
			
		||||
const MagnifierIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Magnifier">
 | 
			
		||||
<method name="setActive">
 | 
			
		||||
    <arg type="b" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="isActive">
 | 
			
		||||
    <arg type="b" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="showCursor" />
 | 
			
		||||
<method name="hideCursor" />
 | 
			
		||||
<method name="createZoomRegion">
 | 
			
		||||
    <arg type="d" direction="in" />
 | 
			
		||||
    <arg type="d" direction="in" />
 | 
			
		||||
    <arg type="ai" direction="in" />
 | 
			
		||||
    <arg type="ai" direction="in" />
 | 
			
		||||
    <arg type="o" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="addZoomRegion">
 | 
			
		||||
    <arg type="o" direction="in" />
 | 
			
		||||
    <arg type="b" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="getZoomRegions">
 | 
			
		||||
    <arg type="ao" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="clearAllZoomRegions" />
 | 
			
		||||
<method name="fullScreenCapable">
 | 
			
		||||
    <arg type="b" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="setCrosswireSize">
 | 
			
		||||
    <arg type="i" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="getCrosswireSize">
 | 
			
		||||
    <arg type="i" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="setCrosswireLength">
 | 
			
		||||
    <arg type="i" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="getCrosswireLength">
 | 
			
		||||
    <arg type="i" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="setCrosswireClip">
 | 
			
		||||
    <arg type="b" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="getCrosswireClip">
 | 
			
		||||
    <arg type="b" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="setCrosswireColor">
 | 
			
		||||
    <arg type="u" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="getCrosswireColor">
 | 
			
		||||
    <arg type="u" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const MagnifierIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Magnifier"> \
 | 
			
		||||
<method name="setActive"> \
 | 
			
		||||
    <arg type="b" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="isActive"> \
 | 
			
		||||
    <arg type="b" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="showCursor" /> \
 | 
			
		||||
<method name="hideCursor" /> \
 | 
			
		||||
<method name="createZoomRegion"> \
 | 
			
		||||
    <arg type="d" direction="in" /> \
 | 
			
		||||
    <arg type="d" direction="in" /> \
 | 
			
		||||
    <arg type="ai" direction="in" /> \
 | 
			
		||||
    <arg type="ai" direction="in" /> \
 | 
			
		||||
    <arg type="o" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="addZoomRegion"> \
 | 
			
		||||
    <arg type="o" direction="in" /> \
 | 
			
		||||
    <arg type="b" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="getZoomRegions"> \
 | 
			
		||||
    <arg type="ao" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="clearAllZoomRegions" /> \
 | 
			
		||||
<method name="fullScreenCapable"> \
 | 
			
		||||
    <arg type="b" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="setCrosswireSize"> \
 | 
			
		||||
    <arg type="i" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="getCrosswireSize"> \
 | 
			
		||||
    <arg type="i" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="setCrosswireLength"> \
 | 
			
		||||
    <arg type="i" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="getCrosswireLength"> \
 | 
			
		||||
    <arg type="i" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="setCrosswireClip"> \
 | 
			
		||||
    <arg type="b" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="getCrosswireClip"> \
 | 
			
		||||
    <arg type="b" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="setCrosswireColor"> \
 | 
			
		||||
    <arg type="u" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="getCrosswireColor"> \
 | 
			
		||||
    <arg type="u" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
// Subset of gnome-mag's ZoomRegion dbus interface -- to be expanded.  See:
 | 
			
		||||
// http://git.gnome.org/browse/gnome-mag/tree/xml/...ZoomRegion.xml
 | 
			
		||||
const ZoomRegionIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Magnifier.ZoomRegion">
 | 
			
		||||
<method name="setMagFactor">
 | 
			
		||||
    <arg type="d" direction="in" />
 | 
			
		||||
    <arg type="d" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="getMagFactor">
 | 
			
		||||
    <arg type="d" direction="out" />
 | 
			
		||||
    <arg type="d" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="setRoi">
 | 
			
		||||
    <arg type="ai" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="getRoi">
 | 
			
		||||
    <arg type="ai" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="shiftContentsTo">
 | 
			
		||||
    <arg type="i" direction="in" />
 | 
			
		||||
    <arg type="i" direction="in" />
 | 
			
		||||
    <arg type="b" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="moveResize">
 | 
			
		||||
    <arg type="ai" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const ZoomRegionIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Magnifier.ZoomRegion"> \
 | 
			
		||||
<method name="setMagFactor"> \
 | 
			
		||||
    <arg type="d" direction="in" /> \
 | 
			
		||||
    <arg type="d" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="getMagFactor"> \
 | 
			
		||||
    <arg type="d" direction="out" /> \
 | 
			
		||||
    <arg type="d" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="setRoi"> \
 | 
			
		||||
    <arg type="ai" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="getRoi"> \
 | 
			
		||||
    <arg type="ai" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="shiftContentsTo"> \
 | 
			
		||||
    <arg type="i" direction="in" /> \
 | 
			
		||||
    <arg type="i" direction="in" /> \
 | 
			
		||||
    <arg type="b" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="moveResize"> \
 | 
			
		||||
    <arg type="ai" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
// For making unique ZoomRegion DBus proxy object paths of the form:
 | 
			
		||||
// '/org/gnome/Magnifier/ZoomRegion/zoomer0',
 | 
			
		||||
 
 | 
			
		||||
@@ -429,7 +429,7 @@ function pushModal(actor, params) {
 | 
			
		||||
            log('pushModal: invocation of begin_modal failed');
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        Meta.disable_unredirect_for_display(global.display);
 | 
			
		||||
        Meta.disable_unredirect_for_screen(global.screen);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    modalCount += 1;
 | 
			
		||||
@@ -528,7 +528,7 @@ function popModal(actor, timestamp) {
 | 
			
		||||
 | 
			
		||||
    layoutManager.modalEnded();
 | 
			
		||||
    global.end_modal(timestamp);
 | 
			
		||||
    Meta.enable_unredirect_for_display(global.display);
 | 
			
		||||
    Meta.enable_unredirect_for_screen(global.screen);
 | 
			
		||||
    actionMode = Shell.ActionMode.NORMAL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -556,15 +556,14 @@ function openRunDialog() {
 | 
			
		||||
 * and switching out of the overview if it's currently active
 | 
			
		||||
 */
 | 
			
		||||
function activateWindow(window, time, workspaceNum) {
 | 
			
		||||
    let workspaceManager = global.workspace_manager;
 | 
			
		||||
    let activeWorkspaceNum = workspaceManager.get_active_workspace_index();
 | 
			
		||||
    let activeWorkspaceNum = global.screen.get_active_workspace_index();
 | 
			
		||||
    let windowWorkspaceNum = (workspaceNum !== undefined) ? workspaceNum : window.get_workspace().index();
 | 
			
		||||
 | 
			
		||||
    if (!time)
 | 
			
		||||
        time = global.get_current_time();
 | 
			
		||||
 | 
			
		||||
    if (windowWorkspaceNum != activeWorkspaceNum) {
 | 
			
		||||
        let workspace = workspaceManager.get_workspace_by_index(windowWorkspaceNum);
 | 
			
		||||
        let workspace = global.screen.get_workspace_by_index(windowWorkspaceNum);
 | 
			
		||||
        workspace.activate_with_focus(window, time);
 | 
			
		||||
    } else {
 | 
			
		||||
        window.activate(time);
 | 
			
		||||
 
 | 
			
		||||
@@ -27,7 +27,6 @@ function _fixMarkup(text, allowMarkup) {
 | 
			
		||||
 | 
			
		||||
        // Support <b>, <i>, and <u>, escape anything else
 | 
			
		||||
        // so it displays as raw markup.
 | 
			
		||||
        // Ref: https://developer.gnome.org/notification-spec/#markup
 | 
			
		||||
        _text = _text.replace(/<(?!\/?[biu]>)/g, '<');
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
@@ -96,10 +95,10 @@ var URLHighlighter = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
            let urlId = this._findUrlAtPos(event);
 | 
			
		||||
            if (urlId != -1 && !this._cursorChanged) {
 | 
			
		||||
                global.display.set_cursor(Meta.Cursor.POINTING_HAND);
 | 
			
		||||
                global.screen.set_cursor(Meta.Cursor.POINTING_HAND);
 | 
			
		||||
                this._cursorChanged = true;
 | 
			
		||||
            } else if (urlId == -1) {
 | 
			
		||||
                global.display.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
                global.screen.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
                this._cursorChanged = false;
 | 
			
		||||
            }
 | 
			
		||||
            return Clutter.EVENT_PROPAGATE;
 | 
			
		||||
@@ -110,7 +109,7 @@ var URLHighlighter = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
            if (this._cursorChanged) {
 | 
			
		||||
                this._cursorChanged = false;
 | 
			
		||||
                global.display.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
                global.screen.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
            }
 | 
			
		||||
            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
 | 
			
		||||
// is no fallback for this icon.
 | 
			
		||||
//
 | 
			
		||||
// If @params contains 'bannerMarkup', with the value %true, a subset (<b>,
 | 
			
		||||
// <i> and <u>) of the markup in [1] will be interpreted within @banner. If
 | 
			
		||||
// the parameter is not present, then anything that looks like markup
 | 
			
		||||
// in @banner will appear literally in the output.
 | 
			
		||||
// If @params contains 'bannerMarkup', with the value %true, then
 | 
			
		||||
// the corresponding element is assumed to use pango markup. If the
 | 
			
		||||
// parameter is not present for an element, then anything that looks
 | 
			
		||||
// like markup in that element will appear literally in the output.
 | 
			
		||||
//
 | 
			
		||||
// If @params contains a 'clear' parameter with the value %true, then
 | 
			
		||||
// the content and the action area of the notification will be cleared.
 | 
			
		||||
@@ -328,8 +328,6 @@ var NotificationApplicationPolicy = new Lang.Class({
 | 
			
		||||
// If @params contains 'soundName' or 'soundFile', the corresponding
 | 
			
		||||
// event sound is played when the notification is shown (if the policy for
 | 
			
		||||
// @source allows playing sounds).
 | 
			
		||||
//
 | 
			
		||||
// [1] https://developer.gnome.org/notification-spec/#markup 
 | 
			
		||||
var Notification = new Lang.Class({
 | 
			
		||||
    Name: 'Notification',
 | 
			
		||||
 | 
			
		||||
@@ -917,7 +915,7 @@ var MessageTray = new Lang.Class({
 | 
			
		||||
        Main.layoutManager.addChrome(this.actor, { affectsInputRegion: false });
 | 
			
		||||
        Main.layoutManager.trackChrome(this._bannerBin, { affectsInputRegion: true });
 | 
			
		||||
 | 
			
		||||
        global.display.connect('in-fullscreen-changed', this._updateState.bind(this));
 | 
			
		||||
        global.screen.connect('in-fullscreen-changed', this._updateState.bind(this));
 | 
			
		||||
 | 
			
		||||
        Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -116,7 +116,7 @@ var ModalDialog = new Lang.Class({
 | 
			
		||||
        if (onPrimary)
 | 
			
		||||
            this._monitorConstraint.primary = true;
 | 
			
		||||
        else
 | 
			
		||||
            this._monitorConstraint.index = global.display.get_current_monitor();
 | 
			
		||||
            this._monitorConstraint.index = global.screen.get_current_monitor();
 | 
			
		||||
 | 
			
		||||
        this.state = State.OPENING;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -8,44 +8,41 @@ const Calendar = imports.ui.calendar;
 | 
			
		||||
const Main = imports.ui.main;
 | 
			
		||||
const MessageList = imports.ui.messageList;
 | 
			
		||||
 | 
			
		||||
const DBusIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.DBus">
 | 
			
		||||
  <method name="ListNames">
 | 
			
		||||
    <arg type="as" direction="out" name="names" />
 | 
			
		||||
  </method>
 | 
			
		||||
  <signal name="NameOwnerChanged">
 | 
			
		||||
    <arg type="s" direction="out" name="name" />
 | 
			
		||||
    <arg type="s" direction="out" name="oldOwner" />
 | 
			
		||||
    <arg type="s" direction="out" name="newOwner" />
 | 
			
		||||
  </signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const DBusIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.DBus"> \
 | 
			
		||||
  <method name="ListNames"> \
 | 
			
		||||
    <arg type="as" direction="out" name="names" /> \
 | 
			
		||||
  </method> \
 | 
			
		||||
  <signal name="NameOwnerChanged"> \
 | 
			
		||||
    <arg type="s" direction="out" name="name" /> \
 | 
			
		||||
    <arg type="s" direction="out" name="oldOwner" /> \
 | 
			
		||||
    <arg type="s" direction="out" name="newOwner" /> \
 | 
			
		||||
  </signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
const DBusProxy = Gio.DBusProxy.makeProxyWrapper(DBusIface);
 | 
			
		||||
 | 
			
		||||
const MprisIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.mpris.MediaPlayer2">
 | 
			
		||||
  <method name="Raise" />
 | 
			
		||||
  <property name="CanRaise" type="b" access="read" />
 | 
			
		||||
  <property name="DesktopEntry" type="s" access="read" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const MprisIface = '<node> \
 | 
			
		||||
<interface name="org.mpris.MediaPlayer2"> \
 | 
			
		||||
  <method name="Raise" /> \
 | 
			
		||||
  <property name="CanRaise" type="b" access="read" /> \
 | 
			
		||||
  <property name="DesktopEntry" type="s" access="read" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
const MprisProxy = Gio.DBusProxy.makeProxyWrapper(MprisIface);
 | 
			
		||||
 | 
			
		||||
const MprisPlayerIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.mpris.MediaPlayer2.Player">
 | 
			
		||||
  <method name="PlayPause" />
 | 
			
		||||
  <method name="Next" />
 | 
			
		||||
  <method name="Previous" />
 | 
			
		||||
  <property name="CanGoNext" type="b" access="read" />
 | 
			
		||||
  <property name="CanGoPrevious" type="b" access="read" />
 | 
			
		||||
  <property name="CanPlay" type="b" access="read" />
 | 
			
		||||
  <property name="Metadata" type="a{sv}" access="read" />
 | 
			
		||||
  <property name="PlaybackStatus" type="s" access="read" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const MprisPlayerIface = '<node> \
 | 
			
		||||
<interface name="org.mpris.MediaPlayer2.Player"> \
 | 
			
		||||
  <method name="PlayPause" /> \
 | 
			
		||||
  <method name="Next" /> \
 | 
			
		||||
  <method name="Previous" /> \
 | 
			
		||||
  <property name="CanGoNext" type="b" access="read" /> \
 | 
			
		||||
  <property name="CanGoPrevious" type="b" access="read" /> \
 | 
			
		||||
  <property name="CanPlay" type="b" access="read" /> \
 | 
			
		||||
  <property name="Metadata" type="a{sv}" access="read" /> \
 | 
			
		||||
  <property name="PlaybackStatus" type="s" access="read" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
const MprisPlayerProxy = Gio.DBusProxy.makeProxyWrapper(MprisPlayerIface);
 | 
			
		||||
 | 
			
		||||
const MPRIS_PLAYER_PREFIX = 'org.mpris.MediaPlayer2.';
 | 
			
		||||
 
 | 
			
		||||
@@ -17,57 +17,55 @@ const Params = imports.misc.params;
 | 
			
		||||
const Util = imports.misc.util;
 | 
			
		||||
 | 
			
		||||
// Should really be defined in Gio.js
 | 
			
		||||
const BusIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.DBus">
 | 
			
		||||
<method name="GetConnectionUnixProcessID">
 | 
			
		||||
    <arg type="s" direction="in" />
 | 
			
		||||
    <arg type="u" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const BusIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.DBus"> \
 | 
			
		||||
<method name="GetConnectionUnixProcessID"> \
 | 
			
		||||
    <arg type="s" direction="in" /> \
 | 
			
		||||
    <arg type="u" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var BusProxy = Gio.DBusProxy.makeProxyWrapper(BusIface);
 | 
			
		||||
function Bus() {
 | 
			
		||||
    return new BusProxy(Gio.DBus.session, 'org.freedesktop.DBus', '/org/freedesktop/DBus');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const FdoNotificationsIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.Notifications">
 | 
			
		||||
<method name="Notify">
 | 
			
		||||
    <arg type="s" direction="in"/>
 | 
			
		||||
    <arg type="u" direction="in"/>
 | 
			
		||||
    <arg type="s" direction="in"/>
 | 
			
		||||
    <arg type="s" direction="in"/>
 | 
			
		||||
    <arg type="s" direction="in"/>
 | 
			
		||||
    <arg type="as" direction="in"/>
 | 
			
		||||
    <arg type="a{sv}" direction="in"/>
 | 
			
		||||
    <arg type="i" direction="in"/>
 | 
			
		||||
    <arg type="u" direction="out"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="CloseNotification">
 | 
			
		||||
    <arg type="u" direction="in"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetCapabilities">
 | 
			
		||||
    <arg type="as" direction="out"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetServerInformation">
 | 
			
		||||
    <arg type="s" direction="out"/>
 | 
			
		||||
    <arg type="s" direction="out"/>
 | 
			
		||||
    <arg type="s" direction="out"/>
 | 
			
		||||
    <arg type="s" direction="out"/>
 | 
			
		||||
</method>
 | 
			
		||||
<signal name="NotificationClosed">
 | 
			
		||||
    <arg type="u"/>
 | 
			
		||||
    <arg type="u"/>
 | 
			
		||||
</signal>
 | 
			
		||||
<signal name="ActionInvoked">
 | 
			
		||||
    <arg type="u"/>
 | 
			
		||||
    <arg type="s"/>
 | 
			
		||||
</signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const FdoNotificationsIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.Notifications"> \
 | 
			
		||||
<method name="Notify"> \
 | 
			
		||||
    <arg type="s" direction="in"/> \
 | 
			
		||||
    <arg type="u" direction="in"/> \
 | 
			
		||||
    <arg type="s" direction="in"/> \
 | 
			
		||||
    <arg type="s" direction="in"/> \
 | 
			
		||||
    <arg type="s" direction="in"/> \
 | 
			
		||||
    <arg type="as" direction="in"/> \
 | 
			
		||||
    <arg type="a{sv}" direction="in"/> \
 | 
			
		||||
    <arg type="i" direction="in"/> \
 | 
			
		||||
    <arg type="u" direction="out"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="CloseNotification"> \
 | 
			
		||||
    <arg type="u" direction="in"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetCapabilities"> \
 | 
			
		||||
    <arg type="as" direction="out"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetServerInformation"> \
 | 
			
		||||
    <arg type="s" direction="out"/> \
 | 
			
		||||
    <arg type="s" direction="out"/> \
 | 
			
		||||
    <arg type="s" direction="out"/> \
 | 
			
		||||
    <arg type="s" direction="out"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<signal name="NotificationClosed"> \
 | 
			
		||||
    <arg type="u"/> \
 | 
			
		||||
    <arg type="u"/> \
 | 
			
		||||
</signal> \
 | 
			
		||||
<signal name="ActionInvoked"> \
 | 
			
		||||
    <arg type="u"/> \
 | 
			
		||||
    <arg type="s"/> \
 | 
			
		||||
</signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var NotificationClosedReason = {
 | 
			
		||||
    EXPIRED: 1,
 | 
			
		||||
@@ -656,19 +654,18 @@ var GtkNotificationDaemonNotification = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const FdoApplicationIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.Application">
 | 
			
		||||
<method name="ActivateAction">
 | 
			
		||||
    <arg type="s" direction="in" />
 | 
			
		||||
    <arg type="av" direction="in" />
 | 
			
		||||
    <arg type="a{sv}" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="Activate">
 | 
			
		||||
    <arg type="a{sv}" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const FdoApplicationIface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.Application"> \
 | 
			
		||||
<method name="ActivateAction"> \
 | 
			
		||||
    <arg type="s" direction="in" /> \
 | 
			
		||||
    <arg type="av" direction="in" /> \
 | 
			
		||||
    <arg type="a{sv}" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="Activate"> \
 | 
			
		||||
    <arg type="a{sv}" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
const FdoApplicationProxy = Gio.DBusProxy.makeProxyWrapper(FdoApplicationIface);
 | 
			
		||||
 | 
			
		||||
function objectPathFromAppId(appId) {
 | 
			
		||||
@@ -777,20 +774,19 @@ var GtkNotificationDaemonAppSource = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const GtkNotificationsIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gtk.Notifications">
 | 
			
		||||
<method name="AddNotification">
 | 
			
		||||
    <arg type="s" direction="in" />
 | 
			
		||||
    <arg type="s" direction="in" />
 | 
			
		||||
    <arg type="a{sv}" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="RemoveNotification">
 | 
			
		||||
    <arg type="s" direction="in" />
 | 
			
		||||
    <arg type="s" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const GtkNotificationsIface = '<node> \
 | 
			
		||||
<interface name="org.gtk.Notifications"> \
 | 
			
		||||
<method name="AddNotification"> \
 | 
			
		||||
    <arg type="s" direction="in" /> \
 | 
			
		||||
    <arg type="s" direction="in" /> \
 | 
			
		||||
    <arg type="a{sv}" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="RemoveNotification"> \
 | 
			
		||||
    <arg type="s" direction="in" /> \
 | 
			
		||||
    <arg type="s" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var GtkNotificationDaemon = new Lang.Class({
 | 
			
		||||
    Name: 'GtkNotificationDaemon',
 | 
			
		||||
@@ -835,10 +831,8 @@ var GtkNotificationDaemon = new Lang.Class({
 | 
			
		||||
                let source;
 | 
			
		||||
                try {
 | 
			
		||||
                    source = this._ensureAppSource(appId);
 | 
			
		||||
                } catch(e) {
 | 
			
		||||
                    if (e instanceof InvalidAppError)
 | 
			
		||||
                        return;
 | 
			
		||||
                    throw e;
 | 
			
		||||
                } catch(e if e instanceof InvalidAppError) {
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                notifications.forEach(([notificationId, notification]) => {
 | 
			
		||||
@@ -869,12 +863,9 @@ var GtkNotificationDaemon = new Lang.Class({
 | 
			
		||||
        let source;
 | 
			
		||||
        try {
 | 
			
		||||
            source = this._ensureAppSource(appId);
 | 
			
		||||
        } catch(e) {
 | 
			
		||||
            if (e instanceof InvalidAppError) {
 | 
			
		||||
                invocation.return_dbus_error('org.gtk.Notifications.InvalidApp', 'The app by ID "%s" could not be found'.format(appId));
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            throw e;
 | 
			
		||||
        } catch(e if e instanceof InvalidAppError) {
 | 
			
		||||
            invocation.return_dbus_error('org.gtk.Notifications.InvalidApp', 'The app by ID "%s" could not be found'.format(appId));
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        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);
 | 
			
		||||
        this._position();
 | 
			
		||||
 | 
			
		||||
        Meta.disable_unredirect_for_display(global.display);
 | 
			
		||||
        Meta.disable_unredirect_for_screen(global.screen);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _position() {
 | 
			
		||||
@@ -48,7 +48,7 @@ var OsdMonitorLabel = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
    destroy() {
 | 
			
		||||
        this._actor.destroy();
 | 
			
		||||
        Meta.enable_unredirect_for_display(global.display);
 | 
			
		||||
        Meta.enable_unredirect_for_screen(global.screen);
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,6 @@ const Clutter = imports.gi.Clutter;
 | 
			
		||||
const GLib = imports.gi.GLib;
 | 
			
		||||
const St = imports.gi.St;
 | 
			
		||||
 | 
			
		||||
const BarLevel = imports.ui.barLevel;
 | 
			
		||||
const Lang = imports.lang;
 | 
			
		||||
const Layout = imports.ui.layout;
 | 
			
		||||
const Main = imports.ui.main;
 | 
			
		||||
@@ -18,18 +17,16 @@ var LEVEL_ANIMATION_TIME = 0.1;
 | 
			
		||||
 | 
			
		||||
var LevelBar = new Lang.Class({
 | 
			
		||||
    Name: 'LevelBar',
 | 
			
		||||
    Extends: BarLevel.BarLevel,
 | 
			
		||||
 | 
			
		||||
    _init() {
 | 
			
		||||
        this._level = 0;
 | 
			
		||||
        this._maxLevel = 100;
 | 
			
		||||
 | 
			
		||||
        let params = {
 | 
			
		||||
            styleClass: 'level',
 | 
			
		||||
        }
 | 
			
		||||
        this.parent(this._level, params);
 | 
			
		||||
        this.actor = new St.Bin({ style_class: 'level',
 | 
			
		||||
                                  x_align: St.Align.START,
 | 
			
		||||
                                  y_fill: true });
 | 
			
		||||
        this._bar = new St.Widget({ style_class: 'level-bar' });
 | 
			
		||||
 | 
			
		||||
        this.actor.accessible_name = _("Volume");
 | 
			
		||||
        this.actor.set_child(this._bar);
 | 
			
		||||
 | 
			
		||||
        this.actor.connect('notify::width', () => { this.level = this.level; });
 | 
			
		||||
    },
 | 
			
		||||
@@ -39,19 +36,12 @@ var LevelBar = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    set level(value) {
 | 
			
		||||
        this._level = Math.max(0, Math.min(value, this._maxLevel));
 | 
			
		||||
        this._level = Math.max(0, Math.min(value, 100));
 | 
			
		||||
 | 
			
		||||
        this.setValue(this._level / 100);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    get maxLevel() {
 | 
			
		||||
        return this._maxLevel;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    set maxLevel(value) {
 | 
			
		||||
        this._maxLevel = Math.max(100, value);
 | 
			
		||||
 | 
			
		||||
        this.setMaximumValue(this._maxLevel / 100);
 | 
			
		||||
        let alloc = this.actor.get_allocation_box();
 | 
			
		||||
        let newWidth = Math.round((alloc.x2 - alloc.x1) * this._level / 100);
 | 
			
		||||
        if (newWidth != this._bar.width)
 | 
			
		||||
            this._bar.width = newWidth;
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
@@ -150,18 +140,12 @@ var OsdWindow = new Lang.Class({
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    setMaxLevel(maxLevel) {
 | 
			
		||||
        if (maxLevel === undefined)
 | 
			
		||||
            maxLevel = 100;
 | 
			
		||||
        this._level.maxLevel = maxLevel;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    show() {
 | 
			
		||||
        if (!this._icon.gicon)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        if (!this.actor.visible) {
 | 
			
		||||
            Meta.disable_unredirect_for_display(global.display);
 | 
			
		||||
            Meta.disable_unredirect_for_screen(global.screen);
 | 
			
		||||
            this.actor.show();
 | 
			
		||||
            this.actor.opacity = 0;
 | 
			
		||||
            this.actor.get_parent().set_child_above_sibling(this.actor, null);
 | 
			
		||||
@@ -195,7 +179,7 @@ var OsdWindow = new Lang.Class({
 | 
			
		||||
                           transition: 'easeOutQuad',
 | 
			
		||||
                           onComplete: () => {
 | 
			
		||||
                              this._reset();
 | 
			
		||||
                              Meta.enable_unredirect_for_display(global.display);
 | 
			
		||||
                              Meta.enable_unredirect_for_screen(global.screen);
 | 
			
		||||
                           }
 | 
			
		||||
                         });
 | 
			
		||||
        return GLib.SOURCE_REMOVE;
 | 
			
		||||
@@ -205,7 +189,6 @@ var OsdWindow = new Lang.Class({
 | 
			
		||||
        this.actor.hide();
 | 
			
		||||
        this.setLabel(null);
 | 
			
		||||
        this.setLevel(null);
 | 
			
		||||
        this.setMaxLevel(null);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _relayout() {
 | 
			
		||||
@@ -250,25 +233,24 @@ var OsdWindowManager = new Lang.Class({
 | 
			
		||||
        this._osdWindows.length = Main.layoutManager.monitors.length;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _showOsdWindow(monitorIndex, icon, label, level, maxLevel) {
 | 
			
		||||
    _showOsdWindow(monitorIndex, icon, label, level) {
 | 
			
		||||
        this._osdWindows[monitorIndex].setIcon(icon);
 | 
			
		||||
        this._osdWindows[monitorIndex].setLabel(label);
 | 
			
		||||
        this._osdWindows[monitorIndex].setLevel(level);
 | 
			
		||||
        this._osdWindows[monitorIndex].setMaxLevel(maxLevel);
 | 
			
		||||
        this._osdWindows[monitorIndex].show();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    show(monitorIndex, icon, label, level, maxLevel) {
 | 
			
		||||
    show(monitorIndex, icon, label, level) {
 | 
			
		||||
        if (monitorIndex != -1) {
 | 
			
		||||
            for (let i = 0; i < this._osdWindows.length; i++) {
 | 
			
		||||
                if (i == monitorIndex)
 | 
			
		||||
                    this._showOsdWindow(i, icon, label, level, maxLevel);
 | 
			
		||||
                    this._showOsdWindow(i, icon, label, level);
 | 
			
		||||
                else
 | 
			
		||||
                    this._osdWindows[i].cancel();
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            for (let i = 0; i < this._osdWindows.length; i++)
 | 
			
		||||
                this._showOsdWindow(i, icon, label, level, maxLevel);
 | 
			
		||||
                this._showOsdWindow(i, icon, label, level);
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -157,7 +157,7 @@ var Overview = new Lang.Class({
 | 
			
		||||
        Main.xdndHandler.connect('drag-begin', this._onDragBegin.bind(this));
 | 
			
		||||
        Main.xdndHandler.connect('drag-end', this._onDragEnd.bind(this));
 | 
			
		||||
 | 
			
		||||
        global.display.connect('restacked', this._onRestacked.bind(this));
 | 
			
		||||
        global.screen.connect('restacked', this._onRestacked.bind(this));
 | 
			
		||||
 | 
			
		||||
        this._windowSwitchTimeoutId = 0;
 | 
			
		||||
        this._windowSwitchTimestamp = 0;
 | 
			
		||||
@@ -286,8 +286,7 @@ var Overview = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        DND.addDragMonitor(this._dragMonitor);
 | 
			
		||||
        // Remember the workspace we started from
 | 
			
		||||
        let workspaceManager = global.workspace_manager;
 | 
			
		||||
        this._lastActiveWorkspaceIndex = workspaceManager.get_active_workspace_index();
 | 
			
		||||
        this._lastActiveWorkspaceIndex = global.screen.get_active_workspace_index();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onDragEnd(time) {
 | 
			
		||||
@@ -297,8 +296,7 @@ var Overview = new Lang.Class({
 | 
			
		||||
        // we have to go back to where we started and hide
 | 
			
		||||
        // the overview
 | 
			
		||||
        if (this._shown) {
 | 
			
		||||
            let workspaceManager = global.workspace_manager;
 | 
			
		||||
            workspaceManager.get_workspace_by_index(this._lastActiveWorkspaceIndex).activate(time);
 | 
			
		||||
            global.screen.get_workspace_by_index(this._lastActiveWorkspaceIndex).activate(time);
 | 
			
		||||
            this.hide();
 | 
			
		||||
        }
 | 
			
		||||
        this._resetWindowSwitchTimeout();
 | 
			
		||||
@@ -319,9 +317,9 @@ var Overview = new Lang.Class({
 | 
			
		||||
        let display = Gdk.Display.get_default();
 | 
			
		||||
        let deviceManager = display.get_device_manager();
 | 
			
		||||
        let pointer = deviceManager.get_client_pointer();
 | 
			
		||||
        let [gdkScreen, pointerX, pointerY] = pointer.get_position();
 | 
			
		||||
        let [screen, pointerX, pointerY] = pointer.get_position();
 | 
			
		||||
 | 
			
		||||
        pointer.warp(gdkScreen, pointerX, pointerY);
 | 
			
		||||
        pointer.warp(screen, pointerX, pointerY);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onDragMotion(dragEvent) {
 | 
			
		||||
@@ -395,8 +393,10 @@ var Overview = new Lang.Class({
 | 
			
		||||
        if (!Main.layoutManager.primaryMonitor)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        this._coverPane.set_position(0, 0);
 | 
			
		||||
        this._coverPane.set_size(global.screen_width, global.screen_height);
 | 
			
		||||
        let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
 | 
			
		||||
 | 
			
		||||
        this._coverPane.set_position(0, workArea.y);
 | 
			
		||||
        this._coverPane.set_size(workArea.width, workArea.height);
 | 
			
		||||
 | 
			
		||||
        this._updateBackgrounds();
 | 
			
		||||
    },
 | 
			
		||||
@@ -550,7 +550,7 @@ var Overview = new Lang.Class({
 | 
			
		||||
        this.visibleTarget = true;
 | 
			
		||||
        this._activationTime = GLib.get_monotonic_time() / GLib.USEC_PER_SEC;
 | 
			
		||||
 | 
			
		||||
        Meta.disable_unredirect_for_display(global.display);
 | 
			
		||||
        Meta.disable_unredirect_for_screen(global.screen);
 | 
			
		||||
        this.viewSelector.show();
 | 
			
		||||
 | 
			
		||||
        this._overview.opacity = 0;
 | 
			
		||||
@@ -635,7 +635,7 @@ var Overview = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
    _hideDone() {
 | 
			
		||||
        // Re-enable unredirection
 | 
			
		||||
        Meta.enable_unredirect_for_display(global.display);
 | 
			
		||||
        Meta.enable_unredirect_for_screen(global.screen);
 | 
			
		||||
 | 
			
		||||
        this.viewSelector.hide();
 | 
			
		||||
        this._desktopFade.hide();
 | 
			
		||||
 
 | 
			
		||||
@@ -253,23 +253,13 @@ var ThumbnailsSlider = new Lang.Class({
 | 
			
		||||
        this.actor.add_actor(this._thumbnailsBox.actor);
 | 
			
		||||
 | 
			
		||||
        Main.layoutManager.connect('monitors-changed', this._updateSlide.bind(this));
 | 
			
		||||
        global.workspace_manager.connect('active-workspace-changed',
 | 
			
		||||
                                         this._updateSlide.bind(this));
 | 
			
		||||
        global.workspace_manager.connect('notify::n-workspaces',
 | 
			
		||||
                                         this._updateSlide.bind(this));
 | 
			
		||||
        this.actor.connect('notify::hover', this._updateSlide.bind(this));
 | 
			
		||||
        this._thumbnailsBox.actor.bind_property('visible', this.actor, 'visible', GObject.BindingFlags.SYNC_CREATE);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getAlwaysZoomOut() {
 | 
			
		||||
        // Always show the pager on hover, during a drag, or if workspaces are
 | 
			
		||||
        // actually used, e.g. there are windows on any non-active workspace
 | 
			
		||||
        let workspaceManager = global.workspace_manager;
 | 
			
		||||
        let alwaysZoomOut = this.actor.hover ||
 | 
			
		||||
                            this._inDrag ||
 | 
			
		||||
                            !Meta.prefs_get_dynamic_workspaces() ||
 | 
			
		||||
                            workspaceManager.n_workspaces > 2 ||
 | 
			
		||||
                            workspaceManager.get_active_workspace_index() != 0;
 | 
			
		||||
        // Always show the pager on hover or during a drag
 | 
			
		||||
        let alwaysZoomOut = this.actor.hover || this._inDrag;
 | 
			
		||||
 | 
			
		||||
        if (!alwaysZoomOut) {
 | 
			
		||||
            let monitors = Main.layoutManager.monitors;
 | 
			
		||||
@@ -294,11 +284,6 @@ var ThumbnailsSlider = new Lang.Class({
 | 
			
		||||
        return child.get_theme_node().get_length('visible-width');
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onDragEnd() {
 | 
			
		||||
        this.actor.sync_hover();
 | 
			
		||||
        this.parent();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getSlide() {
 | 
			
		||||
        if (!this._visible)
 | 
			
		||||
            return 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -313,8 +313,6 @@ var PadDiagram = new Lang.Class({
 | 
			
		||||
    _init(params) {
 | 
			
		||||
        let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/pad-osd.css');
 | 
			
		||||
        let [success, css, etag] = file.load_contents(null);
 | 
			
		||||
        if (css instanceof Uint8Array)
 | 
			
		||||
            css = imports.byteArray.toString(css);
 | 
			
		||||
        this._curEdited = null;
 | 
			
		||||
        this._prevEdited = null;
 | 
			
		||||
        this._css = css;
 | 
			
		||||
@@ -962,15 +960,14 @@ var PadOsd = new Lang.Class({
 | 
			
		||||
});
 | 
			
		||||
Signals.addSignalMethods(PadOsd.prototype);
 | 
			
		||||
 | 
			
		||||
const PadOsdIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.Wacom.PadOsd">
 | 
			
		||||
<method name="Show">
 | 
			
		||||
    <arg name="device_node" direction="in" type="o"/>
 | 
			
		||||
    <arg name="edition_mode" direction="in" type="b"/>
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const PadOsdIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.Wacom.PadOsd"> \
 | 
			
		||||
<method name="Show"> \
 | 
			
		||||
    <arg name="device_node" direction="in" type="o"/> \
 | 
			
		||||
    <arg name="edition_mode" direction="in" type="b"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var PadOsdService = new Lang.Class({
 | 
			
		||||
    Name: 'PadOsdService',
 | 
			
		||||
 
 | 
			
		||||
@@ -265,8 +265,7 @@ var AppMenuButton = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _findTargetApp() {
 | 
			
		||||
        let workspaceManager = global.workspace_manager;
 | 
			
		||||
        let workspace = workspaceManager.get_active_workspace();
 | 
			
		||||
        let workspace = global.screen.get_active_workspace();
 | 
			
		||||
        let tracker = Shell.WindowTracker.get_default();
 | 
			
		||||
        let focusedApp = tracker.focus_app;
 | 
			
		||||
        if (focusedApp && focusedApp.is_on_workspace(workspace))
 | 
			
		||||
@@ -307,11 +306,8 @@ var AppMenuButton = new Lang.Class({
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        let shellShowsAppMenu = this._gtkSettings.gtk_shell_shows_app_menu;
 | 
			
		||||
        Meta.prefs_set_show_fallback_app_menu(!shellShowsAppMenu);
 | 
			
		||||
 | 
			
		||||
        let visible = (this._targetApp != null &&
 | 
			
		||||
                       shellShowsAppMenu &&
 | 
			
		||||
                       this._gtkSettings.gtk_shell_shows_app_menu &&
 | 
			
		||||
                       !Main.overview.visibleTarget);
 | 
			
		||||
        if (visible)
 | 
			
		||||
            this.show();
 | 
			
		||||
@@ -713,7 +709,6 @@ var AggregateMenu = new Lang.Class({
 | 
			
		||||
            this._bluetooth = null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet();
 | 
			
		||||
        this._power = new imports.ui.status.power.Indicator();
 | 
			
		||||
        this._rfkill = new imports.ui.status.rfkill.Indicator();
 | 
			
		||||
        this._volume = new imports.ui.status.volume.Indicator();
 | 
			
		||||
@@ -734,7 +729,6 @@ var AggregateMenu = new Lang.Class({
 | 
			
		||||
        if (this._bluetooth) {
 | 
			
		||||
            this._indicators.add_child(this._bluetooth.indicators);
 | 
			
		||||
        }
 | 
			
		||||
        this._indicators.add_child(this._remoteAccess.indicators);
 | 
			
		||||
        this._indicators.add_child(this._rfkill.indicators);
 | 
			
		||||
        this._indicators.add_child(this._volume.indicators);
 | 
			
		||||
        this._indicators.add_child(this._power.indicators);
 | 
			
		||||
@@ -749,7 +743,6 @@ var AggregateMenu = new Lang.Class({
 | 
			
		||||
        if (this._bluetooth) {
 | 
			
		||||
            this.menu.addMenuItem(this._bluetooth.menu);
 | 
			
		||||
        }
 | 
			
		||||
        this.menu.addMenuItem(this._remoteAccess.menu);
 | 
			
		||||
        this.menu.addMenuItem(this._location.menu);
 | 
			
		||||
        this.menu.addMenuItem(this._rfkill.menu);
 | 
			
		||||
        this.menu.addMenuItem(this._power.menu);
 | 
			
		||||
@@ -779,7 +772,6 @@ var Panel = new Lang.Class({
 | 
			
		||||
        this.actor = new Shell.GenericContainer({ name: 'panel',
 | 
			
		||||
                                                  reactive: true });
 | 
			
		||||
        this.actor._delegate = this;
 | 
			
		||||
        this.actor.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
 | 
			
		||||
 | 
			
		||||
        this._sessionStyle = null;
 | 
			
		||||
 | 
			
		||||
@@ -804,7 +796,6 @@ var Panel = new Lang.Class({
 | 
			
		||||
        this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
 | 
			
		||||
        this.actor.connect('allocate', this._allocate.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));
 | 
			
		||||
 | 
			
		||||
        Main.overview.connect('showing', () => {
 | 
			
		||||
@@ -827,7 +818,7 @@ var Panel = new Lang.Class({
 | 
			
		||||
        global.window_group.connect('actor-removed', this._onWindowActorRemoved.bind(this));
 | 
			
		||||
        global.window_manager.connect('switch-workspace', this._updateSolidStyle.bind(this));
 | 
			
		||||
 | 
			
		||||
        global.display.connect('workareas-changed', () => { this.actor.queue_relayout(); });
 | 
			
		||||
        global.screen.connect('workareas-changed', () => { this.actor.queue_relayout(); });
 | 
			
		||||
        this._updatePanel();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@@ -948,13 +939,8 @@ var Panel = new Lang.Class({
 | 
			
		||||
        if (event.get_source() != actor)
 | 
			
		||||
            return Clutter.EVENT_PROPAGATE;
 | 
			
		||||
 | 
			
		||||
        let type = event.type();
 | 
			
		||||
        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)
 | 
			
		||||
        let button = event.get_button();
 | 
			
		||||
        if (button != 1)
 | 
			
		||||
            return Clutter.EVENT_PROPAGATE;
 | 
			
		||||
 | 
			
		||||
        let focusWindow = global.display.focus_window;
 | 
			
		||||
@@ -975,7 +961,8 @@ var Panel = new Lang.Class({
 | 
			
		||||
        if (!allowDrag)
 | 
			
		||||
            return Clutter.EVENT_PROPAGATE;
 | 
			
		||||
 | 
			
		||||
        global.display.begin_grab_op(dragWindow,
 | 
			
		||||
        global.display.begin_grab_op(global.screen,
 | 
			
		||||
                                     dragWindow,
 | 
			
		||||
                                     Meta.GrabOp.MOVING,
 | 
			
		||||
                                     false, /* pointer grab */
 | 
			
		||||
                                     true, /* frame action */
 | 
			
		||||
@@ -990,7 +977,7 @@ var Panel = new Lang.Class({
 | 
			
		||||
    _onKeyPress(actor, event) {
 | 
			
		||||
        let symbol = event.get_key_symbol();
 | 
			
		||||
        if (symbol == Clutter.KEY_Escape) {
 | 
			
		||||
            global.display.focus_default_window(event.get_time());
 | 
			
		||||
            global.screen.focus_default_window(event.get_time());
 | 
			
		||||
            return Clutter.EVENT_STOP;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -1088,8 +1075,7 @@ var Panel = new Lang.Class({
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        /* Get all the windows in the active workspace that are in the primary monitor and visible */
 | 
			
		||||
        let workspaceManager = global.workspace_manager;
 | 
			
		||||
        let activeWorkspace = workspaceManager.get_active_workspace();
 | 
			
		||||
        let activeWorkspace = global.screen.get_active_workspace();
 | 
			
		||||
        let windows = activeWorkspace.list_windows().filter(metaWindow => {
 | 
			
		||||
            return metaWindow.is_on_primary_monitor() &&
 | 
			
		||||
                   metaWindow.showing_on_its_workspace() &&
 | 
			
		||||
 
 | 
			
		||||
@@ -141,17 +141,8 @@ var PopupBaseMenuItem = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onKeyPressEvent(actor, event) {
 | 
			
		||||
        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) {
 | 
			
		||||
            this.activate(event);
 | 
			
		||||
            return Clutter.EVENT_STOP;
 | 
			
		||||
 
 | 
			
		||||
@@ -12,55 +12,53 @@ const Search = imports.ui.search;
 | 
			
		||||
 | 
			
		||||
const KEY_FILE_GROUP = 'Shell Search Provider';
 | 
			
		||||
 | 
			
		||||
const SearchProviderIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.SearchProvider">
 | 
			
		||||
<method name="GetInitialResultSet">
 | 
			
		||||
    <arg type="as" direction="in" />
 | 
			
		||||
    <arg type="as" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetSubsearchResultSet">
 | 
			
		||||
    <arg type="as" direction="in" />
 | 
			
		||||
    <arg type="as" direction="in" />
 | 
			
		||||
    <arg type="as" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetResultMetas">
 | 
			
		||||
    <arg type="as" direction="in" />
 | 
			
		||||
    <arg type="aa{sv}" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="ActivateResult">
 | 
			
		||||
    <arg type="s" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const SearchProviderIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.SearchProvider"> \
 | 
			
		||||
<method name="GetInitialResultSet"> \
 | 
			
		||||
    <arg type="as" direction="in" /> \
 | 
			
		||||
    <arg type="as" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetSubsearchResultSet"> \
 | 
			
		||||
    <arg type="as" direction="in" /> \
 | 
			
		||||
    <arg type="as" direction="in" /> \
 | 
			
		||||
    <arg type="as" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetResultMetas"> \
 | 
			
		||||
    <arg type="as" direction="in" /> \
 | 
			
		||||
    <arg type="aa{sv}" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="ActivateResult"> \
 | 
			
		||||
    <arg type="s" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const SearchProvider2Iface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.SearchProvider2">
 | 
			
		||||
<method name="GetInitialResultSet">
 | 
			
		||||
    <arg type="as" direction="in" />
 | 
			
		||||
    <arg type="as" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetSubsearchResultSet">
 | 
			
		||||
    <arg type="as" direction="in" />
 | 
			
		||||
    <arg type="as" direction="in" />
 | 
			
		||||
    <arg type="as" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetResultMetas">
 | 
			
		||||
    <arg type="as" direction="in" />
 | 
			
		||||
    <arg type="aa{sv}" direction="out" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="ActivateResult">
 | 
			
		||||
    <arg type="s" direction="in" />
 | 
			
		||||
    <arg type="as" direction="in" />
 | 
			
		||||
    <arg type="u" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="LaunchSearch">
 | 
			
		||||
    <arg type="as" direction="in" />
 | 
			
		||||
    <arg type="u" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const SearchProvider2Iface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.SearchProvider2"> \
 | 
			
		||||
<method name="GetInitialResultSet"> \
 | 
			
		||||
    <arg type="as" direction="in" /> \
 | 
			
		||||
    <arg type="as" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetSubsearchResultSet"> \
 | 
			
		||||
    <arg type="as" direction="in" /> \
 | 
			
		||||
    <arg type="as" direction="in" /> \
 | 
			
		||||
    <arg type="as" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetResultMetas"> \
 | 
			
		||||
    <arg type="as" direction="in" /> \
 | 
			
		||||
    <arg type="aa{sv}" direction="out" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="ActivateResult"> \
 | 
			
		||||
    <arg type="s" direction="in" /> \
 | 
			
		||||
    <arg type="as" direction="in" /> \
 | 
			
		||||
    <arg type="u" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="LaunchSearch"> \
 | 
			
		||||
    <arg type="as" direction="in" /> \
 | 
			
		||||
    <arg type="u" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var SearchProviderProxyInfo = Gio.DBusInterfaceInfo.new_for_xml(SearchProviderIface);
 | 
			
		||||
var SearchProvider2ProxyInfo = Gio.DBusInterfaceInfo.new_for_xml(SearchProvider2Iface);
 | 
			
		||||
 
 | 
			
		||||
@@ -62,11 +62,7 @@ var RunDialog = new Lang.Class({
 | 
			
		||||
                                   'rt': () => {
 | 
			
		||||
                                       Main.reloadThemeResource();
 | 
			
		||||
                                       Main.loadTheme();
 | 
			
		||||
                                   },
 | 
			
		||||
 | 
			
		||||
                                   'check_cloexec_fds': () => {
 | 
			
		||||
                                       Shell.util_check_cloexec_fds();
 | 
			
		||||
                                   },
 | 
			
		||||
                                   }
 | 
			
		||||
                                 };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -118,16 +114,18 @@ var RunDialog = new Lang.Class({
 | 
			
		||||
 | 
			
		||||
        this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
 | 
			
		||||
                                                     entry: this._entryText });
 | 
			
		||||
        this._entryText.connect('activate', (o) => {
 | 
			
		||||
            this.popModal();
 | 
			
		||||
            this._run(o.get_text(),
 | 
			
		||||
                      Clutter.get_current_event().get_state() & Clutter.ModifierType.CONTROL_MASK);
 | 
			
		||||
            if (!this._commandError ||
 | 
			
		||||
                !this.pushModal())
 | 
			
		||||
                this.close();
 | 
			
		||||
        });
 | 
			
		||||
        this._entryText.connect('key-press-event', (o, e) => {
 | 
			
		||||
            let symbol = e.get_key_symbol();
 | 
			
		||||
            if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) {
 | 
			
		||||
                this.popModal();
 | 
			
		||||
                this._run(o.get_text(),
 | 
			
		||||
                          e.get_state() & Clutter.ModifierType.CONTROL_MASK);
 | 
			
		||||
                if (!this._commandError ||
 | 
			
		||||
                    !this.pushModal())
 | 
			
		||||
                    this.close();
 | 
			
		||||
 | 
			
		||||
                return Clutter.EVENT_STOP;
 | 
			
		||||
            }
 | 
			
		||||
            if (symbol == Clutter.Tab) {
 | 
			
		||||
                let text = o.get_text();
 | 
			
		||||
                let prefix;
 | 
			
		||||
@@ -174,10 +172,9 @@ var RunDialog = new Lang.Class({
 | 
			
		||||
                    if (name.slice(0, text.length) == text)
 | 
			
		||||
                        results.push(name);
 | 
			
		||||
                }
 | 
			
		||||
            } catch (e) {
 | 
			
		||||
                if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
 | 
			
		||||
                    !e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_DIRECTORY))
 | 
			
		||||
                    log(e);
 | 
			
		||||
            } catch (e if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
 | 
			
		||||
                           !e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_DIRECTORY))) {
 | 
			
		||||
                log(e);
 | 
			
		||||
            } finally {
 | 
			
		||||
                return results;
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -570,7 +570,7 @@ var ScreenShield = new Lang.Class({
 | 
			
		||||
        this._shortLightbox.connect('shown', this._onShortLightboxShown.bind(this));
 | 
			
		||||
 | 
			
		||||
        this.idleMonitor = Meta.IdleMonitor.get_core();
 | 
			
		||||
        this._cursorTracker = Meta.CursorTracker.get_for_display(global.display);
 | 
			
		||||
        this._cursorTracker = Meta.CursorTracker.get_for_screen(global.screen);
 | 
			
		||||
 | 
			
		||||
        this._syncInhibitor();
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -8,30 +8,29 @@ const Signals = imports.signals;
 | 
			
		||||
 | 
			
		||||
const Main = imports.ui.main;
 | 
			
		||||
 | 
			
		||||
const ScreencastIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.Screencast">
 | 
			
		||||
<method name="Screencast">
 | 
			
		||||
    <arg type="s" direction="in" name="file_template"/>
 | 
			
		||||
    <arg type="a{sv}" direction="in" name="options"/>
 | 
			
		||||
    <arg type="b" direction="out" name="success"/>
 | 
			
		||||
    <arg type="s" direction="out" name="filename_used"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="ScreencastArea">
 | 
			
		||||
    <arg type="i" direction="in" name="x"/>
 | 
			
		||||
    <arg type="i" direction="in" name="y"/>
 | 
			
		||||
    <arg type="i" direction="in" name="width"/>
 | 
			
		||||
    <arg type="i" direction="in" name="height"/>
 | 
			
		||||
    <arg type="s" direction="in" name="file_template"/>
 | 
			
		||||
    <arg type="a{sv}" direction="in" name="options"/>
 | 
			
		||||
    <arg type="b" direction="out" name="success"/>
 | 
			
		||||
    <arg type="s" direction="out" name="filename_used"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="StopScreencast">
 | 
			
		||||
    <arg type="b" direction="out" name="success"/>
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const ScreencastIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.Screencast"> \
 | 
			
		||||
<method name="Screencast"> \
 | 
			
		||||
    <arg type="s" direction="in" name="file_template"/> \
 | 
			
		||||
    <arg type="a{sv}" direction="in" name="options"/> \
 | 
			
		||||
    <arg type="b" direction="out" name="success"/> \
 | 
			
		||||
    <arg type="s" direction="out" name="filename_used"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="ScreencastArea"> \
 | 
			
		||||
    <arg type="i" direction="in" name="x"/> \
 | 
			
		||||
    <arg type="i" direction="in" name="y"/> \
 | 
			
		||||
    <arg type="i" direction="in" name="width"/> \
 | 
			
		||||
    <arg type="i" direction="in" name="height"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="file_template"/> \
 | 
			
		||||
    <arg type="a{sv}" direction="in" name="options"/> \
 | 
			
		||||
    <arg type="b" direction="out" name="success"/> \
 | 
			
		||||
    <arg type="s" direction="out" name="filename_used"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="StopScreencast"> \
 | 
			
		||||
    <arg type="b" direction="out" name="success"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var ScreencastService = new Lang.Class({
 | 
			
		||||
    Name: 'ScreencastService',
 | 
			
		||||
@@ -57,7 +56,7 @@ var ScreencastService = new Lang.Class({
 | 
			
		||||
        let recorder = this._recorders.get(sender);
 | 
			
		||||
        if (!recorder) {
 | 
			
		||||
            recorder = new Shell.Recorder({ stage: global.stage,
 | 
			
		||||
                                            display: global.display });
 | 
			
		||||
                                            screen: global.screen });
 | 
			
		||||
            recorder._watchNameId =
 | 
			
		||||
                Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
 | 
			
		||||
                                   this._onNameVanished.bind(this));
 | 
			
		||||
 
 | 
			
		||||
@@ -16,51 +16,47 @@ const Lightbox = imports.ui.lightbox;
 | 
			
		||||
const Main = imports.ui.main;
 | 
			
		||||
const Tweener = imports.ui.tweener;
 | 
			
		||||
 | 
			
		||||
const ScreenshotIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.Screenshot">
 | 
			
		||||
<method name="ScreenshotArea">
 | 
			
		||||
    <arg type="i" direction="in" name="x"/>
 | 
			
		||||
    <arg type="i" direction="in" name="y"/>
 | 
			
		||||
    <arg type="i" direction="in" name="width"/>
 | 
			
		||||
    <arg type="i" direction="in" name="height"/>
 | 
			
		||||
    <arg type="b" direction="in" name="flash"/>
 | 
			
		||||
    <arg type="s" direction="in" name="filename"/>
 | 
			
		||||
    <arg type="b" direction="out" name="success"/>
 | 
			
		||||
    <arg type="s" direction="out" name="filename_used"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="ScreenshotWindow">
 | 
			
		||||
    <arg type="b" direction="in" name="include_frame"/>
 | 
			
		||||
    <arg type="b" direction="in" name="include_cursor"/>
 | 
			
		||||
    <arg type="b" direction="in" name="flash"/>
 | 
			
		||||
    <arg type="s" direction="in" name="filename"/>
 | 
			
		||||
    <arg type="b" direction="out" name="success"/>
 | 
			
		||||
    <arg type="s" direction="out" name="filename_used"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="Screenshot">
 | 
			
		||||
    <arg type="b" direction="in" name="include_cursor"/>
 | 
			
		||||
    <arg type="b" direction="in" name="flash"/>
 | 
			
		||||
    <arg type="s" direction="in" name="filename"/>
 | 
			
		||||
    <arg type="b" direction="out" name="success"/>
 | 
			
		||||
    <arg type="s" direction="out" name="filename_used"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="SelectArea">
 | 
			
		||||
    <arg type="i" direction="out" name="x"/>
 | 
			
		||||
    <arg type="i" direction="out" name="y"/>
 | 
			
		||||
    <arg type="i" direction="out" name="width"/>
 | 
			
		||||
    <arg type="i" direction="out" name="height"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="FlashArea">
 | 
			
		||||
    <arg type="i" direction="in" name="x"/>
 | 
			
		||||
    <arg type="i" direction="in" name="y"/>
 | 
			
		||||
    <arg type="i" direction="in" name="width"/>
 | 
			
		||||
    <arg type="i" direction="in" name="height"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="PickColor">
 | 
			
		||||
    <arg type="a{sv}" direction="out" name="result"/>
 | 
			
		||||
</method>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const ScreenshotIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.Screenshot"> \
 | 
			
		||||
<method name="ScreenshotArea"> \
 | 
			
		||||
    <arg type="i" direction="in" name="x"/> \
 | 
			
		||||
    <arg type="i" direction="in" name="y"/> \
 | 
			
		||||
    <arg type="i" direction="in" name="width"/> \
 | 
			
		||||
    <arg type="i" direction="in" name="height"/> \
 | 
			
		||||
    <arg type="b" direction="in" name="flash"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="filename"/> \
 | 
			
		||||
    <arg type="b" direction="out" name="success"/> \
 | 
			
		||||
    <arg type="s" direction="out" name="filename_used"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="ScreenshotWindow"> \
 | 
			
		||||
    <arg type="b" direction="in" name="include_frame"/> \
 | 
			
		||||
    <arg type="b" direction="in" name="include_cursor"/> \
 | 
			
		||||
    <arg type="b" direction="in" name="flash"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="filename"/> \
 | 
			
		||||
    <arg type="b" direction="out" name="success"/> \
 | 
			
		||||
    <arg type="s" direction="out" name="filename_used"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="Screenshot"> \
 | 
			
		||||
    <arg type="b" direction="in" name="include_cursor"/> \
 | 
			
		||||
    <arg type="b" direction="in" name="flash"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="filename"/> \
 | 
			
		||||
    <arg type="b" direction="out" name="success"/> \
 | 
			
		||||
    <arg type="s" direction="out" name="filename_used"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="SelectArea"> \
 | 
			
		||||
    <arg type="i" direction="out" name="x"/> \
 | 
			
		||||
    <arg type="i" direction="out" name="y"/> \
 | 
			
		||||
    <arg type="i" direction="out" name="width"/> \
 | 
			
		||||
    <arg type="i" direction="out" name="height"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="FlashArea"> \
 | 
			
		||||
    <arg type="i" direction="in" name="x"/> \
 | 
			
		||||
    <arg type="i" direction="in" name="y"/> \
 | 
			
		||||
    <arg type="i" direction="in" name="width"/> \
 | 
			
		||||
    <arg type="i" direction="in" name="height"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var ScreenshotService = new Lang.Class({
 | 
			
		||||
    Name: 'ScreenshotService',
 | 
			
		||||
@@ -76,13 +72,10 @@ var ScreenshotService = new Lang.Class({
 | 
			
		||||
        Gio.DBus.session.own_name('org.gnome.Shell.Screenshot', Gio.BusNameOwnerFlags.REPLACE, null, null);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _createScreenshot(invocation, needsDisk=true) {
 | 
			
		||||
        let lockedDown = false;
 | 
			
		||||
        if (needsDisk)
 | 
			
		||||
            lockedDown = this._lockdownSettings.get_boolean('disable-save-to-disk')
 | 
			
		||||
 | 
			
		||||
    _createScreenshot(invocation) {
 | 
			
		||||
        let sender = invocation.get_sender();
 | 
			
		||||
        if (this._screenShooter.has(sender) || lockedDown) {
 | 
			
		||||
        if (this._screenShooter.has(sender) ||
 | 
			
		||||
            this._lockdownSettings.get_boolean('disable-save-to-disk')) {
 | 
			
		||||
            invocation.return_value(GLib.Variant.new('(bs)', [false, '']));
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
@@ -117,7 +110,7 @@ var ScreenshotService = new Lang.Class({
 | 
			
		||||
               y + height <= global.screen_height;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onScreenshotComplete(result, area, filenameUsed, flash, invocation) {
 | 
			
		||||
    _onScreenshotComplete(obj, result, area, filenameUsed, flash, invocation) {
 | 
			
		||||
        if (result) {
 | 
			
		||||
            if (flash) {
 | 
			
		||||
                let flashspot = new Flashspot(area);
 | 
			
		||||
@@ -164,15 +157,9 @@ var ScreenshotService = new Lang.Class({
 | 
			
		||||
        if (!screenshot)
 | 
			
		||||
            return;
 | 
			
		||||
        screenshot.screenshot_area (x, y, width, height, filename,
 | 
			
		||||
            (o, res) => {
 | 
			
		||||
                try {
 | 
			
		||||
                    let [result, area, filenameUsed] =
 | 
			
		||||
                        screenshot.screenshot_area_finish(res);
 | 
			
		||||
                    this._onScreenshotComplete(result, area, filenameUsed,
 | 
			
		||||
                                               flash, invocation);
 | 
			
		||||
                } catch (e) {
 | 
			
		||||
                    invocation.return_gerror (e);
 | 
			
		||||
                }
 | 
			
		||||
            (obj, result, area, filenameUsed) => {
 | 
			
		||||
                this._onScreenshotComplete(obj, result, area, filenameUsed,
 | 
			
		||||
                                           flash, invocation);
 | 
			
		||||
            });
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@@ -182,15 +169,9 @@ var ScreenshotService = new Lang.Class({
 | 
			
		||||
        if (!screenshot)
 | 
			
		||||
            return;
 | 
			
		||||
        screenshot.screenshot_window (include_frame, include_cursor, filename,
 | 
			
		||||
            (o, res) => {
 | 
			
		||||
                try {
 | 
			
		||||
                    let [result, area, filenameUsed] =
 | 
			
		||||
                        screenshot.screenshot_window_finish(res);
 | 
			
		||||
                    this._onScreenshotComplete(result, area, filenameUsed,
 | 
			
		||||
                                               flash, invocation);
 | 
			
		||||
                } catch (e) {
 | 
			
		||||
                    invocation.return_gerror (e);
 | 
			
		||||
                }
 | 
			
		||||
            (obj, result, area, filenameUsed) => {
 | 
			
		||||
                this._onScreenshotComplete(obj, result, area, filenameUsed,
 | 
			
		||||
                                           flash, invocation);
 | 
			
		||||
            });
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@@ -200,15 +181,9 @@ var ScreenshotService = new Lang.Class({
 | 
			
		||||
        if (!screenshot)
 | 
			
		||||
            return;
 | 
			
		||||
        screenshot.screenshot(include_cursor, filename,
 | 
			
		||||
            (o, res) => {
 | 
			
		||||
                try {
 | 
			
		||||
                    let [result, area, filenameUsed] =
 | 
			
		||||
                        screenshot.screenshot_finish(res);
 | 
			
		||||
                    this._onScreenshotComplete(result, area, filenameUsed,
 | 
			
		||||
                                               flash, invocation);
 | 
			
		||||
                } catch (e) {
 | 
			
		||||
                    invocation.return_gerror (e);
 | 
			
		||||
                }
 | 
			
		||||
            (obj, result, area, filenameUsed) => {
 | 
			
		||||
                this._onScreenshotComplete(obj, result, area, filenameUsed,
 | 
			
		||||
                                           flash, invocation);
 | 
			
		||||
            });
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@@ -240,34 +215,6 @@ var ScreenshotService = new Lang.Class({
 | 
			
		||||
        let flashspot = new Flashspot({ x : x, y : y, width: width, height: height});
 | 
			
		||||
        flashspot.fire();
 | 
			
		||||
        invocation.return_value(null);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    PickColorAsync(params, invocation) {
 | 
			
		||||
        let pickPixel = new PickPixel();
 | 
			
		||||
        pickPixel.show();
 | 
			
		||||
        pickPixel.connect('finished', (pickPixel, coords) => {
 | 
			
		||||
            if (coords) {
 | 
			
		||||
                let screenshot = this._createScreenshot(invocation, false);
 | 
			
		||||
                if (!screenshot)
 | 
			
		||||
                    return;
 | 
			
		||||
                screenshot.pick_color(...coords, (o, res) => {
 | 
			
		||||
                    let [success, color] = screenshot.pick_color_finish(res);
 | 
			
		||||
                    let { red, green, blue } = color;
 | 
			
		||||
                    let retval = GLib.Variant.new('(a{sv})', [{
 | 
			
		||||
                        color: GLib.Variant.new('(ddd)', [
 | 
			
		||||
                            red / 255.0,
 | 
			
		||||
                            green / 255.0,
 | 
			
		||||
                            blue / 255.0
 | 
			
		||||
                        ])
 | 
			
		||||
                    }]);
 | 
			
		||||
                    this._removeShooterForSender(invocation.get_sender());
 | 
			
		||||
                    invocation.return_value(retval);
 | 
			
		||||
                });
 | 
			
		||||
            } else {
 | 
			
		||||
                invocation.return_error_literal(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED,
 | 
			
		||||
                    "Operation was cancelled");
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
@@ -314,7 +261,7 @@ var SelectArea = new Lang.Class({
 | 
			
		||||
                                     onUngrab: this._onUngrab.bind(this) }))
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        global.display.set_cursor(Meta.Cursor.CROSSHAIR);
 | 
			
		||||
        global.screen.set_cursor(Meta.Cursor.CROSSHAIR);
 | 
			
		||||
        Main.uiGroup.set_child_above_sibling(this._group, null);
 | 
			
		||||
        this._group.visible = true;
 | 
			
		||||
    },
 | 
			
		||||
@@ -383,7 +330,7 @@ var SelectArea = new Lang.Class({
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onUngrab() {
 | 
			
		||||
        global.display.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
        global.screen.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
        this.emit('finished', this._result);
 | 
			
		||||
 | 
			
		||||
        GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
 | 
			
		||||
@@ -394,54 +341,6 @@ var SelectArea = new Lang.Class({
 | 
			
		||||
});
 | 
			
		||||
Signals.addSignalMethods(SelectArea.prototype);
 | 
			
		||||
 | 
			
		||||
var PickPixel = new Lang.Class({
 | 
			
		||||
    Name: 'PickPixel',
 | 
			
		||||
 | 
			
		||||
    _init() {
 | 
			
		||||
        this._result = null;
 | 
			
		||||
 | 
			
		||||
        this._group = new St.Widget({ visible: false,
 | 
			
		||||
                                      reactive: true });
 | 
			
		||||
        Main.uiGroup.add_actor(this._group);
 | 
			
		||||
 | 
			
		||||
        this._grabHelper = new GrabHelper.GrabHelper(this._group);
 | 
			
		||||
 | 
			
		||||
        this._group.connect('button-release-event',
 | 
			
		||||
                            this._onButtonRelease.bind(this));
 | 
			
		||||
 | 
			
		||||
        let constraint = new Clutter.BindConstraint({ source: global.stage,
 | 
			
		||||
                                                      coordinate: Clutter.BindCoordinate.ALL });
 | 
			
		||||
        this._group.add_constraint(constraint);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    show() {
 | 
			
		||||
        if (!this._grabHelper.grab({ actor: this._group,
 | 
			
		||||
                                     onUngrab: this._onUngrab.bind(this) }))
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        global.display.set_cursor(Meta.Cursor.CROSSHAIR);
 | 
			
		||||
        Main.uiGroup.set_child_above_sibling(this._group, null);
 | 
			
		||||
        this._group.visible = true;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onButtonRelease(actor, event) {
 | 
			
		||||
        this._result = event.get_coords();
 | 
			
		||||
        this._grabHelper.ungrab();
 | 
			
		||||
        return Clutter.EVENT_PROPAGATE;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _onUngrab() {
 | 
			
		||||
        global.display.set_cursor(Meta.Cursor.DEFAULT);
 | 
			
		||||
        this.emit('finished', this._result);
 | 
			
		||||
 | 
			
		||||
        GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
 | 
			
		||||
            this._group.destroy();
 | 
			
		||||
            return GLib.SOURCE_REMOVE;
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
Signals.addSignalMethods(PickPixel.prototype);
 | 
			
		||||
 | 
			
		||||
var FLASHSPOT_ANIMATION_OUT_TIME = 0.5; // seconds
 | 
			
		||||
 | 
			
		||||
var Flashspot = new Lang.Class({
 | 
			
		||||
 
 | 
			
		||||
@@ -68,20 +68,19 @@ function waitLeisure() {
 | 
			
		||||
    return callback => { cb = callback; };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const PerfHelperIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.PerfHelper">
 | 
			
		||||
<method name="CreateWindow">
 | 
			
		||||
    <arg type="i" direction="in" />
 | 
			
		||||
    <arg type="i" direction="in" />
 | 
			
		||||
    <arg type="b" direction="in" />
 | 
			
		||||
    <arg type="b" direction="in" />
 | 
			
		||||
    <arg type="b" direction="in" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="WaitWindows" />
 | 
			
		||||
<method name="DestroyWindows" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const PerfHelperIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.PerfHelper"> \
 | 
			
		||||
<method name="CreateWindow"> \
 | 
			
		||||
    <arg type="i" direction="in" /> \
 | 
			
		||||
    <arg type="i" direction="in" /> \
 | 
			
		||||
    <arg type="b" direction="in" /> \
 | 
			
		||||
    <arg type="b" direction="in" /> \
 | 
			
		||||
    <arg type="b" direction="in" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="WaitWindows" /> \
 | 
			
		||||
<method name="DestroyWindows" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var PerfHelperProxy = Gio.DBusProxy.makeProxyWrapper(PerfHelperIface);
 | 
			
		||||
function PerfHelper() {
 | 
			
		||||
@@ -217,14 +216,12 @@ function _step(g, finish, onError) {
 | 
			
		||||
                         if (onError)
 | 
			
		||||
                             onError(err);
 | 
			
		||||
                     });
 | 
			
		||||
    } catch (err if err instanceof StopIteration) {
 | 
			
		||||
        if (finish)
 | 
			
		||||
            finish();
 | 
			
		||||
    } catch (err) {
 | 
			
		||||
        if (err instanceof StopIteration) {
 | 
			
		||||
            if (finish)
 | 
			
		||||
                finish();
 | 
			
		||||
        } else {
 | 
			
		||||
            if (onError)
 | 
			
		||||
                onError(err);
 | 
			
		||||
        }
 | 
			
		||||
        if (onError)
 | 
			
		||||
            onError(err);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -117,8 +117,6 @@ function _loadMode(file, info) {
 | 
			
		||||
    let fileContent, success, tag, newMode;
 | 
			
		||||
    try {
 | 
			
		||||
        [success, fileContent, tag] = file.load_contents(null);
 | 
			
		||||
        if (fileContent instanceof Uint8Array)
 | 
			
		||||
            fileContent = imports.byteArray.toString(fileContent);
 | 
			
		||||
        newMode = JSON.parse(fileContent);
 | 
			
		||||
    } catch(e) {
 | 
			
		||||
        return;
 | 
			
		||||
 
 | 
			
		||||
@@ -14,72 +14,70 @@ const Main = imports.ui.main;
 | 
			
		||||
const Screenshot = imports.ui.screenshot;
 | 
			
		||||
const ViewSelector = imports.ui.viewSelector;
 | 
			
		||||
 | 
			
		||||
const GnomeShellIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell">
 | 
			
		||||
<method name="Eval">
 | 
			
		||||
    <arg type="s" direction="in" name="script" />
 | 
			
		||||
    <arg type="b" direction="out" name="success" />
 | 
			
		||||
    <arg type="s" direction="out" name="result" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="FocusSearch"/>
 | 
			
		||||
<method name="ShowOSD">
 | 
			
		||||
    <arg type="a{sv}" direction="in" name="params"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="ShowMonitorLabels">
 | 
			
		||||
    <arg type="a{uv}" direction="in" name="params" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="ShowMonitorLabels2">
 | 
			
		||||
    <arg type="a{sv}" direction="in" name="params" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="HideMonitorLabels" />
 | 
			
		||||
<method name="FocusApp">
 | 
			
		||||
    <arg type="s" direction="in" name="id"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="ShowApplications" />
 | 
			
		||||
<method name="GrabAccelerator">
 | 
			
		||||
    <arg type="s" direction="in" name="accelerator"/>
 | 
			
		||||
    <arg type="u" direction="in" name="flags"/>
 | 
			
		||||
    <arg type="u" direction="out" name="action"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GrabAccelerators">
 | 
			
		||||
    <arg type="a(su)" direction="in" name="accelerators"/>
 | 
			
		||||
    <arg type="au" direction="out" name="actions"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="UngrabAccelerator">
 | 
			
		||||
    <arg type="u" direction="in" name="action"/>
 | 
			
		||||
    <arg type="b" direction="out" name="success"/>
 | 
			
		||||
</method>
 | 
			
		||||
<signal name="AcceleratorActivated">
 | 
			
		||||
    <arg name="action" type="u" />
 | 
			
		||||
    <arg name="parameters" type="a{sv}" />
 | 
			
		||||
</signal>
 | 
			
		||||
<property name="Mode" type="s" access="read" />
 | 
			
		||||
<property name="OverviewActive" type="b" access="readwrite" />
 | 
			
		||||
<property name="ShellVersion" type="s" access="read" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const GnomeShellIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell"> \
 | 
			
		||||
<method name="Eval"> \
 | 
			
		||||
    <arg type="s" direction="in" name="script" /> \
 | 
			
		||||
    <arg type="b" direction="out" name="success" /> \
 | 
			
		||||
    <arg type="s" direction="out" name="result" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="FocusSearch"/> \
 | 
			
		||||
<method name="ShowOSD"> \
 | 
			
		||||
    <arg type="a{sv}" direction="in" name="params"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="ShowMonitorLabels"> \
 | 
			
		||||
    <arg type="a{uv}" direction="in" name="params" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="ShowMonitorLabels2"> \
 | 
			
		||||
    <arg type="a{sv}" direction="in" name="params" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="HideMonitorLabels" /> \
 | 
			
		||||
<method name="FocusApp"> \
 | 
			
		||||
    <arg type="s" direction="in" name="id"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="ShowApplications" /> \
 | 
			
		||||
<method name="GrabAccelerator"> \
 | 
			
		||||
    <arg type="s" direction="in" name="accelerator"/> \
 | 
			
		||||
    <arg type="u" direction="in" name="flags"/> \
 | 
			
		||||
    <arg type="u" direction="out" name="action"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GrabAccelerators"> \
 | 
			
		||||
    <arg type="a(su)" direction="in" name="accelerators"/> \
 | 
			
		||||
    <arg type="au" direction="out" name="actions"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="UngrabAccelerator"> \
 | 
			
		||||
    <arg type="u" direction="in" name="action"/> \
 | 
			
		||||
    <arg type="b" direction="out" name="success"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<signal name="AcceleratorActivated"> \
 | 
			
		||||
    <arg name="action" type="u" /> \
 | 
			
		||||
    <arg name="parameters" type="a{sv}" /> \
 | 
			
		||||
</signal> \
 | 
			
		||||
<property name="Mode" type="s" access="read" /> \
 | 
			
		||||
<property name="OverviewActive" type="b" access="readwrite" /> \
 | 
			
		||||
<property name="ShellVersion" type="s" access="read" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const ScreenSaverIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.ScreenSaver">
 | 
			
		||||
<method name="Lock">
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetActive">
 | 
			
		||||
    <arg name="active" direction="out" type="b" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="SetActive">
 | 
			
		||||
    <arg name="value" direction="in" type="b" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetActiveTime">
 | 
			
		||||
    <arg name="value" direction="out" type="u" />
 | 
			
		||||
</method>
 | 
			
		||||
<signal name="ActiveChanged">
 | 
			
		||||
    <arg name="new_value" type="b" />
 | 
			
		||||
</signal>
 | 
			
		||||
<signal name="WakeUpScreen" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const ScreenSaverIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.ScreenSaver"> \
 | 
			
		||||
<method name="Lock"> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetActive"> \
 | 
			
		||||
    <arg name="active" direction="out" type="b" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="SetActive"> \
 | 
			
		||||
    <arg name="value" direction="in" type="b" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetActiveTime"> \
 | 
			
		||||
    <arg name="value" direction="out" type="u" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<signal name="ActiveChanged"> \
 | 
			
		||||
    <arg name="new_value" type="b" /> \
 | 
			
		||||
</signal> \
 | 
			
		||||
<signal name="WakeUpScreen" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var GnomeShell = new Lang.Class({
 | 
			
		||||
    Name: 'GnomeShellDBus',
 | 
			
		||||
@@ -147,20 +145,15 @@ var GnomeShell = new Lang.Class({
 | 
			
		||||
        for (let param in params)
 | 
			
		||||
            params[param] = params[param].deep_unpack();
 | 
			
		||||
 | 
			
		||||
        let { monitor: monitorIndex,
 | 
			
		||||
              label,
 | 
			
		||||
              level,
 | 
			
		||||
              max_level: maxLevel,
 | 
			
		||||
              icon: serializedIcon } = params;
 | 
			
		||||
 | 
			
		||||
        if (monitorIndex === undefined)
 | 
			
		||||
            monitorIndex = -1;
 | 
			
		||||
        let monitorIndex = params['monitor'] || -1;
 | 
			
		||||
        let label = params['label'] || undefined;
 | 
			
		||||
        let level = params['level'] || undefined;
 | 
			
		||||
 | 
			
		||||
        let icon = null;
 | 
			
		||||
        if (serializedIcon)
 | 
			
		||||
            icon = Gio.Icon.new_for_string(serializedIcon);
 | 
			
		||||
        if (params['icon'])
 | 
			
		||||
            icon = Gio.Icon.new_for_string(params['icon']);
 | 
			
		||||
 | 
			
		||||
        Main.osdWindowManager.show(monitorIndex, icon, label, level, maxLevel);
 | 
			
		||||
        Main.osdWindowManager.show(monitorIndex, icon, label, level);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    FocusApp(id) {
 | 
			
		||||
@@ -295,44 +288,43 @@ var GnomeShell = new Lang.Class({
 | 
			
		||||
    ShellVersion: Config.PACKAGE_VERSION
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const GnomeShellExtensionsIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.Extensions">
 | 
			
		||||
<method name="ListExtensions">
 | 
			
		||||
    <arg type="a{sa{sv}}" direction="out" name="extensions" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetExtensionInfo">
 | 
			
		||||
    <arg type="s" direction="in" name="extension" />
 | 
			
		||||
    <arg type="a{sv}" direction="out" name="info" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="GetExtensionErrors">
 | 
			
		||||
    <arg type="s" direction="in" name="extension" />
 | 
			
		||||
    <arg type="as" direction="out" name="errors" />
 | 
			
		||||
</method>
 | 
			
		||||
<signal name="ExtensionStatusChanged">
 | 
			
		||||
    <arg type="s" name="uuid"/>
 | 
			
		||||
    <arg type="i" name="state"/>
 | 
			
		||||
    <arg type="s" name="error"/>
 | 
			
		||||
</signal>
 | 
			
		||||
<method name="InstallRemoteExtension">
 | 
			
		||||
    <arg type="s" direction="in" name="uuid"/>
 | 
			
		||||
    <arg type="s" direction="out" name="result"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="UninstallExtension">
 | 
			
		||||
    <arg type="s" direction="in" name="uuid"/>
 | 
			
		||||
    <arg type="b" direction="out" name="success"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="LaunchExtensionPrefs">
 | 
			
		||||
    <arg type="s" direction="in" name="uuid"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="ReloadExtension">
 | 
			
		||||
    <arg type="s" direction="in" name="uuid"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="CheckForUpdates">
 | 
			
		||||
</method>
 | 
			
		||||
<property name="ShellVersion" type="s" access="read" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const GnomeShellExtensionsIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.Extensions"> \
 | 
			
		||||
<method name="ListExtensions"> \
 | 
			
		||||
    <arg type="a{sa{sv}}" direction="out" name="extensions" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetExtensionInfo"> \
 | 
			
		||||
    <arg type="s" direction="in" name="extension" /> \
 | 
			
		||||
    <arg type="a{sv}" direction="out" name="info" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="GetExtensionErrors"> \
 | 
			
		||||
    <arg type="s" direction="in" name="extension" /> \
 | 
			
		||||
    <arg type="as" direction="out" name="errors" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<signal name="ExtensionStatusChanged"> \
 | 
			
		||||
    <arg type="s" name="uuid"/> \
 | 
			
		||||
    <arg type="i" name="state"/> \
 | 
			
		||||
    <arg type="s" name="error"/> \
 | 
			
		||||
</signal> \
 | 
			
		||||
<method name="InstallRemoteExtension"> \
 | 
			
		||||
    <arg type="s" direction="in" name="uuid"/> \
 | 
			
		||||
    <arg type="s" direction="out" name="result"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="UninstallExtension"> \
 | 
			
		||||
    <arg type="s" direction="in" name="uuid"/> \
 | 
			
		||||
    <arg type="b" direction="out" name="success"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="LaunchExtensionPrefs"> \
 | 
			
		||||
    <arg type="s" direction="in" name="uuid"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="ReloadExtension"> \
 | 
			
		||||
    <arg type="s" direction="in" name="uuid"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="CheckForUpdates"> \
 | 
			
		||||
</method> \
 | 
			
		||||
<property name="ShellVersion" type="s" access="read" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var GnomeShellExtensions = new Lang.Class({
 | 
			
		||||
    Name: 'GnomeShellExtensionsDBus',
 | 
			
		||||
 
 | 
			
		||||
@@ -436,39 +436,38 @@ var ShellProcessesDialog = new Lang.Class({
 | 
			
		||||
});
 | 
			
		||||
Signals.addSignalMethods(ShellProcessesDialog.prototype);
 | 
			
		||||
 | 
			
		||||
const GnomeShellMountOpIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.Gtk.MountOperationHandler">
 | 
			
		||||
<method name="AskPassword">
 | 
			
		||||
    <arg type="s" direction="in" name="object_id"/>
 | 
			
		||||
    <arg type="s" direction="in" name="message"/>
 | 
			
		||||
    <arg type="s" direction="in" name="icon_name"/>
 | 
			
		||||
    <arg type="s" direction="in" name="default_user"/>
 | 
			
		||||
    <arg type="s" direction="in" name="default_domain"/>
 | 
			
		||||
    <arg type="u" direction="in" name="flags"/>
 | 
			
		||||
    <arg type="u" direction="out" name="response"/>
 | 
			
		||||
    <arg type="a{sv}" direction="out" name="response_details"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="AskQuestion">
 | 
			
		||||
    <arg type="s" direction="in" name="object_id"/>
 | 
			
		||||
    <arg type="s" direction="in" name="message"/>
 | 
			
		||||
    <arg type="s" direction="in" name="icon_name"/>
 | 
			
		||||
    <arg type="as" direction="in" name="choices"/>
 | 
			
		||||
    <arg type="u" direction="out" name="response"/>
 | 
			
		||||
    <arg type="a{sv}" direction="out" name="response_details"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="ShowProcesses">
 | 
			
		||||
    <arg type="s" direction="in" name="object_id"/>
 | 
			
		||||
    <arg type="s" direction="in" name="message"/>
 | 
			
		||||
    <arg type="s" direction="in" name="icon_name"/>
 | 
			
		||||
    <arg type="ai" direction="in" name="application_pids"/>
 | 
			
		||||
    <arg type="as" direction="in" name="choices"/>
 | 
			
		||||
    <arg type="u" direction="out" name="response"/>
 | 
			
		||||
    <arg type="a{sv}" direction="out" name="response_details"/>
 | 
			
		||||
</method>
 | 
			
		||||
<method name="Close"/>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const GnomeShellMountOpIface = '<node> \
 | 
			
		||||
<interface name="org.Gtk.MountOperationHandler"> \
 | 
			
		||||
<method name="AskPassword"> \
 | 
			
		||||
    <arg type="s" direction="in" name="object_id"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="message"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="icon_name"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="default_user"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="default_domain"/> \
 | 
			
		||||
    <arg type="u" direction="in" name="flags"/> \
 | 
			
		||||
    <arg type="u" direction="out" name="response"/> \
 | 
			
		||||
    <arg type="a{sv}" direction="out" name="response_details"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="AskQuestion"> \
 | 
			
		||||
    <arg type="s" direction="in" name="object_id"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="message"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="icon_name"/> \
 | 
			
		||||
    <arg type="as" direction="in" name="choices"/> \
 | 
			
		||||
    <arg type="u" direction="out" name="response"/> \
 | 
			
		||||
    <arg type="a{sv}" direction="out" name="response_details"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="ShowProcesses"> \
 | 
			
		||||
    <arg type="s" direction="in" name="object_id"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="message"/> \
 | 
			
		||||
    <arg type="s" direction="in" name="icon_name"/> \
 | 
			
		||||
    <arg type="ai" direction="in" name="application_pids"/> \
 | 
			
		||||
    <arg type="as" direction="in" name="choices"/> \
 | 
			
		||||
    <arg type="u" direction="out" name="response"/> \
 | 
			
		||||
    <arg type="a{sv}" direction="out" name="response_details"/> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="Close"/> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var ShellMountOperationType = {
 | 
			
		||||
    NONE: 0,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										109
									
								
								js/ui/slider.js
									
									
									
									
									
								
							
							
						
						
									
										109
									
								
								js/ui/slider.js
									
									
									
									
									
								
							@@ -7,38 +7,55 @@ const Lang = imports.lang;
 | 
			
		||||
const St = imports.gi.St;
 | 
			
		||||
const Signals = imports.signals;
 | 
			
		||||
 | 
			
		||||
const BarLevel = imports.ui.barLevel;
 | 
			
		||||
 | 
			
		||||
var SLIDER_SCROLL_STEP = 0.02; /* Slider scrolling step in % */
 | 
			
		||||
 | 
			
		||||
var Slider = new Lang.Class({
 | 
			
		||||
    Name: "Slider",
 | 
			
		||||
    Extends: BarLevel.BarLevel,
 | 
			
		||||
 | 
			
		||||
    _init(value) {
 | 
			
		||||
        let params = {
 | 
			
		||||
            styleClass: 'slider',
 | 
			
		||||
            canFocus: true,
 | 
			
		||||
            reactive: true,
 | 
			
		||||
            accessibleRole: Atk.Role.SLIDER,
 | 
			
		||||
        }
 | 
			
		||||
        this.parent(value, params)
 | 
			
		||||
        if (isNaN(value))
 | 
			
		||||
            // Avoid spreading NaNs around
 | 
			
		||||
            throw TypeError('The slider value must be a number');
 | 
			
		||||
        this._value = Math.max(Math.min(value, 1), 0);
 | 
			
		||||
        this._sliderWidth = 0;
 | 
			
		||||
 | 
			
		||||
        this.actor = new St.DrawingArea({ style_class: 'slider',
 | 
			
		||||
                                          can_focus: true,
 | 
			
		||||
                                          reactive: true,
 | 
			
		||||
                                          accessible_role: Atk.Role.SLIDER });
 | 
			
		||||
        this.actor.connect('repaint', this._sliderRepaint.bind(this));
 | 
			
		||||
        this.actor.connect('button-press-event', this._startDragging.bind(this));
 | 
			
		||||
        this.actor.connect('touch-event', this._touchDragging.bind(this));
 | 
			
		||||
        this.actor.connect('scroll-event', this._onScrollEvent.bind(this));
 | 
			
		||||
        this.actor.connect('key-press-event', this.onKeyPressEvent.bind(this));
 | 
			
		||||
        this.actor.connect('allocation-changed', (actor, box) => {
 | 
			
		||||
            this._sliderWidth = box.get_width();
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        this._releaseId = this._motionId = 0;
 | 
			
		||||
        this._dragging = false;
 | 
			
		||||
 | 
			
		||||
        this._customAccessible = St.GenericAccessible.new_for_actor(this.actor);
 | 
			
		||||
        this.actor.set_accessible(this._customAccessible);
 | 
			
		||||
 | 
			
		||||
        this._customAccessible.connect('get-current-value', this._getCurrentValue.bind(this));
 | 
			
		||||
        this._customAccessible.connect('get-minimum-value', this._getMinimumValue.bind(this));
 | 
			
		||||
        this._customAccessible.connect('get-maximum-value', this._getMaximumValue.bind(this));
 | 
			
		||||
        this._customAccessible.connect('get-minimum-increment', this._getMinimumIncrement.bind(this));
 | 
			
		||||
        this._customAccessible.connect('set-current-value', this._setCurrentValue.bind(this));
 | 
			
		||||
 | 
			
		||||
        this.connect('value-changed', this._valueChanged.bind(this));
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _barLevelRepaint(area) {
 | 
			
		||||
        this.parent(area);
 | 
			
		||||
    setValue(value) {
 | 
			
		||||
        if (isNaN(value))
 | 
			
		||||
            throw TypeError('The slider value must be a number');
 | 
			
		||||
 | 
			
		||||
        // Add handle
 | 
			
		||||
        this._value = Math.max(Math.min(value, 1), 0);
 | 
			
		||||
        this.actor.queue_repaint();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _sliderRepaint(area) {
 | 
			
		||||
        let cr = area.get_context();
 | 
			
		||||
        let themeNode = area.get_theme_node();
 | 
			
		||||
        let [width, height] = area.get_surface_size();
 | 
			
		||||
@@ -49,9 +66,41 @@ var Slider = new Lang.Class({
 | 
			
		||||
        let [hasHandleColor, handleBorderColor] =
 | 
			
		||||
            themeNode.lookup_color('-slider-handle-border-color', false);
 | 
			
		||||
 | 
			
		||||
        let sliderHeight = themeNode.get_length('-slider-height');
 | 
			
		||||
 | 
			
		||||
        let sliderBorderWidth = themeNode.get_length('-slider-border-width');
 | 
			
		||||
        let sliderBorderRadius = Math.min(width, sliderHeight) / 2;
 | 
			
		||||
 | 
			
		||||
        let sliderBorderColor = themeNode.get_color('-slider-border-color');
 | 
			
		||||
        let sliderColor = themeNode.get_color('-slider-background-color');
 | 
			
		||||
 | 
			
		||||
        let sliderActiveBorderColor = themeNode.get_color('-slider-active-border-color');
 | 
			
		||||
        let sliderActiveColor = themeNode.get_color('-slider-active-background-color');
 | 
			
		||||
 | 
			
		||||
        const TAU = Math.PI * 2;
 | 
			
		||||
 | 
			
		||||
        let handleX = handleRadius + (width - 2 * handleRadius) * this._value / this._maxValue;
 | 
			
		||||
        let handleX = handleRadius + (width - 2 * handleRadius) * this._value;
 | 
			
		||||
 | 
			
		||||
        cr.arc(sliderBorderRadius + sliderBorderWidth, height / 2, sliderBorderRadius, TAU * 1/4, TAU * 3/4);
 | 
			
		||||
        cr.lineTo(handleX, (height - sliderHeight) / 2);
 | 
			
		||||
        cr.lineTo(handleX, (height + sliderHeight) / 2);
 | 
			
		||||
        cr.lineTo(sliderBorderRadius + sliderBorderWidth, (height + sliderHeight) / 2);
 | 
			
		||||
        Clutter.cairo_set_source_color(cr, sliderActiveColor);
 | 
			
		||||
        cr.fillPreserve();
 | 
			
		||||
        Clutter.cairo_set_source_color(cr, sliderActiveBorderColor);
 | 
			
		||||
        cr.setLineWidth(sliderBorderWidth);
 | 
			
		||||
        cr.stroke();
 | 
			
		||||
 | 
			
		||||
        cr.arc(width - sliderBorderRadius - sliderBorderWidth, height / 2, sliderBorderRadius, TAU * 3/4, TAU * 1/4);
 | 
			
		||||
        cr.lineTo(handleX, (height + sliderHeight) / 2);
 | 
			
		||||
        cr.lineTo(handleX, (height - sliderHeight) / 2);
 | 
			
		||||
        cr.lineTo(width - sliderBorderRadius - sliderBorderWidth, (height - sliderHeight) / 2);
 | 
			
		||||
        Clutter.cairo_set_source_color(cr, sliderColor);
 | 
			
		||||
        cr.fillPreserve();
 | 
			
		||||
        Clutter.cairo_set_source_color(cr, sliderBorderColor);
 | 
			
		||||
        cr.setLineWidth(sliderBorderWidth);
 | 
			
		||||
        cr.stroke();
 | 
			
		||||
 | 
			
		||||
        let handleY = height / 2;
 | 
			
		||||
 | 
			
		||||
        let color = themeNode.get_foreground_color();
 | 
			
		||||
@@ -159,7 +208,7 @@ var Slider = new Lang.Class({
 | 
			
		||||
            delta = -dy * SLIDER_SCROLL_STEP;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this._value = Math.min(Math.max(0, this._value + delta), this._maxValue);
 | 
			
		||||
        this._value = Math.min(Math.max(0, this._value + delta), 1);
 | 
			
		||||
 | 
			
		||||
        this.actor.queue_repaint();
 | 
			
		||||
        this.emit('value-changed', this._value);
 | 
			
		||||
@@ -181,7 +230,7 @@ var Slider = new Lang.Class({
 | 
			
		||||
        let key = event.get_key_symbol();
 | 
			
		||||
        if (key == Clutter.KEY_Right || key == Clutter.KEY_Left) {
 | 
			
		||||
            let delta = key == Clutter.KEY_Right ? 0.1 : -0.1;
 | 
			
		||||
            this._value = Math.max(0, Math.min(this._value + delta, this._maxValue));
 | 
			
		||||
            this._value = Math.max(0, Math.min(this._value + delta, 1));
 | 
			
		||||
            this.actor.queue_repaint();
 | 
			
		||||
            this.emit('drag-begin');
 | 
			
		||||
            this.emit('value-changed', this._value);
 | 
			
		||||
@@ -197,7 +246,7 @@ var Slider = new Lang.Class({
 | 
			
		||||
        relX = absX - sliderX;
 | 
			
		||||
        relY = absY - sliderY;
 | 
			
		||||
 | 
			
		||||
        let width = this._barLevelWidth;
 | 
			
		||||
        let width = this._sliderWidth;
 | 
			
		||||
        let handleRadius = this.actor.get_theme_node().get_length('-slider-handle-radius');
 | 
			
		||||
 | 
			
		||||
        let newvalue;
 | 
			
		||||
@@ -207,14 +256,38 @@ var Slider = new Lang.Class({
 | 
			
		||||
            newvalue = 1;
 | 
			
		||||
        else
 | 
			
		||||
            newvalue = (relX - handleRadius) / (width - 2 * handleRadius);
 | 
			
		||||
        this._value = newvalue * this._maxValue;
 | 
			
		||||
        this._value = newvalue;
 | 
			
		||||
        this.actor.queue_repaint();
 | 
			
		||||
        this.emit('value-changed', this._value);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getCurrentValue(actor) {
 | 
			
		||||
        return this._value;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getMinimumValue(actor) {
 | 
			
		||||
        return 0;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getMaximumValue(actor) {
 | 
			
		||||
        return 1;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _getMinimumIncrement(actor) {
 | 
			
		||||
        return 0.1;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _setCurrentValue(actor, value) {
 | 
			
		||||
        this._value = value;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _valueChanged(slider, value, property) {
 | 
			
		||||
        this._customAccessible.notify ("accessible-value");
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    get value() {
 | 
			
		||||
        return this._value;
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
Signals.addSignalMethods(Slider.prototype);
 | 
			
		||||
 
 | 
			
		||||
@@ -11,14 +11,13 @@ const PopupMenu = imports.ui.popupMenu;
 | 
			
		||||
const BUS_NAME = 'org.gnome.SettingsDaemon.Rfkill';
 | 
			
		||||
const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill';
 | 
			
		||||
 | 
			
		||||
const RfkillManagerInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.SettingsDaemon.Rfkill">
 | 
			
		||||
<property name="BluetoothAirplaneMode" type="b" access="readwrite" />
 | 
			
		||||
<property name="BluetoothHasAirplaneMode" type="b" access="read" />
 | 
			
		||||
<property name="BluetoothHardwareAirplaneMode" type="b" access="readwrite" />
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const RfkillManagerInterface = '<node> \
 | 
			
		||||
<interface name="org.gnome.SettingsDaemon.Rfkill"> \
 | 
			
		||||
<property name="BluetoothAirplaneMode" type="b" access="readwrite" /> \
 | 
			
		||||
<property name="BluetoothHasAirplaneMode" type="b" access="read" /> \
 | 
			
		||||
<property name="BluetoothHardwareAirplaneMode" type="b" access="readwrite" /> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const RfkillManagerProxy = Gio.DBusProxy.makeProxyWrapper(RfkillManagerInterface);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -11,12 +11,11 @@ const Slider = imports.ui.slider;
 | 
			
		||||
const BUS_NAME = 'org.gnome.SettingsDaemon.Power';
 | 
			
		||||
const OBJECT_PATH = '/org/gnome/SettingsDaemon/Power';
 | 
			
		||||
 | 
			
		||||
const BrightnessInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.SettingsDaemon.Power.Screen">
 | 
			
		||||
<property name="Brightness" type="i" access="readwrite"/>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const BrightnessInterface = '<node> \
 | 
			
		||||
<interface name="org.gnome.SettingsDaemon.Power.Screen"> \
 | 
			
		||||
<property name="Brightness" type="i" access="readwrite"/> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const BrightnessProxy = Gio.DBusProxy.makeProxyWrapper(BrightnessInterface);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -398,7 +398,7 @@ var InputSourceManager = new Lang.Class({
 | 
			
		||||
        return true;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _switchInputSource(display, window, binding) {
 | 
			
		||||
    _switchInputSource(display, screen, window, binding) {
 | 
			
		||||
        if (this._mruSources.length < 2)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -40,31 +40,29 @@ function accuracyLevelToString(accuracyLevel) {
 | 
			
		||||
    return 'NONE';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var GeoclueIface = `
 | 
			
		||||
<node>
 | 
			
		||||
  <interface name="org.freedesktop.GeoClue2.Manager">
 | 
			
		||||
    <property name="InUse" type="b" access="read"/>
 | 
			
		||||
    <property name="AvailableAccuracyLevel" type="u" access="read"/>
 | 
			
		||||
    <method name="AddAgent">
 | 
			
		||||
      <arg name="id" type="s" direction="in"/>
 | 
			
		||||
    </method>
 | 
			
		||||
  </interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
var GeoclueIface = '<node> \
 | 
			
		||||
  <interface name="org.freedesktop.GeoClue2.Manager"> \
 | 
			
		||||
    <property name="InUse" type="b" access="read"/> \
 | 
			
		||||
    <property name="AvailableAccuracyLevel" type="u" access="read"/> \
 | 
			
		||||
    <method name="AddAgent"> \
 | 
			
		||||
      <arg name="id" type="s" direction="in"/> \
 | 
			
		||||
    </method> \
 | 
			
		||||
  </interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const GeoclueManager = Gio.DBusProxy.makeProxyWrapper(GeoclueIface);
 | 
			
		||||
 | 
			
		||||
var AgentIface = `
 | 
			
		||||
<node>
 | 
			
		||||
  <interface name="org.freedesktop.GeoClue2.Agent">
 | 
			
		||||
    <property name="MaxAccuracyLevel" type="u" access="read"/>
 | 
			
		||||
    <method name="AuthorizeApp">
 | 
			
		||||
      <arg name="desktop_id" type="s" direction="in"/>
 | 
			
		||||
      <arg name="req_accuracy_level" type="u" direction="in"/>
 | 
			
		||||
      <arg name="authorized" type="b" direction="out"/>
 | 
			
		||||
      <arg name="allowed_accuracy_level" type="u" direction="out"/>
 | 
			
		||||
    </method>
 | 
			
		||||
  </interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
var AgentIface = '<node> \
 | 
			
		||||
  <interface name="org.freedesktop.GeoClue2.Agent"> \
 | 
			
		||||
    <property name="MaxAccuracyLevel" type="u" access="read"/> \
 | 
			
		||||
    <method name="AuthorizeApp"> \
 | 
			
		||||
      <arg name="desktop_id" type="s" direction="in"/> \
 | 
			
		||||
      <arg name="req_accuracy_level" type="u" direction="in"/> \
 | 
			
		||||
      <arg name="authorized" type="b" direction="out"/> \
 | 
			
		||||
      <arg name="allowed_accuracy_level" type="u" direction="out"/> \
 | 
			
		||||
    </method> \
 | 
			
		||||
  </interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
var Indicator = new Lang.Class({
 | 
			
		||||
    Name: 'LocationIndicator',
 | 
			
		||||
 
 | 
			
		||||
@@ -51,26 +51,25 @@ var PortalHelperResult = {
 | 
			
		||||
    RECHECK: 2
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const PortalHelperIface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.Shell.PortalHelper">
 | 
			
		||||
<method name="Authenticate">
 | 
			
		||||
    <arg type="o" direction="in" name="connection" />
 | 
			
		||||
    <arg type="s" direction="in" name="url" />
 | 
			
		||||
    <arg type="u" direction="in" name="timestamp" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="Close">
 | 
			
		||||
    <arg type="o" direction="in" name="connection" />
 | 
			
		||||
</method>
 | 
			
		||||
<method name="Refresh">
 | 
			
		||||
    <arg type="o" direction="in" name="connection" />
 | 
			
		||||
</method>
 | 
			
		||||
<signal name="Done">
 | 
			
		||||
    <arg type="o" name="connection" />
 | 
			
		||||
    <arg type="u" name="result" />
 | 
			
		||||
</signal>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const PortalHelperIface = '<node> \
 | 
			
		||||
<interface name="org.gnome.Shell.PortalHelper"> \
 | 
			
		||||
<method name="Authenticate"> \
 | 
			
		||||
    <arg type="o" direction="in" name="connection" /> \
 | 
			
		||||
    <arg type="s" direction="in" name="url" /> \
 | 
			
		||||
    <arg type="u" direction="in" name="timestamp" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="Close"> \
 | 
			
		||||
    <arg type="o" direction="in" name="connection" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<method name="Refresh"> \
 | 
			
		||||
    <arg type="o" direction="in" name="connection" /> \
 | 
			
		||||
</method> \
 | 
			
		||||
<signal name="Done"> \
 | 
			
		||||
    <arg type="o" name="connection" /> \
 | 
			
		||||
    <arg type="u" name="result" /> \
 | 
			
		||||
</signal> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
const PortalHelperProxy = Gio.DBusProxy.makeProxyWrapper(PortalHelperIface);
 | 
			
		||||
 | 
			
		||||
function signalToIcon(value) {
 | 
			
		||||
@@ -996,16 +995,8 @@ var NMWirelessDialog = new Lang.Class({
 | 
			
		||||
        else if (!oneHasConnection && twoHasConnection)
 | 
			
		||||
            return 1;
 | 
			
		||||
 | 
			
		||||
        let oneAp = one.accessPoints[0] || null;
 | 
			
		||||
        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;
 | 
			
		||||
        let oneStrength = one.accessPoints[0].strength;
 | 
			
		||||
        let twoStrength = two.accessPoints[0].strength;
 | 
			
		||||
 | 
			
		||||
        // place stronger connections first
 | 
			
		||||
        if (oneStrength != twoStrength)
 | 
			
		||||
@@ -1165,11 +1156,6 @@ var NMWirelessDialog = new Lang.Class({
 | 
			
		||||
            Util.ensureActorVisibleInScrollView(this._scrollView, network.item.actor);
 | 
			
		||||
            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();
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
@@ -1958,7 +1944,6 @@ var NMApplet = new Lang.Class({
 | 
			
		||||
        this.indicators.visible = this._client.nm_running;
 | 
			
		||||
        this.menu.actor.visible = this._client.networking_enabled;
 | 
			
		||||
 | 
			
		||||
        this._updateIcon();
 | 
			
		||||
        this._syncConnectivity();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -10,13 +10,12 @@ const PopupMenu = imports.ui.popupMenu;
 | 
			
		||||
const BUS_NAME = 'org.gnome.SettingsDaemon.Color';
 | 
			
		||||
const OBJECT_PATH = '/org/gnome/SettingsDaemon/Color';
 | 
			
		||||
 | 
			
		||||
const ColorInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.gnome.SettingsDaemon.Color">
 | 
			
		||||
  <property name="DisabledUntilTomorrow" type="b" access="readwrite"/>
 | 
			
		||||
  <property name="NightLightActive" type="b" access="read"/>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const ColorInterface = '<node> \
 | 
			
		||||
<interface name="org.gnome.SettingsDaemon.Color"> \
 | 
			
		||||
  <property name="DisabledUntilTomorrow" type="b" access="readwrite"/> \
 | 
			
		||||
  <property name="NightLightActive" type="b" access="read"/> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const ColorProxy = Gio.DBusProxy.makeProxyWrapper(ColorInterface);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -13,18 +13,17 @@ const PopupMenu = imports.ui.popupMenu;
 | 
			
		||||
const BUS_NAME = 'org.freedesktop.UPower';
 | 
			
		||||
const OBJECT_PATH = '/org/freedesktop/UPower/devices/DisplayDevice';
 | 
			
		||||
 | 
			
		||||
const DisplayDeviceInterface = `
 | 
			
		||||
<node>
 | 
			
		||||
<interface name="org.freedesktop.UPower.Device">
 | 
			
		||||
  <property name="Type" type="u" access="read"/>
 | 
			
		||||
  <property name="State" type="u" access="read"/>
 | 
			
		||||
  <property name="Percentage" type="d" access="read"/>
 | 
			
		||||
  <property name="TimeToEmpty" type="x" access="read"/>
 | 
			
		||||
  <property name="TimeToFull" type="x" access="read"/>
 | 
			
		||||
  <property name="IsPresent" type="b" access="read"/>
 | 
			
		||||
  <property name="IconName" type="s" access="read"/>
 | 
			
		||||
</interface>
 | 
			
		||||
</node>`;
 | 
			
		||||
const DisplayDeviceInterface = '<node> \
 | 
			
		||||
<interface name="org.freedesktop.UPower.Device"> \
 | 
			
		||||
  <property name="Type" type="u" access="read"/> \
 | 
			
		||||
  <property name="State" type="u" access="read"/> \
 | 
			
		||||
  <property name="Percentage" type="d" access="read"/> \
 | 
			
		||||
  <property name="TimeToEmpty" type="x" access="read"/> \
 | 
			
		||||
  <property name="TimeToFull" type="x" access="read"/> \
 | 
			
		||||
  <property name="IsPresent" type="b" access="read"/> \
 | 
			
		||||
  <property name="IconName" type="s" access="read"/> \
 | 
			
		||||
</interface> \
 | 
			
		||||
</node>';
 | 
			
		||||
 | 
			
		||||
const PowerManagerProxy = Gio.DBusProxy.makeProxyWrapper(DisplayDeviceInterface);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user