예제 #1
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:
            userPrefs.selectedProject = unicode(
                    self.pbtnProject.titleOfSelectedItem())
            userPrefs.save()
예제 #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:
            userPrefs.selectedProject = unicode(
                self.pbtnProject.titleOfSelectedItem())
            userPrefs.save()
예제 #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:
         userPrefs.showHelpMessageOnStart = False
         userPrefs.save()
예제 #4
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:
         userPrefs.showHelpMessageOnStart = False
         userPrefs.save()
    def saveSettings(self):
        userPrefs.workDayLength = fh.hoursToSeconds(
            self.stprWorkHours.intValue())

        userPrefs.workEndTime = fh.nsDateToDatetime(
            self.dpkrWorkStarts.dateValue()).strftime("%H:%M")

        userPrefs.logEditComman = self.edtLogEditCommand.stringValue()

        userPrefs.logDateTimeFormat = self.edtDateTimeFormat.stringValue()

        userPrefs.notificationTime = self.stprNotificationTime.intValue()

        userPrefs.notificationRepeatTime = (
            self.stprNotificationRepeatTime.intValue())

        userPrefs.save()
예제 #6
0
    def saveSettings(self):
        userPrefs.workDayLength = fh.hoursToSeconds(
                self.stprWorkHours.intValue())

        userPrefs.workEndTime = fh.nsDateToDatetime(
                self.dpkrWorkStarts.dateValue()).strftime("%H:%M")

        userPrefs.logEditComman = self.edtLogEditCommand.stringValue()

        userPrefs.logDateTimeFormat = self.edtDateTimeFormat.stringValue()

        userPrefs.notificationTime = self.stprNotificationTime.intValue()

        userPrefs.notificationRepeatTime = (self.
                stprNotificationRepeatTime.intValue())

        userPrefs.save()