def set_canvas(self, canvas): Drawer.set_canvas(self, canvas) self.spinner.set_canvas(canvas) self.relocate() canvas.connect(self, "absolute-motion-notify-event", lambda canvas, event: GLib.idle_add(self._on_mouse_motion, event)) canvas.connect(self, "absolute-button-release-event", lambda canvas, event: GLib.idle_add(self._on_mouse_button_release, event)) canvas.connect(self, "size-allocate", self._on_size_allocate_cb) canvas.connect(self, "drag-begin", self._on_drag_begin) canvas.connect(self, "drag-data-get", self._on_drag_data_get) canvas.connect(self, "drag-end", self._on_drag_end) canvas.connect(self, "drag-failed", self._on_drag_failed)
def set_canvas(self, canvas): Drawer.set_canvas(self, canvas) self.spinner.set_canvas(canvas) canvas.connect( "absolute-motion-notify-event", lambda canvas, event: GLib.idle_add(self._on_mouse_motion, event))