Example #1
0
 def clock_update(self):
     if self.clock:
         timeout_add(
             clockWaitMilliseconds(),
             self.clock_update,
         )
         self.set_value(localtime()[3:6])
Example #2
0
 def update(self):
     if self.running:
         timeout_add(clockWaitMilliseconds(), self.update)
         if self.local:
             self.set_label(strftime(self.format))
         else:
             self.set_label(strftime(self.format, time.gmtime()))
Example #3
0
	def clock_update(self):
		if self.clock:
			timeout_add(
				clockWaitMilliseconds(),
				self.clock_update,
			)
			self.set_value(localtime()[3:6])
Example #4
0
 def update(self):
     if self.running:
         timeout_add(clockWaitMilliseconds(), self.update)
         if self.seconds:
             l = "%.2d:%.2d:%.2d" % tuple(localtime()[3:6])
         else:
             l = "%.2d:%.2d" % tuple(localtime()[3:5])
         if self.bold:
             l = "<b>%s</b>" % l
         self.set_label(l)
Example #5
0
	def updateTimes(self):
		dt = now() % 1
		timeout_add(clockWaitMilliseconds(), self.updateTimes)
		#print("updateTimes", dt)
		lt = localtime()
		self.label_cur.set_label(
			_("Current:") +
			" %.4d/%.2d/%.2d - %.2d:%.2d:%.2d" % lt[:6]
		)
		if not self.editTime:
			self.timeInput.set_value(lt[3:6])
		if not self.editDate:
			self.dateInput.set_value(lt[:3])
		return False
Example #6
0
	def updateTimes(self):
		dt = now() % 1
		timeout_add(clockWaitMilliseconds(), self.updateTimes)
		#print("updateTimes", dt)
		lt = localtime()
		self.label_cur.set_label(
			_("Current:") +
			" %.4d/%.2d/%.2d - %.2d:%.2d:%.2d" % lt[:6]
		)
		if not self.editTime:
			self.timeInput.set_value(lt[3:6])
		if not self.editDate:
			self.dateInput.set_value(lt[:3])
		return False
Example #7
0
 def update(self):
     if self.running:
         timeout_add(clockWaitMilliseconds(), self.update)
         self.set_label(strftime(self.format))