Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-06-15 08:08:19 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-06-15 08:08:19 (GMT)
commit661990cc3c569b6e0042d7dd6e032e5ceb418d13 (patch)
treed62256ab3ab6f51fe84f0ea82c4f2c0b98331587
parentdb5cdf2dea7b4e03322d34a128f293f19859a5b5 (diff)
Disconnect from size_allocate event
-rw-r--r--OficinaActivity.py14
1 files changed, 4 insertions, 10 deletions
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)