/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: Vincent Ladeuil
  • Date: 2008-05-05 18:16:46 UTC
  • mto: (487.1.1 gtk)
  • mto: This revision was merged to the branch mainline in revision 490.
  • Revision ID: v.ladeuil+lp@free.fr-20080505181646-n95l8ltw2u6jtr26
Fix bug #187283 fix replacing _() by _i18n().

* genpot.sh 
Remove duplication. Add the ability to specify the genrated pot
file on command-line for debugging purposes.

* po/olive-gtk.pot:
Regenerated.

* __init__.py, branch.py, branchview/treeview.py, checkout.py,
commit.py, conflicts.py, diff.py, errors.py, initialize.py,
merge.py, nautilus-bzr.py, olive/__init__.py, olive/add.py,
olive/bookmark.py, olive/guifiles.py, olive/info.py,
olive/menu.py, olive/mkdir.py, olive/move.py, olive/remove.py,
olive/rename.py, push.py, revbrowser.py, status.py, tags.py:
Replace all calls to _() by calls to _i18n(), the latter being
defined in __init__.py and imported in the other modules from
there. This fix the problem encountered countless times when
running bzr selftest and getting silly error messages about
boolean not being callables.

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)