diff --git a/gramps/gui/editors/addmedia.py b/gramps/gui/editors/addmedia.py index af196ecee..c3f062a83 100644 --- a/gramps/gui/editors/addmedia.py +++ b/gramps/gui/editors/addmedia.py @@ -55,11 +55,11 @@ from gramps.gen.config import config from gramps.gen.utils.file import (media_path_full, media_path, relative_path, find_file, get_unicode_path_from_file_chooser) from gramps.gen.mime import get_type -from gramps.gui.thumbnails import find_mime_type_pixbuf -from gramps.gui.display import display_help -from gramps.gui.managedwindow import ManagedWindow -from gramps.gui.dialog import ErrorDialog, WarningDialog -from gramps.gui.glade import Glade +from ..thumbnails import find_mime_type_pixbuf +from ..display import display_help +from ..managedwindow import ManagedWindow +from ..dialog import ErrorDialog, WarningDialog +from ..glade import Glade #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/addrembedlist.py b/gramps/gui/editors/displaytabs/addrembedlist.py index d2b43ce6d..028dd5dc8 100644 --- a/gramps/gui/editors/displaytabs/addrembedlist.py +++ b/gramps/gui/editors/displaytabs/addrembedlist.py @@ -39,7 +39,7 @@ from gi.repository import GObject #------------------------------------------------------------------------- from gramps.gen.lib import Address from gramps.gen.errors import WindowActiveError -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets from addressmodel import AddressModel from embeddedlist import EmbeddedList @@ -109,7 +109,7 @@ class AddrEmbedList(EmbeddedList): """ addr = Address() try: - from gramps.gui.editors import EditAddress + from .. import EditAddress EditAddress(self.dbstate, self.uistate, self.track, addr, self.add_callback) except WindowActiveError: @@ -134,7 +134,7 @@ class AddrEmbedList(EmbeddedList): addr = self.get_selected() if addr: try: - from gramps.gui.editors import EditAddress + from .. import EditAddress EditAddress(self.dbstate, self.uistate, self.track, addr, self.edit_callback) except WindowActiveError: diff --git a/gramps/gui/editors/displaytabs/attrembedlist.py b/gramps/gui/editors/displaytabs/attrembedlist.py index 5812ded22..ef631c02d 100644 --- a/gramps/gui/editors/displaytabs/attrembedlist.py +++ b/gramps/gui/editors/displaytabs/attrembedlist.py @@ -35,7 +35,7 @@ from gi.repository import GObject #------------------------------------------------------------------------- from gramps.gen.lib import Attribute from gramps.gen.errors import WindowActiveError -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets from attrmodel import AttrModel from embeddedlist import EmbeddedList @@ -70,7 +70,7 @@ class AttrEmbedList(EmbeddedList): AttrModel, move_buttons=True) def get_editor(self): - from gramps.gui.editors import EditAttribute + from .. import EditAttribute return EditAttribute def get_user_values(self): diff --git a/gramps/gui/editors/displaytabs/backreflist.py b/gramps/gui/editors/displaytabs/backreflist.py index 604414873..9f970a370 100644 --- a/gramps/gui/editors/displaytabs/backreflist.py +++ b/gramps/gui/editors/displaytabs/backreflist.py @@ -42,7 +42,7 @@ from gi.repository import Gtk # #------------------------------------------------------------------------- from gramps.gen.errors import WindowActiveError -from gramps.gui.widgets import SimpleButton +from ...widgets import SimpleButton from embeddedlist import EmbeddedList #------------------------------------------------------------------------- @@ -135,7 +135,7 @@ class BackRefList(EmbeddedList): def edit_button_clicked(self, obj): - from gramps.gui.editors import EditEvent, EditPerson, EditFamily, EditSource, \ + from .. import EditEvent, EditPerson, EditFamily, EditSource, \ EditPlace, EditMedia, EditRepository, \ EditCitation diff --git a/gramps/gui/editors/displaytabs/buttontab.py b/gramps/gui/editors/displaytabs/buttontab.py index 29861b712..a8986432b 100644 --- a/gramps/gui/editors/displaytabs/buttontab.py +++ b/gramps/gui/editors/displaytabs/buttontab.py @@ -41,7 +41,7 @@ from gi.repository import Gdk # GRAMPS classes # #------------------------------------------------------------------------- -from gramps.gui.widgets import SimpleButton +from ...widgets import SimpleButton from grampstab import GrampsTab from gramps.gen.errors import WindowActiveError diff --git a/gramps/gui/editors/displaytabs/citationembedlist.py b/gramps/gui/editors/displaytabs/citationembedlist.py index 42831d9a3..3948ab6f2 100644 --- a/gramps/gui/editors/displaytabs/citationembedlist.py +++ b/gramps/gui/editors/displaytabs/citationembedlist.py @@ -45,11 +45,11 @@ from gi.repository import GObject from gramps.gen.errors import WindowActiveError from gramps.gen.lib import Citation, Source from gramps.gen.lib import Source, Citation -from gramps.gui.dbguielement import DbGUIElement -from gramps.gui.selectors import SelectorFactory +from ...dbguielement import DbGUIElement +from ...selectors import SelectorFactory from citationrefmodel import CitationRefModel from embeddedlist import EmbeddedList -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets #------------------------------------------------------------------------- # @@ -134,7 +134,7 @@ class CitationEmbedList(EmbeddedList, DbGUIElement): This prevents the dialog from coming up twice on the same object. """ try: - from gramps.gui.editors import EditCitation + from .. import EditCitation EditCitation(self.dbstate, self.uistate, self.track, Citation(), Source(), self.add_callback, self.callertitle) @@ -162,23 +162,23 @@ class CitationEmbedList(EmbeddedList, DbGUIElement): if object: if isinstance(object, Source): try: - from gramps.gui.editors import EditCitation + from .. import EditCitation EditCitation(self.dbstate, self.uistate, self.track, Citation(), object, callback=self.add_callback, callertitle=self.callertitle) except WindowActiveError: - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog(_("Cannot share this reference"), self.__blocked_text()) elif isinstance(object, Citation): try: - from gramps.gui.editors import EditCitation + from .. import EditCitation EditCitation(self.dbstate, self.uistate, self.track, object, callback=self.add_callback, callertitle=self.callertitle) except WindowActiveError: - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog(_("Cannot share this reference"), self.__blocked_text()) else: @@ -207,7 +207,7 @@ class CitationEmbedList(EmbeddedList, DbGUIElement): if handle: citation = self.dbstate.db.get_citation_from_handle(handle) try: - from gramps.gui.editors import EditCitation + from .. import EditCitation EditCitation(self.dbstate, self.uistate, self.track, citation, callertitle = self.callertitle) except WindowActiveError: @@ -246,12 +246,12 @@ class CitationEmbedList(EmbeddedList, DbGUIElement): object = self.dbstate.db.get_citation_from_handle(handle) if isinstance(object, Citation): try: - from gramps.gui.editors import EditCitation + from .. import EditCitation EditCitation(self.dbstate, self.uistate, self.track, object, callback=self.add_callback, callertitle=self.callertitle) except WindowActiveError: - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog(_("Cannot share this reference"), self.__blocked_text()) else: @@ -265,13 +265,13 @@ class CitationEmbedList(EmbeddedList, DbGUIElement): object = self.dbstate.db.get_source_from_handle(handle) if isinstance(object, Source): try: - from gramps.gui.editors import EditCitation + from .. import EditCitation EditCitation(self.dbstate, self.uistate, self.track, Citation(), object, callback=self.add_callback, callertitle=self.callertitle) except WindowActiveError: - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog(_("Cannot share this reference"), self.__blocked_text()) else: diff --git a/gramps/gui/editors/displaytabs/embeddedlist.py b/gramps/gui/editors/displaytabs/embeddedlist.py index ddc608397..f07ee6648 100644 --- a/gramps/gui/editors/displaytabs/embeddedlist.py +++ b/gramps/gui/editors/displaytabs/embeddedlist.py @@ -44,7 +44,7 @@ from gi.repository import Pango # GRAMPS classes # #------------------------------------------------------------------------- -from gramps.gui.utils import is_right_click +from ...utils import is_right_click from buttontab import ButtonTab #------------------------------------------------------------------------- @@ -496,7 +496,7 @@ class EmbeddedList(ButtonTab): try: self.model = self.construct_model() except AttributeError, msg: - from gramps.gui.dialog import RunDatabaseRepair + from ...dialog import RunDatabaseRepair import traceback traceback.print_exc() RunDatabaseRepair(str(msg)) diff --git a/gramps/gui/editors/displaytabs/eventembedlist.py b/gramps/gui/editors/displaytabs/eventembedlist.py index c7c951877..abed40074 100644 --- a/gramps/gui/editors/displaytabs/eventembedlist.py +++ b/gramps/gui/editors/displaytabs/eventembedlist.py @@ -37,11 +37,11 @@ from gi.repository import GObject #------------------------------------------------------------------------- from gramps.gen.lib import Event, EventRef, EventRoleType, EventType from gramps.gen.errors import WindowActiveError -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets from groupembeddedlist import GroupEmbeddedList from eventrefmodel import EventRefModel -from gramps.gui.dbguielement import DbGUIElement -from gramps.gui.selectors import SelectorFactory +from ...dbguielement import DbGUIElement +from ...selectors import SelectorFactory #------------------------------------------------------------------------- # @@ -141,7 +141,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList): self.rebuild_callback() def get_ref_editor(self): - from gramps.gui.editors import EditFamilyEventRef + from .. import EditFamilyEventRef return EditFamilyEventRef def get_icon_name(self): @@ -256,7 +256,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList): self.dbstate, self.uistate, self.track, event, ref, self.object_added) except WindowActiveError: - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog(_("Cannot share this reference"), self.__blocked_text()) @@ -269,7 +269,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList): self.dbstate, self.uistate, self.track, event, ref[1], self.object_edited) except WindowActiveError: - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog(_("Cannot edit this reference"), self.__blocked_text()) elif ref and ref[0] != self._WORKGROUP: @@ -310,7 +310,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList): """ handle change request of non native data """ - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog( _("Cannot change Person"), _("You cannot change Person events in the Family Editor") @@ -333,7 +333,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList): self.get_ref_editor()(self.dbstate, self.uistate, self.track, event, obj, self.object_edited) except WindowActiveError: - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog( _("Cannot edit this reference"), _("This event reference cannot be edited at this time. " @@ -362,7 +362,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList): """ person = self.dbstate.db.get_person_from_handle(key) try: - from gramps.gui.editors import EditPerson + from .. import EditPerson EditPerson(self.dbstate, self.uistate, [], person) except WindowActiveError: pass diff --git a/gramps/gui/editors/displaytabs/eventrefmodel.py b/gramps/gui/editors/displaytabs/eventrefmodel.py index 5550fa2e5..c9ce84160 100644 --- a/gramps/gui/editors/displaytabs/eventrefmodel.py +++ b/gramps/gui/editors/displaytabs/eventrefmodel.py @@ -46,7 +46,7 @@ import cgi # GRAMPS classes # #------------------------------------------------------------------------- -from gramps.gui.widgets.undoablebuffer import UndoableBuffer +from ...widgets.undoablebuffer import UndoableBuffer from gramps.gen.datehandler import get_date, get_date_valid from gramps.gen.config import config diff --git a/gramps/gui/editors/displaytabs/familyattrembedlist.py b/gramps/gui/editors/displaytabs/familyattrembedlist.py index e7832a07f..ac3e43bc2 100644 --- a/gramps/gui/editors/displaytabs/familyattrembedlist.py +++ b/gramps/gui/editors/displaytabs/familyattrembedlist.py @@ -38,7 +38,7 @@ class FamilyAttrEmbedList(AttrEmbedList): AttrEmbedList.__init__(self, dbstate, uistate, track, data) def get_editor(self): - from gramps.gui.editors import EditFamilyAttribute + from .. import EditFamilyAttribute return EditFamilyAttribute def get_user_values(self): diff --git a/gramps/gui/editors/displaytabs/familyldsembedlist.py b/gramps/gui/editors/displaytabs/familyldsembedlist.py index 7d5089127..b4fc1e532 100644 --- a/gramps/gui/editors/displaytabs/familyldsembedlist.py +++ b/gramps/gui/editors/displaytabs/familyldsembedlist.py @@ -59,7 +59,7 @@ class FamilyLdsEmbedList(LdsEmbedList): LdsEmbedList.__init__(self, dbstate, uistate, track, data) def get_editor(self): - from gramps.gui.editors import EditFamilyLdsOrd + from .. import EditFamilyLdsOrd return EditFamilyLdsOrd def new_data(self): diff --git a/gramps/gui/editors/displaytabs/gallerytab.py b/gramps/gui/editors/displaytabs/gallerytab.py index 4b6983aa2..095e91029 100644 --- a/gramps/gui/editors/displaytabs/gallerytab.py +++ b/gramps/gui/editors/displaytabs/gallerytab.py @@ -49,17 +49,17 @@ from gi.repository import GObject # GRAMPS classes # #------------------------------------------------------------------------- -from gramps.gui.utils import is_right_click, open_file_with_default_application -from gramps.gui.dbguielement import DbGUIElement -from gramps.gui.selectors import SelectorFactory +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.db import DbTxn from gramps.gen.utils.file import (media_path_full, media_path, relative_path, fix_encoding) -from gramps.gui.thumbnails import get_thumbnail_image +from ...thumbnails import get_thumbnail_image from gramps.gen.errors import WindowActiveError from gramps.gen.mime import get_type, is_valid_type -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets from buttontab import ButtonTab from gramps.gen.constfunc import win from gramps.gen.const import THUMBSCALE @@ -250,7 +250,7 @@ class GalleryTab(ButtonTab, DbGUIElement): obj = self.dbstate.db.get_object_from_handle(handle) if obj is None : #notify user of error - from gramps.gui.dialog import RunDatabaseRepair + from ...dialog import RunDatabaseRepair RunDatabaseRepair( _('Non existing media found in the Gallery')) else : @@ -275,7 +275,7 @@ class GalleryTab(ButtonTab, DbGUIElement): def add_button_clicked(self, obj): try: - from gramps.gui.editors import EditMediaRef + from .. import EditMediaRef EditMediaRef(self.dbstate, self.uistate, self.track, MediaObject(), MediaRef(), self.add_callback) @@ -321,11 +321,11 @@ class GalleryTab(ButtonTab, DbGUIElement): if src: sref = MediaRef() try: - from gramps.gui.editors import EditMediaRef + from .. import EditMediaRef EditMediaRef(self.dbstate, self.uistate, self.track, src, sref, self.add_callback) except WindowActiveError: - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog(_("Cannot share this reference"), self.__blocked_text()) @@ -341,11 +341,11 @@ class GalleryTab(ButtonTab, DbGUIElement): obj = self.dbstate.db.get_object_from_handle( ref.get_reference_handle()) try: - from gramps.gui.editors import EditMediaRef + from .. import EditMediaRef EditMediaRef(self.dbstate, self.uistate, self.track, obj, ref, self.edit_callback) except WindowActiveError: - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog(_("Cannot edit this reference"), self.__blocked_text()) diff --git a/gramps/gui/editors/displaytabs/groupembeddedlist.py b/gramps/gui/editors/displaytabs/groupembeddedlist.py index 84462ec4e..cd2d7dc35 100644 --- a/gramps/gui/editors/displaytabs/groupembeddedlist.py +++ b/gramps/gui/editors/displaytabs/groupembeddedlist.py @@ -42,7 +42,7 @@ from gi.repository import GObject # GRAMPS classes # #------------------------------------------------------------------------- -from gramps.gui.utils import is_right_click +from ...utils import is_right_click from embeddedlist import EmbeddedList #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/ldsembedlist.py b/gramps/gui/editors/displaytabs/ldsembedlist.py index 5c596dece..1b43e63bc 100644 --- a/gramps/gui/editors/displaytabs/ldsembedlist.py +++ b/gramps/gui/editors/displaytabs/ldsembedlist.py @@ -72,7 +72,7 @@ class LdsEmbedList(EmbeddedList): LdsModel, move_buttons=True) def get_editor(self): - from gramps.gui.editors import EditLdsOrd + from .. import EditLdsOrd return EditLdsOrd def new_data(self): diff --git a/gramps/gui/editors/displaytabs/locationembedlist.py b/gramps/gui/editors/displaytabs/locationembedlist.py index 2555d579a..dff9aac31 100644 --- a/gramps/gui/editors/displaytabs/locationembedlist.py +++ b/gramps/gui/editors/displaytabs/locationembedlist.py @@ -35,7 +35,7 @@ from gi.repository import GObject #------------------------------------------------------------------------- from gramps.gen.lib import Location from gramps.gen.errors import WindowActiveError -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets from locationmodel import LocationModel from embeddedlist import EmbeddedList @@ -75,7 +75,7 @@ class LocationEmbedList(EmbeddedList): def add_button_clicked(self, obj): loc = Location() try: - from gramps.gui.editors import EditLocation + from .. import EditLocation EditLocation(self.dbstate, self.uistate, self.track, loc, self.add_callback) except WindowActiveError: @@ -91,7 +91,7 @@ class LocationEmbedList(EmbeddedList): loc = self.get_selected() if loc: try: - from gramps.gui.editors import EditLocation + from .. import EditLocation EditLocation(self.dbstate, self.uistate, self.track, loc, self.edit_callback) except WindowActiveError: diff --git a/gramps/gui/editors/displaytabs/nameembedlist.py b/gramps/gui/editors/displaytabs/nameembedlist.py index c0821fe36..e8d174589 100644 --- a/gramps/gui/editors/displaytabs/nameembedlist.py +++ b/gramps/gui/editors/displaytabs/nameembedlist.py @@ -43,7 +43,7 @@ from gramps.gen.ggettext import gettext as _ #------------------------------------------------------------------------- from gramps.gen.lib import Name, Surname from gramps.gen.errors import WindowActiveError -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets from namemodel import NameModel from groupembeddedlist import GroupEmbeddedList @@ -157,7 +157,7 @@ class NameEmbedList(GroupEmbeddedList): name.add_surname(Surname()) name.set_primary_surname(0) try: - from gramps.gui.editors import EditName + from .. import EditName EditName(self.dbstate, self.uistate, self.track, name, self.add_callback) except WindowActiveError: @@ -174,7 +174,7 @@ class NameEmbedList(GroupEmbeddedList): name = self.get_selected() if name and name[1] is not None: try: - from gramps.gui.editors import EditName + from .. import EditName if name[0] == NameModel.ALTINDEX: EditName(self.dbstate, self.uistate, self.track, name[1], self.edit_callback) diff --git a/gramps/gui/editors/displaytabs/namemodel.py b/gramps/gui/editors/displaytabs/namemodel.py index 7eae6efb9..b7c826c01 100644 --- a/gramps/gui/editors/displaytabs/namemodel.py +++ b/gramps/gui/editors/displaytabs/namemodel.py @@ -45,7 +45,7 @@ WEIGHT_BOLD = Pango.Weight.BOLD # GRAMPS classes # #------------------------------------------------------------------------- -from gramps.gui.widgets.undoablebuffer import UndoableBuffer +from ...widgets.undoablebuffer import UndoableBuffer from gramps.gen.display.name import displayer as name_displayer #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/notetab.py b/gramps/gui/editors/displaytabs/notetab.py index 9b5ca54fe..78a9661ed 100644 --- a/gramps/gui/editors/displaytabs/notetab.py +++ b/gramps/gui/editors/displaytabs/notetab.py @@ -41,11 +41,11 @@ from gi.repository import GObject #------------------------------------------------------------------------- from gramps.gen.errors import WindowActiveError from gramps.gen.lib import Note -from gramps.gui.dbguielement import DbGUIElement -from gramps.gui.selectors import SelectorFactory +from ...dbguielement import DbGUIElement +from ...selectors import SelectorFactory from notemodel import NoteModel from embeddedlist import EmbeddedList -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets #------------------------------------------------------------------------- # @@ -131,7 +131,7 @@ class NoteTab(EmbeddedList, DbGUIElement): if self.notetype : note.set_type(self.notetype) try: - from gramps.gui.editors import EditNote + from .. import EditNote EditNote(self.dbstate, self.uistate, self.track, note, self.add_callback, self.callertitle, extratype = [self.notetype]) @@ -162,7 +162,7 @@ class NoteTab(EmbeddedList, DbGUIElement): if handle: note = self.dbstate.db.get_note_from_handle(handle) try: - from gramps.gui.editors import EditNote + from .. import EditNote EditNote(self.dbstate, self.uistate, self.track, note, callertitle = self.callertitle, extratype = [self.notetype] ) diff --git a/gramps/gui/editors/displaytabs/personeventembedlist.py b/gramps/gui/editors/displaytabs/personeventembedlist.py index 2f02b3e83..a1a9a5724 100644 --- a/gramps/gui/editors/displaytabs/personeventembedlist.py +++ b/gramps/gui/editors/displaytabs/personeventembedlist.py @@ -106,7 +106,7 @@ class PersonEventEmbedList(EventEmbedList): ] def get_ref_editor(self): - from gramps.gui.editors import EditEventRef + from .. import EditEventRef return EditEventRef def editnotworkgroup(self, key): @@ -115,7 +115,7 @@ class PersonEventEmbedList(EventEmbedList): """ family = self.dbstate.db.get_family_from_handle(key) try: - from gramps.gui.editors import EditFamily + from .. import EditFamily EditFamily(self.dbstate, self.uistate, [], family) except WindowActiveError: pass @@ -124,7 +124,7 @@ class PersonEventEmbedList(EventEmbedList): """ handle change request of non native data """ - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog( _("Cannot change Family"), _("You cannot change Family events in the Person Editor") diff --git a/gramps/gui/editors/displaytabs/personrefembedlist.py b/gramps/gui/editors/displaytabs/personrefembedlist.py index 27a0f6f9a..1862cf09f 100644 --- a/gramps/gui/editors/displaytabs/personrefembedlist.py +++ b/gramps/gui/editors/displaytabs/personrefembedlist.py @@ -35,7 +35,7 @@ from gi.repository import GObject #------------------------------------------------------------------------- from gramps.gen.lib import PersonRef from gramps.gen.errors import WindowActiveError -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets from personrefmodel import PersonRefModel from embeddedlist import EmbeddedList @@ -72,7 +72,7 @@ class PersonRefEmbedList(EmbeddedList): move_buttons=True) def get_ref_editor(self): - from gramps.gui.editors import EditPersonRef + from .. import EditPersonRef return EditPersonRef def get_data(self): @@ -82,7 +82,7 @@ class PersonRefEmbedList(EmbeddedList): return ((1, 0), (1, 1), (1, 2)) def add_button_clicked(self, obj): - from gramps.gui.editors import EditPersonRef + from .. import EditPersonRef try: ref = PersonRef() ref.rel = _('Godfather') @@ -99,7 +99,7 @@ class PersonRefEmbedList(EmbeddedList): GObject.idle_add(self.tree.scroll_to_cell, len(data) - 1) def edit_button_clicked(self, obj): - from gramps.gui.editors import EditPersonRef + from .. import EditPersonRef ref = self.get_selected() if ref: try: @@ -117,7 +117,7 @@ class PersonRefEmbedList(EmbeddedList): And event reference that is from a drag and drop has an unknown event reference type """ - from gramps.gui.editors import EditPersonRef + from .. import EditPersonRef try: ref = PersonRef(obj) ref.rel = _('Unknown') diff --git a/gramps/gui/editors/displaytabs/repoembedlist.py b/gramps/gui/editors/displaytabs/repoembedlist.py index b5438181d..313651d36 100644 --- a/gramps/gui/editors/displaytabs/repoembedlist.py +++ b/gramps/gui/editors/displaytabs/repoembedlist.py @@ -34,10 +34,10 @@ from gi.repository import GObject # #------------------------------------------------------------------------- from gramps.gen.lib import RepoRef, Repository -from gramps.gui.dbguielement import DbGUIElement -from gramps.gui.selectors import SelectorFactory +from ...dbguielement import DbGUIElement +from ...selectors import SelectorFactory from gramps.gen.errors import WindowActiveError -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets from reporefmodel import RepoRefModel from embeddedlist import EmbeddedList @@ -100,7 +100,7 @@ class RepoEmbedList(EmbeddedList, DbGUIElement): return ((1, 0), (1, 1), (1, 2), (1, 3)) def handle_extra_type(self, objtype, obj): - from gramps.gui.editors import EditRepoRef + from .. import EditRepoRef try: ref = RepoRef() repo = self.dbstate.db.get_repository_from_handle(obj) @@ -111,7 +111,7 @@ class RepoEmbedList(EmbeddedList, DbGUIElement): pass def add_button_clicked(self, obj): - from gramps.gui.editors import EditRepoRef + from .. import EditRepoRef ref = RepoRef() repo = Repository() try: @@ -132,7 +132,7 @@ class RepoEmbedList(EmbeddedList, DbGUIElement): repo = sel.run() if repo: try: - from gramps.gui.editors import EditRepoRef + from .. import EditRepoRef ref = RepoRef() EditRepoRef(self.dbstate, self.uistate, @@ -158,12 +158,12 @@ class RepoEmbedList(EmbeddedList, DbGUIElement): if ref: repo = self.dbstate.db.get_repository_from_handle(ref.ref) try: - from gramps.gui.editors import EditRepoRef + from .. import EditRepoRef EditRepoRef( self.dbstate, self.uistate, self.track, repo, ref, self.edit_callback) except WindowActiveError: - from gramps.gui.dialog import WarningDialog + from ...dialog import WarningDialog WarningDialog( _("Cannot edit this reference"), _("This repository reference cannot be edited at this " diff --git a/gramps/gui/editors/displaytabs/surnametab.py b/gramps/gui/editors/displaytabs/surnametab.py index 2b19b5fc3..855aa576a 100644 --- a/gramps/gui/editors/displaytabs/surnametab.py +++ b/gramps/gui/editors/displaytabs/surnametab.py @@ -48,7 +48,7 @@ _ENTER = Gdk.keyval_from_name("Enter") #------------------------------------------------------------------------- from surnamemodel import SurnameModel from embeddedlist import EmbeddedList -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets from gramps.gen.lib import Surname, NameOriginType #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/webembedlist.py b/gramps/gui/editors/displaytabs/webembedlist.py index 450fd10e2..b55344245 100644 --- a/gramps/gui/editors/displaytabs/webembedlist.py +++ b/gramps/gui/editors/displaytabs/webembedlist.py @@ -36,7 +36,7 @@ from gi.repository import GObject #------------------------------------------------------------------------- from gramps.gen.lib import Url from gramps.gen.errors import WindowActiveError -from gramps.gui.ddtargets import DdTargets +from ...ddtargets import DdTargets from webmodel import WebModel from embeddedlist import EmbeddedList @@ -82,7 +82,7 @@ class WebEmbedList(EmbeddedList): return ((1, 0), (1, 1), (1, 2)) def add_button_clicked(self, obj): - from gramps.gui.editors import EditUrl + from .. import EditUrl url = Url() try: EditUrl(self.dbstate, self.uistate, self.track, @@ -97,7 +97,7 @@ class WebEmbedList(EmbeddedList): GObject.idle_add(self.tree.scroll_to_cell, len(data) - 1) def edit_button_clicked(self, obj): - from gramps.gui.editors import EditUrl + from .. import EditUrl url = self.get_selected() if url: try: @@ -118,7 +118,7 @@ class WebEmbedList(EmbeddedList): ] def jump_button_clicked(self, obj): - from gramps.gui.display import display_url + from ...display import display_url url = self.get_selected() if url.get_path(): diff --git a/gramps/gui/editors/editaddress.py b/gramps/gui/editors/editaddress.py index ca6fb1b00..e6dd23383 100644 --- a/gramps/gui/editors/editaddress.py +++ b/gramps/gui/editors/editaddress.py @@ -49,9 +49,9 @@ from gi.repository import Gtk #------------------------------------------------------------------------- from editsecondary import EditSecondary from gramps.gen.lib import NoteType -from gramps.gui.glade import Glade +from ..glade import Glade from displaytabs import CitationEmbedList, NoteTab -from gramps.gui.widgets import MonitoredDate, MonitoredEntry, PrivacyButton +from ..widgets import MonitoredDate, MonitoredEntry, PrivacyButton #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editattribute.py b/gramps/gui/editors/editattribute.py index b000237d3..4af3d458e 100644 --- a/gramps/gui/editors/editattribute.py +++ b/gramps/gui/editors/editattribute.py @@ -48,9 +48,9 @@ from gi.repository import Gtk #------------------------------------------------------------------------- from editsecondary import EditSecondary from gramps.gen.lib import NoteType -from gramps.gui.glade import Glade +from ..glade import Glade from displaytabs import CitationEmbedList, NoteTab -from gramps.gui.widgets import MonitoredEntry, PrivacyButton, MonitoredDataType +from ..widgets import MonitoredEntry, PrivacyButton, MonitoredDataType #------------------------------------------------------------------------- # @@ -143,7 +143,7 @@ class EditAttribute(EditSecondary): t = self.obj.get_type() if t.is_custom() and str(t) == '': - from gramps.gui.dialog import ErrorDialog + from ..dialog import ErrorDialog ErrorDialog( _("Cannot save attribute"), _("The attribute type cannot be empty")) diff --git a/gramps/gui/editors/editchildref.py b/gramps/gui/editors/editchildref.py index 4dd584821..6571c6d0a 100644 --- a/gramps/gui/editors/editchildref.py +++ b/gramps/gui/editors/editchildref.py @@ -50,9 +50,9 @@ from gi.repository import Gtk from editsecondary import EditSecondary from gramps.gen.lib import NoteType from gramps.gen.errors import WindowActiveError -from gramps.gui.glade import Glade +from ..glade import Glade from displaytabs import CitationEmbedList, NoteTab -from gramps.gui.widgets import MonitoredDataType, PrivacyButton +from ..widgets import MonitoredDataType, PrivacyButton from gramps.gen.display.name import displayer as name_displayer #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/editcitation.py b/gramps/gui/editors/editcitation.py index 930fc24ac..899d86b12 100644 --- a/gramps/gui/editors/editcitation.py +++ b/gramps/gui/editors/editcitation.py @@ -46,11 +46,11 @@ from editprimary import EditPrimary from displaytabs import (NoteTab, GalleryTab, DataEmbedList, SourceBackRefList, RepoEmbedList, CitationBackRefList) -from gramps.gui.widgets import (MonitoredEntry, PrivacyButton, MonitoredMenu, +from ..widgets import (MonitoredEntry, PrivacyButton, MonitoredMenu, MonitoredDate) -from gramps.gui.dialog import ErrorDialog +from ..dialog import ErrorDialog from editreference import RefTab -from gramps.gui.glade import Glade +from ..glade import Glade #------------------------------------------------------------------------- # @@ -64,7 +64,7 @@ class EditCitation(EditPrimary): This class is called both to edit the Citation Primary object and to edit references from other objects to citations. - It is called from gramps.gui.editors.__init__ for editing the primary object + It is called from ..editors.__init__ for editing the primary object and is called from CitationEmbedList for editing references @param callertitle: Text passed by calling object to add to title diff --git a/gramps/gui/editors/editdate.py b/gramps/gui/editors/editdate.py index 75f926ac8..3aef321fd 100644 --- a/gramps/gui/editors/editdate.py +++ b/gramps/gui/editors/editdate.py @@ -65,9 +65,9 @@ from gramps.gen.ggettext import sgettext as _ from gramps.gen.lib.date import Date from gramps.gen.datehandler import displayer from gramps.gen.const import URL_MANUAL_PAGE -from gramps.gui.display import display_help -from gramps.gui.managedwindow import ManagedWindow -from gramps.gui.glade import Glade +from ..display import display_help +from ..managedwindow import ManagedWindow +from ..glade import Glade #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editevent.py b/gramps/gui/editors/editevent.py index 1a129093d..56cf26e15 100644 --- a/gramps/gui/editors/editevent.py +++ b/gramps/gui/editors/editevent.py @@ -44,14 +44,14 @@ from gi.repository import Gtk from gramps.gen.const import URL_MANUAL_PAGE from gramps.gen.lib import Event, NoteType from gramps.gen.db import DbTxn -from gramps.gui.display import display_help +from ..display import display_help from editprimary import EditPrimary from objectentries import PlaceEntry -from gramps.gui.glade import Glade -from gramps.gui.dialog import ErrorDialog +from ..glade import Glade +from ..dialog import ErrorDialog from displaytabs import (CitationEmbedList, NoteTab, GalleryTab, EventBackRefList, AttrEmbedList) -from gramps.gui.widgets import (MonitoredEntry, PrivacyButton, +from ..widgets import (MonitoredEntry, PrivacyButton, MonitoredDataType, MonitoredDate) from gramps.gen.utils.db import get_participant_from_event diff --git a/gramps/gui/editors/editeventref.py b/gramps/gui/editors/editeventref.py index b93a86874..eeb9d045c 100644 --- a/gramps/gui/editors/editeventref.py +++ b/gramps/gui/editors/editeventref.py @@ -37,10 +37,10 @@ from gramps.gen.ggettext import gettext as _ #------------------------------------------------------------------------- from gramps.gen.lib import EventType, NoteType from gramps.gen.db import DbTxn -from gramps.gui.glade import Glade +from ..glade import Glade from displaytabs import (CitationEmbedList, NoteTab, GalleryTab, EventBackRefList, AttrEmbedList) -from gramps.gui.widgets import (PrivacyButton, MonitoredEntry, +from ..widgets import (PrivacyButton, MonitoredEntry, MonitoredDate, MonitoredDataType) from editreference import RefTab, EditReference diff --git a/gramps/gui/editors/editfamily.py b/gramps/gui/editors/editfamily.py index 8aca2b77f..adff17afc 100644 --- a/gramps/gui/editors/editfamily.py +++ b/gramps/gui/editors/editfamily.py @@ -49,7 +49,7 @@ log = logging.getLogger(".") # #------------------------------------------------------------------------- from gramps.gen.ggettext import gettext as _ -from gramps.gui.ddtargets import DdTargets +from ..ddtargets import DdTargets from gi.repository import Gtk from gi.repository import Gdk from gi.repository import Pango @@ -66,7 +66,7 @@ from gramps.gen.lib import ChildRef, Family, Name, NoteType, Person, Surname from gramps.gen.db import DbTxn from gramps.gen.errors import WindowActiveError from gramps.gen.datehandler import displayer -from gramps.gui.glade import Glade +from ..glade import Glade from editprimary import EditPrimary from editchildref import EditChildRef @@ -74,14 +74,14 @@ from editperson import EditPerson from displaytabs import (EmbeddedList, EventEmbedList, CitationEmbedList, FamilyAttrEmbedList, NoteTab, GalleryTab, FamilyLdsEmbedList, ChildModel) -from gramps.gui.widgets import (PrivacyButton, MonitoredEntry, MonitoredDataType, +from ..widgets import (PrivacyButton, MonitoredEntry, MonitoredDataType, MonitoredTagList) from gramps.gen.plug import CATEGORY_QR_FAMILY -from gramps.gui.dialog import (ErrorDialog, RunDatabaseRepair, WarningDialog, +from ..dialog import (ErrorDialog, RunDatabaseRepair, WarningDialog, MessageHideDialog) from gramps.gen.utils.db import (get_birth_or_fallback, get_death_or_fallback, get_marriage_or_fallback, preset_name, family_name) -from gramps.gui.selectors import SelectorFactory +from ..selectors import SelectorFactory from gramps.gen.utils.id import create_id SelectPerson = SelectorFactory('Person') diff --git a/gramps/gui/editors/editldsord.py b/gramps/gui/editors/editldsord.py index d12246c12..bb68c30ef 100644 --- a/gramps/gui/editors/editldsord.py +++ b/gramps/gui/editors/editldsord.py @@ -48,13 +48,13 @@ from gi.repository import Gtk from gramps.gen.lib import LdsOrd, NoteType from gramps.gen.display.name import displayer as name_displayer from gramps.gen.utils.lds import TEMPLES -from gramps.gui.glade import Glade +from ..glade import Glade from editsecondary import EditSecondary from objectentries import PlaceEntry from displaytabs import CitationEmbedList,NoteTab -from gramps.gui.widgets import (PrivacyButton, MonitoredDate, +from ..widgets import (PrivacyButton, MonitoredDate, MonitoredMenu, MonitoredStrMenu) -from gramps.gui.selectors import SelectorFactory +from ..selectors import SelectorFactory _DATA_MAP = { LdsOrd.BAPTISM : [ diff --git a/gramps/gui/editors/editlink.py b/gramps/gui/editors/editlink.py index 3e395d555..da9f1b373 100644 --- a/gramps/gui/editors/editlink.py +++ b/gramps/gui/editors/editlink.py @@ -34,9 +34,9 @@ import re # #------------------------------------------------------------------------- from gramps.gen.ggettext import gettext as _ -from gramps.gui.managedwindow import ManagedWindow -from gramps.gui.display import display_help -from gramps.gui.glade import Glade +from ..managedwindow import ManagedWindow +from ..display import display_help +from ..glade import Glade from gramps.gen.simple import SimpleAccess WEB, EVENT, FAMILY, MEDIA, NOTE, PERSON, PLACE, REPOSITORY, SOURCE = range(9) @@ -146,7 +146,7 @@ class EditLink(ManagedWindow): (object_class, "handle", obj.handle)) def _on_new(self, widget): - from gramps.gui.editors import EditObject + from ..editors import EditObject object_class = OBJECT_MAP[self.uri_list.get_active()] EditObject(self.dbstate, self.uistate, @@ -155,7 +155,7 @@ class EditLink(ManagedWindow): callback=self._on_new_callback) def _on_edit_one(self, widget): - from gramps.gui.editors import EditObject + from ..editors import EditObject uri = self.url_link.get_text() if uri.startswith("gramps://"): obj_class, prop, value = uri[9:].split("/", 2) @@ -165,7 +165,7 @@ class EditLink(ManagedWindow): obj_class, prop, value) def _on_pick_one(self, widget): - from gramps.gui.selectors import SelectorFactory + from ..selectors import SelectorFactory object_class = OBJECT_MAP[self.uri_list.get_active()] Select = SelectorFactory(object_class) uri = self.url_link.get_text() diff --git a/gramps/gui/editors/editlocation.py b/gramps/gui/editors/editlocation.py index a1dc8f791..fbd7455fd 100644 --- a/gramps/gui/editors/editlocation.py +++ b/gramps/gui/editors/editlocation.py @@ -28,8 +28,8 @@ # #------------------------------------------------------------------------- from editsecondary import EditSecondary -from gramps.gui.glade import Glade -from gramps.gui.widgets import MonitoredEntry +from ..glade import Glade +from ..widgets import MonitoredEntry from gramps.gen.ggettext import gettext as _ #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/editmedia.py b/gramps/gui/editors/editmedia.py index 53a4ad4c4..73b3613bc 100644 --- a/gramps/gui/editors/editmedia.py +++ b/gramps/gui/editors/editmedia.py @@ -43,21 +43,21 @@ from gi.repository import Gdk # gramps modules # #------------------------------------------------------------------------- -from gramps.gui.utils import open_file_with_default_application +from ..utils import open_file_with_default_application from gramps.gen.lib import MediaObject, NoteType from gramps.gen.db import DbTxn from gramps.gen.mime import get_description, get_type -from gramps.gui.thumbnails import get_thumbnail_image, find_mime_type_pixbuf +from ..thumbnails import get_thumbnail_image, find_mime_type_pixbuf from gramps.gen.utils.file import (media_path_full, find_file, get_unicode_path_from_file_chooser) from editprimary import EditPrimary -from gramps.gui.widgets import (MonitoredDate, MonitoredEntry, PrivacyButton, +from ..widgets import (MonitoredDate, MonitoredEntry, PrivacyButton, MonitoredTagList) from displaytabs import (CitationEmbedList, AttrEmbedList, NoteTab, MediaBackRefList) from addmedia import AddMediaObject -from gramps.gui.dialog import ErrorDialog -from gramps.gui.glade import Glade +from ..dialog import ErrorDialog +from ..glade import Glade #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editmediaref.py b/gramps/gui/editors/editmediaref.py index dc37b12c2..c549a96b2 100644 --- a/gramps/gui/editors/editmediaref.py +++ b/gramps/gui/editors/editmediaref.py @@ -44,18 +44,18 @@ from gi.repository import Gdk # gramps modules # #------------------------------------------------------------------------- -from gramps.gui.utils import open_file_with_default_application +from ..utils import open_file_with_default_application from gramps.gen.const import THUMBSCALE from gramps.gen.mime import get_description, get_type -from gramps.gui.thumbnails import get_thumbnail_image, find_mime_type_pixbuf +from ..thumbnails import get_thumbnail_image, find_mime_type_pixbuf from gramps.gen.utils.file import (media_path_full, find_file, get_unicode_path_from_file_chooser) from gramps.gen.lib import NoteType from gramps.gen.db import DbTxn -from gramps.gui.glade import Glade +from ..glade import Glade from displaytabs import (CitationEmbedList, AttrEmbedList, MediaBackRefList, NoteTab) -from gramps.gui.widgets import (MonitoredSpinButton, MonitoredEntry, PrivacyButton, +from ..widgets import (MonitoredSpinButton, MonitoredEntry, PrivacyButton, MonitoredDate, MonitoredTagList) from editreference import RefTab, EditReference from addmedia import AddMediaObject diff --git a/gramps/gui/editors/editname.py b/gramps/gui/editors/editname.py index 3604e2242..b018d8b73 100644 --- a/gramps/gui/editors/editname.py +++ b/gramps/gui/editors/editname.py @@ -50,9 +50,9 @@ from gramps.gen.display.name import displayer as name_displayer from editsecondary import EditSecondary from gramps.gen.lib import NoteType from displaytabs import GrampsTab, CitationEmbedList, NoteTab, SurnameTab -from gramps.gui.widgets import (MonitoredEntry, MonitoredMenu, MonitoredDate, +from ..widgets import (MonitoredEntry, MonitoredMenu, MonitoredDate, MonitoredDataType, PrivacyButton) -from gramps.gui.glade import Glade +from ..glade import Glade from gramps.gen.errors import ValidationError #------------------------------------------------------------------------- @@ -370,7 +370,7 @@ class EditName(EditSecondary): #user wants to group with surname if self.global_group_set and not self.original_group_set : #warn that group will revert to surname - from gramps.gui.dialog import QuestionDialog2 + from ..dialog import QuestionDialog2 q = QuestionDialog2( _("Break global name grouping?"), _("All people with the name of %(surname)s will no longer " @@ -400,7 +400,7 @@ class EditName(EditSecondary): #if changed, ask if this has to happen for the entire group, #this might be creation of group link, or change of group link if self.global_group_as != group_as: - from gramps.gui.dialog import QuestionDialog2 + from ..dialog import QuestionDialog2 q = QuestionDialog2( _("Group all people with the same name?"), diff --git a/gramps/gui/editors/editnote.py b/gramps/gui/editors/editnote.py index 872390bd3..6b76bd080 100644 --- a/gramps/gui/editors/editnote.py +++ b/gramps/gui/editors/editnote.py @@ -50,12 +50,12 @@ from gi.repository import Pango from gramps.gen.config import config from editprimary import EditPrimary from displaytabs import GrampsTab, NoteBackRefList -from gramps.gui.widgets import (MonitoredDataType, MonitoredCheckbox, +from ..widgets import (MonitoredDataType, MonitoredCheckbox, MonitoredEntry, PrivacyButton, MonitoredTagList) from gramps.gen.lib import Note from gramps.gen.db import DbTxn -from gramps.gui.dialog import ErrorDialog -from gramps.gui.glade import Glade +from ..dialog import ErrorDialog +from ..glade import Glade #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editperson.py b/gramps/gui/editors/editperson.py index ca341defa..d0bdbcf58 100644 --- a/gramps/gui/editors/editperson.py +++ b/gramps/gui/editors/editperson.py @@ -51,22 +51,22 @@ from gi.repository import Pango # #------------------------------------------------------------------------- from gramps.gen.utils.file import media_path_full -from gramps.gui.thumbnails import get_thumbnail_image -from gramps.gui.utils import is_right_click, open_file_with_default_application +from ..thumbnails import get_thumbnail_image +from ..utils import is_right_click, open_file_with_default_application from gramps.gen.utils.db import get_birth_or_fallback from gramps.gen.lib import NoteType, Person, Surname from gramps.gen.db import DbTxn -from gramps.gui import widgets +from .. import widgets from gramps.gen.display.name import displayer as name_displayer from gramps.gen.errors import WindowActiveError -from gramps.gui.glade import Glade -from gramps.gui.widgets.menuitem import add_menuitem +from ..glade import Glade +from ..widgets.menuitem import add_menuitem from editprimary import EditPrimary from editmediaref import EditMediaRef from editname import EditName from gramps.gen.config import config -from gramps.gui.dialog import ErrorDialog, ICON +from ..dialog import ErrorDialog, ICON from gramps.gen.errors import ValidationError from displaytabs import (PersonEventEmbedList, NameEmbedList, CitationEmbedList, @@ -928,7 +928,7 @@ class EditPerson(EditPrimary): obj = self.dbstate.db.get_object_from_handle(handle) if obj is None : #notify user of error - from gramps.gui.dialog import RunDatabaseRepair + from ..dialog import RunDatabaseRepair RunDatabaseRepair( _('Non existing media found in the Gallery')) else : diff --git a/gramps/gui/editors/editpersonref.py b/gramps/gui/editors/editpersonref.py index 5ecfce764..afe20e51c 100644 --- a/gramps/gui/editors/editpersonref.py +++ b/gramps/gui/editors/editpersonref.py @@ -49,10 +49,10 @@ from gi.repository import Gtk from gramps.gen.display.name import displayer as name_displayer from editsecondary import EditSecondary from gramps.gen.lib import NoteType -from gramps.gui.widgets import MonitoredEntry, PrivacyButton -from gramps.gui.selectors import SelectorFactory +from ..widgets import MonitoredEntry, PrivacyButton +from ..selectors import SelectorFactory from displaytabs import CitationEmbedList, NoteTab -from gramps.gui.glade import Glade +from ..glade import Glade #------------------------------------------------------------------------- # @@ -173,7 +173,7 @@ class EditPersonRef(EditSecondary): self.callback = None self.close() else: - from gramps.gui.dialog import ErrorDialog + from ..dialog import ErrorDialog ErrorDialog( _('No person selected'), diff --git a/gramps/gui/editors/editplace.py b/gramps/gui/editors/editplace.py index 79be35df0..ce9accb6a 100644 --- a/gramps/gui/editors/editplace.py +++ b/gramps/gui/editors/editplace.py @@ -49,11 +49,11 @@ from gramps.gen.db import DbTxn from editprimary import EditPrimary from displaytabs import (GrampsTab, LocationEmbedList, CitationEmbedList, GalleryTab, NoteTab, WebEmbedList, PlaceBackRefList) -from gramps.gui.widgets import MonitoredEntry, PrivacyButton +from ..widgets import MonitoredEntry, PrivacyButton from gramps.gen.errors import ValidationError from gramps.gen.utils.place import conv_lat_lon -from gramps.gui.dialog import ErrorDialog -from gramps.gui.glade import Glade +from ..dialog import ErrorDialog +from ..glade import Glade #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editprimary.py b/gramps/gui/editors/editprimary.py index 7aceae420..40573b708 100644 --- a/gramps/gui/editors/editprimary.py +++ b/gramps/gui/editors/editprimary.py @@ -40,15 +40,15 @@ from gi.repository import Gtk # GRAMPS modules # #------------------------------------------------------------------------- -from gramps.gui.managedwindow import ManagedWindow +from ..managedwindow import ManagedWindow from gramps.gen.datehandler import displayer, parser from gramps.gen.display.name import displayer as name_displayer from gramps.gen.config import config -from gramps.gui.utils import is_right_click -from gramps.gui.display import display_help -from gramps.gui.dialog import SaveDialog +from ..utils import is_right_click +from ..display import display_help +from ..dialog import SaveDialog from gramps.gen.lib import PrimaryObject -from gramps.gui.dbguielement import DbGUIElement +from ..dbguielement import DbGUIElement class EditPrimary(ManagedWindow, DbGUIElement): @@ -303,7 +303,7 @@ class EditPrimary(ManagedWindow, DbGUIElement): """ Create actions and ui of context menu """ - from gramps.gui.plug.quick import create_quickreport_menu + from ..plug.quick import create_quickreport_menu self.popupmanager = Gtk.UIManager() #add custom actions diff --git a/gramps/gui/editors/editreference.py b/gramps/gui/editors/editreference.py index aa7bd67fa..d38d5598f 100644 --- a/gramps/gui/editors/editreference.py +++ b/gramps/gui/editors/editreference.py @@ -33,10 +33,10 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- -from gramps.gui.managedwindow import ManagedWindow +from ..managedwindow import ManagedWindow from displaytabs import GrampsTab from gramps.gen.config import config -from gramps.gui.dbguielement import DbGUIElement +from ..dbguielement import DbGUIElement #------------------------------------------------------------------------- # @@ -198,7 +198,7 @@ class EditReference(ManagedWindow, DbGUIElement): self.close() def define_help_button(self, button, webpage='', section=''): - from gramps.gui.display import display_help + from ..display import display_help button.connect('clicked', lambda x: display_help(webpage, section)) button.set_sensitive(True) diff --git a/gramps/gui/editors/editreporef.py b/gramps/gui/editors/editreporef.py index e260280df..d487f3493 100644 --- a/gramps/gui/editors/editreporef.py +++ b/gramps/gui/editors/editreporef.py @@ -37,9 +37,9 @@ from gramps.gen.lib import NoteType from gramps.gen.db import DbTxn from displaytabs import NoteTab,AddrEmbedList,WebEmbedList,SourceBackRefList -from gramps.gui.widgets import MonitoredEntry, PrivacyButton, MonitoredDataType +from ..widgets import MonitoredEntry, PrivacyButton, MonitoredDataType from editreference import RefTab, EditReference -from gramps.gui.glade import Glade +from ..glade import Glade #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editrepository.py b/gramps/gui/editors/editrepository.py index 52006d501..1c8ae1f5d 100644 --- a/gramps/gui/editors/editrepository.py +++ b/gramps/gui/editors/editrepository.py @@ -43,11 +43,11 @@ from gi.repository import Gtk from gramps.gen.lib import NoteType, Repository from gramps.gen.db import DbTxn -from gramps.gui.widgets import MonitoredEntry, MonitoredDataType, PrivacyButton +from ..widgets import MonitoredEntry, MonitoredDataType, PrivacyButton from displaytabs import AddrEmbedList, WebEmbedList, NoteTab, SourceBackRefList from editprimary import EditPrimary -from gramps.gui.dialog import ErrorDialog -from gramps.gui.glade import Glade +from ..dialog import ErrorDialog +from ..glade import Glade class EditRepository(EditPrimary): diff --git a/gramps/gui/editors/editsecondary.py b/gramps/gui/editors/editsecondary.py index 8179a4fb1..2c8e08d8f 100644 --- a/gramps/gui/editors/editsecondary.py +++ b/gramps/gui/editors/editsecondary.py @@ -21,10 +21,10 @@ # $Id$ -from gramps.gui.managedwindow import ManagedWindow -from gramps.gui.display import display_help +from ..managedwindow import ManagedWindow +from ..display import display_help from gramps.gen.config import config -from gramps.gui.dbguielement import DbGUIElement +from ..dbguielement import DbGUIElement class EditSecondary(ManagedWindow, DbGUIElement): diff --git a/gramps/gui/editors/editsource.py b/gramps/gui/editors/editsource.py index 8927ce44e..446321ea3 100644 --- a/gramps/gui/editors/editsource.py +++ b/gramps/gui/editors/editsource.py @@ -50,9 +50,9 @@ from editprimary import EditPrimary from displaytabs import (NoteTab, GalleryTab, DataEmbedList, CitationBackRefList, RepoEmbedList) -from gramps.gui.widgets import MonitoredEntry, PrivacyButton -from gramps.gui.dialog import ErrorDialog -from gramps.gui.glade import Glade +from ..widgets import MonitoredEntry, PrivacyButton +from ..dialog import ErrorDialog +from ..glade import Glade #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/edittaglist.py b/gramps/gui/editors/edittaglist.py index 48ffd8cef..99d2ca65d 100644 --- a/gramps/gui/editors/edittaglist.py +++ b/gramps/gui/editors/edittaglist.py @@ -34,10 +34,10 @@ from gi.repository import Gtk # #------------------------------------------------------------------------- from gramps.gen.ggettext import sgettext as _ -from gramps.gui.managedwindow import ManagedWindow +from ..managedwindow import ManagedWindow from gramps.gen.const import URL_MANUAL_PAGE -from gramps.gui.display import display_help -from gramps.gui.listmodel import ListModel, TOGGLE +from ..display import display_help +from ..listmodel import ListModel, TOGGLE #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editurl.py b/gramps/gui/editors/editurl.py index 2aea6b7d3..a85ea414b 100644 --- a/gramps/gui/editors/editurl.py +++ b/gramps/gui/editors/editurl.py @@ -34,8 +34,8 @@ from gramps.gen.ggettext import gettext as _ # #------------------------------------------------------------------------- from editsecondary import EditSecondary -from gramps.gui.widgets import MonitoredEntry, PrivacyButton, MonitoredDataType -from gramps.gui.glade import Glade +from ..widgets import MonitoredEntry, PrivacyButton, MonitoredDataType +from ..glade import Glade #------------------------------------------------------------------------- # @@ -68,7 +68,7 @@ class EditUrl(EditSecondary): def jump_to(self, obj): if self.obj.get_path(): - from gramps.gui.display import display_url + from ..display import display_url display_url(self.obj.get_path()) def _setup_fields(self): diff --git a/gramps/gui/editors/filtereditor.py b/gramps/gui/editors/filtereditor.py index 31370d0e5..778c972d1 100644 --- a/gramps/gui/editors/filtereditor.py +++ b/gramps/gui/editors/filtereditor.py @@ -57,17 +57,17 @@ from gi.repository import GObject from gramps.gen.filters import (GenericFilterFactory, FilterList, reload_custom_filters) from gramps.gen.filters.rules._matchesfilterbase import MatchesFilterBase -from gramps.gui.listmodel import ListModel -from gramps.gui.managedwindow import ManagedWindow -from gramps.gui.dialog import QuestionDialog +from ..listmodel import ListModel +from ..managedwindow import ManagedWindow +from ..dialog import QuestionDialog from gramps.gen.const import RULE_GLADE, URL_MANUAL_PAGE -from gramps.gui.display import display_help +from ..display import display_help from gramps.gen.errors import WindowActiveError from gramps.gen.ggettext import sgettext as _ from gramps.gen.lib import AttributeType, EventType, FamilyRelType, NameOriginType, NameType, NoteType from gramps.gen.filters import rules -from gramps.gui.autocomp import StandardCustomSelector, fill_entry -from gramps.gui.selectors import SelectorFactory +from ..autocomp import StandardCustomSelector, fill_entry +from ..selectors import SelectorFactory from gramps.gen.display.name import displayer as _nd from gramps.gen.utils.db import family_name from gramps.gen.utils.string import confidence diff --git a/gramps/gui/editors/objectentries.py b/gramps/gui/editors/objectentries.py index d289e2549..fa59fa912 100644 --- a/gramps/gui/editors/objectentries.py +++ b/gramps/gui/editors/objectentries.py @@ -49,8 +49,8 @@ from gramps.gen.lib import (Place, MediaObject, Note) from editplace import EditPlace from editmedia import EditMedia from editnote import EditNote -from gramps.gui.selectors import SelectorFactory -from gramps.gui.ddtargets import DdTargets +from ..selectors import SelectorFactory +from ..ddtargets import DdTargets from gramps.gen.errors import WindowActiveError #-------------------------------------------------------------------------