* src/AddMedia.py: Remove unneeded update argument.
* src/ArgHandler.py (auto_save_load): Mysterious workaround :-). * src/EditPlace.py (display_references): Drop media objects; (DeletePlaceQuery.query_response): use proper handle removal. * src/GrampsBSDDB.py (remove_object): emit media signal. * src/GrampsDbBase.py (GrampsDbBase): Add media-related signals; (commit_media_object,transaction_commit,undo): emit media signals. * src/ImageSelect.py (GlobalMediaProperties,DeleteMediaQuery): Remove unneeded update argument. * src/MediaView.py (media_add,media_update,media_delete): Add callbacks; (change_db): connect callbacks to signals; (popup_change_description): Call property editor without callback param; (on_add_clicked): Call AddMedia without callback param; (add_object,update_display,add_to_display): Remove unneeded methods; (on_edit_clicked): call property editor without callback param; (on_delete_clicked): call deleter without callback param; (on_drag_data_received): Call property editor without callback param. * src/PlaceView.py (new_place_after_edit): Remove unneeded method; (delete_place): Remove unneeded tree update; (is_used) Add method; (on_delete_clicked): Use new detection method. svn: r4287
This commit is contained in:
@@ -225,6 +225,12 @@ class ArgHandler:
|
||||
filename = os.path.normpath(os.path.abspath(filename))
|
||||
filetype = GrampsMime.get_type(filename)
|
||||
if filetype == const.app_gramps:
|
||||
# FIXME: For some reason the following two lines are needed
|
||||
# to prevent source view from getting out of sync. Makes no
|
||||
# sense to me right now, but it seems to fix a problem and
|
||||
# make no harm otherwise. Should remove when understood.
|
||||
import GrampsBSDDB
|
||||
self.parent.db = GrampsBSDDB.GrampsBSDDB()
|
||||
self.parent.read_file(filename)
|
||||
return 1
|
||||
elif filetype == const.app_gramps_xml:
|
||||
|
||||
Reference in New Issue
Block a user