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-10-30 11:01:34 (GMT)
committer Sascha Silbe <silbe@activitycentral.com>2011-12-05 23:03:30 (GMT)
commit89c7f38768607cf035aa2c83784d88d565d0a216 (patch)
treefe08b609b02bc6ae9cdc0fbcdaf8c7bdc773fbb2
parentceb5d4e78d18bd206fcf8fc65d4f7aa3210bda07 (diff)
Tray: replace deprecated get_child_requisition() invocation
Widget.get_child_requisition() has been replaced by Widget.get_preferred_size() in GTK 3 [1]. [1] http://developer.gnome.org/gtk3/3.0/GtkWidget.html#gtk-widget-get-child-requisition [changed description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
-rw-r--r--src/sugar3/graphics/tray.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sugar3/graphics/tray.py b/src/sugar3/graphics/tray.py
index f14569b..07bf3e2 100644
--- a/src/sugar3/graphics/tray.py
+++ b/src/sugar3/graphics/tray.py
@@ -130,11 +130,11 @@ class _TrayViewport(Gtk.Viewport):
return self._can_scroll_prev
def _size_allocate_cb(self, viewport, allocation):
- bar_requisition = self.traybar.get_child_requisition()
+ bar_minimum, bar_natural = self.traybar.get_preferred_size()
if self.orientation == Gtk.Orientation.HORIZONTAL:
- scrollable = bar_requisition[0] > allocation.width
+ scrollable = bar_minimum.width > allocation.width
else:
- scrollable = bar_requisition[1] > allocation.height
+ scrollable = bar_minimum.height > allocation.height
if scrollable != self._scrollable:
self._scrollable = scrollable