diff options
Diffstat (limited to 'src/sugar3/graphics/window.py')
-rw-r--r-- | src/sugar3/graphics/window.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/sugar3/graphics/window.py b/src/sugar3/graphics/window.py index 0309bc4..3f6ee5b 100644 --- a/src/sugar3/graphics/window.py +++ b/src/sugar3/graphics/window.py @@ -22,6 +22,7 @@ STABLE. from gi.repository import GObject from gi.repository import Gtk +from gi.repository import Gdk import warnings from sugar3.graphics.icon import Icon @@ -45,11 +46,13 @@ class UnfullscreenButton(Gtk.Window): self.props.accept_focus = False #Setup estimate of width, height - w, h = Gtk.icon_size_lookup(Gtk.IconSize.LARGE_TOOLBAR) + ret, w, h = Gtk.icon_size_lookup(Gtk.IconSize.LARGE_TOOLBAR) self._width = w self._height = h - self.connect('size-request', self._size_request_cb) + #TODO: 'size-request' is not available anymore + # see http://developer.gnome.org/gtk3/3.2/ch25s02.html + #self.connect('size-request', self._size_request_cb) screen = self.get_screen() screen.connect('size-changed', self._screen_size_changed_cb) @@ -191,7 +194,7 @@ class Window(Gtk.Window): self.__vbox.remove(self._toolbar_box) if toolbar_box: - self.__vbox.pack_start(toolbar_box, False) + self.__vbox.pack_start(toolbar_box, False, False, 0) self.__vbox.reorder_child(toolbar_box, 0) self._toolbar_box = toolbar_box @@ -204,18 +207,18 @@ class Window(Gtk.Window): box.remove(self.tray) if position == Gtk.PositionType.LEFT: - self.__hbox.pack_start(tray, False) + self.__hbox.pack_start(tray, False, False, 0) elif position == Gtk.PositionType.RIGHT: - self.__hbox.pack_end(tray, False) + self.__hbox.pack_end(tray, False, False, 0) elif position == Gtk.PositionType.BOTTOM: - self.__vbox.pack_end(tray, False) + self.__vbox.pack_end(tray, False, False, 0) self.tray = tray def add_alert(self, alert): self._alerts.append(alert) if len(self._alerts) == 1: - self.__vbox.pack_start(alert, False) + self.__vbox.pack_start(alert, False, False, 0) if self._toolbar_box is not None: self.__vbox.reorder_child(alert, 1) else: @@ -228,7 +231,7 @@ class Window(Gtk.Window): if alert.get_parent() is not None: self.__vbox.remove(alert) if len(self._alerts) >= 1: - self.__vbox.pack_start(self._alerts[0], False) + self.__vbox.pack_start(self._alerts[0], False, False, 0) if self._toolbar_box is not None: self.__vbox.reorder_child(self._alerts[0], 1) else: |