/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 annotate/config.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:
20
20
 
21
21
from bzrlib.config import config_dir
22
22
import bzrlib.util.configobj.configobj as configobj
23
 
from bzrlib.util.configobj.validate import Validator
24
23
 
25
24
 
26
25
gannotate_configspec = (
52
51
                                     configspec=gannotate_configspec)
53
52
        self.window = window
54
53
        self.pane = window.pane
55
 
        self.span_selector = window.span_selector
56
54
        
57
55
        self.initial_comment = ["gannotate plugin configuration"]
58
 
        self.validate(Validator())
 
56
        self['window']['width'] = 750
 
57
        self['window']['height'] = 550
 
58
        self['window']['maximized'] = False
 
59
        self['window']['x'] = 0
 
60
        self['window']['y'] = 0
 
61
        self['window']['pane_position'] = 325
 
62
        self['spans']['max_custom_spans'] = 4
 
63
        self['spans']['custom_spans'] = []
59
64
 
60
65
        self.apply()
61
66
        self._connect_signals()
71
76
        if self["window"]["maximized"]:
72
77
            self.window.maximize()
73
78
 
74
 
        self.span_selector.max_custom_spans =\
75
 
                self["spans"]["max_custom_spans"]
76
 
 
77
79
        # XXX Don't know how to set an empty list as default in
78
80
        # gannotate_configspec.
79
 
        try:
80
 
            for span in self["spans"]["custom_spans"]:
81
 
                self.span_selector.add_custom_span(span)
82
 
        except KeyError:
83
 
            pass
84
 
 
85
81
    def _connect_signals(self):
86
82
        self.window.connect("destroy", self._write)
87
83
        self.window.connect("configure-event", self._save_window_props)
88
84
        self.window.connect("window-state-event", self._save_window_props)
89
85
        self.pane.connect("notify", self._save_pane_props)
90
 
        self.span_selector.connect("custom-span-added",
91
 
                                   self._save_custom_spans)
92
86
 
93
87
    def _save_window_props(self, w, e, *args):
94
88
        if e.window.get_state() & gtk.gdk.WINDOW_STATE_MAXIMIZED: