/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 diff.py

  • Committer: Adeodato Simó
  • Date: 2007-07-05 19:35:12 UTC
  • mto: This revision was merged to the branch mainline in revision 234.
  • Revision ID: dato@net.com.org.es-20070705193512-23ze1o604e874bd6
Rename apply_colordiffrc to apply_colordiff_colors, improve docstring.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
            self.buffer = gtksourceview.SourceBuffer()
96
96
            slm = gtksourceview.SourceLanguagesManager()
97
97
            gsl = slm.get_language_from_mime_type("text/x-patch")
98
 
            self.apply_colordiffrc(gsl)
 
98
            self.apply_colordiff_colors(gsl)
99
99
            self.buffer.set_language(gsl)
100
100
            self.buffer.set_highlight(True)
101
101
 
173
173
        self.buffer.set_text(s.getvalue().decode(sys.getdefaultencoding(), 'replace'))
174
174
 
175
175
    @staticmethod
176
 
    def apply_colordiffrc(lang):
177
 
        """Set style colors in lang to that specified in colordiff config file.
 
176
    def apply_colordiff_colors(lang):
 
177
        """Set style colors for lang using the colordiff configuration file.
178
178
 
179
179
        Both ~/.colordiffrc and ~/.colordiffrc.bzr-gtk are read.
180
180
 
181
 
        :param lang: a gtksourceview.SourceLanguage object.
 
181
        :param lang: a "Diff" gtksourceview.SourceLanguage object.
182
182
        """
183
183
        def parse_colordiffrc(fileobj):
184
184
            """Parse fileobj as a colordiff configuration file.