Disable popup filter on Windows OS

This commit is contained in:
Nicolargo 2014-09-02 22:54:20 +02:00
parent 9f551a5637
commit 3f2654d9d5
2 changed files with 15 additions and 14 deletions

View File

@ -20,7 +20,7 @@
"""Init the Glances software."""
__appname__ = 'glances'
__version__ = '2.1_RC7'
__version__ = '2.1_RC8'
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
__license__ = 'LGPL'

View File

@ -545,7 +545,7 @@ class GlancesCurses(object):
popup.addnstr(2 + y, 2, m, len(m))
y += 1
if is_input:
if is_input and not is_windows:
# Create a subwindow for the text field
subpop = popup.derwin(1, input_size, 2, 2 + len(m))
subpop.attron(self.__colors_list['FILTER'])
@ -717,15 +717,16 @@ class GlancesCurses(object):
else:
return c + 1
class glances_textbox(Textbox):
"""
"""
def __init__(*args, **kwargs):
Textbox.__init__(*args, **kwargs)
def do_command(self, ch):
if ch == 10: # Enter
return 0
if ch == 127: # Enter
return 8
return Textbox.do_command(self, ch)
if not is_windows:
class glances_textbox(Textbox):
"""
"""
def __init__(*args, **kwargs):
Textbox.__init__(*args, **kwargs)
def do_command(self, ch):
if ch == 10: # Enter
return 0
if ch == 127: # Enter
return 8
return Textbox.do_command(self, ch)