diff --git a/ChangeLog b/ChangeLog index 28702d3f3..de9e647d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-07-19 Zsolt Foldvari + * src/GrampsCfg.py: UI improvements. + * src/Config/_GrampsIniKeys.py: Proper key retrieval. + 2006-07-19 Alex Roitman * src/plugins/EventCmp.py (filter_editor_clicked): Adapt to filter editor changes; Stop separately adding birth and death. diff --git a/src/Config/_GrampsIniKeys.py b/src/Config/_GrampsIniKeys.py index c25b417c5..a1a2d9745 100644 --- a/src/Config/_GrampsIniKeys.py +++ b/src/Config/_GrampsIniKeys.py @@ -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 """ diff --git a/src/GrampsCfg.py b/src/GrampsCfg.py index 85251577a..b04cc0636 100644 --- a/src/GrampsCfg.py +++ b/src/GrampsCfg.py @@ -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