OSDN Git Service

The "no-show-all" of scrollbar on ThreadView is set
authorAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 3 May 2009 14:46:41 +0000 (23:46 +0900)
committerAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 3 May 2009 14:46:41 +0000 (23:46 +0900)
and the page_size of the adjustment is also set immediately,
then ThreadPopup gets the appropriate size.

src/FukuiNoNamari/thread_popup.py
src/FukuiNoNamari/thread_view.py

index 479166d..95a7091 100644 (file)
@@ -134,7 +134,7 @@ class ThreadPopup(gobject.GObject):
 
         # set width
         view.drawingarea.size_allocate(gtk.gdk.Rectangle(0, 0, 300, 200))
-
+        view.adjustment.page_size = 200
 
         for num in numlist:
             for layout in self._thread_view_list[0].res_layout_list:
@@ -157,9 +157,6 @@ class ThreadPopup(gobject.GObject):
                                   view.drawingarea.allocation.height
                                   +ThreadPopup._BORDER_WIDTH*2)
 
-        view.show_all()
-        view.vscrollbar.hide()
-
         # show the popup at an appropriate position.
         width, height = popupwin.get_size()
         if abs_x + width > gtk.gdk.screen_width():
@@ -168,7 +165,7 @@ class ThreadPopup(gobject.GObject):
             abs_y = abs_y - height
         popupwin.move(abs_x, abs_y)
 
-        popupwin.show()
+        popupwin.show_all()
 
         if not self._timer_started:
             self._timer_started = True
index 1c2aa3f..636b73e 100644 (file)
@@ -529,6 +529,7 @@ class ThreadView(gtk.HBox):
         self.drawingarea.set_property("can_focus", True)
 
         self.vscrollbar = gtk.VScrollbar()
+        self.vscrollbar.set_property("no-show-all", True)
         self.pack_start(self.drawingarea)
         self.pack_start(self.vscrollbar, expand=False)
         self.adjustment  = self.vscrollbar.get_adjustment()