/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-10-14 19:49:27 UTC
  • Revision ID: jelmer@samba.org-20081014194927-l8hyj1i4j3sxktte
Fix paths for patch handling command and icons.

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_OK, gtk.RESPONSE_ACCEPT))
 
31
        super(StatusDialog, self).__init__(flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE))
32
32
        self.set_title("Working tree changes")
 
33
        self.set_default_response(gtk.RESPONSE_CLOSE)
33
34
        self._create()
34
35
        self.wt = wt
35
36
        self.wtpath = wtpath
36
 
        
 
37
 
37
38
        if revision is None:
38
39
            revision = self.wt.branch.last_revision()
39
40
            
44
45
 
45
46
    def _create(self):
46
47
        self.set_default_size(400, 300)
47
 
        scrolledwindow = gtk.ScrolledWindow()
48
 
        scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
 
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)
49
52
        self.treeview = gtk.TreeView()
50
 
        scrolledwindow.add(self.treeview)
51
 
        self.vbox.pack_start(scrolledwindow, True, True)
 
53
        sw.add(self.treeview)
 
54
        self.vbox.pack_start(sw, True, True)
52
55
        self.vbox.show_all()
53
56
 
 
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
 
54
64
    def row_diff(self, tv, path, tvc):
55
65
        file = self.model[path][1]
56
66
        if file is None:
61
71
        window.set_file(file)
62
72
        window.show()
63
73
 
 
74
 
64
75
    def _generate_status(self):
65
76
        """ Generate 'bzr status' output. """
66
77
        self.model = gtk.TreeStore(str, str)