Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-12-11 22:43:40 (GMT)
committer Daniel Drake <dsd@laptop.org>2011-12-11 22:43:40 (GMT)
commita3466555aba92de55c0d3d77571deaf56db11f6c (patch)
tree6801f9a18456542239967829d3163d6aba74fc76
parent776b76b743273878700e5f5fc406045b65dfcf88 (diff)
TrayViewport allocation fix for gtk3
-rw-r--r--src/sugar3/graphics/tray.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sugar3/graphics/tray.py b/src/sugar3/graphics/tray.py
index 7911fce..9ed0466 100644
--- a/src/sugar3/graphics/tray.py
+++ b/src/sugar3/graphics/tray.py
@@ -76,14 +76,15 @@ class _TrayViewport(Gtk.Viewport):
assert item in self.traybar.get_children()
# Get the allocation, and make sure that it is visible
+ allocation = item.get_allocation()
if self.orientation == Gtk.Orientation.HORIZONTAL:
adj = self.get_hadjustment()
- start = item.allocation.x
- stop = item.allocation.x + item.allocation.width
+ start = allocation.x
+ stop = allocation.x + allocation.width
else:
adj = self.get_vadjustment()
- start = item.allocation.y
- stop = item.allocation.y + item.allocation.height
+ start = allocation.y
+ stop = allocation.y + allocation.height
if start < adj.get_value():
adj.set_value(start)