Palettes based in GtkMenu do not have present() method

There are two different palette widgets in Sugar.
_PaletteMenuWidget is a Gtk.Menu and  _PaletteWindowWidget is a Gtk.Window.
Only the palettes where the widget is a Gtk.Window can do present()
This commit is contained in:
Gonzalo Odiard 2015-05-15 18:34:17 -03:00 committed by Sam Parkinson
parent 5818721818
commit 2186c53aeb

View File

@ -189,7 +189,8 @@ class Palette(PaletteWindow):
def __map_cb(self, *args):
# Fixes #4463
self._widget.present()
if hasattr(self._widget, 'present'):
self._widget.present()
def __destroy_cb(self, palette):
self._secondary_anim.stop()