OSDN Git Service

Fix: spell miss of commit fbac42a0d137286b9320842ad465a42c6d28397c
[fukui-no-namari/fukui-no-namari.git] / src / FukuiNoNamari / thread_view.py
index 320d6c9..7228b60 100644 (file)
@@ -48,15 +48,13 @@ class ThreadView(gtk.HBox):
         self.drawingarea.connect(
             "size-allocate", self.on_drawingarea_size_allocate)
         self.drawingarea.connect(
         self.drawingarea.connect(
             "size-allocate", self.on_drawingarea_size_allocate)
         self.drawingarea.connect(
-            "button-press-event", self.on_drawingarea_button_press_event)
-        self.drawingarea.connect(
             "scroll-event", self.on_drawingarea_scroll_event)
         self.drawingarea.connect(
             "motion-notify-event", self.on_drawingrarea_motion_notify_event)
         self.drawingarea.connect(
             "scroll-event", self.on_drawingarea_scroll_event)
         self.drawingarea.connect(
             "motion-notify-event", self.on_drawingrarea_motion_notify_event)
         self.drawingarea.connect(
-            "button-press-event", self.on_drawingrarea_button_press_event)
+            "button-press-event", self.on_drawingarea_button_press_event)
         self.drawingarea.connect(
         self.drawingarea.connect(
-            "button-release-event", self.on_drawingrarea_button_release_event)
+            "button-release-event", self.on_drawingarea_button_release_event)
         self.vscrollbar.connect(
             "value-changed", self.on_vscrollbar_value_changed)
 
         self.vscrollbar.connect(
             "value-changed", self.on_vscrollbar_value_changed)
 
@@ -234,23 +232,11 @@ class ThreadView(gtk.HBox):
         if self.adjustment.value < 0:
             self.adjustment.value = 0
 
         if self.adjustment.value < 0:
             self.adjustment.value = 0
 
-    def on_drawingarea_button_press_event(self, widget, event, data=None):
-        self.drawingarea.queue_draw()
-
     def on_vscrollbar_value_changed(self, widget, data=None):
         self.drawingarea.queue_draw()
 
     def on_drawingarea_scroll_event(self, widget, event, data=None):
     def on_vscrollbar_value_changed(self, widget, data=None):
         self.drawingarea.queue_draw()
 
     def on_drawingarea_scroll_event(self, widget, event, data=None):
-        if event.direction == gtk.gdk.SCROLL_UP:
-            self.adjustment.value -= 66.476200804
-            if self.adjustment.value < self.adjustment.lower:
-                self.adjustment.value = self.adjustment.lower
-        if event.direction == gtk.gdk.SCROLL_DOWN:
-            self.adjustment.value += 66.476200804
-            max_value = self.adjustment.upper - self.adjustment.page_size
-            if self.adjustment.value > max_value:
-                self.adjustment.value = max_value
-        self.prevent_adjustment_overflow()
+        self.vscrollbar.emit("scroll-event", event)
 
     def on_drawingrarea_motion_notify_event(self, widget, event, data=None):
         if event.state & gtk.gdk.BUTTON1_MASK != gtk.gdk.BUTTON1_MASK:
 
     def on_drawingrarea_motion_notify_event(self, widget, event, data=None):
         if event.state & gtk.gdk.BUTTON1_MASK != gtk.gdk.BUTTON1_MASK:
@@ -267,7 +253,7 @@ class ThreadView(gtk.HBox):
 
         self.drawingarea.window.set_cursor(cursor)
 
 
         self.drawingarea.window.set_cursor(cursor)
 
-    def on_drawingrarea_button_press_event(self, widget, event, data=None):
+    def on_drawingarea_button_press_event(self, widget, event, data=None):
         if event.button == 1:
             self.current_pressed_uri = None
             self.button1_pressed = True
         if event.button == 1:
             self.current_pressed_uri = None
             self.button1_pressed = True
@@ -298,7 +284,7 @@ class ThreadView(gtk.HBox):
             return True
             
 
             return True
             
 
-    def on_drawingrarea_button_release_event(self, widget, event, data=None):
+    def on_drawingarea_button_release_event(self, widget, event, data=None):
         if event.button == 1:
             button1_pressed = self.button1_pressed
             self.button1_pressed = False
         if event.button == 1:
             button1_pressed = self.button1_pressed
             self.button1_pressed = False