Port PanelMenu to new class framework
Second patch in the class framework, now it's the turn of PanelMenu (buttons, menus and status indicators). https://bugzilla.gnome.org/show_bug.cgi?id=664436
This commit is contained in:
@ -36,15 +36,12 @@ const LayoutMenuItem = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
function XKBIndicator() {
|
||||
this._init.call(this);
|
||||
}
|
||||
|
||||
XKBIndicator.prototype = {
|
||||
__proto__: PanelMenu.Button.prototype,
|
||||
const XKBIndicator = new Lang.Class({
|
||||
Name: 'XKBIndicator',
|
||||
Extends: PanelMenu.Button,
|
||||
|
||||
_init: function() {
|
||||
PanelMenu.Button.prototype._init.call(this, St.Align.START);
|
||||
this.parent(0.0);
|
||||
|
||||
this._container = new Shell.GenericContainer();
|
||||
this._container.connect('get-preferred-width', Lang.bind(this, this._containerGetPreferredWidth));
|
||||
@ -219,4 +216,4 @@ XKBIndicator.prototype = {
|
||||
for (let i = 0; i < this._labelActors.length; i++)
|
||||
this._labelActors[i].allocate_align_fill(box, 0.5, 0, false, false, flags);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
Reference in New Issue
Block a user