def __init__(self):## , showInactive=True FIXME ls = gtk.ListStore(int, str) gtk.ComboBox.__init__(self, ls) ### cell = gtk.CellRendererText() self.pack_start(cell, True) self.add_attribute(cell, 'text', 1) ### for i, mod in calTypes.iterIndexModule(): ls.append([i, _(mod.desc)])
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)])
def onDateChange(self, *a, **ka): ud.IntegratedCalObj.onDateChange(self, *a, **ka) for child in self.get_children(): child.destroy() sgroup = gtk.SizeGroup(gtk.SIZE_GROUP_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) ### pack(self, hbox) self.show_all()
def onDateChange(self, *a, **ka): ud.BaseCalObj.onDateChange(self, *a, **ka) for child in self.get_children(): child.destroy() sgroup = gtk.SizeGroup(gtk.SIZE_GROUP_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, ) ### pack(self, hbox) self.show_all()