ui-macos: move the noLatencyControl setting to a per-connection setting.

I think some connections you'll want to optimize for latency, and others for
bandwidth.  Probably.

Also, use a dropdown box instead of a checkbox; that way we can make it more
clear what each of the settings means.

While we're here, adjust all the anchor settings for the different display
items so that resizing the dialog box works sensibly.
This commit is contained in:
Avery Pennarun
2011-02-04 21:37:51 -08:00
parent ca7d38dc1a
commit 621997b279
3 changed files with 255 additions and 126 deletions

View File

@ -58,6 +58,9 @@ NET_ALL = 0
NET_AUTO = 1
NET_MANUAL = 2
LAT_BANDWIDTH = 0
LAT_INTERACTIVE = 1
class SshuttleServer(NSObject):
def init(self):
self = super(SshuttleServer, self).init()
@ -155,3 +158,9 @@ class SshuttleServer(NSObject):
def setUseDns_(self, v):
self._k_useDns = v
config_changed()
def latencyControl(self):
return getattr(self, '_k_latencyControl', LAT_INTERACTIVE)
def setLatencyControl_(self, v):
self._k_latencyControl = v
config_changed()