mirror of
https://github.com/gryf/wicd.git
synced 2025-12-21 05:18:02 +01:00
curses/wicd-curses.py:
Console display defaults to raw_display now, added -c argument to select curses_display curses/README,in/man=wicd-curses.8.in: Updated stuff done in wicd-curses.py
This commit is contained in:
@@ -865,12 +865,14 @@ def main():
|
||||
# Import the screen based on whatever the user picked.
|
||||
# The raw_display will have some features that may be useful to users
|
||||
# later
|
||||
if options.rawscreen:
|
||||
parser.set_defaults(screen='raw')
|
||||
if options.screen == 'raw':
|
||||
import urwid.raw_display
|
||||
ui = urwid.raw_display.Screen()
|
||||
else:
|
||||
elif options.screen is 'curses':
|
||||
import urwid.curses_display
|
||||
ui = urwid.curses_display.Screen()
|
||||
|
||||
# Default Color scheme.
|
||||
# Other potential color schemes can be found at:
|
||||
# http://excess.org/urwid/wiki/RecommendedPalette
|
||||
@@ -952,8 +954,11 @@ setup_dbus()
|
||||
########################################
|
||||
if __name__ == '__main__':
|
||||
parser = OptionParser(version="wicd-curses-%s (using wicd %s)" % (CURSES_REVNO,daemon.Hello()))
|
||||
parser.add_option("-r", "--raw-screen",action="store_true",dest='rawscreen',
|
||||
help="use urwid's raw screen controller")
|
||||
# raw = True. curses = False
|
||||
parser.set_defaults(screen='raw')
|
||||
parser.add_option("-r", "--raw-screen",action="store_const",const='raw'
|
||||
,dest='screen',help="use urwid's raw screen controller (default)")
|
||||
parser.add_option("-c", "--curses-screen",action="store_const",const='curses',dest='screen',help="use urwid's curses screen controller")
|
||||
(options,args) = parser.parse_args()
|
||||
main()
|
||||
# Make sure that the terminal does not try to overwrite the last line of
|
||||
|
||||
Reference in New Issue
Block a user