本文整理汇总了Python中Settings.Settings.sync方法的典型用法代码示例。如果您正苦于以下问题:Python Settings.sync方法的具体用法?Python Settings.sync怎么用?Python Settings.sync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings.Settings
的用法示例。
在下文中一共展示了Settings.sync方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: saveSettings
# 需要导入模块: from Settings import Settings [as 别名]
# 或者: from Settings.Settings import sync [as 别名]
def saveSettings(self):
Settings.set("workDayLength", fh.hoursToSeconds(self.stprWorkHours.intValue()))
dateStr = str(self.dpkrWorkStarts.dateValue())
Settings.set("workEndTime", dateStr[11:16])
Settings.set("logEditCommand", self.edtLogEditCommand.stringValue())
Settings.set("logDateTimeFormat", self.edtDateTimeFormat.stringValue())
Settings.set("notificationTime", self.stprNotificationTime.intValue())
Settings.set("notificationRepeatTime", self.stprNotificationRepeatTime.intValue())
Settings.sync()
示例2: projectChange_
# 需要导入模块: from Settings import Settings [as 别名]
# 或者: from Settings.Settings import sync [as 别名]
def projectChange_(self, sender):
"""Project changed event"""
if self.pbtnProject.titleOfSelectedItem():
self.cbxInput.removeAllItems()
self.cbxInput.addItemsWithObjectValues_(Projects.getAutocomleteList(
self.pbtnProject.titleOfSelectedItem(), SlackingAutocompletes.get()))
if sender:
Settings.set("selectedProject", unicode(self.pbtnProject.titleOfSelectedItem()))
Settings.sync()
示例3: showStartHelpMessage
# 需要导入模块: from Settings import Settings [as 别名]
# 或者: from Settings.Settings import sync [as 别名]
def showStartHelpMessage(self):
"""Show alert with help message"""
alert = NSAlert.alloc().init()
alert.addButtonWithTitle_('OK')
alert.setMessageText_("Congrats, you started your working day!")
alert.setInformativeText_("Now start doing your working activity (e.g reading mail). "
"When you finish with your activity go back to MacTimeLog and type it in. "
"If your activity is slacking, use 2 asterisks (**) at the end of the activity's name.")
alert.setShowsSuppressionButton_(True)
alert.runModal()
if alert.suppressionButton().state() == NSOnState:
Settings.set("showHelpMessageOnStart", False)
Settings.sync()