Skip to content

Commit

Permalink
ux: Remove syntax highlighting from the 'Command Output' window
Browse files Browse the repository at this point in the history
The syntax highlighting was not very useful and could sometimes make
things harder to read.

Signed-off-by: David Aguilar <davvid@gmail.com>
  • Loading branch information
davvid committed May 20, 2011
1 parent 8124f27 commit c19f2fd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions cola/views/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from PyQt4 import QtGui

from cola import core
from cola.views.syntax import LogSyntaxHighlighter


class LogView(QtGui.QWidget):
Expand All @@ -23,7 +22,6 @@ def __init__(self, parent=None, output=None):
self._layout.addWidget(self.output_text)
if output:
self.set_output(output)
self.syntax = LogSyntaxHighlighter(self.output_text.document())

def clear(self):
self.output_text.clear()
Expand Down
11 changes: 0 additions & 11 deletions cola/views/syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,6 @@ def generate_rules(self):
if self.whitespace:
self.create_rules('(..*?)(\s+)$', (None, bad_ws))

class LogSyntaxHighlighter(GenericSyntaxHighligher):
def generate_rules(self):
info = self.mkformat(self.color_info, bold=True)
emphasis = self.mkformat(self.color_emphasis, bold=True)
date = self.mkformat(self.color_date, bold=True)

info_rgx = '^([^:]+:)(.*)$'
date_rgx = TERMINAL('^\w{3}\W+\w{3}\W+\d+\W+[:0-9]+\W+\d{4}$')

self.create_rules(date_rgx, date,
info_rgx, (info, emphasis))

# This is used as a mixin to generate property callbacks
def accessors(attr):
Expand Down

0 comments on commit c19f2fd

Please sign in to comment.