~ubuntu-branches/ubuntu/saucy/gnome-shell/saucy-proposed

« back to all changes in this revision

Viewing changes to js/ui/status/keyboard.js

Tags: upstream-3.3.90
ImportĀ upstreamĀ versionĀ 3.3.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
const PanelMenu = imports.ui.panelMenu;
15
15
const Util = imports.misc.util;
16
16
 
17
 
function LayoutMenuItem() {
18
 
    this._init.apply(this, arguments);
19
 
}
20
 
 
21
 
LayoutMenuItem.prototype = {
22
 
    __proto__: PopupMenu.PopupBaseMenuItem.prototype,
 
17
const LayoutMenuItem = new Lang.Class({
 
18
    Name: 'LayoutMenuItem',
 
19
    Extends: PopupMenu.PopupBaseMenuItem,
23
20
 
24
21
    _init: function(config, id, indicator, long_name) {
25
 
        PopupMenu.PopupBaseMenuItem.prototype._init.call(this);
 
22
        this.parent();
26
23
 
27
24
        this._config = config;
28
25
        this._id = id;
33
30
    },
34
31
 
35
32
    activate: function(event) {
36
 
        PopupMenu.PopupBaseMenuItem.prototype.activate.call(this);
 
33
        this.parent(event);
 
34
 
37
35
        this._config.lock_group(this._id);
38
36
    }
39
 
};
40
 
 
41
 
function XKBIndicator() {
42
 
    this._init.call(this);
43
 
}
44
 
 
45
 
XKBIndicator.prototype = {
46
 
    __proto__: PanelMenu.Button.prototype,
 
37
});
 
38
 
 
39
const XKBIndicator = new Lang.Class({
 
40
    Name: 'XKBIndicator',
 
41
    Extends: PanelMenu.Button,
47
42
 
48
43
    _init: function() {
49
 
        PanelMenu.Button.prototype._init.call(this, St.Align.START);
 
44
        this.parent(0.0);
50
45
 
51
46
        this._container = new Shell.GenericContainer();
52
47
        this._container.connect('get-preferred-width', Lang.bind(this, this._containerGetPreferredWidth));
221
216
        for (let i = 0; i < this._labelActors.length; i++)
222
217
            this._labelActors[i].allocate_align_fill(box, 0.5, 0, false, false, flags);
223
218
    }
224
 
};
 
219
});