* src/gramps_main.py (save_media): Add support for default action.
* src/plugins/Check.py (cleanup_missing_photos): Add support for default action. * src/plugins/WriteCD.py (on_ok_clicked): Add support for default action. * src/plugins/WritePkg.py (export): Add support for default action. * src/plugins/WriteFtree.py: Do not import unused dialog. svn: r2652
This commit is contained in:
parent
42cf3e24cc
commit
9fc5ce16db
@ -10,6 +10,12 @@
|
||||
* src/plugins/WebPage.py (write_gallery): Use object ID as a file name
|
||||
- prevents collision between identical names coming from different dirs.
|
||||
|
||||
* src/gramps_main.py (save_media): Add support for default action.
|
||||
* src/plugins/Check.py (cleanup_missing_photos): Add support for default action.
|
||||
* src/plugins/WriteCD.py (on_ok_clicked): Add support for default action.
|
||||
* src/plugins/WritePkg.py (export): Add support for default action.
|
||||
* src/plugins/WriteFtree.py: Do not import unused dialog.
|
||||
|
||||
2004-01-16 Don Allingham <dallingham@users.sourceforge.net>
|
||||
* src/plugins/AncestorChart2.py: first pass at multipage output
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2003 Donald N. Allingham
|
||||
# Copyright (C) 2000-2004 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -1073,6 +1073,7 @@ class Gramps:
|
||||
|
||||
def save_media(self,filename):
|
||||
import RelImage
|
||||
missmedia_action = 0
|
||||
#-------------------------------------------------------------------------
|
||||
def remove_clicked():
|
||||
# File is lost => remove all references and the object itself
|
||||
@ -1145,13 +1146,21 @@ class Gramps:
|
||||
% os.path.basename(oldfile), "so it was ignored."
|
||||
else:
|
||||
# File is lost => ask what to do
|
||||
MissingMediaDialog(_("Media object could not be found"),
|
||||
_("%(file_name)s is referenced in the database, but no longer exists. "
|
||||
"The file may have been deleted or moved to a different location. "
|
||||
"You may choose to either remove the reference from the database, "
|
||||
"keep the reference to the missing file, or select a new file."
|
||||
) % { 'file_name' : oldfile },
|
||||
remove_clicked, leave_clicked, select_clicked)
|
||||
if missmedia_action == 0:
|
||||
mmd = MissingMediaDialog(_("Media object could not be found"),
|
||||
_("%(file_name)s is referenced in the database, but no longer exists. "
|
||||
"The file may have been deleted or moved to a different location. "
|
||||
"You may choose to either remove the reference from the database, "
|
||||
"keep the reference to the missing file, or select a new file."
|
||||
) % { 'file_name' : oldfile },
|
||||
remove_clicked, leave_clicked, select_clicked)
|
||||
missmedia_action = mmd.default_action
|
||||
elif missmedia_action == 1:
|
||||
remove_clicked()
|
||||
elif missmedia_action == 2:
|
||||
leave_clicked()
|
||||
elif missmedia_action == 3:
|
||||
select_clicked()
|
||||
|
||||
def save_file(self,filename,comment):
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2003 Donald N. Allingham
|
||||
# Copyright (C) 2000-2004 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -18,6 +18,8 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
"Database Processing/Check and repair database"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -112,6 +114,7 @@ class CheckIntegrity:
|
||||
self.broken_links.append((child,family))
|
||||
|
||||
def cleanup_missing_photos(self,cl=0):
|
||||
missmedia_action = 0
|
||||
#-------------------------------------------------------------------------
|
||||
def remove_clicked():
|
||||
# File is lost => remove all references and the object itself
|
||||
@ -185,13 +188,21 @@ class CheckIntegrity:
|
||||
% os.path.basename(photo_name)
|
||||
self.bad_photo.append(ObjectMap[ObjectId])
|
||||
else:
|
||||
MissingMediaDialog(_("Media object could not be found"),
|
||||
if missmedia_action == 0:
|
||||
mmd = MissingMediaDialog(_("Media object could not be found"),
|
||||
_("%(file_name)s is referenced in the database, but no longer exists. "
|
||||
"The file may have been deleted or moved to a different location. "
|
||||
"You may choose to either remove the reference from the database, "
|
||||
"keep the reference to the missing file, or select a new file."
|
||||
) % { 'file_name' : photo_name },
|
||||
remove_clicked, leave_clicked, select_clicked)
|
||||
remove_clicked, leave_clicked, select_clicked)
|
||||
missmedia_action = mmd.default_action
|
||||
elif missmedia_action == 1:
|
||||
remove_clicked()
|
||||
elif missmedia_action == 2:
|
||||
leave_clicked()
|
||||
elif missmedia_action == 3:
|
||||
select_clicked()
|
||||
|
||||
def cleanup_empty_families(self,automatic):
|
||||
for key in self.db.getFamilyMap().keys():
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2003 Donald N. Allingham
|
||||
# Copyright (C) 2000-2004 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -162,6 +162,7 @@ class PackageWriter:
|
||||
|
||||
def on_ok_clicked(self,obj):
|
||||
Utils.destroy_passed_object(obj)
|
||||
missmedia_action = 0
|
||||
|
||||
base = os.path.basename(self.db.getSavePath())
|
||||
|
||||
@ -250,14 +251,21 @@ class PackageWriter:
|
||||
else:
|
||||
# File is lost => ask what to do
|
||||
self.object_id = obj.getId()
|
||||
QuestionDialog.MissingMediaDialog(_("Media object could not be found"),
|
||||
_("%(file_name)s is referenced in the database, but no longer exists. "
|
||||
"The file may have been deleted or moved to a different location. "
|
||||
"You may choose to either remove the reference from the database, "
|
||||
"keep the reference to the missing file, or select a new file."
|
||||
) % { 'file_name' : oldfile },
|
||||
remove_clicked, leave_clicked, select_clicked)
|
||||
|
||||
if missmedia_action == 0:
|
||||
mmd = QuestionDialog.MissingMediaDialog(_("Media object could not be found"),
|
||||
_("%(file_name)s is referenced in the database, but no longer exists. "
|
||||
"The file may have been deleted or moved to a different location. "
|
||||
"You may choose to either remove the reference from the database, "
|
||||
"keep the reference to the missing file, or select a new file."
|
||||
) % { 'file_name' : oldfile },
|
||||
remove_clicked, leave_clicked, select_clicked)
|
||||
missmedia_action = mmd.default_action
|
||||
elif missmedia_action == 1:
|
||||
remove_clicked()
|
||||
elif missmedia_action == 2:
|
||||
leave_clicked()
|
||||
elif missmedia_action == 3:
|
||||
select_clicked()
|
||||
|
||||
# Write XML now
|
||||
g = gnome.vfs.create('burn:///%s/data.gramps' % base,gnome.vfs.OPEN_WRITE )
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2003 Donald N. Allingham
|
||||
# Copyright (C) 2003-2004 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -48,7 +48,7 @@ import Utils
|
||||
import GenericFilter
|
||||
import Errors
|
||||
|
||||
from QuestionDialog import MissingMediaDialog, ErrorDialog
|
||||
from QuestionDialog import ErrorDialog
|
||||
|
||||
from gettext import gettext as _
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2003 Donald N. Allingham
|
||||
# Copyright (C) 2000-2004 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -104,6 +104,7 @@ class PackageWriter:
|
||||
gnome.help_display('gramps-manual','export-data')
|
||||
|
||||
def export(self, filename):
|
||||
missmedia_action = 0
|
||||
#--------------------------------------------------------------
|
||||
def remove_clicked():
|
||||
# File is lost => remove all references and the object itself
|
||||
@ -178,13 +179,21 @@ class PackageWriter:
|
||||
g.close()
|
||||
else:
|
||||
# File is lost => ask what to do
|
||||
MissingMediaDialog(_("Media object could not be found"),
|
||||
_("%(file_name)s is referenced in the database, but no longer exists. "
|
||||
"The file may have been deleted or moved to a different location. "
|
||||
"You may choose to either remove the reference from the database, "
|
||||
"keep the reference to the missing file, or select a new file."
|
||||
) % { 'file_name' : oldfile },
|
||||
remove_clicked, leave_clicked, select_clicked)
|
||||
if missmedia_action == 0:
|
||||
mmd = MissingMediaDialog(_("Media object could not be found"),
|
||||
_("%(file_name)s is referenced in the database, but no longer exists. "
|
||||
"The file may have been deleted or moved to a different location. "
|
||||
"You may choose to either remove the reference from the database, "
|
||||
"keep the reference to the missing file, or select a new file."
|
||||
) % { 'file_name' : oldfile },
|
||||
remove_clicked, leave_clicked, select_clicked)
|
||||
missmedia_action = mmd.default_action
|
||||
elif missmedia_action == 1:
|
||||
remove_clicked()
|
||||
elif missmedia_action == 2:
|
||||
leave_clicked()
|
||||
elif missmedia_action == 3:
|
||||
select_clicked()
|
||||
|
||||
# Write XML now
|
||||
g = StringIO()
|
||||
|
Loading…
Reference in New Issue
Block a user