From 536bc24f613b74b448b9a98dab9a6429e0442408 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Sun, 9 Nov 2008 18:01:59 +0000 Subject: [PATCH] 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 --- js/ui/overlay.js | 2 +- js/ui/panel.js | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/js/ui/overlay.js b/js/ui/overlay.js index 1e744d11f..4427ae7ab 100644 --- a/js/ui/overlay.js +++ b/js/ui/overlay.js @@ -5,6 +5,7 @@ const Meta = imports.gi.Meta; const Shell = imports.gi.Shell; const Tweener = imports.tweener.tweener; +const Main = imports.ui.main; const Panel = imports.ui.panel; const OVERLAY_BACKGROUND_COLOR = new Clutter.Color(); @@ -228,7 +229,6 @@ Overlay.prototype = { }, _deactivate : function() { - let Main = imports.ui.main; Main.hide_overlay(); } }; diff --git a/js/ui/panel.js b/js/ui/panel.js index f702a7c1d..3216746d0 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -5,10 +5,7 @@ const Mainloop = imports.mainloop; const Shell = imports.gi.Shell; const Clutter = imports.gi.Clutter; -// The mutual import here causes things to break in weird ways, -// (http://bugzilla.gnome.org/show_bug.cgi?id=558741) -// So we do a local import below -// const Main = imports.ui.main; +const Main = imports.ui.main; const PANEL_HEIGHT = 32; const PANEL_BACKGROUND_COLOR = new Clutter.Color(); @@ -46,9 +43,6 @@ Panel.prototype = { message.connect('button-press-event', function(o, event) { - // See comment above - let Main = imports.ui.main; - if (Main.overlay.visible) Main.hide_overlay(); else