/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to viz/diffwin.py

  • Committer: Jelmer Vernooij
  • Date: 2006-08-21 13:42:50 UTC
  • Revision ID: jelmer@samba.org-20060821134250-b684f0456b352dfe
Use HPaned rather than HBox so long filenames can be viewed (fixes #56993).
Patch by vila.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
    def construct(self):
55
55
        """Construct the window contents."""
56
 
        hbox = gtk.HBox(spacing=6)
57
 
        hbox.set_border_width(0)
58
 
        self.add(hbox)
59
 
        hbox.show()
 
56
        # The   window  consists  of   a  pane   containing:  the
 
57
        # hierarchical list  of files on  the left, and  the diff
 
58
        # for the currently selected file on the right.
 
59
        pane = gtk.HPaned()
 
60
        self.add(pane)
 
61
        pane.show()
60
62
 
 
63
        # The file hierarchy: a scrollable treeview
61
64
        scrollwin = gtk.ScrolledWindow()
62
65
        scrollwin.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
63
66
        scrollwin.set_shadow_type(gtk.SHADOW_IN)
64
 
        hbox.pack_start(scrollwin, expand=False, fill=True)
 
67
        pane.pack1(scrollwin)
65
68
        scrollwin.show()
66
69
 
67
70
        self.model = gtk.TreeStore(str, str)
79
82
        column.add_attribute(cell, "text", 0)
80
83
        self.treeview.append_column(column)
81
84
 
82
 
 
 
85
        # The diffs of the  selected file: a scrollable source or
 
86
        # text view
83
87
        scrollwin = gtk.ScrolledWindow()
84
88
        scrollwin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
85
89
        scrollwin.set_shadow_type(gtk.SHADOW_IN)
86
 
        hbox.pack_start(scrollwin, expand=True, fill=True)
 
90
        pane.pack2(scrollwin)
87
91
        scrollwin.show()
88
92
 
89
93
        if have_gtksourceview: