diff --git a/NEWS b/NEWS index 5672725f..d916f01b 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ Version 2.8.1 Bugs corrected: * Autodiscover error while binding on IPv6 addresses (issue #1002) + * GPU plugin is display when hitting '4' or '5' shortkeys (issue #1012) Version 2.8 =========== diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py index acd7e9ef..f7bac5dc 100644 --- a/glances/outputs/glances_curses.py +++ b/glances/outputs/glances_curses.py @@ -400,33 +400,24 @@ class _GlancesCurses(object): def disable_top(self): """Disable the top panel""" - self.args.disable_quicklook = True - self.args.disable_cpu = True - self.args.disable_mem = True - self.args.disable_memswap = True - self.args.disable_load = True + for p in ['quicklook', 'cpu', 'gpu', 'mem', 'memswap', 'load']: + setattr(self.args, 'disable_' + p, True) def enable_top(self): """Enable the top panel""" - self.args.disable_quicklook = False - self.args.disable_cpu = False - self.args.disable_mem = False - self.args.disable_memswap = False - self.args.disable_load = False + for p in ['quicklook', 'cpu', 'gpu', 'mem', 'memswap', 'load']: + setattr(self.args, 'disable_' + p, False) def disable_fullquicklook(self): """Disable the full quicklook mode""" - self.args.disable_quicklook = False - self.args.disable_cpu = False - self.args.disable_mem = False - self.args.disable_memswap = False + for p in ['quicklook', 'cpu', 'gpu', 'mem', 'memswap']: + setattr(self.args, 'disable_' + p, False) def enable_fullquicklook(self): """Disable the full quicklook mode""" self.args.disable_quicklook = False - self.args.disable_cpu = True - self.args.disable_mem = True - self.args.disable_memswap = True + for p in ['cpu', 'gpu', 'mem', 'memswap']: + setattr(self.args, 'disable_' + p, True) def end(self): """Shutdown the curses window."""