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
0
    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
0
 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()