当前位置: 首页>>代码示例>>Python>>正文


Python EditorDialog.get_value方法代码示例

本文整理汇总了Python中syncthing_gtk.editordialog.EditorDialog.get_value方法的典型用法代码示例。如果您正苦于以下问题:Python EditorDialog.get_value方法的具体用法?Python EditorDialog.get_value怎么用?Python EditorDialog.get_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在syncthing_gtk.editordialog.EditorDialog的用法示例。


在下文中一共展示了EditorDialog.get_value方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_value

# 需要导入模块: from syncthing_gtk.editordialog import EditorDialog [as 别名]
# 或者: from syncthing_gtk.editordialog.EditorDialog import get_value [as 别名]
 def get_value(self, key):
     if key == "addresses":
         return ",".join([strip_v(x) for x in self.values[key]])
     elif key == "compression":
         val = EditorDialog.get_value(self, key)
         # For syncthing <= 0.10.25
         if val in (True, "true"):
             return "always"
         elif val in (False, "false"):
             return "never"
         else:
             return val
     else:
         return EditorDialog.get_value(self, key)
开发者ID:nagyist,项目名称:syncthing-gtk,代码行数:16,代码来源:deviceeditor.py

示例2: get_value

# 需要导入模块: from syncthing_gtk.editordialog import EditorDialog [as 别名]
# 或者: from syncthing_gtk.editordialog.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)
开发者ID:GeoffreyFrogeye,项目名称:syncthing-gtk,代码行数:15,代码来源:foldereditor.py

示例3: get_value

# 需要导入模块: from syncthing_gtk.editordialog import EditorDialog [as 别名]
# 或者: from syncthing_gtk.editordialog.EditorDialog import get_value [as 别名]
	def get_value(self, key):
		if key == "listenAddresses":
			return ", ".join([ strip_v(x) for x in self.values[key]])
		elif key == "globalAnnounceServers":
			return ", ".join([ strip_v(x) for x in self.values["globalAnnounceServers"]])
		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)
开发者ID:syncthing,项目名称:syncthing-gtk,代码行数:15,代码来源:daemonsettings.py

示例4: get_value

# 需要导入模块: from syncthing_gtk.editordialog import EditorDialog [as 别名]
# 或者: from syncthing_gtk.editordialog.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 == "cleanoutDays":
			return self.get_burried_value("versioning/params/cleanoutDays", self.values, 0, int)
		elif key == "command":
			return self.get_burried_value("versioning/params/command", self.values, "")
		elif key == "versionsPath":
			return self.get_burried_value("versioning/params/versionsPath", self.values, "")
		elif key == "readOnly":
			return self.get_burried_value("type", self.values, "") in ("readonly", "sendonly")
		elif key == "receiveOnly":
			return self.get_burried_value("type", self.values, "") in ("receiveonly")
		elif key == "versioning":
			return self.get_burried_value("versioning/type", self.values, "")
		else:
			return EditorDialog.get_value(self, key)
开发者ID:syncthing,项目名称:syncthing-gtk,代码行数:21,代码来源:foldereditor.py

示例5: get_value

# 需要导入模块: from syncthing_gtk.editordialog import EditorDialog [as 别名]
# 或者: from syncthing_gtk.editordialog.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)
开发者ID:syncthing,项目名称:syncthing-gtk,代码行数:7,代码来源:uisettingsdialog.py


注:本文中的syncthing_gtk.editordialog.EditorDialog.get_value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。