Ejemplo n.º 1
0
class WidgetClass(gtk.VBox):
    def __init__(self, event):  ## FIXME
        gtk.VBox.__init__(self)
        self.event = event
        assert event.parent.name == "universityTerm"  ## FIXME
        sizeGroup = gtk.SizeGroup(gtk.SizeGroupMode.HORIZONTAL)
        #####
        if not event.parent.courses:
            showError(event.parent.noCourseError, ui.eventManDialog)
            raise RuntimeError("No courses added")
        self.courseIds = []
        self.courseNames = []
        combo = gtk.ComboBoxText()
        for course in event.parent.courses:
            self.courseIds.append(course[0])
            self.courseNames.append(course[1])
            combo.append_text(course[1])
        #combo.connect("changed", self.updateSummary)
        self.courseCombo = combo
        ##
        hbox = gtk.HBox()
        label = gtk.Label(_("Course"))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        pack(hbox, combo)
        ##
        pack(self, hbox)
        #####
        hbox = gtk.HBox()
        label = gtk.Label(_("Date"))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        self.dateInput = DateButton()
        pack(hbox, self.dateInput)
        pack(self, hbox)
        #####
        hbox = gtk.HBox()
        label = gtk.Label(_("Time"))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        ##
        self.dayTimeStartCombo = HourMinuteButton()
        self.dayTimeEndCombo = HourMinuteButton()
        ##
        #self.dayTimeStartCombo.get_child().set_direction(gtk.TextDirection.LTR)
        #self.dayTimeEndCombo.get_child().set_direction(gtk.TextDirection.LTR)
        ##
        pack(hbox, self.dayTimeStartCombo)
        pack(hbox, gtk.Label(" " + _("to") + " "))
        pack(hbox, self.dayTimeEndCombo)
        pack(self, hbox)
        ###########
        #hbox = gtk.HBox()
        #label = gtk.Label(_("Summary"))
        #label.set_alignment(0, 0.5)
        #sizeGroup.add_widget(label)
        #pack(hbox, label)
        #self.summaryEntry = gtk.Entry()
        #pack(hbox, self.summaryEntry, 1, 1)
        #pack(self, hbox)
        #####
        hbox = gtk.HBox()
        label = gtk.Label(_("Description"))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        self.descriptionInput = TextFrame()
        pack(hbox, self.descriptionInput, 1, 1)
        pack(self, hbox)
        #####
        hbox = gtk.HBox()
        label = gtk.Label(_("Icon"))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        self.iconSelect = IconSelectButton()
        #print(join(pixDir, self.icon))
        pack(hbox, self.iconSelect)
        pack(hbox, gtk.Label(""), 1, 1)
        pack(self, hbox)
        ######
        self.notificationBox = common.NotificationBox(event)
        pack(self, self.notificationBox)
        ######
        #self.filesBox = common.FilesBox(self.event)
        #pack(self, self.filesBox)
        ######
        self.courseCombo.set_active(0)
        #self.updateSummary()

    def focusSummary(self):
        pass

    #def updateSummary(self, widget=None):
    #	courseIndex = self.courseCombo.get_active()
    #	summary = _("%s Exam")%self.courseNames[courseIndex]
    #	self.summaryEntry.set_text(summary)
    #	self.event.summary = summary

    def updateWidget(self):  ## FIXME
        if self.event.courseId is None:
            pass
        else:
            self.courseCombo.set_active(
                self.courseIds.index(self.event.courseId))
        ##
        self.dateInput.set_value(self.event.getDate())
        ##
        timeRangeRule, ok = self.event["dayTimeRange"]
        if not ok:
            raise RuntimeError("no dayTimeRange rule")
        self.dayTimeStartCombo.set_value(timeRangeRule.dayTimeStart)
        self.dayTimeEndCombo.set_value(timeRangeRule.dayTimeEnd)
        ####
        #self.summaryEntry.set_text(self.event.summary)
        self.descriptionInput.set_text(self.event.description)
        self.iconSelect.set_filename(self.event.icon)
        ####
        self.notificationBox.updateWidget()
        ####
        #self.filesBox.updateWidget()

    def updateVars(self):  ## FIXME
        courseIndex = self.courseCombo.get_active()
        if courseIndex is None:
            showError(_("No course is selected"), ui.eventManDialog)
            raise RuntimeError("No courses is selected")
        else:
            self.event.courseId = self.courseIds[courseIndex]
        ##
        self.event.setDate(*tuple(self.dateInput.get_value()))
        ##
        timeRangeRule, ok = self.event["dayTimeRange"]
        if not ok:
            raise RuntimeError("no dayTimeRange rule")
        timeRangeRule.setRange(
            self.dayTimeStartCombo.get_value(),
            self.dayTimeEndCombo.get_value(),
        )
        ####
        #self.event.summary = self.summaryEntry.get_text()
        self.event.description = self.descriptionInput.get_text()
        self.event.icon = self.iconSelect.get_filename()
        ####
        self.notificationBox.updateVars()
        self.event.updateSummary()

    def modeComboChanged(self, obj=None):
        # overwrite method from common.WidgetClass
        newMode = self.modeCombo.get_active()
        self.dateInput.changeMode(self.event.mode, newMode)
        self.event.mode = newMode
Ejemplo n.º 2
0
class WidgetClass(common.WidgetClass):
    def __init__(self, event):## FIXME
        common.WidgetClass.__init__(self, event)
        ######
        sizeGroup = gtk.SizeGroup(gtk.SizeGroupMode.HORIZONTAL)
        ######
        hbox = gtk.HBox()
        label = gtk.Label(_('Start'))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        self.startDateInput = DateButton()
        pack(hbox, self.startDateInput)
        ###
        pack(hbox, gtk.Label(''), 1, 1)
        pack(self, hbox)
        ######
        hbox = gtk.HBox()
        label = gtk.Label(_('Repeat Every '))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        self.weeksSpin = IntSpinButton(1, 99999)
        pack(hbox, self.weeksSpin)
        pack(hbox, gtk.Label('  '+_(' Weeks')))
        ###
        pack(hbox, gtk.Label(''), 1, 1)
        pack(self, hbox)
        ######
        hbox = gtk.HBox()
        label = gtk.Label(_('End'))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        self.endDateInput = DateButton()
        pack(hbox, self.endDateInput)
        ###
        pack(hbox, gtk.Label(''), 1, 1)
        pack(self, hbox)
        #########
        hbox = gtk.HBox()
        label = gtk.Label(_('Time'))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        ##
        self.dayTimeStartInput = HourMinuteButton()
        self.dayTimeEndInput = HourMinuteButton()
        ##
        pack(hbox, self.dayTimeStartInput)
        pack(hbox, gtk.Label(' ' + _('to') + ' '))
        pack(hbox, self.dayTimeEndInput)
        pack(self, hbox)
        #############
        #self.notificationBox = common.NotificationBox(event)
        #pack(self, self.notificationBox)
        #############
        #self.filesBox = common.FilesBox(self.event)
        #pack(self, self.filesBox)
    def updateWidget(self):## FIXME
        common.WidgetClass.updateWidget(self)
        mode = self.event.mode
        ###
        self.startDateInput.set_value(jd_to(self.event.getStartJd(), mode))
        self.weeksSpin.set_value(self.event['cycleWeeks'].weeks)
        self.endDateInput.set_value(jd_to(self.event.getEndJd(), mode))
        ###
        timeRangeRule = self.event['dayTimeRange']
        self.dayTimeStartInput.set_value(timeRangeRule.dayTimeStart)
        self.dayTimeEndInput.set_value(timeRangeRule.dayTimeEnd)
    def updateVars(self):## FIXME
        common.WidgetClass.updateVars(self)
        self.event['start'].setDate(self.startDateInput.get_value())
        self.event['end'].setDate(self.endDateInput.get_value())
        self.event['cycleWeeks'].setData(self.weeksSpin.get_value())
        ###
        self.event['dayTimeRange'].setRange(
            self.dayTimeStartInput.get_value(),
            self.dayTimeEndInput.get_value(),
        )
    def modeComboChanged(self, obj=None):## overwrite method from common.WidgetClass
        newMode = self.modeCombo.get_active()
        self.startDateInput.changeMode(self.event.mode, newMode)
        self.endDateInput.changeMode(self.event.mode, newMode)
        self.event.mode = newMode
Ejemplo n.º 3
0
class WidgetClass(common.WidgetClass):
	def __init__(self, event):## FIXME
		event.setJd(ui.cell.jd)
		common.WidgetClass.__init__(self, event)
		######
		sizeGroup = gtk.SizeGroup(gtk.SizeGroupMode.HORIZONTAL)
		######
		hbox = gtk.HBox()
		label = gtk.Label(_('Start'))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		self.startDateInput = DateButton()
		pack(hbox, self.startDateInput)
		###
		pack(hbox, gtk.Label(''), 1, 1)
		pack(self, hbox)
		######
		hbox = gtk.HBox()
		label = gtk.Label(_('End'))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		self.endDateInput = DateButton()
		pack(hbox, self.endDateInput)
		###
		pack(hbox, gtk.Label(''), 1, 1)
		pack(self, hbox)
		######
		hbox = gtk.HBox()
		label = gtk.Label(_('Day of Month'))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		self.daySpin = DaySpinButton()
		pack(hbox, self.daySpin)
		###
		pack(hbox, gtk.Label(''), 1, 1)
		pack(self, hbox)
		#########
		hbox = gtk.HBox()
		label = gtk.Label(_('Time'))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		##
		self.dayTimeStartInput = HourMinuteButton()
		self.dayTimeEndInput = HourMinuteButton()
		##
		pack(hbox, self.dayTimeStartInput)
		pack(hbox, gtk.Label(' ' + _('to') + ' '))
		pack(hbox, self.dayTimeEndInput)
		pack(self, hbox)
		#############
		#self.notificationBox = common.NotificationBox(event)
		#pack(self, self.notificationBox)
		#############
		#self.filesBox = common.FilesBox(self.event)
		#pack(self, self.filesBox)
	def updateWidget(self):## FIXME
		common.WidgetClass.updateWidget(self)
		mode = self.event.mode
		###
		self.startDateInput.set_value(jd_to(self.event.getStartJd(), mode))
		self.endDateInput.set_value(jd_to(self.event.getEndJd(), mode))
		###
		self.daySpin.set_value(self.event.getDay())
		###
		timeRangeRule = self.event['dayTimeRange']
		self.dayTimeStartInput.set_value(timeRangeRule.dayTimeStart)
		self.dayTimeEndInput.set_value(timeRangeRule.dayTimeEnd)
	def updateVars(self):## FIXME
		common.WidgetClass.updateVars(self)
		self.event['start'].setDate(self.startDateInput.get_value())
		self.event['end'].setDate(self.endDateInput.get_value())
		self.event.setDay(self.daySpin.get_value())
		###
		self.event['dayTimeRange'].setRange(
			self.dayTimeStartInput.get_value(),
			self.dayTimeEndInput.get_value(),
		)
	def modeComboChanged(self, obj=None):## overwrite method from common.WidgetClass
		newMode = self.modeCombo.get_active()
		self.startDateInput.changeMode(self.event.mode, newMode)
		self.endDateInput.changeMode(self.event.mode, newMode)
		self.event.mode = newMode
Ejemplo n.º 4
0
class WidgetClass(common.WidgetClass):
	def __init__(self, event):## FIXME
		common.WidgetClass.__init__(self, event)
		######
		sizeGroup = gtk.SizeGroup(gtk.SizeGroupMode.HORIZONTAL)
		######
		hbox = gtk.HBox()
		label = gtk.Label(_("Start"))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		self.startDateInput = DateButton()
		pack(hbox, self.startDateInput)
		###
		pack(hbox, gtk.Label(""), 1, 1)
		pack(self, hbox)
		######
		hbox = gtk.HBox()
		label = gtk.Label(_("Repeat Every "))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		self.weeksSpin = IntSpinButton(1, 99999)
		pack(hbox, self.weeksSpin)
		pack(hbox, gtk.Label("  " + _(" Weeks")))
		###
		pack(hbox, gtk.Label(""), 1, 1)
		pack(self, hbox)
		######
		hbox = gtk.HBox()
		label = gtk.Label(_("End"))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		self.endDateInput = DateButton()
		pack(hbox, self.endDateInput)
		###
		pack(hbox, gtk.Label(""), 1, 1)
		pack(self, hbox)
		#########
		hbox = gtk.HBox()
		label = gtk.Label(_("Time"))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		##
		self.dayTimeStartInput = HourMinuteButton()
		self.dayTimeEndInput = HourMinuteButton()
		##
		pack(hbox, self.dayTimeStartInput)
		pack(hbox, gtk.Label(" " + _("to") + " "))
		pack(hbox, self.dayTimeEndInput)
		pack(self, hbox)
		#############
		#self.notificationBox = common.NotificationBox(event)
		#pack(self, self.notificationBox)
		#############
		#self.filesBox = common.FilesBox(self.event)
		#pack(self, self.filesBox)

	def updateWidget(self):## FIXME
		common.WidgetClass.updateWidget(self)
		mode = self.event.mode
		###
		self.startDateInput.set_value(jd_to(self.event.getStartJd(), mode))
		###
		cycleWeeks, ok = self.event["cycleWeeks"]
		if not ok:
			raise RuntimeError("no cycleWeeks rule")
		self.weeksSpin.set_value(cycleWeeks.weeks)
		###
		self.endDateInput.set_value(jd_to(self.event.getEndJd(), mode))
		###
		dayTimeRange, ok = self.event["dayTimeRange"]
		self.dayTimeStartInput.set_value(dayTimeRange.dayTimeStart)
		self.dayTimeEndInput.set_value(dayTimeRange.dayTimeEnd)

	def updateVars(self):## FIXME
		common.WidgetClass.updateVars(self)
		###
		start, ok = self.event["start"]
		if not ok:
			raise RuntimeError("no start rule")
		start.setDate(self.startDateInput.get_value())
		###
		end, ok = self.event["end"]
		if not ok:
			raise RuntimeError("no end rule")
		end.setDate(self.endDateInput.get_value())
		###
		cycleWeeks, ok = self.event["cycleWeeks"]
		if not ok:
			raise RuntimeError("no cycleWeeks rule")
		cycleWeeks.setData(self.weeksSpin.get_value())
		###
		dayTimeRange, ok = self.event["dayTimeRange"]
		if not ok:
			raise RuntimeError("no dayTimeRange rule")
		dayTimeRange.setRange(
			self.dayTimeStartInput.get_value(),
			self.dayTimeEndInput.get_value(),
		)

	def modeComboChanged(self, obj=None):
		# overwrite method from common.WidgetClass
		newMode = self.modeCombo.get_active()
		self.startDateInput.changeMode(self.event.mode, newMode)
		self.endDateInput.changeMode(self.event.mode, newMode)
		self.event.mode = newMode
Ejemplo n.º 5
0
class WidgetClass(gtk.VBox):
    def __init__(self, event):## FIXME
        gtk.VBox.__init__(self)
        self.event = event
        assert event.parent.name == 'universityTerm' ## FIXME
        sizeGroup = gtk.SizeGroup(gtk.SizeGroupMode.HORIZONTAL)
        #####
        if not event.parent.courses:
            showError(event.parent.noCourseError, ui.eventManDialog)
            raise RuntimeError('No courses added')
        self.courseIds = []
        self.courseNames = []
        combo = gtk.ComboBoxText()
        for course in event.parent.courses:
            self.courseIds.append(course[0])
            self.courseNames.append(course[1])
            combo.append_text(course[1])
        #combo.connect('changed', self.updateSummary)
        self.courseCombo = combo
        ##
        hbox = gtk.HBox()
        label = gtk.Label(_('Course'))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        pack(hbox, combo)
        ##
        pack(self, hbox)
        #####
        hbox = gtk.HBox()
        label = gtk.Label(_('Date'))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        self.dateInput = DateButton()
        pack(hbox, self.dateInput)
        pack(self, hbox)
        #####
        hbox = gtk.HBox()
        label = gtk.Label(_('Time'))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        ##
        self.dayTimeStartCombo = HourMinuteButton()
        self.dayTimeEndCombo = HourMinuteButton()
        ##
        #self.dayTimeStartCombo.get_child().set_direction(gtk.TextDirection.LTR)
        #self.dayTimeEndCombo.get_child().set_direction(gtk.TextDirection.LTR)
        ##
        pack(hbox, self.dayTimeStartCombo)
        pack(hbox, gtk.Label(' ' + _('to') + ' '))
        pack(hbox, self.dayTimeEndCombo)
        pack(self, hbox)
        ###########
        #hbox = gtk.HBox()
        #label = gtk.Label(_('Summary'))
        #label.set_alignment(0, 0.5)
        #sizeGroup.add_widget(label)
        #pack(hbox, label)
        #self.summaryEntry = gtk.Entry()
        #pack(hbox, self.summaryEntry, 1, 1)
        #pack(self, hbox)
        #####
        hbox = gtk.HBox()
        label = gtk.Label(_('Description'))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        self.descriptionInput = TextFrame()
        pack(hbox, self.descriptionInput, 1, 1)
        pack(self, hbox)
        #####
        hbox = gtk.HBox()
        label = gtk.Label(_('Icon'))
        label.set_alignment(0, 0.5)
        sizeGroup.add_widget(label)
        pack(hbox, label)
        self.iconSelect = IconSelectButton()
        #print(join(pixDir, self.icon))
        pack(hbox, self.iconSelect)
        pack(hbox, gtk.Label(''), 1, 1)
        pack(self, hbox)
        ######
        self.notificationBox = common.NotificationBox(event)
        pack(self, self.notificationBox)
        ######
        #self.filesBox = common.FilesBox(self.event)
        #pack(self, self.filesBox)
        ######
        self.courseCombo.set_active(0)
        #self.updateSummary()
    def focusSummary(self):
        pass
    #def updateSummary(self, widget=None):
    #    courseIndex = self.courseCombo.get_active()
    #    summary = _('%s Exam')%self.courseNames[courseIndex]
    #    self.summaryEntry.set_text(summary)
    #    self.event.summary = summary
    def updateWidget(self):## FIXME
        if self.event.courseId is None:
            pass
        else:
            self.courseCombo.set_active(self.courseIds.index(self.event.courseId))
        ##
        self.dateInput.set_value(self.event.getDate())
        ##
        timeRangeRule = self.event['dayTimeRange']
        self.dayTimeStartCombo.set_value(timeRangeRule.dayTimeStart)
        self.dayTimeEndCombo.set_value(timeRangeRule.dayTimeEnd)
        ####
        #self.summaryEntry.set_text(self.event.summary)
        self.descriptionInput.set_text(self.event.description)
        self.iconSelect.set_filename(self.event.icon)
        ####
        self.notificationBox.updateWidget()
        ####
        #self.filesBox.updateWidget()
    def updateVars(self):## FIXME
        courseIndex = self.courseCombo.get_active()
        if courseIndex is None:
            showError(_('No course is selected'), ui.eventManDialog)
            raise RuntimeError('No courses is selected')
        else:
            self.event.courseId = self.courseIds[courseIndex]
        ##
        self.event.setDate(*tuple(self.dateInput.get_value()))
        ##
        self.event['dayTimeRange'].setRange(
            self.dayTimeStartCombo.get_value(),
            self.dayTimeEndCombo.get_value(),
        )
        ####
        #self.event.summary = self.summaryEntry.get_text()
        self.event.description = self.descriptionInput.get_text()
        self.event.icon = self.iconSelect.get_filename()
        ####
        self.notificationBox.updateVars()
        self.event.updateSummary()
    def modeComboChanged(self, obj=None):## overwrite method from common.WidgetClass
        newMode = self.modeCombo.get_active()
        self.dateInput.changeMode(self.event.mode, newMode)
        self.event.mode = newMode
Ejemplo n.º 6
0
class WidgetClass(common.WidgetClass):
	def __init__(self, event):## FIXME
		event.setJd(ui.cell.jd)
		common.WidgetClass.__init__(self, event)
		######
		sizeGroup = gtk.SizeGroup(gtk.SizeGroupMode.HORIZONTAL)
		######
		hbox = gtk.HBox()
		label = gtk.Label(_("Start"))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		self.startDateInput = DateButton()
		pack(hbox, self.startDateInput)
		###
		pack(hbox, gtk.Label(""), 1, 1)
		pack(self, hbox)
		######
		hbox = gtk.HBox()
		label = gtk.Label(_("End"))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		self.endDateInput = DateButton()
		pack(hbox, self.endDateInput)
		###
		pack(hbox, gtk.Label(""), 1, 1)
		pack(self, hbox)
		######
		hbox = gtk.HBox()
		label = gtk.Label(_("Day of Month"))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		self.daySpin = DaySpinButton()
		pack(hbox, self.daySpin)
		###
		pack(hbox, gtk.Label(""), 1, 1)
		pack(self, hbox)
		#########
		hbox = gtk.HBox()
		label = gtk.Label(_("Time"))
		label.set_alignment(0, 0.5)
		sizeGroup.add_widget(label)
		pack(hbox, label)
		##
		self.dayTimeStartInput = HourMinuteButton()
		self.dayTimeEndInput = HourMinuteButton()
		##
		pack(hbox, self.dayTimeStartInput)
		pack(hbox, gtk.Label(" " + _("to") + " "))
		pack(hbox, self.dayTimeEndInput)
		pack(self, hbox)
		#############
		#self.notificationBox = common.NotificationBox(event)
		#pack(self, self.notificationBox)
		#############
		#self.filesBox = common.FilesBox(self.event)
		#pack(self, self.filesBox)

	def updateWidget(self):## FIXME
		common.WidgetClass.updateWidget(self)
		mode = self.event.mode
		###
		self.startDateInput.set_value(jd_to(self.event.getStartJd(), mode))
		self.endDateInput.set_value(jd_to(self.event.getEndJd(), mode))
		###
		self.daySpin.set_value(self.event.getDay())
		###
		dayTimeRange, ok = self.event["dayTimeRange"]
		if not ok:
			raise RuntimeError("no dayTimeRange rule")
		self.dayTimeStartInput.set_value(dayTimeRange.dayTimeStart)
		self.dayTimeEndInput.set_value(dayTimeRange.dayTimeEnd)

	def updateVars(self):## FIXME
		common.WidgetClass.updateVars(self)
		##
		start, ok = self.event["start"]
		if not ok:
			raise RuntimeError("no start rule")
		start.setDate(self.startDateInput.get_value())
		##
		end, ok = self.event["end"]
		if not ok:
			raise RuntimeError("no end rule")
		end.setDate(self.endDateInput.get_value())
		##
		self.event.setDay(self.daySpin.get_value())
		###
		dayTimeRange, ok = self.event["dayTimeRange"]
		if not ok:
			raise RuntimeError("no dayTimeRange rule")
		dayTimeRange.setRange(
			self.dayTimeStartInput.get_value(),
			self.dayTimeEndInput.get_value(),
		)

	def modeComboChanged(self, obj=None):
		# overwrite method from common.WidgetClass
		newMode = self.modeCombo.get_active()
		self.startDateInput.changeMode(self.event.mode, newMode)
		self.endDateInput.changeMode(self.event.mode, newMode)
		self.event.mode = newMode