/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

Add options to viz treeview to not show the line graph, and to only show the main line.
Set the revision browser to use these options.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    pass
22
22
 
23
23
import gtk
24
 
from bzrlib.plugins.gtk import _i18n
25
 
 
26
24
 
27
25
class StatusDialog(gtk.Dialog):
28
26
    """ Display Status window and perform the needed actions. """
29
 
    def __init__(self, wt, wtpath, revision=None):
 
27
    def __init__(self, wt, wtpath):
30
28
        """ Initialize the Status window. """
31
29
        super(StatusDialog, self).__init__(flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
32
30
        self.set_title("Working tree changes")
33
31
        self._create()
34
32
        self.wt = wt
35
33
        self.wtpath = wtpath
36
 
        
37
 
        if revision is None:
38
 
            revision = self.wt.branch.last_revision()
39
 
            
40
34
        # Set the old working tree
41
 
        self.old_tree = self.wt.branch.repository.revision_tree(revision)
 
35
        self.old_tree = self.wt.branch.repository.revision_tree(self.wt.branch.last_revision())
42
36
        # Generate status output
43
37
        self._generate_status()
44
38
 
81
75
        
82
76
        if len(delta.added):
83
77
            changes = True
84
 
            titer = self.model.append(None, [ _i18n('Added'), None ])
 
78
            titer = self.model.append(None, [ _('Added'), None ])
85
79
            for path, id, kind in delta.added:
86
80
                self.model.append(titer, [ path, path ])
87
81
 
88
82
        if len(delta.removed):
89
83
            changes = True
90
 
            titer = self.model.append(None, [ _i18n('Removed'), None ])
 
84
            titer = self.model.append(None, [ _('Removed'), None ])
91
85
            for path, id, kind in delta.removed:
92
86
                self.model.append(titer, [ path, path ])
93
87
 
94
88
        if len(delta.renamed):
95
89
            changes = True
96
 
            titer = self.model.append(None, [ _i18n('Renamed'), None ])
 
90
            titer = self.model.append(None, [ _('Renamed'), None ])
97
91
            for oldpath, newpath, id, kind, text_modified, meta_modified \
98
92
                    in delta.renamed:
99
93
                self.model.append(titer, [ oldpath, newpath ])
100
94
 
101
95
        if len(delta.modified):
102
96
            changes = True
103
 
            titer = self.model.append(None, [ _i18n('Modified'), None ])
 
97
            titer = self.model.append(None, [ _('Modified'), None ])
104
98
            for path, id, kind, text_modified, meta_modified in delta.modified:
105
99
                self.model.append(titer, [ path, path ])
106
100
        
108
102
        for path in self.wt.unknowns():
109
103
            changes = True
110
104
            if not done_unknown:
111
 
                titer = self.model.append(None, [ _i18n('Unknown'), None ])
 
105
                titer = self.model.append(None, [ _('Unknown'), None ])
112
106
                done_unknown = True
113
107
            self.model.append(titer, [ path, path ])
114
108
 
115
109
        if not changes:
116
 
            self.model.append(None, [ _i18n('No changes.'), None ])
 
110
            self.model.append(None, [ _('No changes.'), None ])
117
111
 
118
112
        self.treeview.expand_all()
119
113