Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2011-09-11 20:41:09 (GMT)
committer Daniel Drake <dsd@laptop.org>2011-09-27 11:43:51 (GMT)
commitd39a81396916ce1f388b3f91ad867864415cb1af (patch)
tree97a953242fff6b45c83d6c989099c2102cb675fe /src
parent47cc7f7e77bc80d13d9bf6693a3e47c93e28972b (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/sugar/graphics/window.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/sugar/graphics/window.py b/src/sugar/graphics/window.py
index b269efc..dbac464 100644
--- a/src/sugar/graphics/window.py
+++ b/src/sugar/graphics/window.py
@@ -103,12 +103,9 @@ class Window(gtk.Window):
self.__vbox.pack_start(self.__hbox)
self.__hbox.show()
- self._event_box = gtk.EventBox()
- self.__hbox.pack_start(self._event_box)
- self._event_box.show()
- 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_events(gtk.gdk.POINTER_MOTION_HINT_MASK
+ | gtk.gdk.POINTER_MOTION_MASK)
+ self.connect('motion-notify-event', self.__motion_notify_cb)
self.add(self.__vbox)
self.__vbox.show()
@@ -173,10 +170,10 @@ class Window(gtk.Window):
def set_canvas(self, canvas):
if self._canvas:
- self._event_box.remove(self._canvas)
+ self.__hbox.remove(self._canvas)
if canvas:
- self._event_box.add(canvas)
+ self.__hbox.pack_start(canvas)
self._canvas = canvas
self.__vbox.set_focus_child(self._canvas)