Don't put event box in toplevel window

Remove an unnecessary toplevel widget.

This event box was originally added by Marco "to make it easier
to take screenshot of the canvas area only" (7f731457c2) but we're
unsure why this is, and it doesn't seem to be needed for our current
screenshot-taking mechanism. Screenshots continue to work fine after
removing this.
This commit is contained in:
Simon Schampijer 2011-09-11 21:41:09 +01:00 committed by Daniel Drake
parent 47cc7f7e77
commit d39a813969

View File

@ -103,12 +103,9 @@ class Window(gtk.Window):
self.__vbox.pack_start(self.__hbox) self.__vbox.pack_start(self.__hbox)
self.__hbox.show() self.__hbox.show()
self._event_box = gtk.EventBox() self.add_events(gtk.gdk.POINTER_MOTION_HINT_MASK
self.__hbox.pack_start(self._event_box) | gtk.gdk.POINTER_MOTION_MASK)
self._event_box.show() self.connect('motion-notify-event', self.__motion_notify_cb)
self._event_box.add_events(gtk.gdk.POINTER_MOTION_HINT_MASK
| gtk.gdk.POINTER_MOTION_MASK)
self._event_box.connect('motion-notify-event', self.__motion_notify_cb)
self.add(self.__vbox) self.add(self.__vbox)
self.__vbox.show() self.__vbox.show()
@ -173,10 +170,10 @@ class Window(gtk.Window):
def set_canvas(self, canvas): def set_canvas(self, canvas):
if self._canvas: if self._canvas:
self._event_box.remove(self._canvas) self.__hbox.remove(self._canvas)
if canvas: if canvas:
self._event_box.add(canvas) self.__hbox.pack_start(canvas)
self._canvas = canvas self._canvas = canvas
self.__vbox.set_focus_child(self._canvas) self.__vbox.set_focus_child(self._canvas)