本文整理匯總了Python中syncthing_gtk.EditorDialog.get_value方法的典型用法代碼示例。如果您正苦於以下問題:Python EditorDialog.get_value方法的具體用法?Python EditorDialog.get_value怎麽用?Python EditorDialog.get_value使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類syncthing_gtk.EditorDialog
的用法示例。
在下文中一共展示了EditorDialog.get_value方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_value
# 需要導入模塊: from syncthing_gtk import EditorDialog [as 別名]
# 或者: from syncthing_gtk.EditorDialog import get_value [as 別名]
def get_value(self, key):
if key == "ListenAddress":
return ",".join([ x.strip() for x in self.values[key]])
elif key == "MaxSendKbpsEnabled":
return (self.values["MaxSendKbps"] != 0)
else:
return EditorDialog.get_value(self, key)
示例2: get_value
# 需要導入模塊: from syncthing_gtk import EditorDialog [as 別名]
# 或者: from syncthing_gtk.EditorDialog import get_value [as 別名]
def get_value(self, key):
if key == "KeepVersions":
return self.get_burried_value("Versioning/Params/keep", self.values, 0, int)
elif key == "MaxAge":
return self.get_burried_value("Versioning/Params/maxAge", self.values, 0, int) / 86400 # seconds to days
elif key == "VersionsPath":
return self.get_burried_value("Versioning/Params/versionsPath", self.values, "")
elif key == "Versioning":
return self.get_burried_value("Versioning/Type", self.values, "")
elif key == "INotify":
return self.id in self.app.config["use_inotify"]
else:
return EditorDialog.get_value(self, key)
示例3: get_value
# 需要導入模塊: from syncthing_gtk import EditorDialog [as 別名]
# 或者: from syncthing_gtk.EditorDialog import get_value [as 別名]
def get_value(self, key):
if key == "ListenAddress":
return ", ".join([ x.strip() for x in self.values[key]])
elif key == "GlobalAnnServers":
if "GlobalAnnServer" in self.values:
# For Syncthing < 0.9.10
return self.values["GlobalAnnServer"]
return ", ".join([ x.strip() for x in self.values["GlobalAnnServers"]])
elif key == "URAccepted":
return (self.values["URAccepted"] == 1)
elif key == "MaxSendKbpsEnabled":
return (self.values["MaxSendKbps"] != 0)
elif key == "MaxRecvKbpsEnabled":
return (self.values["MaxRecvKbps"] != 0)
else:
return EditorDialog.get_value(self, key)
示例4: get_value
# 需要導入模塊: from syncthing_gtk import EditorDialog [as 別名]
# 或者: from syncthing_gtk.EditorDialog import get_value [as 別名]
def get_value(self, key):
if key == "autostart":
return is_ran_on_startup("Syncthing-GTK")
else:
return EditorDialog.get_value(self, key)
示例5: get_value
# 需要導入模塊: from syncthing_gtk import EditorDialog [as 別名]
# 或者: from syncthing_gtk.EditorDialog import get_value [as 別名]
def get_value(self, key):
if key == "Addresses":
return ",".join([ x.strip() for x in self.values[key]])
else:
return EditorDialog.get_value(self, key)