當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。