Gentoo Archives: gentoo-commits

From: Ralph Sennhauser <sera@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/java-config:master commit in: src/java_config_2/
Date: Sat, 28 Dec 2013 13:15:46
Message-Id: 1388161744.cc5d3204d40388fb20d63917ef3e7281365ebd27.sera@gentoo
1 commit: cc5d3204d40388fb20d63917ef3e7281365ebd27
2 Author: Ralph Sennhauser <sera <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 27 16:29:04 2013 +0000
4 Commit: Ralph Sennhauser <sera <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 27 16:29:04 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/java-config.git;a=commit;h=cc5d3204
7
8 OutputFormatter: drop unused xtitle code
9
10 ---
11 src/java_config_2/OutputFormatter.py | 29 -----------------------------
12 1 file changed, 29 deletions(-)
13
14 diff --git a/src/java_config_2/OutputFormatter.py b/src/java_config_2/OutputFormatter.py
15 index d554fd0..c385da2 100644
16 --- a/src/java_config_2/OutputFormatter.py
17 +++ b/src/java_config_2/OutputFormatter.py
18 @@ -29,40 +29,14 @@ class OutputFormatter:
19
20 def __init__(self, displayColor=True, displayTitle=True, autoIndent=True):
21 self.colorOutput = displayColor
22 - self.consoleTitle = displayTitle
23 self.autoIndent = autoIndent
24
25 - if displayTitle and "TERM" in os.environ:
26 - if os.environ["TERM"] not in [ "xterm", "Eterm", "aterm", "rxvt" ]:
27 - self.consoleTitle = False
28 -
29 def __call__(self, displayColor=True, displayTitle=True, autoIndent=True):
30 return self
31
32 def setColorOutputStatus(self, status):
33 self.colorOutput = status
34
35 - def setDisplayTitleStatus(self, status):
36 - if status and "TERM" in os.environ:
37 - if os.environ["TERM"] in [ "xterm", "Eterm", "aterm", "rxvt" ]:
38 - self.consoleTitle = True
39 - else:
40 - self.consoleTitle = False
41 - else:
42 - self.consoleTitle = False
43 -
44 - def isColorOutputEnabled(self):
45 - return self.colorOutput
46 -
47 - def isTitleDisplayEnabled(self):
48 - return self.consoleTitle
49 -
50 -
51 - def __setTitle(self, title):
52 - if self.consoleTitle:
53 - sys.stderr.write("\x1b]1;\x07\x1b]2;" + str(title) + "\x07")
54 - sys.stderr.flush()
55 -
56 def __indent(self, prefix, message):
57 if self.autoIndent is True:
58 num = len(prefix)
59 @@ -116,9 +90,6 @@ class OutputFormatter:
60 message = "%H%C" + self.__indent("!!! ALERT: ", message) + "%$"
61 sys.stderr.write(self.__parseColor(message) + '\n')
62
63 - def setTitle(self, message):
64 - self.__setTitle(self.__parseColor(message))
65 -
66
67 OutputFormatter = OutputFormatter()
68 # vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap: