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:
Giovanni Campagna
2011-11-20 15:38:48 +01:00
parent 2b57603271
commit 566bdb50c2
11 changed files with 73 additions and 111 deletions

View File

@ -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);
}
};
});