Ticket #4253: 0001-Adapt-to-PaletteMenu-changes-for-popdown-on-item-act.patch

File 0001-Adapt-to-PaletteMenu-changes-for-popdown-on-item-act.patch, 2.3 KB (added by erikos, 10 years ago)

Adapt to PaletteMenu changes for popdown on item activation (shell)

  • extensions/deviceicon/frame.py

    From b33bf88002b7faf9eeb6ca8ff3332d0c5ab549d2 Mon Sep 17 00:00:00 2001
    From: Simon Schampijer <simon@laptop.org>
    Date: Mon, 10 Dec 2012 15:42:18 +0100
    Subject: [PATCH shell] Adapt to PaletteMenu changes for popdown on item
     activation, SL #4191 and SL #4253
    
    The toolkit now popdown the Palette when an
    item is activated. We do not have to do it manually
    any more.
    
    The Control Panel item code was setting the panel
    as transient on itself, this fails as the Palette
    vanishes after the item is activated. We are doing
    fine without setting the Control Panel transient on
    the Palette, which is wrong in any case.
    
    Signed-off-by: Simon Schampijer <simon@laptop.org>
    ---
     extensions/deviceicon/frame.py | 1 -
     src/jarabe/view/buddymenu.py   | 1 -
     src/jarabe/view/palettes.py    | 2 --
     3 files changed, 4 deletions(-)
    
    diff --git a/extensions/deviceicon/frame.py b/extensions/deviceicon/frame.py
    index cfc25bf..52e92ea 100644
    a b class DeviceView(TrayIcon): 
    5959        return palette
    6060
    6161    def __button_release_event_cb(self, widget, event):
    62         self.props.palette.popdown(immediate=True)
    6362        self._input_method.show()
    6463        frame = jarabe.frame.get_view()
    6564        frame.hide()
  • src/jarabe/view/buddymenu.py

    diff --git a/src/jarabe/view/buddymenu.py b/src/jarabe/view/buddymenu.py
    index e38d215..5e38cb9 100644
    a b class BuddyMenu(Palette): 
    133133
    134134        # show the control panel
    135135        panel = ControlPanel()
    136         panel.set_transient_for(self._widget.get_toplevel())
    137136        panel.show()
    138137
    139138    def _update_invite_menu(self, activity):
  • src/jarabe/view/palettes.py

    diff --git a/src/jarabe/view/palettes.py b/src/jarabe/view/palettes.py
    index cc15408..d61a250 100644
    a b class ActivityPalette(Palette): 
    163163        # TODO: start-with
    164164
    165165    def __start_activate_cb(self, menu_item):
    166         self.popdown(immediate=True)
    167166        misc.launch(self._activity_info)
    168167
    169168
    class VolumePalette(Palette): 
    271270        self.connect('popup', self.__popup_cb)
    272271
    273272    def __unmount_activate_cb(self, menu_item):
    274         self.popdown(immediate=True)
    275273        flags = 0
    276274        mount_operation = Gtk.MountOperation( \
    277275            parent=self.content_box.get_toplevel())