From f20348a5fd9b585c239139113b7df40ae6d9db8c Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 16 Jan 2007 20:32:29 +0100 Subject: [PATCH] There are 4 different menu shells on the panel, check against the right one. --- shell/view/frame/Frame.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/shell/view/frame/Frame.py b/shell/view/frame/Frame.py index 92437fef..b0a19a8c 100644 --- a/shell/view/frame/Frame.py +++ b/shell/view/frame/Frame.py @@ -264,11 +264,11 @@ class Frame: panel.connect('enter-notify-event', self._enter_notify_cb) panel.connect('leave-notify-event', self._leave_notify_cb) - self._menu_shell = panel.get_menu_shell() - self._menu_shell.connect('activated', - self._menu_shell_activated_cb) - self._menu_shell.connect('deactivated', - self._menu_shell_deactivated_cb) + menu_shell = panel.get_menu_shell() + menu_shell.connect('activated', + self._menu_shell_activated_cb) + menu_shell.connect('deactivated', + self._menu_shell_deactivated_cb) def _menu_shell_activated_cb(self, menu_shell): self._timeline.goto('slide_in', True) @@ -287,7 +287,7 @@ class Frame: return True def _drag_leave_cb(self, window, drag_context, timestamp): - self._leave_notify() + self._leave_notify(window) logging.debug('Frame._drag_leave_cb ' + str(self._mode)) def _leave_notify_cb(self, window, event): @@ -295,16 +295,16 @@ class Frame: if event.state == gtk.gdk.BUTTON1_MASK: return - self._leave_notify() + self._leave_notify(window) logging.debug('Frame._leave_notify_cb ' + str(self._mode)) def _enter_notify(self): self._hover_frame = True self._timeline.goto('slide_in', True) - def _leave_notify(self): + def _leave_notify(self, panel): self._hover_frame = False - if not self._menu_shell.is_active() and \ + if not panel.get_menu_shell().is_active() and \ (self._mode == Frame.HIDE_ON_LEAVE or \ self._mode == Frame.AUTOMATIC): self._timeline.play('before_slide_out', 'slide_out')