本文整理汇总了Python中Settings.Settings.getDefaultSettings方法的典型用法代码示例。如果您正苦于以下问题:Python Settings.getDefaultSettings方法的具体用法?Python Settings.getDefaultSettings怎么用?Python Settings.getDefaultSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings.Settings
的用法示例。
在下文中一共展示了Settings.getDefaultSettings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Settings_GTK
# 需要导入模块: from Settings import Settings [as 别名]
# 或者: from Settings.Settings import getDefaultSettings [as 别名]
#.........这里部分代码省略.........
nameWidget.set_text(user)
passWidget.set_text(password)
del user
del password
else:
nameWidget.set_text("")
passWidget.set_text("")
checkbuttonCredentialsUsedWidget.set_active(self._settings_dict[areCredentialsUsedSettingName])
def __setCredentialsForProxy(self):
"""loads stored proxy credentials"""
self.__setCredentialsToWidgets("useProxy",
self.__wTree.get_widget("checkbuttonUseProxy"),
"proxy",
self.__wTree.get_widget("entryProxyUserName"),
self.__wTree.get_widget("entryProxyPassword"))
def __setCredentialsForUploaders(self):
"""loads stored accounts credentials"""
for name, accountWidgets in self.__accounts.items():
self.__setCredentialsToWidgets(
self._settings_class.getSettingNameForUsingUploaderPassword(name),
accountWidgets[2],
name,
accountWidgets[0],
accountWidgets[1]
)
def __buttonOKClicked(self, widget):
self.__window.destroy()
def __buttonResetClicked(self, widget):
self.__setComponentsToValues(self._settings_class.getDefaultSettings())
#self.__optipngBox.show()
def __scaleCompressionValueChanged(self, widget):
val = widget.get_value()
if (not self.__optipngInstalled) and val == 0 and self.__comboboxFileType.get_active() == 0:
self.__hscaleCompression.set_value(1)
def __comboboxFileTypeChanged(self, widget):
#if change from png to jpg change hscaleValue, change labels
index = self.__comboboxFileType.get_active()
if index != 0: # not png
self.__optipngBox.hide()
if index != 1: # not jpg
self.__labelScaleMax.set_text(_("shorter\ntime"))
self.__hscaleCompression.set_value(0)
if not self.__optipngInstalled and self.__comboboxFileType.get_active() == 0: # png
self.__optipngBox.show()
self.__hscaleCompression.set_value(1)
else:
self.__labelScaleMax.set_text(_("better\nquality"))
self.__hscaleCompression.set_value(75)
value = self.convertFileIndexToType(index)
self._settings_dict["fileType"] = value
self._settings_dict["fileSize"] = self.__hscaleCompression.get_value()
def __buttonInstallOptipng(self, widget):
print "install optipng"
#if system("command -v apt-get") == 0:
self.__optipngBox.hide()