2008-01-03 Benny Malengier <benny.malengier@gramps-project.org>
* src/plugins/RelCalc.py: managed window error, bug 1499 svn: r9699
This commit is contained in:
parent
22b32f3ca3
commit
1e2d017c92
@ -1,3 +1,6 @@
|
|||||||
|
2008-01-03 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
|
* src/plugins/RelCalc.py: managed window error, bug 1499
|
||||||
|
|
||||||
2008-01-03 Gary Burton <gary.burton@zen.co.uk>
|
2008-01-03 Gary Burton <gary.burton@zen.co.uk>
|
||||||
* src/GrampsWidgets.py: allow MonitoredEntry widgets to be updated with
|
* src/GrampsWidgets.py: allow MonitoredEntry widgets to be updated with
|
||||||
empty strings. I fixed this issue in trunk 2 months ago and no ill effects
|
empty strings. I fixed this issue in trunk 2 months ago and no ill effects
|
||||||
|
@ -79,12 +79,6 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||||
ManagedWindow.ManagedWindow.__init__(self, uistate, [], self.__class__)
|
ManagedWindow.ManagedWindow.__init__(self, uistate, [], self.__class__)
|
||||||
|
|
||||||
if not self.person:
|
|
||||||
ErrorDialog(_('Active person has not been set'),
|
|
||||||
_('You must select an active person for this '
|
|
||||||
'tool to work properly.'))
|
|
||||||
return
|
|
||||||
|
|
||||||
self.RelClass = relationship_class
|
self.RelClass = relationship_class
|
||||||
self.relationship = self.RelClass(self.db)
|
self.relationship = self.RelClass(self.db)
|
||||||
@ -93,7 +87,9 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
|
|||||||
glade_file = "%s/relcalc.glade" % base
|
glade_file = "%s/relcalc.glade" % base
|
||||||
self.glade = gtk.glade.XML(glade_file,"relcalc","gramps")
|
self.glade = gtk.glade.XML(glade_file,"relcalc","gramps")
|
||||||
|
|
||||||
name = NameDisplay.displayer.display(self.person)
|
name = ''
|
||||||
|
if self.person:
|
||||||
|
name = NameDisplay.displayer.display(self.person)
|
||||||
self.title = _('Relationship calculator: %(person_name)s'
|
self.title = _('Relationship calculator: %(person_name)s'
|
||||||
) % {'person_name' : name}
|
) % {'person_name' : name}
|
||||||
window = self.glade.get_widget('relcalc')
|
window = self.glade.get_widget('relcalc')
|
||||||
@ -132,6 +128,14 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
|
|||||||
"on_close_clicked" : self.close,
|
"on_close_clicked" : self.close,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if not self.person:
|
||||||
|
self.window.hide()
|
||||||
|
ErrorDialog(_('Active person has not been set'),
|
||||||
|
_('You must select an active person for this '
|
||||||
|
'tool to work properly.'))
|
||||||
|
self.close()
|
||||||
|
return
|
||||||
|
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
def build_menu_names(self,obj):
|
def build_menu_names(self,obj):
|
||||||
|
Loading…
Reference in New Issue
Block a user