diff --git a/src/sugar3/graphics/tray.py b/src/sugar3/graphics/tray.py
index 82e1d97..e9b7a0d 100644
a
|
b
|
class _TrayViewport(Gtk.Viewport): |
46 | 46 | self._can_scroll_next = False |
47 | 47 | self._can_scroll_prev = False |
48 | 48 | |
49 | | GObject.GObject.__init__(self) |
| 49 | Gtk.Viewport.__init__(self) |
50 | 50 | |
51 | 51 | self.set_shadow_type(Gtk.ShadowType.NONE) |
52 | 52 | |
… |
… |
class _TrayViewport(Gtk.Viewport): |
169 | 169 | |
170 | 170 | class _TrayScrollButton(ToolButton): |
171 | 171 | |
| 172 | __gtype_name__ = 'SugarTrayScrollButton' |
| 173 | |
172 | 174 | def __init__(self, icon_name, scroll_direction): |
173 | 175 | ToolButton.__init__(self) |
174 | 176 | self._viewport = None |
… |
… |
ALIGN_TO_START = 0 |
223 | 225 | ALIGN_TO_END = 1 |
224 | 226 | |
225 | 227 | |
226 | | class HTray(Gtk.HBox): |
| 228 | class HTray(Gtk.EventBox): |
227 | 229 | |
228 | 230 | __gtype_name__ = 'SugarHTray' |
229 | 231 | |
… |
… |
class HTray(Gtk.HBox): |
237 | 239 | self._drag_active = False |
238 | 240 | self.align = ALIGN_TO_START |
239 | 241 | |
240 | | GObject.GObject.__init__(self, **kwargs) |
| 242 | Gtk.EventBox.__init__(self, **kwargs) |
| 243 | |
| 244 | self._box = Gtk.HBox() |
| 245 | self.add(self._box) |
241 | 246 | |
242 | 247 | scroll_left = _TrayScrollButton('go-left', _PREVIOUS_PAGE) |
243 | | self.pack_start(scroll_left, False, False, 0) |
| 248 | self._box.pack_start(scroll_left, False, False, 0) |
244 | 249 | |
245 | 250 | self._viewport = _TrayViewport(Gtk.Orientation.HORIZONTAL) |
246 | | self.pack_start(self._viewport, True, True, 0) |
| 251 | self._box.pack_start(self._viewport, True, True, 0) |
247 | 252 | self._viewport.show() |
248 | 253 | |
249 | 254 | scroll_right = _TrayScrollButton('go-right', _NEXT_PAGE) |
250 | | self.pack_start(scroll_right, False, False, 0) |
| 255 | self._box.pack_start(scroll_right, False, False, 0) |
251 | 256 | |
252 | 257 | scroll_left.viewport = self._viewport |
253 | 258 | scroll_right.viewport = self._viewport |
… |
… |
class HTray(Gtk.HBox): |
309 | 314 | self._viewport.scroll_to_item(item) |
310 | 315 | |
311 | 316 | |
312 | | class VTray(Gtk.VBox): |
| 317 | class VTray(Gtk.EventBox): |
313 | 318 | |
314 | 319 | __gtype_name__ = 'SugarVTray' |
315 | 320 | |
… |
… |
class VTray(Gtk.VBox): |
323 | 328 | self._drag_active = False |
324 | 329 | self.align = ALIGN_TO_START |
325 | 330 | |
326 | | GObject.GObject.__init__(self, **kwargs) |
| 331 | Gtk.EventBox.__init__(self, **kwargs) |
| 332 | |
| 333 | self._box = Gtk.HBox() |
| 334 | self.add(self._box) |
327 | 335 | |
328 | 336 | scroll_up = _TrayScrollButton('go-up', _PREVIOUS_PAGE) |
329 | | self.pack_start(scroll_up, False, False, 0) |
| 337 | self._box.pack_start(scroll_up, False, False, 0) |
330 | 338 | |
331 | 339 | self._viewport = _TrayViewport(Gtk.Orientation.VERTICAL) |
332 | | self.pack_start(self._viewport, True, True, 0) |
| 340 | self._box.pack_start(self._viewport, True, True, 0) |
333 | 341 | self._viewport.show() |
334 | 342 | |
335 | 343 | scroll_down = _TrayScrollButton('go-down', _NEXT_PAGE) |
336 | | self.pack_start(scroll_down, False, False, 0) |
| 344 | self._box.pack_start(scroll_down, False, False, 0) |
337 | 345 | |
338 | 346 | scroll_up.viewport = self._viewport |
339 | 347 | scroll_down.viewport = self._viewport |
… |
… |
class _IconWidget(Gtk.EventBox): |
406 | 414 | __gtype_name__ = 'SugarTrayIconWidget' |
407 | 415 | |
408 | 416 | def __init__(self, icon_name=None, xo_color=None): |
409 | | GObject.GObject.__init__(self) |
| 417 | Gtk.EventBox.__init__(self) |
410 | 418 | |
411 | 419 | self.set_app_paintable(True) |
412 | 420 | |