fix focus out event

svn: r6087
This commit is contained in:
Don Allingham 2006-03-06 05:22:45 +00:00
parent 51c1f0730a
commit 35134198cf
4 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,7 @@
2006-03-05 Don Allingham <don@gramps-project.org>
* src/TipOfDay.py: Fix the image location
* src/Editors/_EditPerson.py: fix focus_out_event
* src/ViewManager.py: replace the data
* src/DataViews/_RepositoryView.py: column editing
* src/DataViews/_MediaView.py: column editing
* src/DataViews/_SourceView.py: column editing

View File

@ -340,9 +340,10 @@ class EditPerson(EditPrimary):
def given_focus_out_event (self, entry, event):
if not self.should_guess_gender:
return False
gender = self.given.get_value()
self.gender.force(self.db.genderStats.guess_gender())
try:
self.gender.force(self.db.genderStats.guess_gender(entry.get_text()))
except:
return False
return False
def load_photo(self,photo):

View File

@ -28,6 +28,7 @@
from xml.parsers.expat import ParserCreate
from random import Random
from gettext import gettext as _
import os
#-------------------------------------------------------------------------
#
@ -57,6 +58,8 @@ class TipOfDay:
top = xml.get_widget("tod")
tip = xml.get_widget("tip")
use = xml.get_widget('usetips')
image = xml.get_widget('image')
image.set_from_file(os.path.join(const.image_dir,'splash.jpg'))
alt_title = xml.get_widget("title")
tmsg = _("GRAMPS' Tip of the Day")

View File

@ -11899,9 +11899,8 @@ Text Beside Icons</property>
</child>
<child>
<widget class="GtkImage" id="image1968">
<widget class="GtkImage" id="image">
<property name="visible">True</property>
<property name="pixbuf">splash.jpg</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>