From 661990cc3c569b6e0042d7dd6e032e5ceb418d13 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Mon, 15 Jun 2009 08:08:19 +0000 Subject: Disconnect from size_allocate event --- diff --git a/OficinaActivity.py b/OficinaActivity.py index 6f8c104..f7dd088 100644 --- a/OficinaActivity.py +++ b/OficinaActivity.py @@ -120,14 +120,11 @@ class OficinaActivity(activity.Activity): def map_cp(widget): def size_allocate_cb(widget, allocation): - if self._setup_handle: - self.disconnect(self._setup_handle) - self._setup_handle = None + self.fixed.disconnect(self._setup_handle) self.area.setup(allocation.width, allocation.height) - if self._setup_handle: - self.disconnect(self._setup_handle) self.canvas.add_with_viewport(self.fixed) + self.disconnect(self._setup_handle) self._setup_handle = self.fixed.connect('size_allocate', size_allocate_cb) @@ -141,15 +138,12 @@ class OficinaActivity(activity.Activity): pixbuf = gtk.gdk.pixbuf_new_from_file(file_path) def size_allocate_cb(widget, allocation): - if self._setup_handle: - self.disconnect(self._setup_handle) - self._setup_handle = None + self.fixed.disconnect(self._setup_handle) self.area.setup(pixbuf.get_width(), pixbuf.get_height()) self.area.loadImageFromJournal(pixbuf) - if self._setup_handle: - self.disconnect(self._setup_handle) self.canvas.add_with_viewport(self.fixed) + self.disconnect(self._setup_handle) self._setup_handle = self.fixed.connect('size_allocate', size_allocate_cb) -- cgit v0.9.1