* src/GrampsCfg.py: add cell renderer to combobox
svn: r7001
This commit is contained in:
parent
2b9c05714d
commit
323dd9033b
@ -1,4 +1,5 @@
|
|||||||
2006-07-06 Don Allingham <don@gramps-project.org>
|
2006-07-06 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/GrampsCfg.py: add cell renderer to combobox
|
||||||
* help/C/gramps-manual.xml: update doc
|
* help/C/gramps-manual.xml: update doc
|
||||||
|
|
||||||
2006-07-06 Alex Roitman <shura@gramps-project.org>
|
2006-07-06 Alex Roitman <shura@gramps-project.org>
|
||||||
|
@ -222,18 +222,20 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
|
|||||||
obox = gtk.ComboBox()
|
obox = gtk.ComboBox()
|
||||||
obox_data = {}
|
obox_data = {}
|
||||||
obox_model = gtk.ListStore(str, int)
|
obox_model = gtk.ListStore(str, int)
|
||||||
|
cell = gtk.CellRendererText()
|
||||||
|
obox.pack_start(cell, True)
|
||||||
|
obox.add_attribute(cell, 'text', 0)
|
||||||
index = 0
|
index = 0
|
||||||
for t, v in format_list:
|
for t, v in format_list:
|
||||||
obox_model.append(row=[t, v])
|
obox_model.append(row=[t, v])
|
||||||
print [t, v]
|
|
||||||
obox_data[v] = index
|
obox_data[v] = index
|
||||||
index += 1
|
index += 1
|
||||||
|
|
||||||
obox.set_model(obox_model)
|
obox.set_model(obox_model)
|
||||||
|
|
||||||
#active = int(Config.get(Config.NAME_FORMAT))
|
active = int(Config.get(Config.NAME_FORMAT))
|
||||||
#obox.set_active(active)
|
obox.set_active(active)
|
||||||
# obox.connect('changed', self.name_changed)
|
obox.connect('changed', self.name_changed)
|
||||||
lwidget = BasicLabel("%s: " % _('Preset format'))
|
lwidget = BasicLabel("%s: " % _('Preset format'))
|
||||||
|
|
||||||
# custom_ui = self.build_custom_name_ui()
|
# custom_ui = self.build_custom_name_ui()
|
||||||
@ -281,16 +283,16 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
## return table
|
## return table
|
||||||
|
|
||||||
## def name_changed(self,obj):
|
def name_changed(self,obj):
|
||||||
## return
|
custom_text = NameDisplay.formats[Name.CUSTOM]
|
||||||
## custom_text = NameDisplay.formats[Name.CUSTOM]
|
if obj.get_active_text() == custom_text:
|
||||||
## if obj.get_active_text() == custom_text:
|
pass
|
||||||
## self.name_exp.set_sensitive(True)
|
#self.name_exp.set_sensitive(True)
|
||||||
## self.name_exp.set_expanded(True)
|
#self.name_exp.set_expanded(True)
|
||||||
## else:
|
else:
|
||||||
## Config.set(Config.NAME_FORMAT,obj.get_active())
|
Config.set(Config.NAME_FORMAT,obj.get_active())
|
||||||
## self.name_exp.set_expanded(False)
|
#self.name_exp.set_expanded(False)
|
||||||
## self.name_exp.set_sensitive(False)
|
#self.name_exp.set_sensitive(False)
|
||||||
|
|
||||||
def add_formats_panel(self):
|
def add_formats_panel(self):
|
||||||
table = gtk.Table(3,8)
|
table = gtk.Table(3,8)
|
||||||
|
Loading…
Reference in New Issue
Block a user