Merge pull request #93 from dsblank/master
7335: Cleanup code, filenames, and documentation
This commit is contained in:
commit
885bab26ef
@ -219,7 +219,7 @@ Citation
|
||||
Media Object
|
||||
====================================
|
||||
.. automodule:: gramps.gen.lib.mediaobj
|
||||
.. autoclass:: MediaObject
|
||||
.. autoclass:: Media
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -164,7 +164,7 @@ class DbReadBase(object):
|
||||
|
||||
def find_next_object_gramps_id(self):
|
||||
"""
|
||||
Return the next available Gramps ID for a MediaObject object based
|
||||
Return the next available Gramps ID for a Media object based
|
||||
off the media object ID prefix.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
@ -367,7 +367,7 @@ class DbReadBase(object):
|
||||
|
||||
def get_media_object_handles(self, sort_handles=False):
|
||||
"""
|
||||
Return a list of database handles, one handle for each MediaObject in
|
||||
Return a list of database handles, one handle for each Media in
|
||||
the database.
|
||||
|
||||
If sort_handles is True, the list is sorted by title.
|
||||
@ -505,9 +505,9 @@ class DbReadBase(object):
|
||||
|
||||
def get_object_from_gramps_id(self, val):
|
||||
"""
|
||||
Find a MediaObject in the database from the passed Gramps ID.
|
||||
Find a Media in the database from the passed Gramps ID.
|
||||
|
||||
If no such MediaObject exists, None is returned.
|
||||
If no such Media exists, None is returned.
|
||||
Needs to be overridden by the derived class.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
@ -919,7 +919,7 @@ class DbReadBase(object):
|
||||
|
||||
def has_object_handle(self, handle):
|
||||
"""
|
||||
Return True if the handle exists in the current MediaObjectdatabase.
|
||||
Return True if the handle exists in the current Mediadatabase.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@ -991,7 +991,7 @@ class DbReadBase(object):
|
||||
|
||||
def iter_media_objects(self):
|
||||
"""
|
||||
Return an iterator over objects for MediaObjects in the database
|
||||
Return an iterator over objects for Medias in the database
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@ -1129,7 +1129,7 @@ class DbReadBase(object):
|
||||
|
||||
def set_object_id_prefix(self, val):
|
||||
"""
|
||||
Set the naming template for Gramps MediaObject ID values.
|
||||
Set the naming template for Gramps Media ID values.
|
||||
|
||||
The string is expected to be in the form of a simple text string, or
|
||||
in a format that contains a C/Python style format string using %d,
|
||||
@ -1285,7 +1285,7 @@ class DbWriteBase(DbReadBase):
|
||||
|
||||
def add_object(self, obj, transaction, set_gid=True):
|
||||
"""
|
||||
Add a MediaObject to the database, assigning internal IDs if they have
|
||||
Add a Media to the database, assigning internal IDs if they have
|
||||
not already been defined.
|
||||
|
||||
If not set_gid, then gramps_id is not set.
|
||||
@ -1382,7 +1382,7 @@ class DbWriteBase(DbReadBase):
|
||||
|
||||
def commit_media_object(self, obj, transaction, change_time=None):
|
||||
"""
|
||||
Commit the specified MediaObject to the database, storing the changes
|
||||
Commit the specified Media to the database, storing the changes
|
||||
as part of the transaction.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
@ -1507,7 +1507,7 @@ class DbWriteBase(DbReadBase):
|
||||
|
||||
def remove_object(self, handle, transaction):
|
||||
"""
|
||||
Remove the MediaObjectPerson specified by the database handle from the
|
||||
Remove the MediaPerson specified by the database handle from the
|
||||
database, preserving the change in the passed transaction.
|
||||
|
||||
This method must be overridden in the derived class.
|
||||
|
@ -76,7 +76,7 @@ CLASS_TO_KEY_MAP = {"Person": PERSON_KEY,
|
||||
"Source": SOURCE_KEY,
|
||||
"Citation": CITATION_KEY,
|
||||
"Event": EVENT_KEY,
|
||||
"MediaObject": MEDIA_KEY,
|
||||
"Media": MEDIA_KEY,
|
||||
"Place": PLACE_KEY,
|
||||
"Repository": REPOSITORY_KEY,
|
||||
"Note" : NOTE_KEY,
|
||||
@ -87,7 +87,7 @@ KEY_TO_CLASS_MAP = {PERSON_KEY: "Person",
|
||||
SOURCE_KEY: "Source",
|
||||
CITATION_KEY: "Citation",
|
||||
EVENT_KEY: "Event",
|
||||
MEDIA_KEY: "MediaObject",
|
||||
MEDIA_KEY: "Media",
|
||||
PLACE_KEY: "Place",
|
||||
REPOSITORY_KEY: "Repository",
|
||||
NOTE_KEY: "Note",
|
||||
|
@ -61,7 +61,7 @@ from gramps.gen.db import (PERSON_KEY,
|
||||
|
||||
from gramps.gen.utils.id import create_id
|
||||
from gramps.gen.lib.researcher import Researcher
|
||||
from gramps.gen.lib import (Tag, MediaObject, Person, Family, Source, Citation, Event,
|
||||
from gramps.gen.lib import (Tag, Media, Person, Family, Source, Citation, Event,
|
||||
Place, Repository, Note, NameOriginType)
|
||||
from gramps.gen.lib.genderstats import GenderStats
|
||||
|
||||
@ -527,7 +527,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
||||
{
|
||||
"handle_func": self.get_object_from_handle,
|
||||
"gramps_id_func": self.get_object_from_gramps_id,
|
||||
"class_func": MediaObject,
|
||||
"class_func": Media,
|
||||
"cursor_func": self.get_media_cursor,
|
||||
"handles_func": self.get_media_object_handles,
|
||||
"add_func": self.add_object,
|
||||
@ -913,14 +913,14 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
||||
|
||||
def set_object_id_prefix(self, val):
|
||||
"""
|
||||
Set the naming template for GRAMPS MediaObject ID values.
|
||||
Set the naming template for GRAMPS Media ID values.
|
||||
|
||||
The string is expected to be in the form of a simple text string, or
|
||||
in a format that contains a C/Python style format string using %d,
|
||||
such as O%d or O%04d.
|
||||
"""
|
||||
self.mediaobject_prefix = self._validated_id_prefix(val, "O")
|
||||
self.oid2user_format = self.__id2user_format(self.mediaobject_prefix)
|
||||
self.media_prefix = self._validated_id_prefix(val, "O")
|
||||
self.oid2user_format = self.__id2user_format(self.media_prefix)
|
||||
|
||||
def set_place_id_prefix(self, val):
|
||||
"""
|
||||
@ -1019,10 +1019,10 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
||||
|
||||
def find_next_object_gramps_id(self):
|
||||
"""
|
||||
Return the next available GRAMPS' ID for a MediaObject object based
|
||||
Return the next available GRAMPS' ID for a Media object based
|
||||
off the media object ID prefix.
|
||||
"""
|
||||
self.omap_index, gid = self._find_next_gramps_id(self.mediaobject_prefix,
|
||||
self.omap_index, gid = self._find_next_gramps_id(self.media_prefix,
|
||||
self.omap_index,
|
||||
self.media_id_map)
|
||||
return gid
|
||||
@ -1126,10 +1126,10 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
||||
def get_object_from_handle(self, handle):
|
||||
if isinstance(handle, bytes):
|
||||
handle = str(handle, "utf-8")
|
||||
return MediaObject.create(self._get_raw_media_data(handle))
|
||||
return Media.create(self._get_raw_media_data(handle))
|
||||
|
||||
def get_object_from_gramps_id(self, gramps_id):
|
||||
return MediaObject.create(self.media_id_map[gramps_id])
|
||||
return Media.create(self.media_id_map[gramps_id])
|
||||
|
||||
def get_tag_from_handle(self, handle):
|
||||
if isinstance(handle, bytes):
|
||||
@ -1165,7 +1165,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
||||
return Event.create(self.event_id_map[gramps_id])
|
||||
|
||||
def get_media_from_gramps_id(self, gramps_id):
|
||||
return MediaObject.create(self.media_id_map[gramps_id])
|
||||
return Media.create(self.media_id_map[gramps_id])
|
||||
|
||||
def get_place_from_gramps_id(self, gramps_id):
|
||||
return Place.create(self.place_id_map[gramps_id])
|
||||
@ -1379,7 +1379,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
||||
|
||||
def add_object(self, obj, transaction, set_gid=True):
|
||||
"""
|
||||
Add a MediaObject to the database, assigning internal IDs if they have
|
||||
Add a Media to the database, assigning internal IDs if they have
|
||||
not already been defined.
|
||||
|
||||
If not set_gid, then gramps_id is not set.
|
||||
@ -1539,7 +1539,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
||||
|
||||
def remove_object(self, handle, transaction):
|
||||
"""
|
||||
Remove the MediaObjectPerson specified by the database handle from the
|
||||
Remove the MediaPerson specified by the database handle from the
|
||||
database, preserving the change in the passed transaction.
|
||||
"""
|
||||
self._do_remove(handle, transaction, self.media_map,
|
||||
@ -1824,7 +1824,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
||||
return (Event.create(data[1]) for data in self.get_event_cursor())
|
||||
|
||||
def iter_media_objects(self):
|
||||
return (MediaObject.create(data[1]) for data in self.get_media_cursor())
|
||||
return (Media.create(data[1]) for data in self.get_media_cursor())
|
||||
|
||||
def iter_notes(self):
|
||||
return (Note.create(data[1]) for data in self.get_note_cursor())
|
||||
|
@ -37,7 +37,7 @@ from ..lib.citation import Citation
|
||||
from ..lib.event import Event
|
||||
from ..lib.place import Place
|
||||
from ..lib.repo import Repository
|
||||
from ..lib.mediaobj import MediaObject
|
||||
from ..lib.media import Media
|
||||
from ..lib.note import Note
|
||||
from ..lib.tag import Tag
|
||||
|
||||
@ -328,7 +328,7 @@ class GenericMediaFilter(GenericFilter):
|
||||
return db.get_media_cursor()
|
||||
|
||||
def make_obj(self):
|
||||
return MediaObject()
|
||||
return Media()
|
||||
|
||||
def find_from_handle(self, db, handle):
|
||||
return db.get_object_from_handle(handle)
|
||||
|
@ -49,7 +49,7 @@ from .family import Family
|
||||
from .event import Event
|
||||
from .place import Place
|
||||
from .src import Source
|
||||
from .mediaobj import MediaObject
|
||||
from .media import Media
|
||||
from .repo import Repository
|
||||
from .note import Note
|
||||
from .citation import Citation
|
||||
|
@ -218,7 +218,7 @@ class AttributeRoot(SecondaryObject, PrivacyBase):
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Attribute for Person/Family/MediaObject/MediaRef
|
||||
# Attribute for Person/Family/Media/MediaRef
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class Attribute(AttributeRoot, CitationBase, NoteBase):
|
||||
|
@ -163,7 +163,7 @@ class Event(CitationBase, NoteBase, MediaBase, AttributeBase,
|
||||
from .note import Note
|
||||
from .date import Date
|
||||
from .tag import Tag
|
||||
from .mediaobj import MediaObject
|
||||
from .media import Media
|
||||
return {
|
||||
"handle": Handle("Event", "EVENT-HANDLE"),
|
||||
"gramps_id": str,
|
||||
@ -173,7 +173,7 @@ class Event(CitationBase, NoteBase, MediaBase, AttributeBase,
|
||||
"place": Handle("Place", "PLACE-HANDLE"),
|
||||
"citation_list": [Citation],
|
||||
"note_list": [Note],
|
||||
"media_list": [MediaObject],
|
||||
"media_list": [Media],
|
||||
"attribute_list": [Attribute],
|
||||
"change": float,
|
||||
"tag_list": [Tag],
|
||||
|
@ -28,14 +28,14 @@ class HandleClass(str):
|
||||
@classmethod
|
||||
def get_schema(cls):
|
||||
from gramps.gen.lib import (Person, Family, Event, Place, Source,
|
||||
MediaObject, Repository, Note, Citation)
|
||||
Media, Repository, Note, Citation)
|
||||
tables = {
|
||||
"Person": Person,
|
||||
"Family": Family,
|
||||
"Event": Event,
|
||||
"Place": Place,
|
||||
"Source": Source,
|
||||
"Media": MediaObject,
|
||||
"Media": Media,
|
||||
"Repository": Repository,
|
||||
"Note": Note,
|
||||
"Citation": Citation,
|
||||
|
@ -51,10 +51,10 @@ LOG = logging.getLogger(".citation")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# MediaObject class
|
||||
# Media class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class MediaObject(CitationBase, NoteBase, DateBase, AttributeBase,
|
||||
class Media(CitationBase, NoteBase, DateBase, AttributeBase,
|
||||
PrimaryObject):
|
||||
"""
|
||||
Container for information about an image file, including location,
|
||||
@ -63,13 +63,13 @@ class MediaObject(CitationBase, NoteBase, DateBase, AttributeBase,
|
||||
|
||||
def __init__(self, source=None):
|
||||
"""
|
||||
Initialize a MediaObject.
|
||||
Initialize a Media.
|
||||
|
||||
If source is not None, then object is initialized from values of the
|
||||
source object.
|
||||
|
||||
:param source: Object used to initialize the new object
|
||||
:type source: MediaObject
|
||||
:type source: Media
|
||||
"""
|
||||
PrimaryObject.__init__(self, source)
|
||||
CitationBase.__init__(self, source)
|
||||
@ -138,7 +138,7 @@ class MediaObject(CitationBase, NoteBase, DateBase, AttributeBase,
|
||||
:returns: Returns a struct containing the data of the object.
|
||||
:rtype: dict
|
||||
"""
|
||||
return {"_class": "MediaObject",
|
||||
return {"_class": "Media",
|
||||
"handle": Handle("Media", self.handle),
|
||||
"gramps_id": self.gramps_id,
|
||||
"path": self.path,
|
||||
@ -215,7 +215,7 @@ class MediaObject(CitationBase, NoteBase, DateBase, AttributeBase,
|
||||
|
||||
:returns: Returns a serialized object
|
||||
"""
|
||||
default = MediaObject()
|
||||
default = Media()
|
||||
return (Handle.from_struct(struct.get("handle", default.handle)),
|
||||
struct.get("gramps_id", default.gramps_id),
|
||||
struct.get("path", default.path),
|
||||
@ -233,7 +233,7 @@ class MediaObject(CitationBase, NoteBase, DateBase, AttributeBase,
|
||||
def unserialize(self, data):
|
||||
"""
|
||||
Convert the data held in a tuple created by the serialize method
|
||||
back into the data in a MediaObject structure.
|
||||
back into the data in a Media structure.
|
||||
|
||||
:param data: tuple containing the persistent data associated the object
|
||||
:type data: tuple
|
||||
@ -316,7 +316,7 @@ class MediaObject(CitationBase, NoteBase, DateBase, AttributeBase,
|
||||
Lost: handle, id, file, date of acquisition.
|
||||
|
||||
:param acquisition: The media object to merge with the present object.
|
||||
:type acquisition: MediaObject
|
||||
:type acquisition: Media
|
||||
"""
|
||||
self._merge_privacy(acquisition)
|
||||
self._merge_attribute_list(acquisition)
|
||||
@ -326,7 +326,7 @@ class MediaObject(CitationBase, NoteBase, DateBase, AttributeBase,
|
||||
|
||||
def set_mime_type(self, mime_type):
|
||||
"""
|
||||
Set the MIME type associated with the MediaObject.
|
||||
Set the MIME type associated with the Media.
|
||||
|
||||
:param mime_type: MIME type to be assigned to the object
|
||||
:type mime_type: str
|
||||
@ -335,7 +335,7 @@ class MediaObject(CitationBase, NoteBase, DateBase, AttributeBase,
|
||||
|
||||
def get_mime_type(self):
|
||||
"""
|
||||
Return the MIME type associated with the MediaObject.
|
||||
Return the MIME type associated with the Media.
|
||||
|
||||
:returns: Returns the associated MIME type
|
||||
:rtype: str
|
@ -41,7 +41,7 @@ from .handle import Handle
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# MediaObject References for Person/Place/Source
|
||||
# Media References for Person/Place/Source
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class MediaRef(SecondaryObject, PrivacyBase, CitationBase, NoteBase, RefBase,
|
||||
@ -189,7 +189,7 @@ class MediaRef(SecondaryObject, PrivacyBase, CitationBase, NoteBase, RefBase,
|
||||
ret = self.get_referenced_note_handles() + \
|
||||
self.get_referenced_citation_handles()
|
||||
if self.ref:
|
||||
ret += [('MediaObject', self.ref)]
|
||||
ret += [('Media', self.ref)]
|
||||
return ret
|
||||
|
||||
def get_handle_referents(self):
|
||||
|
@ -525,7 +525,7 @@ class PrimaryObject(BasicPrimaryObject):
|
||||
"""
|
||||
if classname == 'Citation' and isinstance(self, CitationBase):
|
||||
return self.has_citation_reference(handle)
|
||||
elif classname == 'MediaObject' and isinstance(self, MediaBase):
|
||||
elif classname == 'Media' and isinstance(self, MediaBase):
|
||||
return self.has_media_reference(handle)
|
||||
else:
|
||||
return self._has_handle_reference(classname, handle)
|
||||
@ -541,7 +541,7 @@ class PrimaryObject(BasicPrimaryObject):
|
||||
"""
|
||||
if classname == 'Citation' and isinstance(self, CitationBase):
|
||||
self.remove_citation_references(handle_list)
|
||||
elif classname == 'MediaObject' and isinstance(self, MediaBase):
|
||||
elif classname == 'Media' and isinstance(self, MediaBase):
|
||||
self.remove_media_references(handle_list)
|
||||
else:
|
||||
self._remove_handle_references(classname, handle_list)
|
||||
@ -559,7 +559,7 @@ class PrimaryObject(BasicPrimaryObject):
|
||||
"""
|
||||
if classname == 'Citation' and isinstance(self, CitationBase):
|
||||
self.replace_citation_references(old_handle, new_handle)
|
||||
elif classname == 'MediaObject' and isinstance(self, MediaBase):
|
||||
elif classname == 'Media' and isinstance(self, MediaBase):
|
||||
self.replace_media_references(old_handle, new_handle)
|
||||
else:
|
||||
self._replace_handle_reference(classname, old_handle, new_handle)
|
||||
|
@ -324,7 +324,7 @@ class Struct(object):
|
||||
self is class when called as a classmethod.
|
||||
"""
|
||||
from gramps.gen.lib import (Person, Family, Event, Source, Place, Citation,
|
||||
Repository, MediaObject, Note, Tag, Date)
|
||||
Repository, Media, Note, Tag, Date)
|
||||
if isinstance(struct, dict):
|
||||
if "_class" in struct.keys():
|
||||
if struct["_class"] == "Person":
|
||||
@ -341,8 +341,8 @@ class Struct(object):
|
||||
return Citation.create(Citation.from_struct(struct))
|
||||
elif struct["_class"] == "Repository":
|
||||
return Repository.create(Repository.from_struct(struct))
|
||||
elif struct["_class"] == "MediaObject":
|
||||
return MediaObject.create(MediaObject.from_struct(struct))
|
||||
elif struct["_class"] == "Media":
|
||||
return Media.create(Media.from_struct(struct))
|
||||
elif struct["_class"] == "Note":
|
||||
return Note.create(Note.from_struct(struct))
|
||||
elif struct["_class"] == "Tag":
|
||||
|
@ -26,7 +26,7 @@ from gramps.plugins.database.dictionarydb import DictionaryDb
|
||||
|
||||
from ..import (Person, Surname, Name, NameType, Family, FamilyRelType,
|
||||
Event, EventType, Source, Place, PlaceName, Citation, Date,
|
||||
Repository, RepositoryType, MediaObject, Note, NoteType,
|
||||
Repository, RepositoryType, Media, Note, NoteType,
|
||||
StyledText, StyledTextTag, StyledTextTagType, Tag,
|
||||
ChildRef, ChildRefType, Attribute, MediaRef, AttributeType,
|
||||
Url, UrlType, Address, EventRef, EventRoleType, RepoRef,
|
||||
|
@ -24,7 +24,7 @@ import unittest
|
||||
|
||||
from .. import (Person, Surname, Name, NameType, Family, FamilyRelType,
|
||||
Event, EventType, Source, Place, PlaceName, Citation, Date,
|
||||
Repository, RepositoryType, MediaObject, Note, NoteType,
|
||||
Repository, RepositoryType, Media, Note, NoteType,
|
||||
StyledText, StyledTextTag, StyledTextTagType, Tag,
|
||||
ChildRef, ChildRefType, Attribute, MediaRef, AttributeType,
|
||||
Url, UrlType, Address, EventRef, EventRoleType, RepoRef,
|
||||
@ -900,13 +900,13 @@ class MediaBaseCheck(unittest.TestCase):
|
||||
self.phoenix.replace_media_references('123456','654321')
|
||||
self.assertEqual(self.phoenix.serialize(), self.ref_list.serialize())
|
||||
|
||||
class MediaObjectCheck(unittest.TestCase, PrivacyBaseTest, AttrBaseTest,
|
||||
class MediaCheck(unittest.TestCase, PrivacyBaseTest, AttrBaseTest,
|
||||
NoteBaseTest, CitationBaseTest):
|
||||
def setUp(self):
|
||||
self.phoenix = MediaObject()
|
||||
self.phoenix = Media()
|
||||
self.phoenix.set_path('example.png')
|
||||
self.titanic = MediaObject(self.phoenix)
|
||||
self.ref_obj = MediaObject(self.phoenix)
|
||||
self.titanic = Media(self.phoenix)
|
||||
self.ref_obj = Media(self.phoenix)
|
||||
|
||||
class MediaRefCheck(unittest.TestCase, PrivacyBaseTest, AttrBaseTest,
|
||||
CitationBaseTest, NoteBaseTest):
|
||||
|
@ -23,7 +23,7 @@
|
||||
import unittest
|
||||
|
||||
from .. import (Person, Family, Event, Source, Place, Citation,
|
||||
Repository, MediaObject, Note, Tag)
|
||||
Repository, Media, Note, Tag)
|
||||
from gramps.gen.lib.struct import Struct
|
||||
from gramps.gen.merge.diff import import_as_dict
|
||||
from gramps.cli.user import User
|
||||
@ -74,9 +74,9 @@ class RepositoryCheck(unittest.TestCase, BaseCheck):
|
||||
self.cls = Repository
|
||||
self.object = self.cls()
|
||||
|
||||
class MediaObjectCheck(unittest.TestCase, BaseCheck):
|
||||
class MediaCheck(unittest.TestCase, BaseCheck):
|
||||
def setUp(self):
|
||||
self.cls = MediaObject
|
||||
self.cls = Media
|
||||
self.object = self.cls()
|
||||
|
||||
class NoteCheck(unittest.TestCase, BaseCheck):
|
||||
|
@ -29,7 +29,7 @@ Provide merge capabilities for citations.
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from ..lib import (Person, Family, Event, Place,
|
||||
MediaObject, Repository, Citation, Source)
|
||||
Media, Repository, Citation, Source)
|
||||
from ..db import DbTxn
|
||||
from ..const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.sgettext
|
||||
@ -82,7 +82,7 @@ class MergeCitationQuery(object):
|
||||
assert(place.has_citation_reference(old_handle))
|
||||
place.replace_citation_references(old_handle, new_handle)
|
||||
self.database.commit_place(place, trans)
|
||||
elif class_name == MediaObject.__name__:
|
||||
elif class_name == Media.__name__:
|
||||
obj = self.database.get_object_from_handle(handle)
|
||||
assert(obj.has_citation_reference(old_handle))
|
||||
obj.replace_citation_references(old_handle, new_handle)
|
||||
|
@ -28,7 +28,7 @@ Provide merge capabilities for notes.
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from ..lib import (Person, Family, Event, Place, Source, Citation, Repository,
|
||||
MediaObject)
|
||||
Media)
|
||||
from ..db import DbTxn
|
||||
from ..const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.sgettext
|
||||
@ -89,7 +89,7 @@ class MergeNoteQuery(object):
|
||||
assert(place.has_note_reference(old_handle))
|
||||
place.replace_note_references(old_handle, new_handle)
|
||||
self.database.commit_place(place, trans)
|
||||
elif class_name == MediaObject.__name__:
|
||||
elif class_name == Media.__name__:
|
||||
obj = self.database.get_object_from_handle(handle)
|
||||
assert(obj.has_note_reference(old_handle))
|
||||
obj.replace_note_references(old_handle, new_handle)
|
||||
|
@ -30,7 +30,7 @@ Provide merge capabilities for sources.
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from ..lib import (Person, Family, Event, Place, Source, Repository,
|
||||
MediaObject, Citation)
|
||||
Media, Citation)
|
||||
from ..db import DbTxn
|
||||
from ..const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.sgettext
|
||||
|
@ -160,7 +160,7 @@ class FilterProxyDb(ProxyDbBase):
|
||||
|
||||
def get_object_from_handle(self, handle):
|
||||
"""
|
||||
Finds a MediaObject in the database from the passed Gramps handle.
|
||||
Finds a Media in the database from the passed Gramps handle.
|
||||
If no such Object exists, None is returned.
|
||||
"""
|
||||
media = self.db.get_object_from_handle(handle)
|
||||
@ -352,8 +352,8 @@ class FilterProxyDb(ProxyDbBase):
|
||||
|
||||
def get_object_from_gramps_id(self, val):
|
||||
"""
|
||||
Finds a MediaObject in the database from the passed Gramps ID.
|
||||
If no such MediaObject exists, None is returned.
|
||||
Finds a Media in the database from the passed Gramps ID.
|
||||
If no such Media exists, None is returned.
|
||||
"""
|
||||
media = self.db.get_object_from_gramps_id(val)
|
||||
if media:
|
||||
|
@ -29,7 +29,7 @@ Proxy class for the Gramps databases. Filter out all living people.
|
||||
#-------------------------------------------------------------------------
|
||||
from .proxybase import ProxyDbBase
|
||||
from ..lib import (Date, Person, Name, Surname, NameOriginType, Family, Source,
|
||||
Citation, Event, MediaObject, Place, Repository, Note, Tag)
|
||||
Citation, Event, Media, Place, Repository, Note, Tag)
|
||||
from ..utils.alive import probably_alive
|
||||
from ..config import config
|
||||
|
||||
|
@ -40,7 +40,7 @@ LOG = logging.getLogger(".citation")
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from ..lib import (MediaRef, Attribute, Address, EventRef,
|
||||
Person, Name, Source, RepoRef, MediaObject, Place, Event,
|
||||
Person, Name, Source, RepoRef, Media, Place, Event,
|
||||
Family, ChildRef, Repository, LdsOrd, Surname, Citation,
|
||||
SrcAttribute, Note, Tag)
|
||||
from .proxybase import ProxyDbBase
|
||||
@ -209,8 +209,8 @@ class PrivateProxyDb(ProxyDbBase):
|
||||
|
||||
def get_object_from_gramps_id(self, val):
|
||||
"""
|
||||
Finds a MediaObject in the database from the passed Gramps ID.
|
||||
If no such MediaObject exists, None is returned.
|
||||
Finds a Media in the database from the passed Gramps ID.
|
||||
If no such Media exists, None is returned.
|
||||
"""
|
||||
obj = self.db.get_object_from_gramps_id(val)
|
||||
if obj and not obj.get_privacy():
|
||||
@ -374,7 +374,7 @@ class PrivateProxyDb(ProxyDbBase):
|
||||
|
||||
def has_object_handle(self, handle):
|
||||
"""
|
||||
Return True if the handle exists in the current MediaObjectdatabase.
|
||||
Return True if the handle exists in the current Mediadatabase.
|
||||
"""
|
||||
object = self.db.get_object_from_handle(handle)
|
||||
if object and not object.get_privacy():
|
||||
@ -432,7 +432,7 @@ class PrivateProxyDb(ProxyDbBase):
|
||||
'Source' : self.db.get_source_from_handle,
|
||||
'Citation' : self.db.get_citation_from_handle,
|
||||
'Place' : self.db.get_place_from_handle,
|
||||
'MediaObject' : self.db.get_object_from_handle,
|
||||
'Media' : self.db.get_object_from_handle,
|
||||
'Note' : self.db.get_note_from_handle,
|
||||
'Repository' : self.db.get_repository_from_handle,
|
||||
}
|
||||
@ -930,7 +930,7 @@ def sanitize_source(db, source):
|
||||
|
||||
def sanitize_media(db, media):
|
||||
"""
|
||||
Create a new MediaObject instance based off the passed Media
|
||||
Create a new Media instance based off the passed Media
|
||||
instance. The returned instance has all private records
|
||||
removed from it.
|
||||
|
||||
@ -938,11 +938,11 @@ def sanitize_media(db, media):
|
||||
:type db: DbBase
|
||||
:param media: source Media object that will be copied with
|
||||
privacy records removed
|
||||
:type media: MediaObject
|
||||
:type media: Media
|
||||
:returns: 'cleansed' Media object
|
||||
:rtype: MediaObject
|
||||
:rtype: Media
|
||||
"""
|
||||
new_media = MediaObject()
|
||||
new_media = Media()
|
||||
|
||||
new_media.set_mime_type(media.get_mime_type())
|
||||
new_media.set_path(media.get_path())
|
||||
|
@ -258,7 +258,7 @@ class ProxyDbBase(DbReadBase):
|
||||
|
||||
def get_media_object_handles(self, sort_handles=False):
|
||||
"""
|
||||
Return a list of database handles, one handle for each MediaObject in
|
||||
Return a list of database handles, one handle for each Media in
|
||||
the database.
|
||||
"""
|
||||
if self.db.is_open:
|
||||
@ -605,8 +605,8 @@ class ProxyDbBase(DbReadBase):
|
||||
|
||||
def get_object_from_gramps_id(self, val):
|
||||
"""
|
||||
Finds a MediaObject in the database from the passed gramps' ID.
|
||||
If no such MediaObject exists, None is returned.
|
||||
Finds a Media in the database from the passed gramps' ID.
|
||||
If no such Media exists, None is returned.
|
||||
"""
|
||||
return self.gfilter(self.include_media_object,
|
||||
self.db.get_object_from_gramps_id(val))
|
||||
@ -873,7 +873,7 @@ class ProxyDbBase(DbReadBase):
|
||||
|
||||
def has_object_handle(self, handle):
|
||||
"""
|
||||
returns True if the handle exists in the current MediaObjectdatabase.
|
||||
returns True if the handle exists in the current Mediadatabase.
|
||||
"""
|
||||
return self.gfilter(self.include_media_object,
|
||||
self.db.get_object_from_handle(handle)) is not None
|
||||
|
@ -31,7 +31,7 @@ a person.
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from .proxybase import ProxyDbBase
|
||||
from ..lib import (Person, Family, Source, Citation, Event, MediaObject,
|
||||
from ..lib import (Person, Family, Source, Citation, Event, Media,
|
||||
Place, Repository, Note, Tag)
|
||||
|
||||
class ReferencedBySelectionProxyDb(ProxyDbBase):
|
||||
@ -95,7 +95,7 @@ class ReferencedBySelectionProxyDb(ProxyDbBase):
|
||||
"Source": set(),
|
||||
"Citation": set(),
|
||||
"Repository": set(),
|
||||
"MediaObject": set(),
|
||||
"Media": set(),
|
||||
"Note": set(),
|
||||
"Tag": set(),
|
||||
}
|
||||
@ -129,7 +129,7 @@ class ReferencedBySelectionProxyDb(ProxyDbBase):
|
||||
obj = self.db.get_repository_from_handle(handle)
|
||||
if obj:
|
||||
self.process_repository(obj)
|
||||
elif class_name == "MediaObject":
|
||||
elif class_name == "Media":
|
||||
obj = self.db.get_object_from_handle(handle)
|
||||
if obj:
|
||||
self.process_media(obj)
|
||||
@ -323,9 +323,9 @@ class ReferencedBySelectionProxyDb(ProxyDbBase):
|
||||
Follow the media object and find all of the primary objects
|
||||
that it references.
|
||||
"""
|
||||
if media is None or media.handle in self.referenced["MediaObject"]:
|
||||
if media is None or media.handle in self.referenced["Media"]:
|
||||
return
|
||||
self.referenced["MediaObject"].add(media.handle)
|
||||
self.referenced["Media"].add(media.handle)
|
||||
self.process_citation_ref_list(media)
|
||||
self.process_attributes(media)
|
||||
self.process_notes(media)
|
||||
@ -344,7 +344,7 @@ class ReferencedBySelectionProxyDb(ProxyDbBase):
|
||||
if tag.value.startswith("gramps://"):
|
||||
obj_class, prop, value = tag.value[9:].split("/")
|
||||
if obj_class == "Media": # bug6493
|
||||
obj_class = "MediaObject"
|
||||
obj_class = "Media"
|
||||
if prop == "handle":
|
||||
self.queue_object(obj_class, value)
|
||||
self.process_tags(note)
|
||||
@ -478,7 +478,7 @@ class ReferencedBySelectionProxyDb(ProxyDbBase):
|
||||
"""
|
||||
Filter for media objects
|
||||
"""
|
||||
return handle in self.referenced["MediaObject"]
|
||||
return handle in self.referenced["Media"]
|
||||
|
||||
def include_event(self, handle):
|
||||
"""
|
||||
|
@ -24,7 +24,7 @@
|
||||
Provide a simplified database access interface to the Gramps database.
|
||||
"""
|
||||
from ..lib import (Person, Family, Event, Source, Place, Citation,
|
||||
MediaObject, Repository, Note, Date, Tag)
|
||||
Media, Repository, Note, Date, Tag)
|
||||
from ..lib.handle import Handle
|
||||
from ..datehandler import displayer
|
||||
from ..utils.string import gender as gender_map
|
||||
@ -977,7 +977,7 @@ class SimpleAccess(object):
|
||||
self.name(self.mother(obj)),
|
||||
self.name(self.father(obj)),
|
||||
self.gid(obj))
|
||||
elif isinstance(obj, MediaObject):
|
||||
elif isinstance(obj, Media):
|
||||
return "%s: %s [%s]" % (_(object_class),
|
||||
obj.desc,
|
||||
self.gid(obj))
|
||||
@ -1030,7 +1030,7 @@ class SimpleAccess(object):
|
||||
return "%s/%s [%s]" % (self.name(self.mother(obj)),
|
||||
self.name(self.father(obj)),
|
||||
self.gid(obj))
|
||||
elif isinstance(obj, MediaObject):
|
||||
elif isinstance(obj, Media):
|
||||
return "%s [%s]" % (obj.desc,
|
||||
self.gid(obj))
|
||||
elif isinstance(obj, Source):
|
||||
|
@ -28,7 +28,7 @@ from html import escape
|
||||
from ..const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.sgettext
|
||||
from ..lib import (Person, Family, Event, Source, Place, Citation,
|
||||
Repository, MediaObject, Note, Date, Span)
|
||||
Repository, Media, Note, Date, Span)
|
||||
from ..config import config
|
||||
from ..datehandler import displayer
|
||||
|
||||
@ -131,7 +131,7 @@ class SimpleTable(object):
|
||||
retval.append(self.access.describe(item))
|
||||
if (self._link_col == col or link is None):
|
||||
link = ('Event', item.handle)
|
||||
elif isinstance(item, MediaObject):
|
||||
elif isinstance(item, Media):
|
||||
retval.append(self.access.describe(item))
|
||||
if (self._link_col == col or link is None):
|
||||
link = ('Media', item.handle)
|
||||
|
@ -64,7 +64,7 @@ PERSONCLASS = 'Person'
|
||||
FAMILYCLASS = 'Family'
|
||||
EVENTCLASS = 'Event'
|
||||
PLACECLASS = 'Place'
|
||||
MEDIACLASS = 'MediaObject'
|
||||
MEDIACLASS = 'Media'
|
||||
SOURCECLASS = 'Source'
|
||||
CITATIONCLASS = 'Citation'
|
||||
REPOCLASS = 'Repository'
|
||||
|
@ -361,7 +361,7 @@ def navigation_label(db, nav_type, handle):
|
||||
obj = db.get_repository_from_handle(handle)
|
||||
if obj:
|
||||
label = obj.get_name()
|
||||
elif nav_type == 'Media' or nav_type == 'MediaObject':
|
||||
elif nav_type == 'Media' or nav_type == 'Media':
|
||||
obj = db.get_object_from_handle(handle)
|
||||
if obj:
|
||||
label = obj.get_description()
|
||||
@ -586,7 +586,7 @@ def get_citation_referents(citation_handle, db):
|
||||
|
||||
"""
|
||||
_primaries = ('Person', 'Family', 'Event', 'Place',
|
||||
'Source', 'MediaObject', 'Repository')
|
||||
'Source', 'Media', 'Repository')
|
||||
|
||||
return (get_referents(citation_handle, db, _primaries))
|
||||
|
||||
@ -660,6 +660,6 @@ def get_note_referents(note_handle, db):
|
||||
|
||||
"""
|
||||
_primaries = ('Person', 'Family', 'Event', 'Place',
|
||||
'Source', 'Citation', 'MediaObject', 'Repository')
|
||||
'Source', 'Citation', 'Media', 'Repository')
|
||||
|
||||
return (get_referents(note_handle, db, _primaries))
|
||||
|
@ -828,7 +828,7 @@ class GrampsLocale(object):
|
||||
return _("the repository")
|
||||
elif objclass == "note":
|
||||
return _("the note")
|
||||
elif objclass in ["media", "mediaobject"]:
|
||||
elif objclass == "media":
|
||||
return _("the media")
|
||||
elif objclass == "source":
|
||||
return _("the source")
|
||||
|
@ -39,7 +39,7 @@ import os
|
||||
#-------------------------------------------------------------------------
|
||||
from ..lib import (Person, Surname, Name, NameType, Family, FamilyRelType,
|
||||
Event, EventType, Source, Place, Citation,
|
||||
Repository, RepositoryType, MediaObject, Note, NoteType,
|
||||
Repository, RepositoryType, Media, Note, NoteType,
|
||||
StyledText, StyledTextTag, StyledTextTagType, Tag,
|
||||
ChildRef, ChildRefType)
|
||||
from .id import create_id
|
||||
@ -130,7 +130,7 @@ def make_unknown(class_arg, explanation, class_func, commit_func, transaction,
|
||||
elif isinstance(obj, Repository):
|
||||
obj.set_name(_('Unknown'))
|
||||
obj.set_type(RepositoryType.UNKNOWN)
|
||||
elif isinstance(obj, MediaObject):
|
||||
elif isinstance(obj, Media):
|
||||
obj.set_path(os.path.join(IMAGE_DIR, "image-missing.png"))
|
||||
obj.set_mime_type('image/png')
|
||||
obj.set_description(_('Unknown'))
|
||||
|
@ -112,7 +112,7 @@ def map2class(target):
|
||||
'repo-link': ClipRepositoryLink,
|
||||
'pevent': ClipEvent,
|
||||
'eventref': ClipEventRef,
|
||||
'mediaobj': ClipMediaObj,
|
||||
'media': ClipMediaObj,
|
||||
'mediaref': ClipMediaRef,
|
||||
'place-link': ClipPlace,
|
||||
'placeref': ClipPlaceRef,
|
||||
@ -139,7 +139,7 @@ OBJ2TARGET = {"Person": Gdk.atom_intern('person-link', False),
|
||||
'Citation': Gdk.atom_intern('citation-link', False),
|
||||
'Repository': Gdk.atom_intern('repo-link', False),
|
||||
'Event': Gdk.atom_intern('pevent', False),
|
||||
'Media': Gdk.atom_intern('mediaobj', False),
|
||||
'Media': Gdk.atom_intern('media', False),
|
||||
'Place': Gdk.atom_intern('place-link', False),
|
||||
'Note': Gdk.atom_intern('note-link', False),
|
||||
}
|
||||
@ -281,7 +281,7 @@ class ClipObjWrapper(ClipWrapper):
|
||||
'Family': self._db.get_family_from_handle,
|
||||
'Event': self._db.get_event_from_handle,
|
||||
'Place': self._db.get_place_from_handle,
|
||||
'MediaObject': self._db.get_object_from_handle,
|
||||
'Media': self._db.get_object_from_handle,
|
||||
'Source': self._db.get_source_from_handle}
|
||||
|
||||
for (classname, handle) in self._obj.get_referenced_handles_recursively():
|
||||
@ -1064,7 +1064,7 @@ class ClipboardListView(object):
|
||||
self._db.connect('event-delete',
|
||||
gen_del_obj(self.delete_object_ref, 'eventref'))
|
||||
self._db.connect('media-delete',
|
||||
gen_del_obj(self.delete_object, 'mediaobj'))
|
||||
gen_del_obj(self.delete_object, 'media'))
|
||||
self._db.connect('media-delete',
|
||||
gen_del_obj(self.delete_object_ref, 'mediaref'))
|
||||
self._db.connect('place-delete',
|
||||
@ -1644,7 +1644,7 @@ class MultiTreeView(Gtk.TreeView):
|
||||
self.uistate, [], ref)
|
||||
except WindowActiveError:
|
||||
pass
|
||||
elif objclass in ['Media', 'MediaObject']:
|
||||
elif objclass == 'Media':
|
||||
ref = self.dbstate.db.get_object_from_handle(handle)
|
||||
if ref:
|
||||
try:
|
||||
|
@ -133,7 +133,7 @@ class _DdTargets(object):
|
||||
self.FAMILY_ATTRIBUTE = _DdType(self, 'fattr')
|
||||
self.FAMILY_EVENT = _DdType(self, 'fevent')
|
||||
self.LOCATION = _DdType(self, 'location')
|
||||
self.MEDIAOBJ = _DdType(self, 'mediaobj')
|
||||
self.MEDIAOBJ = _DdType(self, 'media')
|
||||
self.MEDIAREF = _DdType(self, 'mediaref')
|
||||
self.NAME = _DdType(self, 'name')
|
||||
self.NOTE_LINK = _DdType(self, 'note-link')
|
||||
|
@ -71,27 +71,27 @@ WIKI_HELP_SEC = _('manual|Select_a_media_object_selector')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# AddMediaObject
|
||||
# AddMedia
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class AddMediaObject(ManagedWindow):
|
||||
class AddMedia(ManagedWindow):
|
||||
"""
|
||||
Displays the Add Media Dialog window, allowing the user to select
|
||||
a file from the file system, while providing a description.
|
||||
"""
|
||||
|
||||
def __init__(self, dbstate, uistate, track, mediaobj, callback=None):
|
||||
def __init__(self, dbstate, uistate, track, media, callback=None):
|
||||
"""
|
||||
Create and displays the dialog box
|
||||
|
||||
db - the database in which the new object is to be stored
|
||||
The mediaobject is updated with the information, and on save, the
|
||||
The media is updated with the information, and on save, the
|
||||
callback function is called
|
||||
"""
|
||||
ManagedWindow.__init__(self, uistate, track, self)
|
||||
|
||||
self.dbase = dbstate.db
|
||||
self.obj = mediaobj
|
||||
self.obj = media
|
||||
self.callback = callback
|
||||
|
||||
self.last_directory = config.get('behavior.addmedia-image-dir')
|
||||
|
@ -49,7 +49,7 @@ from gi.repository import GLib
|
||||
from ...utils import is_right_click, open_file_with_default_application
|
||||
from ...dbguielement import DbGUIElement
|
||||
from ...selectors import SelectorFactory
|
||||
from gramps.gen.lib import MediaObject, MediaRef
|
||||
from gramps.gen.lib import Media, MediaRef
|
||||
from gramps.gen.db import DbTxn
|
||||
from gramps.gen.utils.file import (media_path_full, media_path, relative_path,
|
||||
create_checksum)
|
||||
@ -100,8 +100,8 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
"""
|
||||
#note: media-rebuild closes the editors, so no need to connect to it
|
||||
self.callman.register_callbacks(
|
||||
{'media-delete': self.media_delete, # delete a mediaobj we track
|
||||
'media-update': self.media_update, # change a mediaobj we track
|
||||
{'media-delete': self.media_delete, # delete a media we track
|
||||
'media-update': self.media_update, # change a media we track
|
||||
})
|
||||
self.callman.connect_all(keys=['media'])
|
||||
|
||||
@ -285,7 +285,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
try:
|
||||
from .. import EditMediaRef
|
||||
EditMediaRef(self.dbstate, self.uistate, self.track,
|
||||
MediaObject(), MediaRef(),
|
||||
Media(), MediaRef(),
|
||||
self.add_callback)
|
||||
except WindowActiveError:
|
||||
pass
|
||||
@ -322,7 +322,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
This function should be overridden by the derived class.
|
||||
|
||||
"""
|
||||
SelectObject = SelectorFactory('MediaObject')
|
||||
SelectObject = SelectorFactory('Media')
|
||||
|
||||
sel = SelectObject(self.dbstate, self.uistate, self.track)
|
||||
src = sel.run()
|
||||
@ -515,7 +515,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
mime = get_type(name)
|
||||
if not is_valid_type(mime):
|
||||
return
|
||||
photo = MediaObject()
|
||||
photo = Media()
|
||||
self.uistate.set_busy_cursor(True)
|
||||
photo.set_checksum(create_checksum(name))
|
||||
self.uistate.set_busy_cursor(False)
|
||||
|
@ -43,7 +43,7 @@ from gi.repository import Gdk
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.sgettext
|
||||
from ..utils import open_file_with_default_application
|
||||
from gramps.gen.lib import MediaObject, NoteType
|
||||
from gramps.gen.lib import Media, NoteType
|
||||
from gramps.gen.db import DbTxn
|
||||
from gramps.gen.mime import get_description, get_type
|
||||
from gramps.gen.utils.thumbnails import get_thumbnail_image, find_mime_type_pixbuf
|
||||
@ -53,7 +53,7 @@ from ..widgets import (MonitoredDate, MonitoredEntry, PrivacyButton,
|
||||
MonitoredTagList)
|
||||
from .displaytabs import (CitationEmbedList, MediaAttrEmbedList, NoteTab,
|
||||
MediaBackRefList)
|
||||
from .addmedia import AddMediaObject
|
||||
from .addmedia import AddMedia
|
||||
from ..dialog import ErrorDialog
|
||||
from ..glade import Glade
|
||||
from gramps.gen.const import URL_MANUAL_SECT2
|
||||
@ -81,11 +81,11 @@ class EditMedia(EditPrimary):
|
||||
dbstate.db.get_object_from_gramps_id, callback)
|
||||
if not self.obj.get_handle():
|
||||
#show the addmedia dialog immediately, with track of parent.
|
||||
AddMediaObject(dbstate, self.uistate, self.track, self.obj,
|
||||
AddMedia(dbstate, self.uistate, self.track, self.obj,
|
||||
self._update_addmedia)
|
||||
|
||||
def empty_object(self):
|
||||
return MediaObject()
|
||||
return Media()
|
||||
|
||||
def get_menu_title(self):
|
||||
if self.obj.get_handle():
|
||||
@ -258,7 +258,7 @@ class EditMedia(EditPrimary):
|
||||
self.determine_mime()
|
||||
path = self.file_path.get_text()
|
||||
self.obj.set_path(path)
|
||||
AddMediaObject(self.dbstate, self.uistate, self.track, self.obj,
|
||||
AddMedia(self.dbstate, self.uistate, self.track, self.obj,
|
||||
self._update_addmedia)
|
||||
|
||||
def _update_addmedia(self, obj):
|
||||
|
@ -58,7 +58,7 @@ from .displaytabs import (CitationEmbedList, MediaAttrEmbedList, MediaBackRefLis
|
||||
from ..widgets import (MonitoredSpinButton, MonitoredEntry, PrivacyButton,
|
||||
MonitoredDate, MonitoredTagList, SelectionWidget, Region)
|
||||
from .editreference import RefTab, EditReference
|
||||
from .addmedia import AddMediaObject
|
||||
from .addmedia import AddMedia
|
||||
from gramps.gen.const import URL_MANUAL_SECT2
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -82,7 +82,7 @@ class EditMediaRef(EditReference):
|
||||
media_ref, update)
|
||||
if not self.source.get_handle():
|
||||
#show the addmedia dialog immediately, with track of parent.
|
||||
AddMediaObject(state, self.uistate, self.track, self.source,
|
||||
AddMedia(state, self.uistate, self.track, self.source,
|
||||
self._update_addmedia)
|
||||
|
||||
def _local_init(self):
|
||||
@ -435,7 +435,7 @@ class EditMediaRef(EditReference):
|
||||
self.determine_mime()
|
||||
path = self.file_path.get_text()
|
||||
self.source.set_path(path)
|
||||
AddMediaObject(self.dbstate, self.uistate, self.track, self.source,
|
||||
AddMedia(self.dbstate, self.uistate, self.track, self.source,
|
||||
self._update_addmedia)
|
||||
|
||||
def _connect_signals(self):
|
||||
|
@ -44,7 +44,7 @@ from gi.repository import Pango
|
||||
# Gramps modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.lib import (Place, Source, MediaObject, Note)
|
||||
from gramps.gen.lib import (Place, Source, Media, Note)
|
||||
from .editplace import EditPlace
|
||||
from .editsource import EditSource
|
||||
from .editmedia import EditMedia
|
||||
@ -409,7 +409,7 @@ class MediaEntry(ObjEntry):
|
||||
|
||||
def call_editor(self, obj=None):
|
||||
if obj is None:
|
||||
object = MediaObject()
|
||||
object = Media()
|
||||
func = self.obj_added
|
||||
else:
|
||||
object = obj
|
||||
@ -421,7 +421,7 @@ class MediaEntry(ObjEntry):
|
||||
pass
|
||||
|
||||
def call_selector(self):
|
||||
cls = SelectorFactory('MediaObject')
|
||||
cls = SelectorFactory('Media')
|
||||
return cls(self.dbstate, self.uistate, self.track)
|
||||
|
||||
# FIXME isn't used anywhere
|
||||
|
@ -32,7 +32,7 @@ except:
|
||||
MOCKING = False
|
||||
|
||||
from gramps.gen.lib import (Person, Family, Event, Source, Place, Citation,
|
||||
Repository, MediaObject, Note, Tag)
|
||||
Repository, Media, Note, Tag)
|
||||
from gramps.gen.merge.diff import DictionaryDb
|
||||
from gramps.cli.user import User
|
||||
from gramps.gen.dbstate import DbState
|
||||
|
@ -1064,7 +1064,7 @@ class GuiMediaOption(Gtk.Box):
|
||||
"""
|
||||
Handle the button to choose a different note.
|
||||
"""
|
||||
select_class = SelectorFactory('MediaObject')
|
||||
select_class = SelectorFactory('Media')
|
||||
sel = select_class(self.__dbstate, self.__uistate, self.__track)
|
||||
media = sel.run()
|
||||
self.__update_media(media)
|
||||
|
@ -148,7 +148,7 @@ class QuickTable(SimpleTable):
|
||||
objclass, handle = self._link[index]
|
||||
if (objclass == 'Filter' and
|
||||
handle[0] in ['Person', 'Family', 'Place', 'Event',
|
||||
'Repository', 'Note', 'MediaObject',
|
||||
'Repository', 'Note', 'Media',
|
||||
'Citation', 'Source']):
|
||||
menu_item = Gtk.MenuItem(label=_("See data not in Filter"))
|
||||
menu_item.connect("activate",
|
||||
@ -256,7 +256,7 @@ class QuickTable(SimpleTable):
|
||||
return True # handled event
|
||||
except WindowActiveError:
|
||||
pass
|
||||
elif objclass in ['Media', 'MediaObject']:
|
||||
elif objclass == 'Media':
|
||||
ref = self.access.dbase.get_object_from_handle(handle)
|
||||
if ref:
|
||||
try:
|
||||
|
@ -40,7 +40,7 @@ def SelectorFactory(classname):
|
||||
elif classname == 'Citation':
|
||||
from .selectcitation import SelectCitation
|
||||
cls = SelectCitation
|
||||
elif classname in ['MediaObject', 'Media']:
|
||||
elif classname == 'Media':
|
||||
from .selectobject import SelectObject
|
||||
cls = SelectObject
|
||||
elif classname == 'Repository':
|
||||
|
@ -592,7 +592,7 @@ def edit_object(dbstate, uistate, reftype, ref):
|
||||
EditPlace(dbstate, uistate, [], place)
|
||||
except WindowActiveError:
|
||||
pass
|
||||
elif reftype == 'MediaObject':
|
||||
elif reftype == 'Media':
|
||||
try:
|
||||
obj = dbstate.db.get_object_from_handle(ref)
|
||||
EditMedia(dbstate, uistate, [], obj)
|
||||
|
@ -504,7 +504,7 @@ class OrganizeTagsDialog(object):
|
||||
self.db.commit_citation),
|
||||
'Repository': (self.db.get_repository_from_handle,
|
||||
self.db.commit_repository),
|
||||
'MediaObject': (self.db.get_object_from_handle,
|
||||
'Media': (self.db.get_object_from_handle,
|
||||
self.db.commit_media_object),
|
||||
'Note': (self.db.get_note_from_handle,
|
||||
self.db.commit_note)}
|
||||
|
@ -42,7 +42,7 @@ from gi.repository import Gtk
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.datehandler import displayer, format_time
|
||||
from gramps.gen.lib import Date, MediaObject
|
||||
from gramps.gen.lib import Date, Media
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
from .flatbasemodel import FlatBaseModel
|
||||
|
||||
@ -128,7 +128,7 @@ class MediaModel(FlatBaseModel):
|
||||
return ''
|
||||
|
||||
def sort_date(self,data):
|
||||
obj = MediaObject()
|
||||
obj = Media()
|
||||
obj.unserialize(data)
|
||||
d = obj.get_date_object()
|
||||
if d:
|
||||
|
@ -53,7 +53,7 @@ import logging
|
||||
# Gramps libraries
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.lib.mediaobj import MediaObject
|
||||
from gramps.gen.lib.media import Media
|
||||
from gramps.gen.lib.person import Person
|
||||
from gramps.gen.lib.family import Family
|
||||
from gramps.gen.lib.src import Source
|
||||
@ -226,7 +226,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
|
||||
:py:class:`.Person`, :py:class:`.Family`, :py:class:`.Event`,
|
||||
:py:class:`.Place`, :py:class:`.Source`,
|
||||
:py:class:`Citation <.lib.citation.Citation>`, :py:class:`.MediaObject`,
|
||||
:py:class:`Citation <.lib.citation.Citation>`, :py:class:`.Media`,
|
||||
:py:class:`.Repository` and :py:class:`.Note`
|
||||
|
||||
For each object class, there are methods to retrieve data in various ways.
|
||||
@ -333,7 +333,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
{
|
||||
"handle_func": self.get_object_from_handle,
|
||||
"gramps_id_func": self.get_object_from_gramps_id,
|
||||
"class_func": MediaObject,
|
||||
"class_func": Media,
|
||||
"cursor_func": self.get_media_cursor,
|
||||
"handles_func": self.get_media_object_handles,
|
||||
})
|
||||
@ -623,10 +623,10 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
|
||||
def find_next_object_gramps_id(self):
|
||||
"""
|
||||
Return the next available Gramps ID for a MediaObject object based
|
||||
Return the next available Gramps ID for a Media object based
|
||||
off the media object ID prefix.
|
||||
"""
|
||||
self.omap_index, gid = self.__find_next_gramps_id(self.mediaobject_prefix,
|
||||
self.omap_index, gid = self.__find_next_gramps_id(self.media_prefix,
|
||||
self.omap_index, self.oid_trans)
|
||||
return gid
|
||||
|
||||
@ -744,7 +744,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
|
||||
If no such Object exists, a HandleError is raised.
|
||||
"""
|
||||
return self.get_from_handle(handle, MediaObject, self.media_map)
|
||||
return self.get_from_handle(handle, Media, self.media_map)
|
||||
|
||||
def get_place_from_handle(self, handle):
|
||||
"""
|
||||
@ -875,11 +875,11 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
|
||||
def get_object_from_gramps_id(self, val):
|
||||
"""
|
||||
Find a MediaObject in the database from the passed Gramps ID.
|
||||
Find a Media in the database from the passed Gramps ID.
|
||||
|
||||
If no such MediaObject exists, None is returned.
|
||||
If no such Media exists, None is returned.
|
||||
"""
|
||||
return self.__get_obj_from_gramps_id(val, self.oid_trans, MediaObject,
|
||||
return self.__get_obj_from_gramps_id(val, self.oid_trans, Media,
|
||||
self.media_map)
|
||||
|
||||
def get_repository_from_gramps_id(self, val):
|
||||
@ -1095,7 +1095,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
|
||||
def get_media_object_handles(self, sort_handles=False):
|
||||
"""
|
||||
Return a list of database handles, one handle for each MediaObject in
|
||||
Return a list of database handles, one handle for each Media in
|
||||
the database.
|
||||
|
||||
If sort_handles is True, the list is sorted by title.
|
||||
@ -1219,7 +1219,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
iter_places = _f(get_place_cursor, Place)
|
||||
iter_sources = _f(get_source_cursor, Source)
|
||||
iter_citations = _f(get_citation_cursor, Citation)
|
||||
iter_media_objects = _f(get_media_cursor, MediaObject)
|
||||
iter_media_objects = _f(get_media_cursor, Media)
|
||||
iter_repositories = _f(get_repository_cursor, Repository)
|
||||
iter_notes = _f(get_note_cursor, Note)
|
||||
iter_tags = _f(get_tag_cursor, Tag)
|
||||
@ -1350,14 +1350,14 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
|
||||
def set_object_id_prefix(self, val):
|
||||
"""
|
||||
Set the naming template for Gramps MediaObject ID values.
|
||||
Set the naming template for Gramps Media ID values.
|
||||
|
||||
The string is expected to be in the form of a simple text string, or
|
||||
in a format that contains a C/Python style format string using %d,
|
||||
such as O%d or O%04d.
|
||||
"""
|
||||
self.mediaobject_prefix = self._validated_id_prefix(val, "O")
|
||||
self.oid2user_format = self.__id2user_format(self.mediaobject_prefix)
|
||||
self.media_prefix = self._validated_id_prefix(val, "O")
|
||||
self.oid2user_format = self.__id2user_format(self.media_prefix)
|
||||
|
||||
def set_place_id_prefix(self, val):
|
||||
"""
|
||||
@ -1709,7 +1709,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
|
||||
def has_object_handle(self, handle):
|
||||
"""
|
||||
Return True if the handle exists in the current MediaObjectdatabase.
|
||||
Return True if the handle exists in the current Mediadatabase.
|
||||
"""
|
||||
return self.__has_handle(self.media_map, handle)
|
||||
|
||||
@ -1895,9 +1895,9 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
'cursor_func': self.get_citation_cursor,
|
||||
'class_func': Citation,
|
||||
},
|
||||
'MediaObject': {
|
||||
'Media': {
|
||||
'cursor_func': self.get_media_cursor,
|
||||
'class_func': MediaObject,
|
||||
'class_func': Media,
|
||||
},
|
||||
'Repository': {
|
||||
'cursor_func': self.get_repository_cursor,
|
||||
|
@ -24,7 +24,7 @@ from .. import DbBsddb, DbTxn
|
||||
from gramps.cli.clidbman import CLIDbManager
|
||||
from gramps.gen.dbstate import DbState
|
||||
from gramps.gen.lib import (Source, RepoRef, Citation, Repository, Person,
|
||||
Family, Event, Place, MediaObject)
|
||||
Family, Event, Place, Media)
|
||||
|
||||
class GrampsDbBaseTest(unittest.TestCase):
|
||||
"""Base class for unittest that need to be able to create
|
||||
@ -158,6 +158,6 @@ class GrampsDbBaseTest(unittest.TestCase):
|
||||
def _add_media_object_with_sources(self, citations):
|
||||
|
||||
return self._add_object_with_source(citations,
|
||||
MediaObject,
|
||||
Media,
|
||||
self._db.add_object,
|
||||
self._db.commit_media_object)
|
||||
|
@ -58,7 +58,7 @@ from gramps.gen.lib.citation import Citation
|
||||
from gramps.gen.lib.event import Event
|
||||
from gramps.gen.lib.place import Place
|
||||
from gramps.gen.lib.repo import Repository
|
||||
from gramps.gen.lib.mediaobj import MediaObject
|
||||
from gramps.gen.lib.media import Media
|
||||
from gramps.gen.lib.note import Note
|
||||
from gramps.gen.lib.tag import Tag
|
||||
from gramps.gen.lib.genderstats import GenderStats
|
||||
@ -304,7 +304,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
{
|
||||
"handle_func": self.get_object_from_handle,
|
||||
"gramps_id_func": self.get_object_from_gramps_id,
|
||||
"class_func": MediaObject,
|
||||
"class_func": Media,
|
||||
"cursor_func": self.get_media_cursor,
|
||||
"handles_func": self.get_media_object_handles,
|
||||
"add_func": self.add_object,
|
||||
@ -1366,7 +1366,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
(self.get_place_cursor, Place),
|
||||
(self.get_source_cursor, Source),
|
||||
(self.get_citation_cursor, Citation),
|
||||
(self.get_media_cursor, MediaObject),
|
||||
(self.get_media_cursor, Media),
|
||||
(self.get_repository_cursor, Repository),
|
||||
(self.get_note_cursor, Note),
|
||||
(self.get_tag_cursor, Tag),
|
||||
@ -1631,7 +1631,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
|
||||
def add_object(self, obj, transaction, set_gid=True):
|
||||
"""
|
||||
Add a MediaObject to the database, assigning internal IDs if they have
|
||||
Add a Media to the database, assigning internal IDs if they have
|
||||
not already been defined.
|
||||
|
||||
If not set_gid, then gramps_id is not set.
|
||||
@ -1737,7 +1737,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
|
||||
def remove_object(self, handle, transaction):
|
||||
"""
|
||||
Remove the MediaObjectPerson specified by the database handle from the
|
||||
Remove the MediaPerson specified by the database handle from the
|
||||
database, preserving the change in the passed transaction.
|
||||
"""
|
||||
self.__do_remove(handle, transaction, self.media_map,
|
||||
@ -1947,7 +1947,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
|
||||
def commit_media_object(self, obj, transaction, change_time=None):
|
||||
"""
|
||||
Commit the specified MediaObject to the database, storing the changes
|
||||
Commit the specified Media to the database, storing the changes
|
||||
as part of the transaction.
|
||||
"""
|
||||
self.commit_base(obj, self.media_map, MEDIA_KEY,
|
||||
|
@ -695,7 +695,7 @@ class DictionaryDb(DbGeneric):
|
||||
(self.get_place_cursor, Place),
|
||||
(self.get_source_cursor, Source),
|
||||
(self.get_citation_cursor, Citation),
|
||||
(self.get_media_cursor, MediaObject),
|
||||
(self.get_media_cursor, Media),
|
||||
(self.get_repository_cursor, Repository),
|
||||
(self.get_note_cursor, Note),
|
||||
(self.get_tag_cursor, Tag),
|
||||
|
@ -50,7 +50,7 @@ from gramps.gen.mime import get_type
|
||||
from gramps.gen.lib import (Address, Attribute, AttributeType, ChildRef,
|
||||
ChildRefType, Citation, Date, DateError, Event,
|
||||
EventRef, EventRoleType, EventType, Family, LdsOrd,
|
||||
Location, MediaObject, MediaRef, Name,
|
||||
Location, Media, MediaRef, Name,
|
||||
NameOriginType, NameType, Note, NoteType, Person,
|
||||
PersonRef, Place, PlaceName, PlaceRef, PlaceType,
|
||||
RepoRef, Repository, Researcher, Source,
|
||||
@ -2154,10 +2154,10 @@ class GrampsParser(UpdateCallback):
|
||||
self.objref = MediaRef()
|
||||
if 'hlink' in attrs:
|
||||
handle = self.inaugurate(attrs['hlink'], "media",
|
||||
MediaObject)
|
||||
Media)
|
||||
else: # old style XML
|
||||
handle = self.inaugurate_id(attrs.get('ref'), MEDIA_KEY,
|
||||
MediaObject)
|
||||
Media)
|
||||
self.objref.ref = handle
|
||||
self.objref.private = bool(attrs.get('priv'))
|
||||
if self.event:
|
||||
@ -2185,7 +2185,7 @@ class GrampsParser(UpdateCallback):
|
||||
Add a media object to db if it doesn't exist yet and assign
|
||||
id, privacy and changetime.
|
||||
"""
|
||||
self.object = MediaObject()
|
||||
self.object = Media()
|
||||
if 'handle' in attrs:
|
||||
orig_handle = attrs['handle'].replace('_', '')
|
||||
is_merge_candidate = (self.replace_import_handle and
|
||||
@ -2266,7 +2266,7 @@ class GrampsParser(UpdateCallback):
|
||||
self.reporef = None
|
||||
|
||||
def start_photo(self, attrs):
|
||||
self.photo = MediaObject()
|
||||
self.photo = Media()
|
||||
self.pref = MediaRef()
|
||||
self.pref.set_reference_handle(self.photo.get_handle())
|
||||
|
||||
|
@ -116,7 +116,7 @@ from gramps.gen.errors import GedcomError
|
||||
from gramps.gen.const import DATA_DIR
|
||||
from gramps.gen.lib import (Address, Attribute, AttributeType, ChildRef,
|
||||
ChildRefType, Citation, Date, Event, EventRef, EventRoleType,
|
||||
EventType, Family, FamilyRelType, LdsOrd, Location, MediaObject,
|
||||
EventType, Family, FamilyRelType, LdsOrd, Location, Media,
|
||||
MediaRef, Name, NameType, Note, NoteType, Person, PersonRef, Place,
|
||||
RepoRef, Repository, RepositoryType, Researcher,
|
||||
Source, SourceMediaType, SrcAttribute, SrcAttributeType,
|
||||
@ -2823,7 +2823,7 @@ class GedcomParser(UpdateCallback):
|
||||
already used (is in the db), we return the item in the db. Otherwise,
|
||||
we create a new media object, assign the handle and GRAMPS ID.
|
||||
"""
|
||||
obj = MediaObject()
|
||||
obj = Media()
|
||||
intid = self.oid2id.get(gramps_id)
|
||||
if self.dbase.has_object_handle(intid):
|
||||
obj.unserialize(self.dbase.get_raw_object_data(intid))
|
||||
@ -7532,7 +7532,7 @@ class GedcomParser(UpdateCallback):
|
||||
path = filename
|
||||
photo_handle = self.media_map.get(path)
|
||||
if photo_handle is None:
|
||||
photo = MediaObject()
|
||||
photo = Media()
|
||||
photo.set_path(path)
|
||||
photo.set_description(title)
|
||||
full_path = os.path.abspath(path)
|
||||
|
@ -28,7 +28,7 @@ Mixin for DbDir to enable find_from_handle and check_from_handle methods.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
from gramps.gen.lib import (Person, Family, Event, Place, Source,
|
||||
MediaObject, Repository, Note, Tag)
|
||||
Media, Repository, Note, Tag)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
@ -168,15 +168,15 @@ class DbMixin(object):
|
||||
|
||||
def find_object_from_handle(self, handle, transaction):
|
||||
"""
|
||||
Find a MediaObject in the database from the passed handle.
|
||||
Find a Media in the database from the passed handle.
|
||||
|
||||
If no such MediaObject exists, a new Object is added to the database.
|
||||
If no such Media exists, a new Object is added to the database.
|
||||
|
||||
@return: Returns a tuple, first the object, second a bool which is True
|
||||
if the object is new
|
||||
@rtype: tuple
|
||||
"""
|
||||
return self.__find_primary_from_handle(handle, transaction, MediaObject,
|
||||
return self.__find_primary_from_handle(handle, transaction, Media,
|
||||
self.get_raw_object_data, self.add_object)
|
||||
|
||||
def find_place_from_handle(self, handle, transaction):
|
||||
@ -279,14 +279,14 @@ class DbMixin(object):
|
||||
|
||||
def check_object_from_handle(self, handle, transaction, set_gid=True):
|
||||
"""
|
||||
Check whether a MediaObject with the passed handle exists in the
|
||||
Check whether a Media with the passed handle exists in the
|
||||
database.
|
||||
|
||||
If no such MediaObject exists, a new Object is added to the database.
|
||||
If no such Media exists, a new Object is added to the database.
|
||||
If set_gid then a new gramps_id is created, if not, None is used.
|
||||
"""
|
||||
|
||||
self.__check_primary_from_handle(handle, transaction, MediaObject,
|
||||
self.__check_primary_from_handle(handle, transaction, Media,
|
||||
self.has_object_handle, self.add_object,
|
||||
set_gid=set_gid)
|
||||
|
||||
|
@ -45,7 +45,7 @@ fname_map = {'all': _('Filtering_on|all'),
|
||||
'Inverse Place': _('Filtering_on|Inverse Place'),
|
||||
'Inverse Source': _('Filtering_on|Inverse Source'),
|
||||
'Inverse Repository': _('Filtering_on|Inverse Repository'),
|
||||
'Inverse MediaObject': _('Filtering_on|Inverse MediaObject'),
|
||||
'Inverse Media': _('Filtering_on|Inverse Media'),
|
||||
'Inverse Note': _('Filtering_on|Inverse Note'),
|
||||
'all people': _('Filtering_on|all people'),
|
||||
'all families': _('Filtering_on|all families'),
|
||||
@ -106,7 +106,7 @@ def run(database, document, filter_name, *args, **kwargs):
|
||||
stab.row([_("Repositories"), "Filter", "Repository"],
|
||||
"%d/%d" % (len(database.get_repository_handles()),
|
||||
len(database.db.get_repository_handles())))
|
||||
stab.row([_("Media"), "Filter", "MediaObject"],
|
||||
stab.row([_("Media"), "Filter", "Media"],
|
||||
"%d/%d" % (len(database.get_media_object_handles()),
|
||||
len(database.db.get_media_object_handles())))
|
||||
stab.row([_("Notes"), "Filter", "Note"],
|
||||
@ -131,7 +131,7 @@ def run(database, document, filter_name, *args, **kwargs):
|
||||
stab.row([_("Repositories"), "Filter", "Repository"],
|
||||
"%d/%d" % (len(database.get_repository_handles()),
|
||||
len(database.basedb.get_repository_handles())))
|
||||
stab.row([_("Media"), "Filter", "MediaObject"],
|
||||
stab.row([_("Media"), "Filter", "Media"],
|
||||
"%d/%d" % (len(database.get_media_object_handles()),
|
||||
len(database.basedb.get_media_object_handles())))
|
||||
stab.row([_("Notes"), "Filter", "Note"],
|
||||
@ -210,7 +210,7 @@ def run(database, document, filter_name, *args, **kwargs):
|
||||
stab.row(repository, repository.gramps_id)
|
||||
matches += 1
|
||||
|
||||
elif (filter_name == 'Inverse MediaObject'):
|
||||
elif (filter_name == 'Inverse Media'):
|
||||
sdb.dbase = database.db
|
||||
stab.columns(_("Media"), _("Gramps ID"))
|
||||
proxy_handles = set(database.iter_media_object_handles())
|
||||
@ -266,7 +266,7 @@ def run(database, document, filter_name, *args, **kwargs):
|
||||
stab.row(obj, obj.gramps_id)
|
||||
matches += 1
|
||||
|
||||
elif (filter_name in ['all media', 'MediaObject']):
|
||||
elif (filter_name in ['all media', 'Media']):
|
||||
stab.columns(_("Media"), _("Gramps ID"))
|
||||
for obj in database.iter_media_objects():
|
||||
stab.row(obj, obj.gramps_id)
|
||||
|
@ -48,7 +48,7 @@ def get_ref(db, objclass, handle):
|
||||
ref = db.get_place_from_handle(handle)
|
||||
elif objclass == 'Note':
|
||||
ref = db.get_note_from_handle(handle)
|
||||
elif objclass in ['MediaObject', 'Media']:
|
||||
elif objclass == 'Media':
|
||||
ref = db.get_object_from_handle(handle)
|
||||
else:
|
||||
ref = objclass
|
||||
|
@ -56,7 +56,7 @@ from gi.repository import Gtk
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
ngettext = glocale.translation.ngettext # else "nearby" comments are ignored
|
||||
from gramps.gen.lib import (Citation, Event, EventType, Family, MediaObject,
|
||||
from gramps.gen.lib import (Citation, Event, EventType, Family, Media,
|
||||
Name, Note, Person, Place, Repository, Source,
|
||||
StyledText, Tag)
|
||||
from gramps.gen.db import DbTxn
|
||||
@ -778,7 +778,7 @@ class CheckIntegrity(object):
|
||||
empty_source_data = Source().serialize()
|
||||
empty_citation_data = Citation().serialize()
|
||||
empty_place_data = Place().serialize()
|
||||
empty_media_data = MediaObject().serialize()
|
||||
empty_media_data = Media().serialize()
|
||||
empty_repos_data = Repository().serialize()
|
||||
empty_note_data = Note().serialize()
|
||||
|
||||
@ -1448,7 +1448,7 @@ class CheckIntegrity(object):
|
||||
handle = bhandle.decode('utf-8')
|
||||
self.progress.step()
|
||||
info = self.db.media_map[bhandle]
|
||||
obj = MediaObject()
|
||||
obj = Media()
|
||||
obj.unserialize(info)
|
||||
handle_list = obj.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
@ -1544,7 +1544,7 @@ class CheckIntegrity(object):
|
||||
person.unserialize(info)
|
||||
handle_list = person.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'MediaObject':
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
new_handle = create_id()
|
||||
person.replace_media_references(None, new_handle)
|
||||
@ -1561,7 +1561,7 @@ class CheckIntegrity(object):
|
||||
family.unserialize(info)
|
||||
handle_list = family.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'MediaObject':
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
new_handle = create_id()
|
||||
family.replace_media_references(None, new_handle)
|
||||
@ -1578,7 +1578,7 @@ class CheckIntegrity(object):
|
||||
place.unserialize(info)
|
||||
handle_list = place.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'MediaObject':
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
new_handle = create_id()
|
||||
place.replace_media_references(None, new_handle)
|
||||
@ -1595,7 +1595,7 @@ class CheckIntegrity(object):
|
||||
event.unserialize(info)
|
||||
handle_list = event.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'MediaObject':
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
new_handle = create_id()
|
||||
event.replace_media_references(None, new_handle)
|
||||
@ -1612,7 +1612,7 @@ class CheckIntegrity(object):
|
||||
citation.unserialize(info)
|
||||
handle_list = citation.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'MediaObject':
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
new_handle = create_id()
|
||||
citation.replace_media_references(None, new_handle)
|
||||
@ -1629,7 +1629,7 @@ class CheckIntegrity(object):
|
||||
source.unserialize(info)
|
||||
handle_list = source.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'MediaObject':
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
new_handle = create_id()
|
||||
source.replace_media_references(None, new_handle)
|
||||
@ -1768,7 +1768,7 @@ class CheckIntegrity(object):
|
||||
handle = bhandle.decode('utf-8')
|
||||
self.progress.step()
|
||||
info = self.db.media_map[bhandle]
|
||||
obj = MediaObject()
|
||||
obj = Media()
|
||||
obj.unserialize(info)
|
||||
handle_list = obj.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
@ -1892,7 +1892,7 @@ class CheckIntegrity(object):
|
||||
handle = bhandle.decode('utf-8')
|
||||
self.progress.step()
|
||||
info = self.db.media_map[bhandle]
|
||||
obj = MediaObject()
|
||||
obj = Media()
|
||||
obj.unserialize(info)
|
||||
handle_list = obj.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
@ -2044,7 +2044,7 @@ class CheckIntegrity(object):
|
||||
self.db.add_repository(repo, trans, set_gid=True)
|
||||
|
||||
def class_object(self, handle):
|
||||
object = MediaObject()
|
||||
object = Media()
|
||||
object.set_handle(handle)
|
||||
return object
|
||||
|
||||
|
@ -49,7 +49,7 @@ from gi.repository import GdkPixbuf
|
||||
#------------------------------------------------------------------------
|
||||
from gramps.gen.const import URL_MANUAL_PAGE, ICON, SPLASH
|
||||
from gramps.gui.display import display_help
|
||||
from gramps.gen.lib import MediaObject
|
||||
from gramps.gen.lib import Media
|
||||
from gramps.gen.db import DbTxn
|
||||
from gramps.gen.updatecallback import UpdateCallback
|
||||
from gramps.gui.plug import tool
|
||||
@ -530,7 +530,7 @@ class PathChange(BatchOp):
|
||||
self.set_total(self.db.get_number_of_media_objects())
|
||||
with self.db.get_media_cursor() as cursor:
|
||||
for handle, data in cursor:
|
||||
obj = MediaObject()
|
||||
obj = Media()
|
||||
obj.unserialize(data)
|
||||
if obj.get_path().find(from_text) != -1:
|
||||
self.handle_list.append(handle)
|
||||
@ -567,7 +567,7 @@ class Convert2Abs(BatchOp):
|
||||
self.set_total(self.db.get_number_of_media_objects())
|
||||
with self.db.get_media_cursor() as cursor:
|
||||
for handle, data in cursor:
|
||||
obj = MediaObject()
|
||||
obj = Media()
|
||||
obj.unserialize(data)
|
||||
if not os.path.isabs(obj.path):
|
||||
self.handle_list.append(handle)
|
||||
@ -603,7 +603,7 @@ class Convert2Rel(BatchOp):
|
||||
self.set_total(self.db.get_number_of_media_objects())
|
||||
with self.db.get_media_cursor() as cursor:
|
||||
for handle, data in cursor:
|
||||
obj = MediaObject()
|
||||
obj = Media()
|
||||
obj.unserialize(data)
|
||||
if os.path.isabs(obj.path):
|
||||
self.handle_list.append(handle)
|
||||
@ -642,7 +642,7 @@ class ImagesNotIncluded(BatchOp):
|
||||
self.set_total(self.db.get_number_of_media_objects())
|
||||
with self.db.get_media_cursor() as cursor:
|
||||
for handle, data in cursor:
|
||||
obj = MediaObject()
|
||||
obj = Media()
|
||||
obj.unserialize(data)
|
||||
self.handle_list.append(handle)
|
||||
full_path = media_path_full(self.db, obj.path)
|
||||
@ -681,7 +681,7 @@ class ImagesNotIncluded(BatchOp):
|
||||
self.path_list.append(media_full_path)
|
||||
mime_type = get_type(media_full_path)
|
||||
if is_image_type(mime_type):
|
||||
obj = MediaObject()
|
||||
obj = Media()
|
||||
obj.set_path(media_full_path)
|
||||
obj.set_mime_type(mime_type)
|
||||
(root, ext) = os.path.splitext(filename)
|
||||
|
@ -58,7 +58,7 @@ from gramps.gen.merge import MergeCitationQuery
|
||||
|
||||
from gramps.gui.glade import Glade
|
||||
from gramps.gen.db import DbTxn
|
||||
from gramps.gen.lib import (Person, Family, Event, Place, MediaObject, Citation,
|
||||
from gramps.gen.lib import (Person, Family, Event, Place, Media, Citation,
|
||||
Repository)
|
||||
from gramps.gen.errors import MergeError
|
||||
|
||||
|
@ -40,7 +40,7 @@ _ = glocale.translation.gettext
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from gramps.gui.utils import ProgressMeter
|
||||
from gramps.gen.lib import (Event, Family, MediaObject, Note,
|
||||
from gramps.gen.lib import (Event, Family, Media, Note,
|
||||
Person, Place, Repository, Source, Citation)
|
||||
from gramps.gen.db import DbTxn
|
||||
from gramps.gui.plug import tool
|
||||
@ -106,13 +106,13 @@ class ReorderIds(tool.BatchTool):
|
||||
if uistate:
|
||||
self.progress.set_pass(_('Reordering Media Object IDs'),
|
||||
db.get_number_of_media_objects())
|
||||
self.reorder(MediaObject,
|
||||
self.reorder(Media,
|
||||
db.get_object_from_gramps_id,
|
||||
db.get_object_from_handle,
|
||||
db.find_next_object_gramps_id,
|
||||
db.media_map,
|
||||
db.commit_media_object,
|
||||
db.mediaobject_prefix)
|
||||
db.media_prefix)
|
||||
if uistate:
|
||||
self.progress.set_pass(_('Reordering Source IDs'),
|
||||
db.get_number_of_sources())
|
||||
|
@ -49,7 +49,7 @@ from gi.repository import Gtk
|
||||
from gramps.gen.lib import (Address, Attribute, AttributeType, ChildRef,
|
||||
ChildRefType, Citation, Date, Event, EventRef, EventRoleType,
|
||||
EventType, Family, FamilyRelType, GrampsType, LdsOrd, Location,
|
||||
MediaObject, MediaRef, Name, NameOriginType, NameType, Note,
|
||||
Media, MediaRef, Name, NameOriginType, NameType, Note,
|
||||
NoteType, Person, PersonRef, Place, PlaceType, PlaceRef, PlaceName,
|
||||
RepoRef, Repository, RepositoryType, Source, SourceMediaType,
|
||||
SrcAttribute, SrcAttributeType, Surname, Tag, Url, UrlType)
|
||||
@ -411,14 +411,14 @@ class TestcaseGenerator(tool.BatchTool):
|
||||
self.db) as self.trans:
|
||||
self.transaction_count += 1
|
||||
|
||||
m = MediaObject()
|
||||
m = Media()
|
||||
self.fill_object(m)
|
||||
m.set_description("leave this media object invalid description\x9f")
|
||||
m.set_path("/tmp/click_on_keep_reference.png\x9f")
|
||||
m.set_mime_type("image/png\x9f")
|
||||
self.db.add_object(m, self.trans)
|
||||
|
||||
m = MediaObject()
|
||||
m = Media()
|
||||
self.fill_object(m)
|
||||
m.set_description("reselect this media object invalid description\x9f")
|
||||
m.set_path("/tmp/click_on_select_file.png\x9f")
|
||||
@ -427,7 +427,7 @@ class TestcaseGenerator(tool.BatchTool):
|
||||
|
||||
# setup media attached to Source and Citation to be removed
|
||||
|
||||
m = MediaObject()
|
||||
m = Media()
|
||||
self.fill_object(m)
|
||||
m.set_description('remove this media object')
|
||||
m.set_path("/tmp/click_on_remove_object.png")
|
||||
@ -493,7 +493,7 @@ class TestcaseGenerator(tool.BatchTool):
|
||||
c = Citation()
|
||||
self.db.add_citation( c, self.trans)
|
||||
|
||||
m = MediaObject()
|
||||
m = Media()
|
||||
self.db.add_object( m, self.trans)
|
||||
|
||||
r = Repository()
|
||||
@ -933,7 +933,7 @@ class TestcaseGenerator(tool.BatchTool):
|
||||
# MediaRef
|
||||
# Attribute
|
||||
#
|
||||
# MediaObject
|
||||
# Media
|
||||
# Attribute
|
||||
#
|
||||
# Place
|
||||
@ -942,12 +942,12 @@ class TestcaseGenerator(tool.BatchTool):
|
||||
#
|
||||
# Repository (Repositories themselves do not have SourceRefs)
|
||||
# Address
|
||||
m = MediaObject()
|
||||
m = Media()
|
||||
m.set_description(message)
|
||||
m.set_path(str(ICON))
|
||||
m.set_mime_type(get_type(m.get_path()))
|
||||
m.add_citation(choice(c_h_list))
|
||||
# MediaObject : Attribute
|
||||
# Media : Attribute
|
||||
a = Attribute()
|
||||
a.set_type(self.rand_type(AttributeType()))
|
||||
a.set_value(message)
|
||||
@ -1622,7 +1622,7 @@ class TestcaseGenerator(tool.BatchTool):
|
||||
while randint(0,10) == 1:
|
||||
o.add_media_reference( self.fill_object( MediaRef()))
|
||||
|
||||
if isinstance(o,MediaObject):
|
||||
if isinstance(o,Media):
|
||||
if randint(0,3) == 1:
|
||||
o.set_description(str(self.rand_text(self.LONG)))
|
||||
path = choice((ICON, LOGO, SPLASH))
|
||||
@ -1636,7 +1636,7 @@ class TestcaseGenerator(tool.BatchTool):
|
||||
|
||||
if isinstance(o,MediaRef):
|
||||
if not self.generated_media or randint(0,10) == 1:
|
||||
m = MediaObject()
|
||||
m = Media()
|
||||
self.fill_object(m)
|
||||
self.db.add_object( m, self.trans)
|
||||
self.generated_media.append( m.get_handle())
|
||||
|
@ -57,7 +57,7 @@ from gramps.gen.utils.file import (media_path, relative_path, media_path_full,
|
||||
from gramps.gen.utils.db import get_media_referents
|
||||
from gramps.gui.views.bookmarks import MediaBookmarks
|
||||
from gramps.gen.mime import get_type, is_valid_type
|
||||
from gramps.gen.lib import MediaObject
|
||||
from gramps.gen.lib import Media
|
||||
from gramps.gen.db import DbTxn
|
||||
from gramps.gui.editors import EditMedia, DeleteMediaQuery
|
||||
from gramps.gen.errors import WindowActiveError
|
||||
@ -181,7 +181,7 @@ class MediaView(ListView):
|
||||
mime = get_type(name)
|
||||
if not is_valid_type(mime):
|
||||
return
|
||||
photo = MediaObject()
|
||||
photo = Media()
|
||||
self.uistate.set_busy_cursor(True)
|
||||
photo.set_checksum(create_checksum(name))
|
||||
self.uistate.set_busy_cursor(False)
|
||||
@ -310,7 +310,7 @@ class MediaView(ListView):
|
||||
def add(self, obj):
|
||||
"""Add a new media object to the media list"""
|
||||
try:
|
||||
EditMedia(self.dbstate, self.uistate, [], MediaObject())
|
||||
EditMedia(self.dbstate, self.uistate, [], Media())
|
||||
except WindowActiveError:
|
||||
pass
|
||||
|
||||
@ -372,7 +372,7 @@ class MediaView(ListView):
|
||||
for tag_handle in handle_list:
|
||||
links = set([link[1] for link in
|
||||
self.dbstate.db.find_backlink_handles(tag_handle,
|
||||
include_classes='MediaObject')])
|
||||
include_classes='Media')])
|
||||
all_links = all_links.union(links)
|
||||
self.row_update(list(all_links))
|
||||
|
||||
|
@ -101,7 +101,7 @@ _ = glocale.translation.sgettext
|
||||
from gramps.gen.lib import (ChildRefType, Date, EventType, FamilyRelType, Name,
|
||||
NameType, Person, UrlType, NoteType, PlaceType,
|
||||
EventRoleType, Family, Event, Place, Source,
|
||||
Citation, MediaObject, Repository, Note, Tag)
|
||||
Citation, Media, Repository, Note, Tag)
|
||||
from gramps.gen.lib.date import Today
|
||||
from gramps.gen.const import PROGRAM_NAME, URL_HOMEPAGE
|
||||
from gramps.version import VERSION
|
||||
@ -4438,13 +4438,13 @@ class MediaPages(BasePage):
|
||||
@param: title -- the web site title
|
||||
"""
|
||||
log.debug("obj_dict[Media]")
|
||||
for item in self.report.obj_dict[MediaObject].items():
|
||||
for item in self.report.obj_dict[Media].items():
|
||||
log.debug(" %s" % str(item))
|
||||
with self.report.user.progress(_("Narrated Web Site Report"),
|
||||
_("Creating media pages"),
|
||||
len(self.report.obj_dict[MediaObject]) + 1) as step:
|
||||
len(self.report.obj_dict[Media]) + 1) as step:
|
||||
|
||||
sorted_media_handles = sorted(self.report.obj_dict[MediaObject].keys(),
|
||||
sorted_media_handles = sorted(self.report.obj_dict[Media].keys(),
|
||||
key=lambda x: SORT_KEY(self.report.database.get_object_from_handle(x).desc))
|
||||
self.MediaListPage(self.report, title, sorted_media_handles)
|
||||
|
||||
@ -4783,7 +4783,7 @@ class MediaPages(BasePage):
|
||||
mediadetail += srclist
|
||||
|
||||
# get media references
|
||||
reflist = self.display_bkref_list(MediaObject, media_handle)
|
||||
reflist = self.display_bkref_list(Media, media_handle)
|
||||
if reflist is not None:
|
||||
mediadetail += reflist
|
||||
|
||||
@ -4850,7 +4850,7 @@ class ThumbnailPreviewPage(BasePage):
|
||||
def sort_by_desc_and_gid(obj):
|
||||
return (obj.desc, obj.gramps_id)
|
||||
|
||||
self.photo_keys = sorted(self.report.obj_dict[MediaObject],
|
||||
self.photo_keys = sorted(self.report.obj_dict[Media],
|
||||
key=lambda x: sort_by_desc_and_gid(self.dbase_.get_object_from_handle(x)))
|
||||
|
||||
media_list = []
|
||||
@ -7251,7 +7251,7 @@ class NavWebReport(Report):
|
||||
|
||||
def _build_obj_dict(self):
|
||||
_obj_class_list = (Person, Family, Event, Place, Source, Citation,
|
||||
MediaObject, Repository, Note, Tag)
|
||||
Media, Repository, Note, Tag)
|
||||
|
||||
# setup a dictionary of the required structure
|
||||
self.obj_dict = defaultdict(lambda: defaultdict(set))
|
||||
@ -7593,7 +7593,7 @@ class NavWebReport(Report):
|
||||
self._add_media(media_handle, Citation, citation_handle)
|
||||
|
||||
def _add_media(self, media_handle, bkref_class, bkref_handle):
|
||||
media_refs = self.bkref_dict[MediaObject].get(media_handle)
|
||||
media_refs = self.bkref_dict[Media].get(media_handle)
|
||||
if media_refs and (bkref_class, bkref_handle) in media_refs:
|
||||
return
|
||||
media = self.database.get_object_from_handle(media_handle)
|
||||
@ -7603,18 +7603,18 @@ class NavWebReport(Report):
|
||||
False) + self.ext
|
||||
else:
|
||||
media_fname = ""
|
||||
self.obj_dict[MediaObject][media_handle] = (media_fname, media_name,
|
||||
self.obj_dict[Media][media_handle] = (media_fname, media_name,
|
||||
media.gramps_id)
|
||||
self.bkref_dict[MediaObject][media_handle].add((bkref_class, bkref_handle))
|
||||
self.bkref_dict[Media][media_handle].add((bkref_class, bkref_handle))
|
||||
|
||||
############### Attribute section ##############
|
||||
for attr in media.get_attribute_list():
|
||||
for citation_handle in attr.get_citation_list():
|
||||
self._add_citation(citation_handle, MediaObject, media_handle)
|
||||
self._add_citation(citation_handle, Media, media_handle)
|
||||
|
||||
############### Sources section ##############
|
||||
for citation_handle in media.get_citation_list():
|
||||
self._add_citation(citation_handle, MediaObject, media_handle)
|
||||
self._add_citation(citation_handle, Media, media_handle)
|
||||
|
||||
def _add_repository(self, repos_handle, bkref_class, bkref_handle):
|
||||
repos = self.database.get_repository_from_handle(repos_handle)
|
||||
@ -7757,7 +7757,7 @@ class NavWebReport(Report):
|
||||
"""
|
||||
with self.user.progress(_("Narrated Web Site Report"),
|
||||
_("Creating thumbnail preview page..."),
|
||||
len(self.obj_dict[MediaObject])) as step:
|
||||
len(self.obj_dict[Media])) as step:
|
||||
ThumbnailPreviewPage(self, self.title, step)
|
||||
|
||||
def addressbook_pages(self, ind_list):
|
||||
|
2
po/ar.po
2
po/ar.po
@ -27219,7 +27219,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "عكس المستودع"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "عكس كائن الوسائط"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/bg.po
2
po/bg.po
@ -28208,7 +28208,7 @@ msgstr "уникална медия"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
#, fuzzy
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "уникална медия"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/br.po
2
po/br.po
@ -27753,7 +27753,7 @@ msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
#, fuzzy
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Dibab ur media traezen"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/ca.po
2
po/ca.po
@ -28305,7 +28305,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Repositori Invers"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Objecte Audiovisual Invers"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/cs.po
2
po/cs.po
@ -27722,7 +27722,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Invertovat archiv"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Invertovat objekt médií"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/da.po
2
po/da.po
@ -28051,7 +28051,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Ikke-valgt arkiv"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Ikke-valgt medieobjekt"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/de.po
2
po/de.po
@ -28274,7 +28274,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Aufbewahrungsort invertieren"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Medienobjekt invertieren"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/el.po
2
po/el.po
@ -28697,7 +28697,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Αντιστροφή φίλτρου αποθετηρίων"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Αντιστροφή φίλτρου αντικειμένων μέσων"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
@ -25984,7 +25984,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/eo.po
2
po/eo.po
@ -27890,7 +27890,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Deponejoj mankantaj"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Aŭdvidaĵoj mankantaj"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/es.po
2
po/es.po
@ -28314,7 +28314,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "repositorios no presentes"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "objetos audiovisuales no presentes"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/fi.po
2
po/fi.po
@ -23113,7 +23113,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Käänteinen arkisto"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Käänteinen mediatiedosto"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/fr.po
2
po/fr.po
@ -27150,7 +27150,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "les dépôts non-présents"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "les objets media non-présents"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/ga.po
2
po/ga.po
@ -26189,7 +26189,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
@ -26013,7 +26013,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/he.po
2
po/he.po
@ -26722,7 +26722,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/hr.po
2
po/hr.po
@ -27285,7 +27285,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "inverzna spremišta"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "inverzni mediji"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/hu.po
2
po/hu.po
@ -27995,7 +27995,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Tároló ellentettje"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Média objektum ellentettje"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/is.po
2
po/is.po
@ -26322,7 +26322,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/it.po
2
po/it.po
@ -27904,7 +27904,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "depositi non presenti"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "oggetti multimediali non presenti"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/ja.po
2
po/ja.po
@ -27043,7 +27043,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/lt.po
2
po/lt.po
@ -28107,7 +28107,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Atviršktinės saugyklos"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Atvirkšiniai garso/vaizdo kūriniai"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/mk.po
2
po/mk.po
@ -28727,7 +28727,7 @@ msgstr "Филтрирај само живи луѓе"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
#, fuzzy
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Филтрирај само живи луѓе"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/nb.po
2
po/nb.po
@ -27912,7 +27912,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "invers oppbevaringssted"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "invers mediaobjekt"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/nl.po
2
po/nl.po
@ -25258,7 +25258,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Omgekeerde bibliotheek"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Omgekeerd media-object"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/nn.po
2
po/nn.po
@ -27946,7 +27946,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Motsett bibliotek"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Motsett mediaobjekt"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/pl.po
2
po/pl.po
@ -28027,7 +28027,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "odwróć magazyny"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "odwróć obiekty medialne"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
@ -28311,7 +28311,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Repositório inverso"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Objeto multimídia inverso"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
@ -28212,7 +28212,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Repositório inverso"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Objeto multimédia inverso"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/ro.po
2
po/ro.po
@ -28325,7 +28325,7 @@ msgstr "Restricteză datele la persoane în viaţă"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
#, fuzzy
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Restricteză datele la persoane în viaţă"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/ru.po
2
po/ru.po
@ -28501,7 +28501,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "обратить хранилища"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "обратить документы"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/sk.po
2
po/sk.po
@ -27572,7 +27572,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Inv. archív"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Inv. mediálny objekt"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/sl.po
2
po/sl.po
@ -27812,7 +27812,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "nahajališču obrnjeno"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "predmetu obrnjeno"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/sq.po
2
po/sq.po
@ -28498,7 +28498,7 @@ msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
#, fuzzy
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Zhvendos media objekt"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/sr.po
2
po/sr.po
@ -27606,7 +27606,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Преокрени ризницу"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Преокрени медијски предмет"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
@ -26050,7 +26050,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/sv.po
2
po/sv.po
@ -27862,7 +27862,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "ej utvald(a) arkivplats(er)"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "ej utvald(a) mediaobjekt"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/tr.po
2
po/tr.po
@ -26061,7 +26061,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Depoda Olmayan"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Ortam Nesnesinde Olmayan"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/uk.po
2
po/uk.po
@ -27800,7 +27800,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Зворотній порядок сховища"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Зворотній порядок медіа"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
2
po/vi.po
2
po/vi.po
@ -27813,7 +27813,7 @@ msgid "Filtering_on|Inverse Repository"
|
||||
msgstr "Lọc_tiêu_chí|kho đảo thứ tự"
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:48
|
||||
msgid "Filtering_on|Inverse MediaObject"
|
||||
msgid "Filtering_on|Inverse Media"
|
||||
msgstr "Lọc_tiêu_chí|đối tượng đa phương tiện đảo thứ tự "
|
||||
|
||||
#: ../gramps/plugins/quickview/filterbyname.py:49
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user