[Sugar-devel] [PATCH sugar-toolkit-gtk3] Reimplement Palettes for GTK3
Simon Schampijer
simon at schampijer.de
Wed Dec 14 21:20:07 EST 2011
On 14/12/11 22:53, Daniel Drake wrote:
> Moving from GTK2 to GTK3 has presented various challenges regarding
> palettes.
There are two small things that have been introduced accidentally by
this patch, fixups are:
commit a7f1eb596ed3a4b63cab97fbc97c1a9aa0f9c813
Author: Simon Schampijer <simon at schampijer.de>
Date: Wed Dec 14 23:15:02 2011 -0300
tray: fixup Indententation error
diff --git a/src/sugar3/graphics/tray.py b/src/sugar3/graphics/tray.py
index ae8b772..f4bfb83 100644
--- a/src/sugar3/graphics/tray.py
+++ b/src/sugar3/graphics/tray.py
@@ -114,7 +114,7 @@ class _TrayViewport(Gtk.Viewport):
adj.set_value(max(adj.get_lower(), new_value))
def do_get_preferred_width(self):
- if self.orientation == Gtk.Orientation.HORIZONTAL:
+ if self.orientation == Gtk.Orientation.HORIZONTAL:
return Gtk.Viewport.do_get_preferred_width(self)
child_minimum, child_natural =
self.get_child().get_preferred_size()
return child_minimum.width, child_natural.width
commit 551710cb5ee8c8c66c0384e4c17b03aff33f780e
Author: Simon Schampijer <simon at schampijer.de>
Date: Wed Dec 14 23:14:12 2011 -0300
When the Invoker detaches the destroy method will be called
This has been removed accidentely
diff --git a/src/sugar3/graphics/palettewindow.py
b/src/sugar3/graphics/palettewindow.py
index fe0b5a1..ce13544 100644
--- a/src/sugar3/graphics/palettewindow.py
+++ b/src/sugar3/graphics/palettewindow.py
@@ -450,6 +450,10 @@ class PaletteWindow(GObject.GObject):
self._widget.disconnect_by_func(self.__leave_notify_cb)
self._set_effective_group_id(None)
+ def destroy(self):
+ if self._widget is not None:
+ self._widget.destroy()
+
def __destroy_cb(self, palette):
self._mouse_detector.disconnect_by_func(self._mouse_slow_cb)
More information about the Sugar-devel
mailing list