Ticket #4071: 0001-Hide-the-frame-when-My-Settings-is-shown-SL-4071.patch

File 0001-Hide-the-frame-when-My-Settings-is-shown-SL-4071.patch, 1.2 KB (added by humitos, 11 years ago)
  • src/jarabe/view/buddymenu.py

    From 08ab52dcf7b1fde7eb672dc2417e3b4724f0e221 Mon Sep 17 00:00:00 2001
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Thu, 29 Nov 2012 11:18:41 -0300
    Subject: [PATCH sugar] Hide the frame when 'My Settings' is shown SL #4071
    
    When the frame is popped up and the user clicks on 'My Settings', the
    frame is hidden and the Control Panel ModalAlert is shown.
    
    I had to import the frame module inside the menuitem activate callback
    because importing it at the top genereates an import recursion.
    
    Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
    ---
     src/jarabe/view/buddymenu.py | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/src/jarabe/view/buddymenu.py b/src/jarabe/view/buddymenu.py
    index 2d2a7fa..e38d215 100644
    a b class BuddyMenu(Palette): 
    126126        self._quit(get_session_manager().shutdown)
    127127
    128128    def __controlpanel_activate_cb(self, menu_item):
     129        # hide the frame when control panel is shown
     130        import jarabe.frame
     131        frame = jarabe.frame.get_view()
     132        frame.hide()
     133
     134        # show the control panel
    129135        panel = ControlPanel()
    130136        panel.set_transient_for(self._widget.get_toplevel())
    131137        panel.show()