Remove workarounds for mutual imports problems
Now that gjs Bug #558741 is fixed, we can import Main directly from the toplevel of overlay.js/panel.js without causing problems. svn path=/trunk/; revision=41
This commit is contained in:
parent
6a0c6a5df6
commit
536bc24f61
@ -5,6 +5,7 @@ const Meta = imports.gi.Meta;
|
|||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const Tweener = imports.tweener.tweener;
|
const Tweener = imports.tweener.tweener;
|
||||||
|
|
||||||
|
const Main = imports.ui.main;
|
||||||
const Panel = imports.ui.panel;
|
const Panel = imports.ui.panel;
|
||||||
|
|
||||||
const OVERLAY_BACKGROUND_COLOR = new Clutter.Color();
|
const OVERLAY_BACKGROUND_COLOR = new Clutter.Color();
|
||||||
@ -228,7 +229,6 @@ Overlay.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_deactivate : function() {
|
_deactivate : function() {
|
||||||
let Main = imports.ui.main;
|
|
||||||
Main.hide_overlay();
|
Main.hide_overlay();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -5,10 +5,7 @@ const Mainloop = imports.mainloop;
|
|||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
|
|
||||||
// The mutual import here causes things to break in weird ways,
|
const Main = imports.ui.main;
|
||||||
// (http://bugzilla.gnome.org/show_bug.cgi?id=558741)
|
|
||||||
// So we do a local import below
|
|
||||||
// const Main = imports.ui.main;
|
|
||||||
|
|
||||||
const PANEL_HEIGHT = 32;
|
const PANEL_HEIGHT = 32;
|
||||||
const PANEL_BACKGROUND_COLOR = new Clutter.Color();
|
const PANEL_BACKGROUND_COLOR = new Clutter.Color();
|
||||||
@ -46,9 +43,6 @@ Panel.prototype = {
|
|||||||
|
|
||||||
message.connect('button-press-event',
|
message.connect('button-press-event',
|
||||||
function(o, event) {
|
function(o, event) {
|
||||||
// See comment above
|
|
||||||
let Main = imports.ui.main;
|
|
||||||
|
|
||||||
if (Main.overlay.visible)
|
if (Main.overlay.visible)
|
||||||
Main.hide_overlay();
|
Main.hide_overlay();
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user