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

@ -25,15 +25,12 @@ const ConsoleKit = imports.gdm.consoleKit;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
function PowerMenuButton() {
this._init();
}
PowerMenuButton.prototype = {
__proto__: PanelMenu.SystemStatusButton.prototype,
const PowerMenuButton = new Lang.Class({
Name: 'PowerMenuButton',
Extends: PanelMenu.SystemStatusButton,
_init: function() {
PanelMenu.SystemStatusButton.prototype._init.call(this, 'system-shutdown', null);
this.parent('system-shutdown', null);
this._consoleKitManager = new ConsoleKit.ConsoleKitManager();
this._upClient = new UPowerGlib.Client();
@ -143,4 +140,4 @@ PowerMenuButton.prototype = {
if (this._haveShutdown)
this._consoleKitManager.StopRemote();
}
};
});