Resolve cyclic dependency on StatusMenu

Solved by splitting the base class (PanelMenuButton) in a separate
module, ui.panelMenu, which is meant to hold also other reusable
button classes.

https://bugzilla.gnome.org/show_bug.cgi?id=621705
This commit is contained in:
Giovanni Campagna
2010-06-22 23:02:26 +02:00
committed by Dan Winship
parent d2902cb70f
commit 5a7201ef4d
4 changed files with 48 additions and 41 deletions

View File

@ -11,6 +11,7 @@ const _ = Gettext.gettext;
const GnomeSession = imports.misc.gnomeSession;
const Main = imports.ui.main;
const Panel = imports.ui.panel;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
// Adapted from gdm/gui/user-switch-applet/applet.c
@ -23,10 +24,10 @@ function StatusMenuButton() {
}
StatusMenuButton.prototype = {
__proto__: Panel.PanelMenuButton.prototype,
__proto__: PanelMenu.Button.prototype,
_init: function() {
Panel.PanelMenuButton.prototype._init.call(this, St.Align.START);
PanelMenu.Button.prototype._init.call(this, St.Align.START);
let box = new St.BoxLayout({ name: 'panelStatusMenu' });
this.actor.set_child(box);