diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 27803f3b7..55e47b5ad 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,5 +1,7 @@ 2005-11-21 Martin Hawlisch * src/MediaView.py (media_update): Redisplay the media object at the top + * src/FamilyView.py (drag_data_get): Avoid Traceback when dragging from empty list + * src/gramps_main.py (read_file): More changes to unicode filename support 2005-11-20 Don Allingham * src/Report.py: shortened report dialog by making the Paper diff --git a/gramps2/src/FamilyView.py b/gramps2/src/FamilyView.py index d7a138467..835e8e47b 100644 --- a/gramps2/src/FamilyView.py +++ b/gramps2/src/FamilyView.py @@ -1534,6 +1534,8 @@ class FamilyView: if not node: return handle = self.child_model.get_value(node,_HANDLE_COL) + if not handle: + return bits_per = 8; # we're going to pass a string if sel_data.target == DdTargets.PERSON_LINK.drag_type: diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 53ae11225..16e70154a 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -1294,7 +1294,11 @@ class Gramps(GrampsDBCallback.GrampsDBCallback): _('The selected file is a directory, not ' 'a file.\nA GRAMPS database must be a file.')) return 0 - elif Utils.find_file(filename): + nfilename = Utils.find_file(filename) + if nfilename: + # the file exists but the filename may be different due to + # a different encoding of the filename + filename = nfilename if not os.access(filename,os.R_OK): ErrorDialog(_('Cannot open database'), _('You do not have read access to the selected ' @@ -1305,7 +1309,10 @@ class Gramps(GrampsDBCallback.GrampsDBCallback): WarningDialog(_('Read only database'), _('You do not have write access to the selected ' 'file.')) - + else: + # File not found. continue here to get the error message + # displayed by the following try .. except + pass try: if self.load_database(filename,callback,mode=mode) == 1: if filename[-1] == '/':