Trivial GTK3 porting fixes

Fix some trivial issues missed earlier: various missing imports,
some minor API changes to adapt to, do_size_request simple porting,
etc.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
This commit is contained in:
Daniel Drake
2011-12-15 01:23:18 +00:00
committed by Simon Schampijer
parent 827ab7218a
commit 15946211cf
14 changed files with 59 additions and 39 deletions
+7 -4
View File
@@ -354,10 +354,13 @@ class _TimeoutIcon(Gtk.Alignment):
self._draw(context)
return False
def do_size_request(self, requisition):
requisition.height, requisition.width = \
Gtk.icon_size_lookup(Gtk.IconSize.BUTTON)
self._text.size_request()
def do_get_preferred_width(self):
width = Gtk.icon_size_lookup(Gtk.IconSize.BUTTON)[1]
return width, width
def do_get_preferred_height(self):
height = Gtk.icon_size_lookup(Gtk.IconSize.BUTTON)[2]
return height, height
def _draw(self, context):
w = self.get_allocated_width()