~ubuntu-branches/ubuntu/quantal/wxwidgets2.8/quantal

« back to all changes in this revision

Viewing changes to wxPython/wx/tools/Editra/src/doctools.py

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2012-01-07 13:59:25 UTC
  • mfrom: (1.1.9) (5.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20120107135925-2601miy9ullcon9j
Tags: 2.8.12.1-6ubuntu1
* Resync from Debian, changes that were kept:
  - debian/rules: re-enable mediactrl. This allows libwx_gtk2u_media-2.8 to be
    built, as this is required by some applications (LP: #632984)
  - debian/control: Build-dep on libxt-dev for mediactrl.
  - Patches
    + fix-bashism-in-example
* Add conflict on python-wxgtk2.8 (<< 2.8.12.1-6ubuntu1~) to python-wxversion
  to guarantee upgrade ordering when moving from pycentral to dh_python2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
"""
13
13
 
14
14
__author__ = "Cody Precord <cprecord@editra.org>"
15
 
__svnid__ = "$Id: doctools.py 63349 2010-02-01 22:13:57Z CJP $"
16
 
__revision__ = "$Revision: 63349 $"
 
15
__svnid__ = "$Id: doctools.py 66159 2010-11-15 02:24:06Z CJP $"
 
16
__revision__ = "$Revision: 66159 $"
17
17
 
18
18
#--------------------------------------------------------------------------#
19
19
# Imports
38
38
    _poscache = ebmlib.HistoryCache(100)
39
39
 
40
40
    def __init__(self):
41
 
        """Creates the position manager object
42
 
 
43
 
        """
44
 
        object.__init__(self)
 
41
        """Creates the position manager object"""
 
42
        super(DocPositionMgr, self).__init__()
45
43
 
46
44
        # Attributes
47
45
        self._init = False
60
58
 
61
59
    @classmethod
62
60
    def AddNaviPosition(cls, fname, pos):
63
 
        """Add a new postion to the navigation cache
 
61
        """Add a new position to the navigation cache
64
62
        @param fname: file name
65
63
        @param pos: position
66
64
 
67
65
        """
68
 
        # Don't put two identical positions in the cache next to eachother
 
66
        # Don't put two identical positions in the cache next to each other
69
67
        pre = cls._poscache.PeekPrevious()
70
68
        next = cls._poscache.PeekNext()
71
69
        if (fname, pos) in (pre, next):
76
74
    def AddRecord(self, vals):
77
75
        """Adds a record to the dictionary from a list of the
78
76
        filename vals[0] and the position value vals[1].
79
 
        @param vals: file path, cursor postion
 
77
        @param vals: file path, cursor position
80
78
        @type vals: tuple (str, int)
81
79
 
82
80
        """
147
145
    def GetPos(self, name):
148
146
        """Get the position record for a given filename
149
147
        returns 0 if record is not found.
150
 
        @return: postion value for the given filename
 
148
        @return: position value for the given filename
151
149
 
152
150
        """
153
151
        return self._records.get(name, 0)
215
213
        """
216
214
        if pre:
217
215
            if cls._poscache.HasPrevious():
218
 
                print "DO PREVIOUS!!"
219
216
                return cls._poscache.PeekPrevious()
220
217
        else:
221
218
            if cls._poscache.HasNext():