Convert editors to use relative imports

svn: r20503
This commit is contained in:
Nick Hall 2012-10-03 14:43:06 +00:00
parent 54f78b6358
commit b62adcfeb3
51 changed files with 186 additions and 186 deletions

View File

@ -55,11 +55,11 @@ from gramps.gen.config import config
from gramps.gen.utils.file import (media_path_full, media_path, relative_path, from gramps.gen.utils.file import (media_path_full, media_path, relative_path,
find_file, get_unicode_path_from_file_chooser) find_file, get_unicode_path_from_file_chooser)
from gramps.gen.mime import get_type from gramps.gen.mime import get_type
from gramps.gui.thumbnails import find_mime_type_pixbuf from ..thumbnails import find_mime_type_pixbuf
from gramps.gui.display import display_help from ..display import display_help
from gramps.gui.managedwindow import ManagedWindow from ..managedwindow import ManagedWindow
from gramps.gui.dialog import ErrorDialog, WarningDialog from ..dialog import ErrorDialog, WarningDialog
from gramps.gui.glade import Glade from ..glade import Glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -39,7 +39,7 @@ from gi.repository import GObject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.lib import Address from gramps.gen.lib import Address
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gui.ddtargets import DdTargets from ...ddtargets import DdTargets
from addressmodel import AddressModel from addressmodel import AddressModel
from embeddedlist import EmbeddedList from embeddedlist import EmbeddedList
@ -109,7 +109,7 @@ class AddrEmbedList(EmbeddedList):
""" """
addr = Address() addr = Address()
try: try:
from gramps.gui.editors import EditAddress from .. import EditAddress
EditAddress(self.dbstate, self.uistate, self.track, EditAddress(self.dbstate, self.uistate, self.track,
addr, self.add_callback) addr, self.add_callback)
except WindowActiveError: except WindowActiveError:
@ -134,7 +134,7 @@ class AddrEmbedList(EmbeddedList):
addr = self.get_selected() addr = self.get_selected()
if addr: if addr:
try: try:
from gramps.gui.editors import EditAddress from .. import EditAddress
EditAddress(self.dbstate, self.uistate, self.track, EditAddress(self.dbstate, self.uistate, self.track,
addr, self.edit_callback) addr, self.edit_callback)
except WindowActiveError: except WindowActiveError:

View File

@ -35,7 +35,7 @@ from gi.repository import GObject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.lib import Attribute from gramps.gen.lib import Attribute
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gui.ddtargets import DdTargets from ...ddtargets import DdTargets
from attrmodel import AttrModel from attrmodel import AttrModel
from embeddedlist import EmbeddedList from embeddedlist import EmbeddedList
@ -70,7 +70,7 @@ class AttrEmbedList(EmbeddedList):
AttrModel, move_buttons=True) AttrModel, move_buttons=True)
def get_editor(self): def get_editor(self):
from gramps.gui.editors import EditAttribute from .. import EditAttribute
return EditAttribute return EditAttribute
def get_user_values(self): def get_user_values(self):

View File

@ -42,7 +42,7 @@ from gi.repository import Gtk
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gui.widgets import SimpleButton from ...widgets import SimpleButton
from embeddedlist import EmbeddedList from embeddedlist import EmbeddedList
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -135,7 +135,7 @@ class BackRefList(EmbeddedList):
def edit_button_clicked(self, obj): def edit_button_clicked(self, obj):
from gramps.gui.editors import EditEvent, EditPerson, EditFamily, EditSource, \ from .. import EditEvent, EditPerson, EditFamily, EditSource, \
EditPlace, EditMedia, EditRepository, \ EditPlace, EditMedia, EditRepository, \
EditCitation EditCitation

View File

@ -41,7 +41,7 @@ from gi.repository import Gdk
# GRAMPS classes # GRAMPS classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.widgets import SimpleButton from ...widgets import SimpleButton
from grampstab import GrampsTab from grampstab import GrampsTab
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError

View File

@ -45,11 +45,11 @@ from gi.repository import GObject
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gen.lib import Citation, Source from gramps.gen.lib import Citation, Source
from gramps.gen.lib import Source, Citation from gramps.gen.lib import Source, Citation
from gramps.gui.dbguielement import DbGUIElement from ...dbguielement import DbGUIElement
from gramps.gui.selectors import SelectorFactory from ...selectors import SelectorFactory
from citationrefmodel import CitationRefModel from citationrefmodel import CitationRefModel
from embeddedlist import EmbeddedList 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. This prevents the dialog from coming up twice on the same object.
""" """
try: try:
from gramps.gui.editors import EditCitation from .. import EditCitation
EditCitation(self.dbstate, self.uistate, self.track, EditCitation(self.dbstate, self.uistate, self.track,
Citation(), Source(), Citation(), Source(),
self.add_callback, self.callertitle) self.add_callback, self.callertitle)
@ -162,23 +162,23 @@ class CitationEmbedList(EmbeddedList, DbGUIElement):
if object: if object:
if isinstance(object, Source): if isinstance(object, Source):
try: try:
from gramps.gui.editors import EditCitation from .. import EditCitation
EditCitation(self.dbstate, self.uistate, self.track, EditCitation(self.dbstate, self.uistate, self.track,
Citation(), object, Citation(), object,
callback=self.add_callback, callback=self.add_callback,
callertitle=self.callertitle) callertitle=self.callertitle)
except WindowActiveError: except WindowActiveError:
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog(_("Cannot share this reference"), WarningDialog(_("Cannot share this reference"),
self.__blocked_text()) self.__blocked_text())
elif isinstance(object, Citation): elif isinstance(object, Citation):
try: try:
from gramps.gui.editors import EditCitation from .. import EditCitation
EditCitation(self.dbstate, self.uistate, self.track, EditCitation(self.dbstate, self.uistate, self.track,
object, callback=self.add_callback, object, callback=self.add_callback,
callertitle=self.callertitle) callertitle=self.callertitle)
except WindowActiveError: except WindowActiveError:
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog(_("Cannot share this reference"), WarningDialog(_("Cannot share this reference"),
self.__blocked_text()) self.__blocked_text())
else: else:
@ -207,7 +207,7 @@ class CitationEmbedList(EmbeddedList, DbGUIElement):
if handle: if handle:
citation = self.dbstate.db.get_citation_from_handle(handle) citation = self.dbstate.db.get_citation_from_handle(handle)
try: try:
from gramps.gui.editors import EditCitation from .. import EditCitation
EditCitation(self.dbstate, self.uistate, self.track, citation, EditCitation(self.dbstate, self.uistate, self.track, citation,
callertitle = self.callertitle) callertitle = self.callertitle)
except WindowActiveError: except WindowActiveError:
@ -246,12 +246,12 @@ class CitationEmbedList(EmbeddedList, DbGUIElement):
object = self.dbstate.db.get_citation_from_handle(handle) object = self.dbstate.db.get_citation_from_handle(handle)
if isinstance(object, Citation): if isinstance(object, Citation):
try: try:
from gramps.gui.editors import EditCitation from .. import EditCitation
EditCitation(self.dbstate, self.uistate, self.track, EditCitation(self.dbstate, self.uistate, self.track,
object, callback=self.add_callback, object, callback=self.add_callback,
callertitle=self.callertitle) callertitle=self.callertitle)
except WindowActiveError: except WindowActiveError:
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog(_("Cannot share this reference"), WarningDialog(_("Cannot share this reference"),
self.__blocked_text()) self.__blocked_text())
else: else:
@ -265,13 +265,13 @@ class CitationEmbedList(EmbeddedList, DbGUIElement):
object = self.dbstate.db.get_source_from_handle(handle) object = self.dbstate.db.get_source_from_handle(handle)
if isinstance(object, Source): if isinstance(object, Source):
try: try:
from gramps.gui.editors import EditCitation from .. import EditCitation
EditCitation(self.dbstate, self.uistate, self.track, EditCitation(self.dbstate, self.uistate, self.track,
Citation(), object, Citation(), object,
callback=self.add_callback, callback=self.add_callback,
callertitle=self.callertitle) callertitle=self.callertitle)
except WindowActiveError: except WindowActiveError:
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog(_("Cannot share this reference"), WarningDialog(_("Cannot share this reference"),
self.__blocked_text()) self.__blocked_text())
else: else:

View File

@ -44,7 +44,7 @@ from gi.repository import Pango
# GRAMPS classes # GRAMPS classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.utils import is_right_click from ...utils import is_right_click
from buttontab import ButtonTab from buttontab import ButtonTab
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -496,7 +496,7 @@ class EmbeddedList(ButtonTab):
try: try:
self.model = self.construct_model() self.model = self.construct_model()
except AttributeError, msg: except AttributeError, msg:
from gramps.gui.dialog import RunDatabaseRepair from ...dialog import RunDatabaseRepair
import traceback import traceback
traceback.print_exc() traceback.print_exc()
RunDatabaseRepair(str(msg)) RunDatabaseRepair(str(msg))

View File

@ -37,11 +37,11 @@ from gi.repository import GObject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.lib import Event, EventRef, EventRoleType, EventType from gramps.gen.lib import Event, EventRef, EventRoleType, EventType
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gui.ddtargets import DdTargets from ...ddtargets import DdTargets
from groupembeddedlist import GroupEmbeddedList from groupembeddedlist import GroupEmbeddedList
from eventrefmodel import EventRefModel from eventrefmodel import EventRefModel
from gramps.gui.dbguielement import DbGUIElement from ...dbguielement import DbGUIElement
from gramps.gui.selectors import SelectorFactory from ...selectors import SelectorFactory
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -141,7 +141,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
self.rebuild_callback() self.rebuild_callback()
def get_ref_editor(self): def get_ref_editor(self):
from gramps.gui.editors import EditFamilyEventRef from .. import EditFamilyEventRef
return EditFamilyEventRef return EditFamilyEventRef
def get_icon_name(self): def get_icon_name(self):
@ -256,7 +256,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
self.dbstate, self.uistate, self.track, self.dbstate, self.uistate, self.track,
event, ref, self.object_added) event, ref, self.object_added)
except WindowActiveError: except WindowActiveError:
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog(_("Cannot share this reference"), WarningDialog(_("Cannot share this reference"),
self.__blocked_text()) self.__blocked_text())
@ -269,7 +269,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
self.dbstate, self.uistate, self.track, self.dbstate, self.uistate, self.track,
event, ref[1], self.object_edited) event, ref[1], self.object_edited)
except WindowActiveError: except WindowActiveError:
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog(_("Cannot edit this reference"), WarningDialog(_("Cannot edit this reference"),
self.__blocked_text()) self.__blocked_text())
elif ref and ref[0] != self._WORKGROUP: elif ref and ref[0] != self._WORKGROUP:
@ -310,7 +310,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
""" """
handle change request of non native data handle change request of non native data
""" """
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog( WarningDialog(
_("Cannot change Person"), _("Cannot change Person"),
_("You cannot change Person events in the Family Editor") _("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, self.get_ref_editor()(self.dbstate, self.uistate, self.track,
event, obj, self.object_edited) event, obj, self.object_edited)
except WindowActiveError: except WindowActiveError:
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog( WarningDialog(
_("Cannot edit this reference"), _("Cannot edit this reference"),
_("This event reference cannot be edited at this time. " _("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) person = self.dbstate.db.get_person_from_handle(key)
try: try:
from gramps.gui.editors import EditPerson from .. import EditPerson
EditPerson(self.dbstate, self.uistate, [], person) EditPerson(self.dbstate, self.uistate, [], person)
except WindowActiveError: except WindowActiveError:
pass pass

View File

@ -46,7 +46,7 @@ import cgi
# GRAMPS classes # 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.datehandler import get_date, get_date_valid
from gramps.gen.config import config from gramps.gen.config import config

View File

@ -38,7 +38,7 @@ class FamilyAttrEmbedList(AttrEmbedList):
AttrEmbedList.__init__(self, dbstate, uistate, track, data) AttrEmbedList.__init__(self, dbstate, uistate, track, data)
def get_editor(self): def get_editor(self):
from gramps.gui.editors import EditFamilyAttribute from .. import EditFamilyAttribute
return EditFamilyAttribute return EditFamilyAttribute
def get_user_values(self): def get_user_values(self):

View File

@ -59,7 +59,7 @@ class FamilyLdsEmbedList(LdsEmbedList):
LdsEmbedList.__init__(self, dbstate, uistate, track, data) LdsEmbedList.__init__(self, dbstate, uistate, track, data)
def get_editor(self): def get_editor(self):
from gramps.gui.editors import EditFamilyLdsOrd from .. import EditFamilyLdsOrd
return EditFamilyLdsOrd return EditFamilyLdsOrd
def new_data(self): def new_data(self):

View File

@ -49,17 +49,17 @@ from gi.repository import GObject
# GRAMPS classes # GRAMPS classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.utils import is_right_click, open_file_with_default_application from ...utils import is_right_click, open_file_with_default_application
from gramps.gui.dbguielement import DbGUIElement from ...dbguielement import DbGUIElement
from gramps.gui.selectors import SelectorFactory from ...selectors import SelectorFactory
from gramps.gen.lib import MediaObject, MediaRef from gramps.gen.lib import MediaObject, MediaRef
from gramps.gen.db import DbTxn from gramps.gen.db import DbTxn
from gramps.gen.utils.file import (media_path_full, media_path, relative_path, from gramps.gen.utils.file import (media_path_full, media_path, relative_path,
fix_encoding) 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.errors import WindowActiveError
from gramps.gen.mime import get_type, is_valid_type 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 buttontab import ButtonTab
from gramps.gen.constfunc import win from gramps.gen.constfunc import win
from gramps.gen.const import THUMBSCALE from gramps.gen.const import THUMBSCALE
@ -250,7 +250,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
obj = self.dbstate.db.get_object_from_handle(handle) obj = self.dbstate.db.get_object_from_handle(handle)
if obj is None : if obj is None :
#notify user of error #notify user of error
from gramps.gui.dialog import RunDatabaseRepair from ...dialog import RunDatabaseRepair
RunDatabaseRepair( RunDatabaseRepair(
_('Non existing media found in the Gallery')) _('Non existing media found in the Gallery'))
else : else :
@ -275,7 +275,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
def add_button_clicked(self, obj): def add_button_clicked(self, obj):
try: try:
from gramps.gui.editors import EditMediaRef from .. import EditMediaRef
EditMediaRef(self.dbstate, self.uistate, self.track, EditMediaRef(self.dbstate, self.uistate, self.track,
MediaObject(), MediaRef(), MediaObject(), MediaRef(),
self.add_callback) self.add_callback)
@ -321,11 +321,11 @@ class GalleryTab(ButtonTab, DbGUIElement):
if src: if src:
sref = MediaRef() sref = MediaRef()
try: try:
from gramps.gui.editors import EditMediaRef from .. import EditMediaRef
EditMediaRef(self.dbstate, self.uistate, self.track, EditMediaRef(self.dbstate, self.uistate, self.track,
src, sref, self.add_callback) src, sref, self.add_callback)
except WindowActiveError: except WindowActiveError:
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog(_("Cannot share this reference"), WarningDialog(_("Cannot share this reference"),
self.__blocked_text()) self.__blocked_text())
@ -341,11 +341,11 @@ class GalleryTab(ButtonTab, DbGUIElement):
obj = self.dbstate.db.get_object_from_handle( obj = self.dbstate.db.get_object_from_handle(
ref.get_reference_handle()) ref.get_reference_handle())
try: try:
from gramps.gui.editors import EditMediaRef from .. import EditMediaRef
EditMediaRef(self.dbstate, self.uistate, self.track, EditMediaRef(self.dbstate, self.uistate, self.track,
obj, ref, self.edit_callback) obj, ref, self.edit_callback)
except WindowActiveError: except WindowActiveError:
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog(_("Cannot edit this reference"), WarningDialog(_("Cannot edit this reference"),
self.__blocked_text()) self.__blocked_text())

View File

@ -42,7 +42,7 @@ from gi.repository import GObject
# GRAMPS classes # GRAMPS classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.utils import is_right_click from ...utils import is_right_click
from embeddedlist import EmbeddedList from embeddedlist import EmbeddedList
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@ -72,7 +72,7 @@ class LdsEmbedList(EmbeddedList):
LdsModel, move_buttons=True) LdsModel, move_buttons=True)
def get_editor(self): def get_editor(self):
from gramps.gui.editors import EditLdsOrd from .. import EditLdsOrd
return EditLdsOrd return EditLdsOrd
def new_data(self): def new_data(self):

View File

@ -35,7 +35,7 @@ from gi.repository import GObject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.lib import Location from gramps.gen.lib import Location
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gui.ddtargets import DdTargets from ...ddtargets import DdTargets
from locationmodel import LocationModel from locationmodel import LocationModel
from embeddedlist import EmbeddedList from embeddedlist import EmbeddedList
@ -75,7 +75,7 @@ class LocationEmbedList(EmbeddedList):
def add_button_clicked(self, obj): def add_button_clicked(self, obj):
loc = Location() loc = Location()
try: try:
from gramps.gui.editors import EditLocation from .. import EditLocation
EditLocation(self.dbstate, self.uistate, self.track, EditLocation(self.dbstate, self.uistate, self.track,
loc, self.add_callback) loc, self.add_callback)
except WindowActiveError: except WindowActiveError:
@ -91,7 +91,7 @@ class LocationEmbedList(EmbeddedList):
loc = self.get_selected() loc = self.get_selected()
if loc: if loc:
try: try:
from gramps.gui.editors import EditLocation from .. import EditLocation
EditLocation(self.dbstate, self.uistate, self.track, EditLocation(self.dbstate, self.uistate, self.track,
loc, self.edit_callback) loc, self.edit_callback)
except WindowActiveError: except WindowActiveError:

View File

@ -43,7 +43,7 @@ from gramps.gen.ggettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.lib import Name, Surname from gramps.gen.lib import Name, Surname
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gui.ddtargets import DdTargets from ...ddtargets import DdTargets
from namemodel import NameModel from namemodel import NameModel
from groupembeddedlist import GroupEmbeddedList from groupembeddedlist import GroupEmbeddedList
@ -157,7 +157,7 @@ class NameEmbedList(GroupEmbeddedList):
name.add_surname(Surname()) name.add_surname(Surname())
name.set_primary_surname(0) name.set_primary_surname(0)
try: try:
from gramps.gui.editors import EditName from .. import EditName
EditName(self.dbstate, self.uistate, self.track, EditName(self.dbstate, self.uistate, self.track,
name, self.add_callback) name, self.add_callback)
except WindowActiveError: except WindowActiveError:
@ -174,7 +174,7 @@ class NameEmbedList(GroupEmbeddedList):
name = self.get_selected() name = self.get_selected()
if name and name[1] is not None: if name and name[1] is not None:
try: try:
from gramps.gui.editors import EditName from .. import EditName
if name[0] == NameModel.ALTINDEX: if name[0] == NameModel.ALTINDEX:
EditName(self.dbstate, self.uistate, self.track, EditName(self.dbstate, self.uistate, self.track,
name[1], self.edit_callback) name[1], self.edit_callback)

View File

@ -45,7 +45,7 @@ WEIGHT_BOLD = Pango.Weight.BOLD
# GRAMPS classes # GRAMPS classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.widgets.undoablebuffer import UndoableBuffer from ...widgets.undoablebuffer import UndoableBuffer
from gramps.gen.display.name import displayer as name_displayer from gramps.gen.display.name import displayer as name_displayer
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@ -41,11 +41,11 @@ from gi.repository import GObject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gen.lib import Note from gramps.gen.lib import Note
from gramps.gui.dbguielement import DbGUIElement from ...dbguielement import DbGUIElement
from gramps.gui.selectors import SelectorFactory from ...selectors import SelectorFactory
from notemodel import NoteModel from notemodel import NoteModel
from embeddedlist import EmbeddedList 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 : if self.notetype :
note.set_type(self.notetype) note.set_type(self.notetype)
try: try:
from gramps.gui.editors import EditNote from .. import EditNote
EditNote(self.dbstate, self.uistate, self.track, EditNote(self.dbstate, self.uistate, self.track,
note, self.add_callback, note, self.add_callback,
self.callertitle, extratype = [self.notetype]) self.callertitle, extratype = [self.notetype])
@ -162,7 +162,7 @@ class NoteTab(EmbeddedList, DbGUIElement):
if handle: if handle:
note = self.dbstate.db.get_note_from_handle(handle) note = self.dbstate.db.get_note_from_handle(handle)
try: try:
from gramps.gui.editors import EditNote from .. import EditNote
EditNote(self.dbstate, self.uistate, self.track, note, EditNote(self.dbstate, self.uistate, self.track, note,
callertitle = self.callertitle, callertitle = self.callertitle,
extratype = [self.notetype] ) extratype = [self.notetype] )

View File

@ -106,7 +106,7 @@ class PersonEventEmbedList(EventEmbedList):
] ]
def get_ref_editor(self): def get_ref_editor(self):
from gramps.gui.editors import EditEventRef from .. import EditEventRef
return EditEventRef return EditEventRef
def editnotworkgroup(self, key): def editnotworkgroup(self, key):
@ -115,7 +115,7 @@ class PersonEventEmbedList(EventEmbedList):
""" """
family = self.dbstate.db.get_family_from_handle(key) family = self.dbstate.db.get_family_from_handle(key)
try: try:
from gramps.gui.editors import EditFamily from .. import EditFamily
EditFamily(self.dbstate, self.uistate, [], family) EditFamily(self.dbstate, self.uistate, [], family)
except WindowActiveError: except WindowActiveError:
pass pass
@ -124,7 +124,7 @@ class PersonEventEmbedList(EventEmbedList):
""" """
handle change request of non native data handle change request of non native data
""" """
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog( WarningDialog(
_("Cannot change Family"), _("Cannot change Family"),
_("You cannot change Family events in the Person Editor") _("You cannot change Family events in the Person Editor")

View File

@ -35,7 +35,7 @@ from gi.repository import GObject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.lib import PersonRef from gramps.gen.lib import PersonRef
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gui.ddtargets import DdTargets from ...ddtargets import DdTargets
from personrefmodel import PersonRefModel from personrefmodel import PersonRefModel
from embeddedlist import EmbeddedList from embeddedlist import EmbeddedList
@ -72,7 +72,7 @@ class PersonRefEmbedList(EmbeddedList):
move_buttons=True) move_buttons=True)
def get_ref_editor(self): def get_ref_editor(self):
from gramps.gui.editors import EditPersonRef from .. import EditPersonRef
return EditPersonRef return EditPersonRef
def get_data(self): def get_data(self):
@ -82,7 +82,7 @@ class PersonRefEmbedList(EmbeddedList):
return ((1, 0), (1, 1), (1, 2)) return ((1, 0), (1, 1), (1, 2))
def add_button_clicked(self, obj): def add_button_clicked(self, obj):
from gramps.gui.editors import EditPersonRef from .. import EditPersonRef
try: try:
ref = PersonRef() ref = PersonRef()
ref.rel = _('Godfather') ref.rel = _('Godfather')
@ -99,7 +99,7 @@ class PersonRefEmbedList(EmbeddedList):
GObject.idle_add(self.tree.scroll_to_cell, len(data) - 1) GObject.idle_add(self.tree.scroll_to_cell, len(data) - 1)
def edit_button_clicked(self, obj): def edit_button_clicked(self, obj):
from gramps.gui.editors import EditPersonRef from .. import EditPersonRef
ref = self.get_selected() ref = self.get_selected()
if ref: if ref:
try: try:
@ -117,7 +117,7 @@ class PersonRefEmbedList(EmbeddedList):
And event reference that is from a drag and drop has And event reference that is from a drag and drop has
an unknown event reference type an unknown event reference type
""" """
from gramps.gui.editors import EditPersonRef from .. import EditPersonRef
try: try:
ref = PersonRef(obj) ref = PersonRef(obj)
ref.rel = _('Unknown') ref.rel = _('Unknown')

View File

@ -34,10 +34,10 @@ from gi.repository import GObject
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.lib import RepoRef, Repository from gramps.gen.lib import RepoRef, Repository
from gramps.gui.dbguielement import DbGUIElement from ...dbguielement import DbGUIElement
from gramps.gui.selectors import SelectorFactory from ...selectors import SelectorFactory
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gui.ddtargets import DdTargets from ...ddtargets import DdTargets
from reporefmodel import RepoRefModel from reporefmodel import RepoRefModel
from embeddedlist import EmbeddedList from embeddedlist import EmbeddedList
@ -100,7 +100,7 @@ class RepoEmbedList(EmbeddedList, DbGUIElement):
return ((1, 0), (1, 1), (1, 2), (1, 3)) return ((1, 0), (1, 1), (1, 2), (1, 3))
def handle_extra_type(self, objtype, obj): def handle_extra_type(self, objtype, obj):
from gramps.gui.editors import EditRepoRef from .. import EditRepoRef
try: try:
ref = RepoRef() ref = RepoRef()
repo = self.dbstate.db.get_repository_from_handle(obj) repo = self.dbstate.db.get_repository_from_handle(obj)
@ -111,7 +111,7 @@ class RepoEmbedList(EmbeddedList, DbGUIElement):
pass pass
def add_button_clicked(self, obj): def add_button_clicked(self, obj):
from gramps.gui.editors import EditRepoRef from .. import EditRepoRef
ref = RepoRef() ref = RepoRef()
repo = Repository() repo = Repository()
try: try:
@ -132,7 +132,7 @@ class RepoEmbedList(EmbeddedList, DbGUIElement):
repo = sel.run() repo = sel.run()
if repo: if repo:
try: try:
from gramps.gui.editors import EditRepoRef from .. import EditRepoRef
ref = RepoRef() ref = RepoRef()
EditRepoRef(self.dbstate, EditRepoRef(self.dbstate,
self.uistate, self.uistate,
@ -158,12 +158,12 @@ class RepoEmbedList(EmbeddedList, DbGUIElement):
if ref: if ref:
repo = self.dbstate.db.get_repository_from_handle(ref.ref) repo = self.dbstate.db.get_repository_from_handle(ref.ref)
try: try:
from gramps.gui.editors import EditRepoRef from .. import EditRepoRef
EditRepoRef( EditRepoRef(
self.dbstate, self.uistate, self.track, repo, self.dbstate, self.uistate, self.track, repo,
ref, self.edit_callback) ref, self.edit_callback)
except WindowActiveError: except WindowActiveError:
from gramps.gui.dialog import WarningDialog from ...dialog import WarningDialog
WarningDialog( WarningDialog(
_("Cannot edit this reference"), _("Cannot edit this reference"),
_("This repository reference cannot be edited at this " _("This repository reference cannot be edited at this "

View File

@ -48,7 +48,7 @@ _ENTER = Gdk.keyval_from_name("Enter")
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from surnamemodel import SurnameModel from surnamemodel import SurnameModel
from embeddedlist import EmbeddedList from embeddedlist import EmbeddedList
from gramps.gui.ddtargets import DdTargets from ...ddtargets import DdTargets
from gramps.gen.lib import Surname, NameOriginType from gramps.gen.lib import Surname, NameOriginType
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@ -36,7 +36,7 @@ from gi.repository import GObject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.lib import Url from gramps.gen.lib import Url
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gui.ddtargets import DdTargets from ...ddtargets import DdTargets
from webmodel import WebModel from webmodel import WebModel
from embeddedlist import EmbeddedList from embeddedlist import EmbeddedList
@ -82,7 +82,7 @@ class WebEmbedList(EmbeddedList):
return ((1, 0), (1, 1), (1, 2)) return ((1, 0), (1, 1), (1, 2))
def add_button_clicked(self, obj): def add_button_clicked(self, obj):
from gramps.gui.editors import EditUrl from .. import EditUrl
url = Url() url = Url()
try: try:
EditUrl(self.dbstate, self.uistate, self.track, 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) GObject.idle_add(self.tree.scroll_to_cell, len(data) - 1)
def edit_button_clicked(self, obj): def edit_button_clicked(self, obj):
from gramps.gui.editors import EditUrl from .. import EditUrl
url = self.get_selected() url = self.get_selected()
if url: if url:
try: try:
@ -118,7 +118,7 @@ class WebEmbedList(EmbeddedList):
] ]
def jump_button_clicked(self, obj): def jump_button_clicked(self, obj):
from gramps.gui.display import display_url from ...display import display_url
url = self.get_selected() url = self.get_selected()
if url.get_path(): if url.get_path():

View File

@ -49,9 +49,9 @@ from gi.repository import Gtk
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from editsecondary import EditSecondary from editsecondary import EditSecondary
from gramps.gen.lib import NoteType from gramps.gen.lib import NoteType
from gramps.gui.glade import Glade from ..glade import Glade
from displaytabs import CitationEmbedList, NoteTab from displaytabs import CitationEmbedList, NoteTab
from gramps.gui.widgets import MonitoredDate, MonitoredEntry, PrivacyButton from ..widgets import MonitoredDate, MonitoredEntry, PrivacyButton
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -48,9 +48,9 @@ from gi.repository import Gtk
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from editsecondary import EditSecondary from editsecondary import EditSecondary
from gramps.gen.lib import NoteType from gramps.gen.lib import NoteType
from gramps.gui.glade import Glade from ..glade import Glade
from displaytabs import CitationEmbedList, NoteTab 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() t = self.obj.get_type()
if t.is_custom() and str(t) == '': if t.is_custom() and str(t) == '':
from gramps.gui.dialog import ErrorDialog from ..dialog import ErrorDialog
ErrorDialog( ErrorDialog(
_("Cannot save attribute"), _("Cannot save attribute"),
_("The attribute type cannot be empty")) _("The attribute type cannot be empty"))

View File

@ -50,9 +50,9 @@ from gi.repository import Gtk
from editsecondary import EditSecondary from editsecondary import EditSecondary
from gramps.gen.lib import NoteType from gramps.gen.lib import NoteType
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gui.glade import Glade from ..glade import Glade
from displaytabs import CitationEmbedList, NoteTab 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 from gramps.gen.display.name import displayer as name_displayer
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@ -46,11 +46,11 @@ from editprimary import EditPrimary
from displaytabs import (NoteTab, GalleryTab, DataEmbedList, from displaytabs import (NoteTab, GalleryTab, DataEmbedList,
SourceBackRefList, RepoEmbedList, CitationBackRefList) SourceBackRefList, RepoEmbedList, CitationBackRefList)
from gramps.gui.widgets import (MonitoredEntry, PrivacyButton, MonitoredMenu, from ..widgets import (MonitoredEntry, PrivacyButton, MonitoredMenu,
MonitoredDate) MonitoredDate)
from gramps.gui.dialog import ErrorDialog from ..dialog import ErrorDialog
from editreference import RefTab 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 This class is called both to edit the Citation Primary object
and to edit references from other objects to citations. 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 and is called from CitationEmbedList for editing references
@param callertitle: Text passed by calling object to add to title @param callertitle: Text passed by calling object to add to title

View File

@ -65,9 +65,9 @@ from gramps.gen.ggettext import sgettext as _
from gramps.gen.lib.date import Date from gramps.gen.lib.date import Date
from gramps.gen.datehandler import displayer from gramps.gen.datehandler import displayer
from gramps.gen.const import URL_MANUAL_PAGE from gramps.gen.const import URL_MANUAL_PAGE
from gramps.gui.display import display_help from ..display import display_help
from gramps.gui.managedwindow import ManagedWindow from ..managedwindow import ManagedWindow
from gramps.gui.glade import Glade from ..glade import Glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -44,14 +44,14 @@ from gi.repository import Gtk
from gramps.gen.const import URL_MANUAL_PAGE from gramps.gen.const import URL_MANUAL_PAGE
from gramps.gen.lib import Event, NoteType from gramps.gen.lib import Event, NoteType
from gramps.gen.db import DbTxn from gramps.gen.db import DbTxn
from gramps.gui.display import display_help from ..display import display_help
from editprimary import EditPrimary from editprimary import EditPrimary
from objectentries import PlaceEntry from objectentries import PlaceEntry
from gramps.gui.glade import Glade from ..glade import Glade
from gramps.gui.dialog import ErrorDialog from ..dialog import ErrorDialog
from displaytabs import (CitationEmbedList, NoteTab, GalleryTab, from displaytabs import (CitationEmbedList, NoteTab, GalleryTab,
EventBackRefList, AttrEmbedList) EventBackRefList, AttrEmbedList)
from gramps.gui.widgets import (MonitoredEntry, PrivacyButton, from ..widgets import (MonitoredEntry, PrivacyButton,
MonitoredDataType, MonitoredDate) MonitoredDataType, MonitoredDate)
from gramps.gen.utils.db import get_participant_from_event from gramps.gen.utils.db import get_participant_from_event

View File

@ -37,10 +37,10 @@ from gramps.gen.ggettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.lib import EventType, NoteType from gramps.gen.lib import EventType, NoteType
from gramps.gen.db import DbTxn from gramps.gen.db import DbTxn
from gramps.gui.glade import Glade from ..glade import Glade
from displaytabs import (CitationEmbedList, NoteTab, GalleryTab, from displaytabs import (CitationEmbedList, NoteTab, GalleryTab,
EventBackRefList, AttrEmbedList) EventBackRefList, AttrEmbedList)
from gramps.gui.widgets import (PrivacyButton, MonitoredEntry, from ..widgets import (PrivacyButton, MonitoredEntry,
MonitoredDate, MonitoredDataType) MonitoredDate, MonitoredDataType)
from editreference import RefTab, EditReference from editreference import RefTab, EditReference

View File

@ -49,7 +49,7 @@ log = logging.getLogger(".")
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.ggettext import gettext as _ 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 Gtk
from gi.repository import Gdk from gi.repository import Gdk
from gi.repository import Pango 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.db import DbTxn
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gen.datehandler import displayer from gramps.gen.datehandler import displayer
from gramps.gui.glade import Glade from ..glade import Glade
from editprimary import EditPrimary from editprimary import EditPrimary
from editchildref import EditChildRef from editchildref import EditChildRef
@ -74,14 +74,14 @@ from editperson import EditPerson
from displaytabs import (EmbeddedList, EventEmbedList, CitationEmbedList, from displaytabs import (EmbeddedList, EventEmbedList, CitationEmbedList,
FamilyAttrEmbedList, NoteTab, GalleryTab, FamilyAttrEmbedList, NoteTab, GalleryTab,
FamilyLdsEmbedList, ChildModel) FamilyLdsEmbedList, ChildModel)
from gramps.gui.widgets import (PrivacyButton, MonitoredEntry, MonitoredDataType, from ..widgets import (PrivacyButton, MonitoredEntry, MonitoredDataType,
MonitoredTagList) MonitoredTagList)
from gramps.gen.plug import CATEGORY_QR_FAMILY from gramps.gen.plug import CATEGORY_QR_FAMILY
from gramps.gui.dialog import (ErrorDialog, RunDatabaseRepair, WarningDialog, from ..dialog import (ErrorDialog, RunDatabaseRepair, WarningDialog,
MessageHideDialog) MessageHideDialog)
from gramps.gen.utils.db import (get_birth_or_fallback, get_death_or_fallback, from gramps.gen.utils.db import (get_birth_or_fallback, get_death_or_fallback,
get_marriage_or_fallback, preset_name, family_name) 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 from gramps.gen.utils.id import create_id
SelectPerson = SelectorFactory('Person') SelectPerson = SelectorFactory('Person')

View File

@ -48,13 +48,13 @@ from gi.repository import Gtk
from gramps.gen.lib import LdsOrd, NoteType from gramps.gen.lib import LdsOrd, NoteType
from gramps.gen.display.name import displayer as name_displayer from gramps.gen.display.name import displayer as name_displayer
from gramps.gen.utils.lds import TEMPLES from gramps.gen.utils.lds import TEMPLES
from gramps.gui.glade import Glade from ..glade import Glade
from editsecondary import EditSecondary from editsecondary import EditSecondary
from objectentries import PlaceEntry from objectentries import PlaceEntry
from displaytabs import CitationEmbedList,NoteTab from displaytabs import CitationEmbedList,NoteTab
from gramps.gui.widgets import (PrivacyButton, MonitoredDate, from ..widgets import (PrivacyButton, MonitoredDate,
MonitoredMenu, MonitoredStrMenu) MonitoredMenu, MonitoredStrMenu)
from gramps.gui.selectors import SelectorFactory from ..selectors import SelectorFactory
_DATA_MAP = { _DATA_MAP = {
LdsOrd.BAPTISM : [ LdsOrd.BAPTISM : [

View File

@ -34,9 +34,9 @@ import re
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.ggettext import gettext as _ from gramps.gen.ggettext import gettext as _
from gramps.gui.managedwindow import ManagedWindow from ..managedwindow import ManagedWindow
from gramps.gui.display import display_help from ..display import display_help
from gramps.gui.glade import Glade from ..glade import Glade
from gramps.gen.simple import SimpleAccess from gramps.gen.simple import SimpleAccess
WEB, EVENT, FAMILY, MEDIA, NOTE, PERSON, PLACE, REPOSITORY, SOURCE = range(9) WEB, EVENT, FAMILY, MEDIA, NOTE, PERSON, PLACE, REPOSITORY, SOURCE = range(9)
@ -146,7 +146,7 @@ class EditLink(ManagedWindow):
(object_class, "handle", obj.handle)) (object_class, "handle", obj.handle))
def _on_new(self, widget): def _on_new(self, widget):
from gramps.gui.editors import EditObject from ..editors import EditObject
object_class = OBJECT_MAP[self.uri_list.get_active()] object_class = OBJECT_MAP[self.uri_list.get_active()]
EditObject(self.dbstate, EditObject(self.dbstate,
self.uistate, self.uistate,
@ -155,7 +155,7 @@ class EditLink(ManagedWindow):
callback=self._on_new_callback) callback=self._on_new_callback)
def _on_edit_one(self, widget): def _on_edit_one(self, widget):
from gramps.gui.editors import EditObject from ..editors import EditObject
uri = self.url_link.get_text() uri = self.url_link.get_text()
if uri.startswith("gramps://"): if uri.startswith("gramps://"):
obj_class, prop, value = uri[9:].split("/", 2) obj_class, prop, value = uri[9:].split("/", 2)
@ -165,7 +165,7 @@ class EditLink(ManagedWindow):
obj_class, prop, value) obj_class, prop, value)
def _on_pick_one(self, widget): 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()] object_class = OBJECT_MAP[self.uri_list.get_active()]
Select = SelectorFactory(object_class) Select = SelectorFactory(object_class)
uri = self.url_link.get_text() uri = self.url_link.get_text()

View File

@ -28,8 +28,8 @@
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from editsecondary import EditSecondary from editsecondary import EditSecondary
from gramps.gui.glade import Glade from ..glade import Glade
from gramps.gui.widgets import MonitoredEntry from ..widgets import MonitoredEntry
from gramps.gen.ggettext import gettext as _ from gramps.gen.ggettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@ -43,21 +43,21 @@ from gi.repository import Gdk
# gramps modules # 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.lib import MediaObject, NoteType
from gramps.gen.db import DbTxn from gramps.gen.db import DbTxn
from gramps.gen.mime import get_description, get_type 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, from gramps.gen.utils.file import (media_path_full, find_file,
get_unicode_path_from_file_chooser) get_unicode_path_from_file_chooser)
from editprimary import EditPrimary from editprimary import EditPrimary
from gramps.gui.widgets import (MonitoredDate, MonitoredEntry, PrivacyButton, from ..widgets import (MonitoredDate, MonitoredEntry, PrivacyButton,
MonitoredTagList) MonitoredTagList)
from displaytabs import (CitationEmbedList, AttrEmbedList, NoteTab, from displaytabs import (CitationEmbedList, AttrEmbedList, NoteTab,
MediaBackRefList) MediaBackRefList)
from addmedia import AddMediaObject from addmedia import AddMediaObject
from gramps.gui.dialog import ErrorDialog from ..dialog import ErrorDialog
from gramps.gui.glade import Glade from ..glade import Glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -44,18 +44,18 @@ from gi.repository import Gdk
# gramps modules # 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.const import THUMBSCALE
from gramps.gen.mime import get_description, get_type 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, from gramps.gen.utils.file import (media_path_full, find_file,
get_unicode_path_from_file_chooser) get_unicode_path_from_file_chooser)
from gramps.gen.lib import NoteType from gramps.gen.lib import NoteType
from gramps.gen.db import DbTxn from gramps.gen.db import DbTxn
from gramps.gui.glade import Glade from ..glade import Glade
from displaytabs import (CitationEmbedList, AttrEmbedList, MediaBackRefList, from displaytabs import (CitationEmbedList, AttrEmbedList, MediaBackRefList,
NoteTab) NoteTab)
from gramps.gui.widgets import (MonitoredSpinButton, MonitoredEntry, PrivacyButton, from ..widgets import (MonitoredSpinButton, MonitoredEntry, PrivacyButton,
MonitoredDate, MonitoredTagList) MonitoredDate, MonitoredTagList)
from editreference import RefTab, EditReference from editreference import RefTab, EditReference
from addmedia import AddMediaObject from addmedia import AddMediaObject

View File

@ -50,9 +50,9 @@ from gramps.gen.display.name import displayer as name_displayer
from editsecondary import EditSecondary from editsecondary import EditSecondary
from gramps.gen.lib import NoteType from gramps.gen.lib import NoteType
from displaytabs import GrampsTab, CitationEmbedList, NoteTab, SurnameTab from displaytabs import GrampsTab, CitationEmbedList, NoteTab, SurnameTab
from gramps.gui.widgets import (MonitoredEntry, MonitoredMenu, MonitoredDate, from ..widgets import (MonitoredEntry, MonitoredMenu, MonitoredDate,
MonitoredDataType, PrivacyButton) MonitoredDataType, PrivacyButton)
from gramps.gui.glade import Glade from ..glade import Glade
from gramps.gen.errors import ValidationError from gramps.gen.errors import ValidationError
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -370,7 +370,7 @@ class EditName(EditSecondary):
#user wants to group with surname #user wants to group with surname
if self.global_group_set and not self.original_group_set : if self.global_group_set and not self.original_group_set :
#warn that group will revert to surname #warn that group will revert to surname
from gramps.gui.dialog import QuestionDialog2 from ..dialog import QuestionDialog2
q = QuestionDialog2( q = QuestionDialog2(
_("Break global name grouping?"), _("Break global name grouping?"),
_("All people with the name of %(surname)s will no longer " _("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, #if changed, ask if this has to happen for the entire group,
#this might be creation of group link, or change of group link #this might be creation of group link, or change of group link
if self.global_group_as != group_as: if self.global_group_as != group_as:
from gramps.gui.dialog import QuestionDialog2 from ..dialog import QuestionDialog2
q = QuestionDialog2( q = QuestionDialog2(
_("Group all people with the same name?"), _("Group all people with the same name?"),

View File

@ -50,12 +50,12 @@ from gi.repository import Pango
from gramps.gen.config import config from gramps.gen.config import config
from editprimary import EditPrimary from editprimary import EditPrimary
from displaytabs import GrampsTab, NoteBackRefList from displaytabs import GrampsTab, NoteBackRefList
from gramps.gui.widgets import (MonitoredDataType, MonitoredCheckbox, from ..widgets import (MonitoredDataType, MonitoredCheckbox,
MonitoredEntry, PrivacyButton, MonitoredTagList) MonitoredEntry, PrivacyButton, MonitoredTagList)
from gramps.gen.lib import Note from gramps.gen.lib import Note
from gramps.gen.db import DbTxn from gramps.gen.db import DbTxn
from gramps.gui.dialog import ErrorDialog from ..dialog import ErrorDialog
from gramps.gui.glade import Glade from ..glade import Glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -51,22 +51,22 @@ from gi.repository import Pango
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.utils.file import media_path_full from gramps.gen.utils.file import media_path_full
from gramps.gui.thumbnails import get_thumbnail_image from ..thumbnails import get_thumbnail_image
from gramps.gui.utils import is_right_click, open_file_with_default_application from ..utils import is_right_click, open_file_with_default_application
from gramps.gen.utils.db import get_birth_or_fallback from gramps.gen.utils.db import get_birth_or_fallback
from gramps.gen.lib import NoteType, Person, Surname from gramps.gen.lib import NoteType, Person, Surname
from gramps.gen.db import DbTxn 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.display.name import displayer as name_displayer
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gui.glade import Glade from ..glade import Glade
from gramps.gui.widgets.menuitem import add_menuitem from ..widgets.menuitem import add_menuitem
from editprimary import EditPrimary from editprimary import EditPrimary
from editmediaref import EditMediaRef from editmediaref import EditMediaRef
from editname import EditName from editname import EditName
from gramps.gen.config import config 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 gramps.gen.errors import ValidationError
from displaytabs import (PersonEventEmbedList, NameEmbedList, CitationEmbedList, from displaytabs import (PersonEventEmbedList, NameEmbedList, CitationEmbedList,
@ -928,7 +928,7 @@ class EditPerson(EditPrimary):
obj = self.dbstate.db.get_object_from_handle(handle) obj = self.dbstate.db.get_object_from_handle(handle)
if obj is None : if obj is None :
#notify user of error #notify user of error
from gramps.gui.dialog import RunDatabaseRepair from ..dialog import RunDatabaseRepair
RunDatabaseRepair( RunDatabaseRepair(
_('Non existing media found in the Gallery')) _('Non existing media found in the Gallery'))
else : else :

View File

@ -49,10 +49,10 @@ from gi.repository import Gtk
from gramps.gen.display.name import displayer as name_displayer from gramps.gen.display.name import displayer as name_displayer
from editsecondary import EditSecondary from editsecondary import EditSecondary
from gramps.gen.lib import NoteType from gramps.gen.lib import NoteType
from gramps.gui.widgets import MonitoredEntry, PrivacyButton from ..widgets import MonitoredEntry, PrivacyButton
from gramps.gui.selectors import SelectorFactory from ..selectors import SelectorFactory
from displaytabs import CitationEmbedList, NoteTab 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.callback = None
self.close() self.close()
else: else:
from gramps.gui.dialog import ErrorDialog from ..dialog import ErrorDialog
ErrorDialog( ErrorDialog(
_('No person selected'), _('No person selected'),

View File

@ -49,11 +49,11 @@ from gramps.gen.db import DbTxn
from editprimary import EditPrimary from editprimary import EditPrimary
from displaytabs import (GrampsTab, LocationEmbedList, CitationEmbedList, from displaytabs import (GrampsTab, LocationEmbedList, CitationEmbedList,
GalleryTab, NoteTab, WebEmbedList, PlaceBackRefList) 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.errors import ValidationError
from gramps.gen.utils.place import conv_lat_lon from gramps.gen.utils.place import conv_lat_lon
from gramps.gui.dialog import ErrorDialog from ..dialog import ErrorDialog
from gramps.gui.glade import Glade from ..glade import Glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -40,15 +40,15 @@ from gi.repository import Gtk
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.managedwindow import ManagedWindow from ..managedwindow import ManagedWindow
from gramps.gen.datehandler import displayer, parser from gramps.gen.datehandler import displayer, parser
from gramps.gen.display.name import displayer as name_displayer from gramps.gen.display.name import displayer as name_displayer
from gramps.gen.config import config from gramps.gen.config import config
from gramps.gui.utils import is_right_click from ..utils import is_right_click
from gramps.gui.display import display_help from ..display import display_help
from gramps.gui.dialog import SaveDialog from ..dialog import SaveDialog
from gramps.gen.lib import PrimaryObject from gramps.gen.lib import PrimaryObject
from gramps.gui.dbguielement import DbGUIElement from ..dbguielement import DbGUIElement
class EditPrimary(ManagedWindow, DbGUIElement): class EditPrimary(ManagedWindow, DbGUIElement):
@ -303,7 +303,7 @@ class EditPrimary(ManagedWindow, DbGUIElement):
""" """
Create actions and ui of context menu 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() self.popupmanager = Gtk.UIManager()
#add custom actions #add custom actions

View File

@ -33,10 +33,10 @@ from gi.repository import Gtk
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.managedwindow import ManagedWindow from ..managedwindow import ManagedWindow
from displaytabs import GrampsTab from displaytabs import GrampsTab
from gramps.gen.config import config 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() self.close()
def define_help_button(self, button, webpage='', section=''): 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, button.connect('clicked', lambda x: display_help(webpage,
section)) section))
button.set_sensitive(True) button.set_sensitive(True)

View File

@ -37,9 +37,9 @@ from gramps.gen.lib import NoteType
from gramps.gen.db import DbTxn from gramps.gen.db import DbTxn
from displaytabs import NoteTab,AddrEmbedList,WebEmbedList,SourceBackRefList 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 editreference import RefTab, EditReference
from gramps.gui.glade import Glade from ..glade import Glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -43,11 +43,11 @@ from gi.repository import Gtk
from gramps.gen.lib import NoteType, Repository from gramps.gen.lib import NoteType, Repository
from gramps.gen.db import DbTxn 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 displaytabs import AddrEmbedList, WebEmbedList, NoteTab, SourceBackRefList
from editprimary import EditPrimary from editprimary import EditPrimary
from gramps.gui.dialog import ErrorDialog from ..dialog import ErrorDialog
from gramps.gui.glade import Glade from ..glade import Glade
class EditRepository(EditPrimary): class EditRepository(EditPrimary):

View File

@ -21,10 +21,10 @@
# $Id$ # $Id$
from gramps.gui.managedwindow import ManagedWindow from ..managedwindow import ManagedWindow
from gramps.gui.display import display_help from ..display import display_help
from gramps.gen.config import config from gramps.gen.config import config
from gramps.gui.dbguielement import DbGUIElement from ..dbguielement import DbGUIElement
class EditSecondary(ManagedWindow, DbGUIElement): class EditSecondary(ManagedWindow, DbGUIElement):

View File

@ -50,9 +50,9 @@ from editprimary import EditPrimary
from displaytabs import (NoteTab, GalleryTab, DataEmbedList, from displaytabs import (NoteTab, GalleryTab, DataEmbedList,
CitationBackRefList, RepoEmbedList) CitationBackRefList, RepoEmbedList)
from gramps.gui.widgets import MonitoredEntry, PrivacyButton from ..widgets import MonitoredEntry, PrivacyButton
from gramps.gui.dialog import ErrorDialog from ..dialog import ErrorDialog
from gramps.gui.glade import Glade from ..glade import Glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -34,10 +34,10 @@ from gi.repository import Gtk
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.ggettext import sgettext as _ 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.gen.const import URL_MANUAL_PAGE
from gramps.gui.display import display_help from ..display import display_help
from gramps.gui.listmodel import ListModel, TOGGLE from ..listmodel import ListModel, TOGGLE
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -34,8 +34,8 @@ from gramps.gen.ggettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from editsecondary import EditSecondary from editsecondary import EditSecondary
from gramps.gui.widgets import MonitoredEntry, PrivacyButton, MonitoredDataType from ..widgets import MonitoredEntry, PrivacyButton, MonitoredDataType
from gramps.gui.glade import Glade from ..glade import Glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -68,7 +68,7 @@ class EditUrl(EditSecondary):
def jump_to(self, obj): def jump_to(self, obj):
if self.obj.get_path(): if self.obj.get_path():
from gramps.gui.display import display_url from ..display import display_url
display_url(self.obj.get_path()) display_url(self.obj.get_path())
def _setup_fields(self): def _setup_fields(self):

View File

@ -57,17 +57,17 @@ from gi.repository import GObject
from gramps.gen.filters import (GenericFilterFactory, FilterList, from gramps.gen.filters import (GenericFilterFactory, FilterList,
reload_custom_filters) reload_custom_filters)
from gramps.gen.filters.rules._matchesfilterbase import MatchesFilterBase from gramps.gen.filters.rules._matchesfilterbase import MatchesFilterBase
from gramps.gui.listmodel import ListModel from ..listmodel import ListModel
from gramps.gui.managedwindow import ManagedWindow from ..managedwindow import ManagedWindow
from gramps.gui.dialog import QuestionDialog from ..dialog import QuestionDialog
from gramps.gen.const import RULE_GLADE, URL_MANUAL_PAGE 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.errors import WindowActiveError
from gramps.gen.ggettext import sgettext as _ from gramps.gen.ggettext import sgettext as _
from gramps.gen.lib import AttributeType, EventType, FamilyRelType, NameOriginType, NameType, NoteType from gramps.gen.lib import AttributeType, EventType, FamilyRelType, NameOriginType, NameType, NoteType
from gramps.gen.filters import rules from gramps.gen.filters import rules
from gramps.gui.autocomp import StandardCustomSelector, fill_entry from ..autocomp import StandardCustomSelector, fill_entry
from gramps.gui.selectors import SelectorFactory from ..selectors import SelectorFactory
from gramps.gen.display.name import displayer as _nd from gramps.gen.display.name import displayer as _nd
from gramps.gen.utils.db import family_name from gramps.gen.utils.db import family_name
from gramps.gen.utils.string import confidence from gramps.gen.utils.string import confidence

View File

@ -49,8 +49,8 @@ from gramps.gen.lib import (Place, MediaObject, Note)
from editplace import EditPlace from editplace import EditPlace
from editmedia import EditMedia from editmedia import EditMedia
from editnote import EditNote from editnote import EditNote
from gramps.gui.selectors import SelectorFactory from ..selectors import SelectorFactory
from gramps.gui.ddtargets import DdTargets from ..ddtargets import DdTargets
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
#------------------------------------------------------------------------- #-------------------------------------------------------------------------