The -4, --full-quicklook option did not work as expected (issue #663)

This commit is contained in:
nicolargo 2015-09-08 21:32:43 +02:00
parent 6fc6d9af24
commit 023ac7badd
2 changed files with 18 additions and 3 deletions

View File

@ -268,6 +268,20 @@ Start the client browser (browser mode):\n\
args.network_sum = False
args.network_cumul = False
# Manage full quicklook option
if args.full_quicklook:
args.disable_quicklook = False
args.disable_cpu = True
args.disable_mem = True
args.disable_swap = True
args.disable_load = False
else:
args.disable_quicklook = False
args.disable_cpu = False
args.disable_mem = False
args.disable_swap = False
args.disable_load = False
# Control parameter and exit if it is not OK
self.args = args

View File

@ -272,13 +272,11 @@ class _GlancesCurses(object):
self.args.disable_cpu = True
self.args.disable_mem = True
self.args.disable_swap = True
self.args.disable_load = False
else:
self.args.disable_quicklook = False
self.args.disable_cpu = False
self.args.disable_mem = False
self.args.disable_swap = False
self.args.disable_load = False
elif self.pressedkey == ord('/'):
# '/' > Switch between short/long name for processes
self.args.process_short_name = not self.args.process_short_name
@ -571,7 +569,10 @@ class _GlancesCurses(object):
if not self.args.disable_quicklook:
# Quick look is in the place !
quicklook_width = min(screen_x - (stats_width + 8 + stats_number * self.space_between_column), 79)
if self.args.full_quicklook:
quicklook_width = screen_x - (stats_width + 8 + stats_number * self.space_between_column)
else:
quicklook_width = min(screen_x - (stats_width + 8 + stats_number * self.space_between_column), 79)
try:
stats_quicklook = stats.get_plugin(
'quicklook').get_stats_display(max_width=quicklook_width, args=self.args)