/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-06-29 16:20:15 UTC
  • mto: This revision was merged to the branch mainline in revision 519.
  • Revision ID: jelmer@samba.org-20080629162015-amhe7xj4cdmup4id
Rename GtkProgressBarStack to GtkWindowProgressBarStack

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    """ Display Status window and perform the needed actions. """
29
29
    def __init__(self, wt, wtpath, revision=None):
30
30
        """ Initialize the Status window. """
31
 
        super(StatusDialog, self).__init__(flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE))
 
31
        super(StatusDialog, self).__init__(flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
32
32
        self.set_title("Working tree changes")
33
 
        self.set_default_response(gtk.RESPONSE_CLOSE)
34
33
        self._create()
35
34
        self.wt = wt
36
35
        self.wtpath = wtpath
37
 
 
 
36
        
38
37
        if revision is None:
39
38
            revision = self.wt.branch.last_revision()
40
39
            
45
44
 
46
45
    def _create(self):
47
46
        self.set_default_size(400, 300)
48
 
        self.set_has_separator(False)
49
 
        sw = gtk.ScrolledWindow()
50
 
        sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
51
 
        sw.set_shadow_type(gtk.SHADOW_IN)
 
47
        scrolledwindow = gtk.ScrolledWindow()
 
48
        scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
52
49
        self.treeview = gtk.TreeView()
53
 
        sw.add(self.treeview)
54
 
        self.vbox.pack_start(sw, True, True)
 
50
        scrolledwindow.add(self.treeview)
 
51
        self.vbox.pack_start(scrolledwindow, True, True)
55
52
        self.vbox.show_all()
56
53
 
57
 
        # sane border and spacing widths (as recommended by GNOME HIG) 
58
 
        self.set_border_width(5)
59
 
        sw.set_border_width(5)
60
 
        self.vbox.set_spacing(2)
61
 
        self.action_area.set_border_width(5)
62
 
 
63
 
 
64
54
    def row_diff(self, tv, path, tvc):
65
55
        file = self.model[path][1]
66
56
        if file is None:
71
61
        window.set_file(file)
72
62
        window.show()
73
63
 
74
 
 
75
64
    def _generate_status(self):
76
65
        """ Generate 'bzr status' output. """
77
66
        self.model = gtk.TreeStore(str, str)