/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: rodney.dawes at canonical
  • Date: 2008-10-25 06:02:09 UTC
  • Revision ID: rodney.dawes@canonical.com-20081025060209-irlizouino63cs1m
        * preferences/__init__.py:
        Remove the dialog separator
        Remove useless extra call to self._create_pages()
        Make the default window size smaller
        Set the default border width on various widgets
        Set the current notebook page to the first one

        * preferences/identity.py:
        Set various border widths appropriately
        Align the labels to the left
        Remove the unneeded bold markup from the labels
        Change the "User Id" label to "E-Mail"
        Align the radio group labels to the top of the groups

        * preferences/plugins.py:
        Set various border widths appropriately
        Set the default paned position to something more sensible
        Set the shadow type on the treeview's scrolled window to in
        Align the Author and Version labels to the left

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)