[Pkg-bazaar-commits] ./bzr-gtk/unstable r75: Use HPaned rather than HBox so long filenames can be viewed (fixes #56993).

Jelmer Vernooij jelmer at samba.org
Fri Apr 10 07:49:06 UTC 2009


------------------------------------------------------------
revno: 75
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: bzr-gtk
timestamp: Mon 2006-08-21 15:42:50 +0200
message:
  Use HPaned rather than HBox so long filenames can be viewed (fixes #56993).
  Patch by vila.
modified:
  viz/diffwin.py
-------------- next part --------------
=== modified file 'viz/diffwin.py'
--- a/viz/diffwin.py	2006-08-11 07:28:44 +0000
+++ b/viz/diffwin.py	2006-08-21 13:42:50 +0000
@@ -53,15 +53,18 @@
 
     def construct(self):
         """Construct the window contents."""
-        hbox = gtk.HBox(spacing=6)
-        hbox.set_border_width(0)
-        self.add(hbox)
-        hbox.show()
+        # The   window  consists  of   a  pane   containing:  the
+        # hierarchical list  of files on  the left, and  the diff
+        # for the currently selected file on the right.
+        pane = gtk.HPaned()
+        self.add(pane)
+        pane.show()
 
+        # The file hierarchy: a scrollable treeview
         scrollwin = gtk.ScrolledWindow()
         scrollwin.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
         scrollwin.set_shadow_type(gtk.SHADOW_IN)
-        hbox.pack_start(scrollwin, expand=False, fill=True)
+        pane.pack1(scrollwin)
         scrollwin.show()
 
         self.model = gtk.TreeStore(str, str)
@@ -79,11 +82,12 @@
         column.add_attribute(cell, "text", 0)
         self.treeview.append_column(column)
 
-
+        # The diffs of the  selected file: a scrollable source or
+        # text view
         scrollwin = gtk.ScrolledWindow()
         scrollwin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
         scrollwin.set_shadow_type(gtk.SHADOW_IN)
-        hbox.pack_start(scrollwin, expand=True, fill=True)
+        pane.pack2(scrollwin)
         scrollwin.show()
 
         if have_gtksourceview:



More information about the Pkg-bazaar-commits mailing list