Example #1
0
 def onDateChange(self, *a, **kw):
     CustomizableCalObj.onDateChange(self, *a, **kw)
     for i, label in enumerate(self.labelBox.get_children()):
         text = ui.cell.format(ud.dateFormatBin, label.mode)
         if i == 0:
             text = "<b>%s</b>" % text
         label.set_label(text)
Example #2
0
	def onDateChange(self, *a, **kw):
		CustomizableCalObj.onDateChange(self, *a, **kw)
		for i, label in enumerate(self.labelBox.get_children()):
			text = ui.cell.format(ud.dateFormatBin, label.mode)
			if i == 0:
				text = "<b>%s</b>" % text
			label.set_label(text)
Example #3
0
 def onDateChange(self, *a, **kw):
     from scal3.season import getSeasonNamePercentFromJd
     CustomizableCalObj.onDateChange(self, *a, **kw)
     name, frac = getSeasonNamePercentFromJd(ui.cell.jd)
     if rtl:
         percent = '%d%%' % (frac * 100)
     else:
         percent = '%%%d' % (frac * 100)
     self.set_text(
         _(name) + ' - ' + textNumEncode(
             percent,
             changeDot=True,
         ))
     self.set_fraction(frac)
Example #4
0
 def onDateChange(self, *a, **kw):
     from scal3.season import getSeasonNamePercentFromJd
     CustomizableCalObj.onDateChange(self, *a, **kw)
     name, frac = getSeasonNamePercentFromJd(
         ui.cell.jd, ui.seasonPBar_southernHemisphere)
     if rtl:
         percent = "%d%%" % (frac * 100)
     else:
         percent = "%%%d" % (frac * 100)
     self.set_text(
         _(name) + " - " + textNumEncode(
             percent,
             changeDot=True,
         ))
     self.set_fraction(frac)
Example #5
0
	def onDateChange(self, *a, **kw):
		from scal3.season import getSeasonNamePercentFromJd
		CustomizableCalObj.onDateChange(self, *a, **kw)
		name, frac = getSeasonNamePercentFromJd(ui.cell.jd)
		if rtl:
			percent = '%d%%'%(frac*100)
		else:
			percent = '%%%d'%(frac*100)
		self.set_text(
			_(name) +
			' - ' +
			textNumEncode(
				percent,
				changeDot=True,
			)
		)
		self.set_fraction(frac)
Example #6
0
	def onDateChange(self, *a, **kw):
		from scal3.season import getSeasonNamePercentFromJd
		CustomizableCalObj.onDateChange(self, *a, **kw)
		name, frac = getSeasonNamePercentFromJd(ui.cell.jd, ui.seasonPBar_southernHemisphere)
		if rtl:
			percent = "%d%%" % (frac * 100)
		else:
			percent = "%%%d" % (frac * 100)
		self.set_text(
			_(name) +
			" - " +
			textNumEncode(
				percent,
				changeDot=True,
			)
		)
		self.set_fraction(frac)
Example #7
0
    def onDateChange(self, *a, **kw):
        CustomizableCalObj.onDateChange(self, *a, **kw)

        year = ui.cell.year
        jd0 = core.primary_to_jd(year, 1, 1)
        jd1 = ui.cell.jd
        jd2 = core.primary_to_jd(year + 1, 1, 1)
        length = jd2 - jd0
        past = jd1 - jd0
        fraction = float(past) / length
        percent = "%%%d" % (fraction * 100)
        self.set_text(
            textNumEncode(
                percent,
                changeDot=True,
            ) + "   =   " + "%s%s / %s%s" %
            (_(past), _(" days"), _(length), _(" days")))
        self.set_fraction(fraction)
Example #8
0
	def onDateChange(self, *a, **kw):
		CustomizableCalObj.onDateChange(self, *a, **kw)

		year = ui.cell.year
		jd0 = core.primary_to_jd(year, 1, 1)
		jd1 = ui.cell.jd
		jd2 = core.primary_to_jd(year+1, 1, 1)
		length = jd2 - jd0
		past = jd1 - jd0
		fraction = float(past) / length
		percent = "%%%d" % (fraction * 100)
		self.set_text(
			textNumEncode(
				percent,
				changeDot=True,
			) +
			"   =   " +
			"%s%s / %s%s" %(_(past), _(" days"), _(length), _(" days"))
		)
		self.set_fraction(fraction)
Example #9
0
	def onDateChange(self, *a, **kw):
		CustomizableCalObj.onDateChange(self, *a, **kw)
		self.setText(ui.cell.pluginsText)
Example #10
0
 def onDateChange(self, *a, **kw):
     CustomizableCalObj.onDateChange(self, *a, **kw)
     self.queue_draw()
Example #11
0
 def onDateChange(self, *a, **kw):
     CustomizableCalObj.onDateChange(self, *a, **kw)
     self.setText(ui.cell.pluginsText)
Example #12
0
	def onDateChange(self, *a, **kw):
		CustomizableCalObj.onDateChange(self, *a, **kw)
		self.queue_draw()