2006-07-19 Zsolt Foldvari <zsolt.foldvari@nokia.com>

* src/GrampsCfg.py: UI improvements.
	* src/Config/_GrampsIniKeys.py: Proper key retrieval.



svn: r7045
This commit is contained in:
Alex Roitman 2006-07-19 19:56:15 +00:00
parent c06a516b50
commit 0d24ddc403
3 changed files with 18 additions and 11 deletions

View File

@ -1,3 +1,7 @@
2006-07-19 Zsolt Foldvari <zsolt.foldvari@nokia.com>
* src/GrampsCfg.py: UI improvements.
* src/Config/_GrampsIniKeys.py: Proper key retrieval.
2006-07-19 Alex Roitman <shura@gramps-project.org>
* src/plugins/EventCmp.py (filter_editor_clicked): Adapt to filter
editor changes; Stop separately adding birth and death.

View File

@ -116,12 +116,14 @@ class IniKeyClient:
def get_int(self, key):
""" Emulates gconf's client method """
if self.data[key[0]][key[1]].isdigit():
return int(self.data[key[0]][key[1]])
elif self.data[key[0]][key[1]].lower() in ["true"]:
return 1
else:
return 0
try:
val = int(self.data[key[0]][key[1]])
return val
except ValueError:
if self.data[key[0]][key[1]].lower() in ["true"]:
return 1
else:
return 0
def set_bool(self, key, val):
""" Emulates gconf's client method """

View File

@ -230,7 +230,7 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
self.examplename.set_patronymic('patr')
self.examplename.set_call_name('call')
table = gtk.Table(2,3)
table = gtk.Table(2,2)
table.set_border_width(12)
table.set_col_spacings(6)
table.set_row_spacings(6)
@ -270,8 +270,8 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
# put all these together
table.attach(lwidget, 0, 1, 0, 1, yoptions=0)
table.attach(self.fmt_obox, 1, 3, 0, 1, yoptions=0)
table.attach(name_exp, 0, 3, 1, 2, yoptions=0)
table.attach(self.fmt_obox, 1, 2, 0, 1, yoptions=0)
table.attach(name_exp, 0, 2, 1, 2, yoptions=0)
return table
@ -328,12 +328,13 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
format_tree.get_selection().connect('changed',
self.cb_format_tree_select)
format_tree.set_rules_hint(True)
(r,x,y,w,h) = name_column.cell_get_size()
# ... and put it into a scrolled win
format_sw = gtk.ScrolledWindow()
format_sw.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_NEVER)
format_sw.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
format_sw.add(format_tree)
format_sw.set_shadow_type(gtk.SHADOW_IN)
format_sw.set_size_request(-1, h*6)
table.attach(format_sw, 0, 3, 0, 1)
# to hold the values of the selected row of the tree and the iter