* src/DbPrompter.py: catch zero length filename
* src/FamilyView.py: fixed selection of spouse's parents * src/gramps_main.py: update display after loading data svn: r4086
This commit is contained in:
parent
55a416f422
commit
cb8c02aea0
@ -10,6 +10,9 @@
|
||||
find_icon
|
||||
* various: replace the deprecated gtk.TRUE/gtk.FALSE with
|
||||
True/False
|
||||
* src/DbPrompter.py: catch zero length filename
|
||||
* src/FamilyView.py: fixed selection of spouse's parents
|
||||
* src/gramps_main.py: update display after loading data
|
||||
|
||||
2005-02-22 Don Allingham <dallingham@users.sourceforge.net>
|
||||
* src/gramps.glade: use ComboBox instead of ComboBoxEntry
|
||||
|
@ -90,10 +90,11 @@ class DbPrompter:
|
||||
top.hide()
|
||||
if response == gtk.RESPONSE_OK:
|
||||
if new.get_active():
|
||||
prompter = NewNativeDbPrompter(self.parent,self.parent_window)
|
||||
prompter = NewNativeDbPrompter(self.parent,
|
||||
self.parent_window)
|
||||
else:
|
||||
prompter = ExistingDbPrompter(self.parent,self.parent_window)
|
||||
|
||||
prompter = ExistingDbPrompter(self.parent,
|
||||
self.parent_window)
|
||||
if prompter.chooser():
|
||||
break
|
||||
elif response == gtk.RESPONSE_CANCEL:
|
||||
@ -183,11 +184,18 @@ class ExistingDbPrompter:
|
||||
response = choose.run()
|
||||
if response == gtk.RESPONSE_OK:
|
||||
filename = choose.get_filename()
|
||||
if len(filename) == 0:
|
||||
return False
|
||||
filetype = get_mime_type(filename)
|
||||
(the_path,the_file) = os.path.split(filename)
|
||||
choose.destroy()
|
||||
if open_native(self.parent,filename,filetype):
|
||||
return True
|
||||
try:
|
||||
if open_native(self.parent,filename,filetype):
|
||||
return True
|
||||
except:
|
||||
QuestionDialog.ErrorDialog(
|
||||
_("Could not open file: %s") % filename)
|
||||
return False
|
||||
|
||||
# The above native formats did not work, so we need to
|
||||
# look up the importer for this format
|
||||
|
@ -883,12 +883,12 @@ class FamilyView:
|
||||
self.load_family(self.family)
|
||||
|
||||
def ap_parents_clicked(self,obj):
|
||||
self.change_families(self.person)
|
||||
self.change_families(self.person, self.ap_selection)
|
||||
|
||||
def sp_parents_clicked(self,obj):
|
||||
self.change_families(self.selected_spouse)
|
||||
self.change_families(self.selected_spouse, self.sp_selection)
|
||||
|
||||
def change_families(self,person):
|
||||
def change_families(self,person,select):
|
||||
if not person:
|
||||
return
|
||||
plist = person.get_parent_family_handle_list()
|
||||
@ -898,7 +898,7 @@ class FamilyView:
|
||||
if len(plist) == 1:
|
||||
family_handle,m,r = plist[0]
|
||||
else:
|
||||
model, node = self.ap_selection.get_selected()
|
||||
model, node = select.get_selected()
|
||||
path = model.get_path(node)
|
||||
family_handle,m,r = plist[path[0]]
|
||||
family = self.parent.db.get_family_from_handle(family_handle)
|
||||
|
@ -1012,7 +1012,7 @@ class Gramps:
|
||||
self.source_view.change_db(self.db)
|
||||
self.media_view.change_db(self.db)
|
||||
|
||||
def update_display(self,changed):
|
||||
def update_display(self,changed=True):
|
||||
"""Incremental display update, update only the displayed page"""
|
||||
page = self.views.get_current_page()
|
||||
if page == PERSON_VIEW:
|
||||
@ -1128,6 +1128,7 @@ class Gramps:
|
||||
self.gtop.get_widget('tools_menu').set_sensitive(not self.db.readonly)
|
||||
self.gtop.get_widget('tools').set_sensitive(not self.db.readonly)
|
||||
self.goto_active_person()
|
||||
self.update_display()
|
||||
return 1
|
||||
|
||||
def save_media(self,filename):
|
||||
|
Loading…
Reference in New Issue
Block a user