示例#1
0
文件: day_info.py 项目: ilius/starcal
	def onDateChange(self, *a, **ka):
		ud.BaseCalObj.onDateChange(self, *a, **ka)
		for child in self.get_children():
			child.destroy()
		sgroup = gtk.SizeGroup(gtk.SizeGroupMode.HORIZONTAL)
		for i, module in calTypes.iterIndexModule():
			hbox = gtk.HBox()
			label = gtk.Label(_(module.desc))
			label.set_alignment(0, 0.5)
			pack(hbox, label)
			sgroup.add_widget(label)
			pack(hbox, gtk.Label("  "))
			###
			dateLabel = gtk.Label(ui.cell.format(ud.dateFormatBin, i))
			dateLabel.set_selectable(True)
			pack(
				hbox,
				dateLabel,
				0,
				0,
				0,
			)
			###
			pack(self, hbox)
		self.show_all()
示例#2
0
 def __init__(self):## , showInactive=True FIXME
     ls = gtk.ListStore(int, str)
     gtk.ComboBox.__init__(self)
     self.set_model(ls)
     ###
     cell = gtk.CellRendererText()
     pack(self, cell, True)
     self.add_attribute(cell, 'text', 1)
     ###
     for i, mod in calTypes.iterIndexModule():
         ls.append([i, _(mod.desc)])
示例#3
0
 def __init__(self):  ## , showInactive=True FIXME
     ls = gtk.ListStore(int, str)
     gtk.ComboBox.__init__(self)
     self.set_model(ls)
     ###
     cell = gtk.CellRendererText()
     pack(self, cell, True)
     self.add_attribute(cell, 'text', 1)
     ###
     for i, mod in calTypes.iterIndexModule():
         ls.append([i, _(mod.desc)])
示例#4
0
 def onDateChange(self, *a, **ka):
     ud.BaseCalObj.onDateChange(self, *a, **ka)
     for child in self.get_children():
         child.destroy()
     sgroup = gtk.SizeGroup(gtk.SizeGroupMode.HORIZONTAL)
     for i, module in calTypes.iterIndexModule():
         hbox = gtk.HBox()
         label = gtk.Label(_(module.desc))
         label.set_alignment(0, 0.5)
         pack(hbox, label)
         sgroup.add_widget(label)
         pack(hbox, gtk.Label('  '))
         ###
         pack(
             hbox,
             gtk.Label(ui.cell.format(ud.dateFormatBin, i)),
             0,
             0,
             0,
         )
         ###
         pack(self, hbox)
     self.show_all()