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

  • Committer: Jelmer Vernooij
  • Date: 2008-05-01 12:55:33 UTC
  • mto: This revision was merged to the branch mainline in revision 488.
  • Revision ID: jelmer@samba.org-20080501125533-hesg3b13cxgsyqa2
Import Chris Lamb's olive-gtk manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import gtk
24
24
 
25
 
class StatusDialog(gtk.MessageDialog):
 
25
class StatusDialog(gtk.Dialog):
26
26
    """ Display Status window and perform the needed actions. """
27
 
    def __init__(self, wt, wtpath):
 
27
    def __init__(self, wt, wtpath, revision=None):
28
28
        """ Initialize the Status window. """
29
 
        super(StatusDialog, self).__init__(flags=gtk.DIALOG_MODAL, buttons=gtk.BUTTONS_OK)
 
29
        super(StatusDialog, self).__init__(flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
30
30
        self.set_title("Working tree changes")
31
 
        self.set_image(gtk.Label("Working tree status"))
32
31
        self._create()
33
32
        self.wt = wt
34
33
        self.wtpath = wtpath
 
34
        
 
35
        if revision is None:
 
36
            revision = self.wt.branch.last_revision()
 
37
            
35
38
        # Set the old working tree
36
 
        self.old_tree = self.wt.branch.repository.revision_tree(self.wt.branch.last_revision())
 
39
        self.old_tree = self.wt.branch.repository.revision_tree(revision)
37
40
        # Generate status output
38
41
        self._generate_status()
39
42
 
112
115
 
113
116
        self.treeview.expand_all()
114
117
    
115
 
    def display(self):
116
 
        """ Display the Diff window. """
117
 
        self.window.show_all()
118
 
 
119
118
    def close(self, widget=None):
120
119
        self.window.destroy()