OSDN Git Service

not connect size-allocate on threadview, connect configure-event
authorAiwota Programmer <aiwotaprog@tetteke.tk>
Wed, 12 Dec 2007 13:55:09 +0000 (22:55 +0900)
committerAiwota Programmer <aiwotaprog@tetteke.tk>
Wed, 12 Dec 2007 13:55:09 +0000 (22:55 +0900)
src/FukuiNoNamari/thread_view.py

index 8a3ff1c..57c1b1b 100644 (file)
@@ -45,7 +45,7 @@ class ThreadView(gtk.HBox):
         self.drawingarea.connect(
             "expose-event", self.on_drawingarea_expose_event)
         self.drawingarea.connect(
         self.drawingarea.connect(
             "expose-event", self.on_drawingarea_expose_event)
         self.drawingarea.connect(
-            "size-allocate", self.on_drawingarea_size_allocate)
+            "configure-event", self.on_drawingarea_configure_event)
         self.drawingarea.connect(
             "scroll-event", self.on_drawingarea_scroll_event)
         self.drawingarea.connect(
         self.drawingarea.connect(
             "scroll-event", self.on_drawingarea_scroll_event)
         self.drawingarea.connect(
@@ -208,10 +208,10 @@ class ThreadView(gtk.HBox):
     def on_drawingarea_expose_event(self, widget, event, data=None):
         self.draw_viewport()
 
     def on_drawingarea_expose_event(self, widget, event, data=None):
         self.draw_viewport()
 
-    def on_drawingarea_size_allocate(self, widget, allocation, data=None):
-        if allocation.width != self.drawingarea_prev_width:
+    def on_drawingarea_configure_event(self, widget, event, data=None):
+        if event.width != self.drawingarea_prev_width:
             self.relayout()
             self.relayout()
-            self.drawingarea_prev_width = allocation.width
+            self.drawingarea_prev_width = event.width
         self.adjustment.page_size = self.drawingarea.allocation.height
         self.vscrollbar.set_increments(20, self.drawingarea.allocation.height)
 
         self.adjustment.page_size = self.drawingarea.allocation.height
         self.vscrollbar.set_increments(20, self.drawingarea.allocation.height)