Skip to content

Commit

Permalink
#1030: try to make command line parsing more intuitive and resilient,…
Browse files Browse the repository at this point in the history
… add --no-webcam support

git-svn-id: https://xpra.org/svn/Xpra/trunk@11864 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 6, 2016
1 parent aac7847 commit 7b9bb3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def init(self, opts):
self.shadow_fullscreen = opts.shadow_fullscreen

self.webcam_option = opts.webcam.lower()
self.webcam_forwarding = self.webcam_option not in FALSE_OPTIONS
self.webcam_forwarding = self.webcam_option not in ("no", "false")
self.server_supports_webcam = False
self.server_virtual_video_devices = 0
if self.webcam_forwarding:
Expand Down Expand Up @@ -2007,7 +2007,7 @@ def do_start_sending_webcam(self, device_str):
except ImportError as e:
webcamlog("no webcam_util: %s", e)
webcamlog("do_start_sending_webcam(%s)", device_str)
if device_str in ("auto", "on", "yes"):
if device_str in ("auto", "on", "yes", "off", "false", "true"):
if len(non_virtual)>0:
device = non_virtual.keys()[0]
else:
Expand Down
1 change: 1 addition & 0 deletions src/xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ def ignore(defaults):
group.add_option("--bell", action="store",
dest="bell", default=defaults.bell, metavar="yes|no",
help="Forward the system bell. Default: %s." % enabled_str(defaults.bell))
legacy_bool_parse("webcam")
group.add_option("--webcam", action="store",
dest="webcam", default=defaults.webcam,
help="Webcam forwarding, can be used to specify a device. Default: %s." % defaults.webcam)
Expand Down

0 comments on commit 7b9bb3f

Please sign in to comment.