Bug #267860 - Make JobStatusDisplay respect FEATURES=notitles.
authorZac Medico <zmedico@gentoo.org>
Wed, 29 Apr 2009 17:40:27 +0000 (17:40 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 29 Apr 2009 17:40:27 +0000 (17:40 -0000)
svn path=/main/trunk/; revision=13409

pym/_emerge/__init__.py

index b72670a6b444fbd6b8eea38c38bf13104eb250da..fb642c8539cccd5d4dae2096a5e319976eb0219b 100644 (file)
@@ -9854,9 +9854,10 @@ class JobStatusDisplay(object):
                'newline'         : 'nel',
        }
 
-       def __init__(self, out=sys.stdout, quiet=False):
+       def __init__(self, out=sys.stdout, quiet=False, xterm_titles=True):
                object.__setattr__(self, "out", out)
                object.__setattr__(self, "quiet", quiet)
+               object.__setattr__(self, "xterm_titles", xterm_titles)
                object.__setattr__(self, "maxval", 0)
                object.__setattr__(self, "merges", 0)
                object.__setattr__(self, "_changed", False)
@@ -10076,7 +10077,8 @@ class JobStatusDisplay(object):
                else:
                        self._update(color_output.getvalue())
 
-               xtermTitle(" ".join(plain_output.split()))
+               if self.xterm_titles:
+                       xtermTitle(" ".join(plain_output.split()))
 
 class ProgressHandler(object):
        def __init__(self):
@@ -10220,7 +10222,8 @@ class Scheduler(PollScheduler):
                # being in a fragile state. For example, see bug #259954.
                self._unsatisfied_system_deps = set()
 
-               self._status_display = JobStatusDisplay()
+               self._status_display = JobStatusDisplay(
+                       xterm_titles=('notitles' not in settings.features))
                self._max_load = myopts.get("--load-average")
                max_jobs = myopts.get("--jobs")
                if max_jobs is None: