/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/branchwin.py

  • Committer: Daniel Schierbeck
  • Date: 2007-10-21 16:25:29 UTC
  • Revision ID: daniel.schierbeck@gmail.com-20071021162529-tc18s8lxywv2aitu
Removed BranchWindow.set_branch(), used constructor instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    for a particular branch.
29
29
    """
30
30
 
31
 
    def __init__(self, parent=None):
 
31
    def __init__(self, branch, start, maxnum, parent=None):
32
32
        gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
33
33
        self.set_border_width(0)
34
 
        self.set_title("Revision history")
 
34
 
 
35
        self.branch = branch
 
36
        self.start  = start
 
37
        self.maxnum = maxnum
 
38
 
 
39
        self.set_title(branch.nick + " - revision history")
35
40
 
36
41
        self._parent = parent
37
42
 
92
97
        """Construct the top-half of the window."""
93
98
        self.treeview = TreeView()
94
99
 
 
100
        self.treeview.set_branch(self.branch, self.start, self.maxnum)
 
101
 
95
102
        self.treeview.connect("revision-selected",
96
103
                self._treeselection_changed_cb)
97
104
 
141
148
        self.logview.set_go_callback(self._go_clicked_cb)
142
149
        return self.logview
143
150
 
144
 
    def set_branch(self, branch, start, maxnum):
145
 
        """Set the branch and start position for this window.
146
 
 
147
 
        Creates a new TreeModel and populates it with information about
148
 
        the new branch before updating the window title and model of the
149
 
        treeview itself.
150
 
        """
151
 
        self.branch = branch
152
 
        self.set_title(branch.nick + " - revision history")
153
 
        self.treeview.set_branch(branch, start, maxnum)
154
 
    
155
151
    def _on_key_pressed(self, widget, event):
156
152
        """ Key press event handler. """
157
153
        keyname = gtk.gdk.keyval_name(event.keyval)