no message
svn: r419
This commit is contained in:
parent
b100b8f24e
commit
cf10a2c487
@ -106,6 +106,7 @@ report_dir = "./"
|
||||
web_dir = "./"
|
||||
db_dir = "./"
|
||||
id_visible = 0
|
||||
id_edit = 0
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -151,6 +152,7 @@ def loadConfig(call):
|
||||
global usetabs
|
||||
global uncompress
|
||||
global id_visible
|
||||
global id_edit
|
||||
global show_detail
|
||||
global hide_altnames
|
||||
global lastfile
|
||||
@ -172,6 +174,7 @@ def loadConfig(call):
|
||||
usetabs = gnome.config.get_bool("/gramps/config/UseTabs")
|
||||
uncompress = gnome.config.get_bool("/gramps/config/DontCompressXML")
|
||||
id_visible = gnome.config.get_bool("/gramps/config/IdVisible")
|
||||
id_edit = gnome.config.get_bool("/gramps/config/IdEdit")
|
||||
show_detail = gnome.config.get_bool("/gramps/config/ShowDetail")
|
||||
status_bar = gnome.config.get_int("/gramps/config/StatusBar")
|
||||
display_attr = gnome.config.get_bool("/gramps/config/DisplayAttr")
|
||||
@ -244,6 +247,8 @@ def loadConfig(call):
|
||||
uncompress = 0
|
||||
if id_visible == None:
|
||||
id_visible = 0
|
||||
if id_edit == None:
|
||||
id_edit = 0
|
||||
if show_detail == None:
|
||||
show_detail = 0
|
||||
if status_bar == None:
|
||||
@ -345,6 +350,7 @@ def on_propertybox_apply(obj,page):
|
||||
global usetabs
|
||||
global uncompress
|
||||
global id_visible
|
||||
global id_edit
|
||||
global status_bar
|
||||
global display_attr
|
||||
global attr_name
|
||||
@ -366,6 +372,7 @@ def on_propertybox_apply(obj,page):
|
||||
usetabs = prefsTop.get_widget("usetabs").get_active()
|
||||
uncompress = prefsTop.get_widget("uncompress").get_active()
|
||||
id_visible = prefsTop.get_widget("gid_visible").get_active()
|
||||
id_edit = prefsTop.get_widget("gid_edit").get_active()
|
||||
hide_altnames = prefsTop.get_widget("display_altnames").get_active()
|
||||
paper_obj = prefsTop.get_widget("paper_size").get_menu().get_active()
|
||||
output_obj = prefsTop.get_widget("output_format").get_menu().get_active()
|
||||
@ -395,6 +402,7 @@ def on_propertybox_apply(obj,page):
|
||||
gnome.config.set_bool("/gramps/config/UseTabs",usetabs)
|
||||
gnome.config.set_bool("/gramps/config/DontCompressXML",uncompress)
|
||||
gnome.config.set_bool("/gramps/config/IdVisible",id_visible)
|
||||
gnome.config.set_bool("/gramps/config/IdEdit",id_edit)
|
||||
gnome.config.set_bool("/gramps/config/ShowDetail",show_detail)
|
||||
gnome.config.set_int("/gramps/config/StatusBar",status_bar)
|
||||
gnome.config.set_bool("/gramps/config/DisplayAttr",display_attr)
|
||||
@ -532,6 +540,7 @@ def display_preferences_box():
|
||||
pbox = prefsTop.get_widget("propertybox")
|
||||
auto = prefsTop.get_widget("autoload")
|
||||
vis = prefsTop.get_widget("gid_visible")
|
||||
idedit = prefsTop.get_widget("gid_edit")
|
||||
tabs = prefsTop.get_widget("usetabs")
|
||||
compress = prefsTop.get_widget("uncompress")
|
||||
detail = prefsTop.get_widget("showdetail")
|
||||
@ -542,6 +551,7 @@ def display_preferences_box():
|
||||
tabs.set_active(usetabs)
|
||||
compress.set_active(uncompress)
|
||||
vis.set_active(id_visible)
|
||||
idedit.set_active(id_edit)
|
||||
|
||||
if status_bar == 0:
|
||||
prefsTop.get_widget("stat1").set_active(1)
|
||||
|
@ -971,32 +971,6 @@
|
||||
<row_spacing>0</row_spacing>
|
||||
<column_spacing>0</column_spacing>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>gid</name>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>2</left_attach>
|
||||
<right_attach>3</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>user_data</name>
|
||||
@ -1126,6 +1100,30 @@
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<name>gid</name>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>False</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
<child>
|
||||
<left_attach>2</left_attach>
|
||||
<right_attach>3</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>2</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -148,6 +148,7 @@ class EditPerson:
|
||||
self.attr_source = self.get_widget("attr_source")
|
||||
self.name_note = self.get_widget("name_note")
|
||||
self.name_source = self.get_widget("name_source")
|
||||
self.gid = self.get_widget("gid")
|
||||
|
||||
self.elist = person.getEventList()[:]
|
||||
self.nlist = person.getAlternateNames()[:]
|
||||
@ -203,7 +204,8 @@ class EditPerson:
|
||||
const.surnames.sort()
|
||||
self.get_widget("lastNameList").set_popdown_strings(const.surnames)
|
||||
|
||||
self.get_widget("gid").set_text(person.getId())
|
||||
self.gid.set_text(person.getId())
|
||||
self.gid.set_editable(Config.id_edit)
|
||||
self.event_list.set_column_visibility(3,Config.show_detail)
|
||||
self.name_list.set_column_visibility(1,Config.show_detail)
|
||||
self.attr_list.set_column_visibility(2,Config.show_detail)
|
||||
@ -453,10 +455,13 @@ def did_data_change(obj):
|
||||
dplace = epo.dplace.get_text()
|
||||
gender = epo.is_male.get_active()
|
||||
text = epo.notes_field.get_chars(0,-1)
|
||||
idval = epo.gid.get_text()
|
||||
|
||||
changed = 0
|
||||
name = person.getPrimaryName()
|
||||
|
||||
if person.getId() != idval:
|
||||
changed = 1
|
||||
if suffix != name.getSuffix() or surname != name.getSurname():
|
||||
changed = 1
|
||||
if given != name.getFirstName() or nick != person.getNickName():
|
||||
@ -1108,9 +1113,20 @@ def save_person(obj):
|
||||
given = epo.given.get_text()
|
||||
nick = epo.nick.get_text()
|
||||
title = epo.title.get_text()
|
||||
idval = epo.gid.get_text()
|
||||
|
||||
name = epo.pname
|
||||
|
||||
if idval != person.getId():
|
||||
m = epo.db.getPersonMap()
|
||||
if not m.has_key(idval):
|
||||
person.setId(idval)
|
||||
else:
|
||||
n = Config.nameof(m[idval])
|
||||
msg1 = _("GRAMPS ID value was not changed.")
|
||||
msg2 = _("%s is already used by %s") % (idval,n)
|
||||
GnomeWarningDialog("%s\n%s" % (msg1,msg2))
|
||||
|
||||
if suffix != name.getSuffix():
|
||||
name.setSuffix(suffix)
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table13</name>
|
||||
<rows>5</rows>
|
||||
<rows>6</rows>
|
||||
<columns>2</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
<row_spacing>0</row_spacing>
|
||||
@ -82,8 +82,8 @@
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>4</top_attach>
|
||||
<bottom_attach>5</bottom_attach>
|
||||
<top_attach>5</top_attach>
|
||||
<bottom_attach>6</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
@ -111,8 +111,8 @@
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>4</top_attach>
|
||||
<bottom_attach>5</bottom_attach>
|
||||
<top_attach>5</top_attach>
|
||||
<bottom_attach>6</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
@ -239,6 +239,35 @@
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCheckButton</class>
|
||||
<name>gid_edit</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>on_object_toggled</handler>
|
||||
<object>propertybox</object>
|
||||
<last_modification_time>Thu, 12 Jul 2001 13:42:44 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Allow internal GRAMPS ID numbers to be edited</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>4</top_attach>
|
||||
<bottom_attach>5</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
|
Loading…
Reference in New Issue
Block a user