diff --git a/gramps/gui/plug/_dialogs.py b/gramps/gui/plug/_dialogs.py index 1286afa2a..b3b4ed956 100644 --- a/gramps/gui/plug/_dialogs.py +++ b/gramps/gui/plug/_dialogs.py @@ -43,11 +43,11 @@ from collections import defaultdict #------------------------------------------------------------------------- from gramps.gen.const import PLUGINS_GLADE from gramps.gen.plug.report._constants import standalone_categories -from gramps.gui.plug import tool +from . import tool from gramps.gen.plug import REPORT -from gramps.gui.plug.report import report -from gramps.gui.pluginmanager import GuiPluginManager -from gramps.gui.managedwindow import ManagedWindow +from .report import report +from ..pluginmanager import GuiPluginManager +from ..managedwindow import ManagedWindow #------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/_guioptions.py b/gramps/gui/plug/_guioptions.py index 4d307ffc7..02b6ca70e 100644 --- a/gramps/gui/plug/_guioptions.py +++ b/gramps/gui/plug/_guioptions.py @@ -52,12 +52,12 @@ from gi.repository import GObject # #------------------------------------------------------------------------- from gramps.gen.utils.file import get_unicode_path_from_file_chooser -from gramps.gui.utils import ProgressMeter -from gramps.gui.pluginmanager import GuiPluginManager -from gramps.gui import widgets -from gramps.gui.managedwindow import ManagedWindow -from gramps.gui.dialog import OptionDialog -from gramps.gui.selectors import SelectorFactory +from ..utils import ProgressMeter +from ..pluginmanager import GuiPluginManager +from .. import widgets +from ..managedwindow import ManagedWindow +from ..dialog import OptionDialog +from ..selectors import SelectorFactory from gramps.gen.display.name import displayer as _nd from gramps.gen.filters import GenericFilterFactory, GenericFilter, rules diff --git a/gramps/gui/plug/_windows.py b/gramps/gui/plug/_windows.py index b4543ee17..af918acb2 100644 --- a/gramps/gui/plug/_windows.py +++ b/gramps/gui/plug/_windows.py @@ -47,16 +47,16 @@ from gi.repository import GObject # GRAMPS modules # #------------------------------------------------------------------------- -from gramps.gui.managedwindow import ManagedWindow +from ..managedwindow import ManagedWindow from gramps.gen.errors import UnavailableError, WindowActiveError from gramps.gen.plug import PluginRegister, PTYPE_STR, load_addon_file from gramps.gen.ggettext import gettext as _ -from gramps.gui.utils import open_file_with_default_application -from gramps.gui.pluginmanager import GuiPluginManager +from ..utils import open_file_with_default_application +from ..pluginmanager import GuiPluginManager import tool from _guioptions import add_gui_options -from gramps.gui.dialog import InfoDialog -from gramps.gui.editors import EditPerson +from ..dialog import InfoDialog +from ..editors import EditPerson from gramps.gen.utils.file import get_unicode_path_from_file_chooser from gramps.gen.const import URL_WIKISTRING, USER_HOME, WIKI_EXTRAPLUGINS_RAWDATA from gramps.gen.config import config diff --git a/gramps/gui/plug/export/_exportassistant.py b/gramps/gui/plug/export/_exportassistant.py index 376ead178..58ecba2f4 100644 --- a/gramps/gui/plug/export/_exportassistant.py +++ b/gramps/gui/plug/export/_exportassistant.py @@ -60,12 +60,12 @@ from gi.repository import GdkPixbuf from gramps.gen.const import USER_HOME, ICON, SPLASH from gramps.gen.config import config -from gramps.gui.pluginmanager import GuiPluginManager +from ...pluginmanager import GuiPluginManager from gramps.gen.utils.file import (find_folder, get_new_filename, get_unicode_path_from_file_chooser) -from gramps.gui.managedwindow import ManagedWindow -from gramps.gui.dialog import ErrorDialog -from gramps.gui.user import User +from ...managedwindow import ManagedWindow +from ...dialog import ErrorDialog +from ...user import User #------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/export/_exportoptions.py b/gramps/gui/plug/export/_exportoptions.py index 822f370ef..fb569aae6 100644 --- a/gramps/gui/plug/export/_exportoptions.py +++ b/gramps/gui/plug/export/_exportoptions.py @@ -40,7 +40,7 @@ from gramps.gen.ggettext import ngettext from gramps.gen.config import config from gramps.gen.display.name import displayer as name_displayer from gramps.gen.filters import GenericFilter, rules -from gramps.gui.utils import ProgressMeter +from ...utils import ProgressMeter from gramps.gen.proxy import (PrivateProxyDb, LivingProxyDb, FilterProxyDb, @@ -221,7 +221,7 @@ class WriterOptionBox(object): def show_preview_data(self, widget): from gramps.gen.dbstate import DbState - from gramps.gui.plug.quick import run_quick_report_by_name + from ..quick import run_quick_report_by_name if widget.proxy_name == "unfiltered": dbstate = self.dbstate else: @@ -249,7 +249,7 @@ class WriterOptionBox(object): """ # Make a box and put the option in it: from gi.repository import Gtk - from gramps.gui.widgets import SimpleButton + from ...widgets import SimpleButton button = Gtk.Button(ngettext("%d Person", "%d People", 0) % 0) button.set_size_request(107, -1) button.connect("clicked", self.show_preview_data) @@ -622,7 +622,7 @@ class WriterOptionBox(object): Callback which invokes the EditFilter dialog. Will create new filter if called if none is selected. """ - from gramps.gui.editors import EditFilter + from ...editors import EditFilter from gramps.gen.filters import FilterList, GenericFilterFactory from gramps.gen.const import CUSTOM_FILTERS the_filter = None @@ -644,7 +644,7 @@ class WriterOptionBox(object): the_filter, filterdb, lambda : self.edit_filter_save(filterdb, namespace)) else: # can't edit this filter - from gramps.gui.dialog import ErrorDialog + from ...dialog import ErrorDialog ErrorDialog(_("Cannot edit a system filter"), _("Please select a different filter to edit")) diff --git a/gramps/gui/plug/quick/_quickreports.py b/gramps/gui/plug/quick/_quickreports.py index 6bda392ad..5d4e1c716 100644 --- a/gramps/gui/plug/quick/_quickreports.py +++ b/gramps/gui/plug/quick/_quickreports.py @@ -54,7 +54,7 @@ from gi.repository import Gtk # GRAMPS modules # #------------------------------------------------------------------------- -from gramps.gui.pluginmanager import GuiPluginManager +from ...pluginmanager import GuiPluginManager from gramps.gen.plug import (CATEGORY_QR_PERSON, CATEGORY_QR_FAMILY, CATEGORY_QR_MEDIA, CATEGORY_QR_EVENT, CATEGORY_QR_SOURCE, CATEGORY_QR_MISC, CATEGORY_QR_PLACE, CATEGORY_QR_REPOSITORY, diff --git a/gramps/gui/plug/quick/_quicktable.py b/gramps/gui/plug/quick/_quicktable.py index 92a05c061..cf71eed46 100644 --- a/gramps/gui/plug/quick/_quicktable.py +++ b/gramps/gui/plug/quick/_quicktable.py @@ -50,10 +50,10 @@ from gramps.gen.ggettext import sgettext as _ from gramps.gen.simple import SimpleTable from gramps.gen.utils.trans import trans_objclass from gramps.gen.errors import WindowActiveError -from gramps.gui.widgets.multitreeview import MultiTreeView -from gramps.gui.ddtargets import DdTargets -from gramps.gui.plug.quick import run_quick_report_by_name -from gramps.gui.editors import (EditPerson, EditEvent, EditFamily, EditCitation, +from ...widgets.multitreeview import MultiTreeView +from ...ddtargets import DdTargets +from ..quick import run_quick_report_by_name +from ...editors import (EditPerson, EditEvent, EditFamily, EditCitation, EditSource, EditPlace, EditRepository, EditNote, EditMedia) diff --git a/gramps/gui/plug/quick/_textbufdoc.py b/gramps/gui/plug/quick/_textbufdoc.py index 8ad0c99c8..a99b4c9db 100644 --- a/gramps/gui/plug/quick/_textbufdoc.py +++ b/gramps/gui/plug/quick/_textbufdoc.py @@ -38,7 +38,7 @@ from gi.repository import Pango, PangoCairo from gramps.gen.plug.docgen import (BaseDoc, TextDoc, FONT_SERIF, PARA_ALIGN_RIGHT, FONT_SANS_SERIF, FONT_MONOSPACE, PARA_ALIGN_CENTER, PARA_ALIGN_LEFT) -from gramps.gui.managedwindow import ManagedWindow +from ...managedwindow import ManagedWindow RESOLUTION = PangoCairo.font_map_get_default().get_resolution() diff --git a/gramps/gui/plug/report/_docreportdialog.py b/gramps/gui/plug/report/_docreportdialog.py index f4868597e..3edff3cb8 100644 --- a/gramps/gui/plug/report/_docreportdialog.py +++ b/gramps/gui/plug/report/_docreportdialog.py @@ -45,7 +45,7 @@ from gi.repository import Gtk from gramps.gen.config import config from _reportdialog import ReportDialog from _papermenu import PaperFrame -from gramps.gui.pluginmanager import GuiPluginManager +from ...pluginmanager import GuiPluginManager PLUGMAN = GuiPluginManager.get_instance() #------------------------------------------------------------------------- diff --git a/gramps/gui/plug/report/_drawreportdialog.py b/gramps/gui/plug/report/_drawreportdialog.py index f900d124e..07d978ba7 100644 --- a/gramps/gui/plug/report/_drawreportdialog.py +++ b/gramps/gui/plug/report/_drawreportdialog.py @@ -36,7 +36,7 @@ from gi.repository import GObject #------------------------------------------------------------------------- from gramps.gen.plug.report._constants import CATEGORY_DRAW from _docreportdialog import DocReportDialog -from gramps.gui.pluginmanager import GuiPluginManager +from ...pluginmanager import GuiPluginManager #------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/report/_papermenu.py b/gramps/gui/plug/report/_papermenu.py index c6dba6419..99df6dfa6 100644 --- a/gramps/gui/plug/report/_papermenu.py +++ b/gramps/gui/plug/report/_papermenu.py @@ -43,7 +43,7 @@ from gi.repository import GObject #------------------------------------------------------------------------- from gramps.gen.plug.docgen import PaperStyle, PAPER_PORTRAIT, PAPER_LANDSCAPE from gramps.gen.plug.report._paper import paper_sizes -from gramps.gui.glade import Glade +from ...glade import Glade #------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/report/_reportdialog.py b/gramps/gui/plug/report/_reportdialog.py index 6f499c16a..a6af41f01 100644 --- a/gramps/gui/plug/report/_reportdialog.py +++ b/gramps/gui/plug/report/_reportdialog.py @@ -51,15 +51,15 @@ from gi.repository import Gtk from gramps.gen.ggettext import gettext as _ from gramps.gen.config import config from gramps.gen.errors import DatabaseError, FilterError, ReportError, WindowActiveError -from gramps.gui.utils import open_file_with_default_application -from gramps.gui.plug import add_gui_options -from gramps.gui.user import User -from gramps.gui.dialog import ErrorDialog, OptionDialog +from ...utils import open_file_with_default_application +from .. import add_gui_options +from ...user import User +from ...dialog import ErrorDialog, OptionDialog from gramps.gen.plug.report import (CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK, CATEGORY_CODE, CATEGORY_WEB, CATEGORY_GRAPHVIZ, standalone_categories) from gramps.gen.plug.docgen import StyleSheet, StyleSheetList -from gramps.gui.managedwindow import ManagedWindow +from ...managedwindow import ManagedWindow from _stylecombobox import StyleComboBox from _styleeditor import StyleListDisplay from _fileentry import FileEntry @@ -562,7 +562,7 @@ class ReportDialog(ManagedWindow): pass def on_help_clicked(self, *obj): - from gramps.gui.display import display_help + from ...display import display_help display_help(URL_REPORT_PAGE, self.report_name.replace(" ", "_")) def on_style_edit_clicked(self, *obj): diff --git a/gramps/gui/plug/report/_styleeditor.py b/gramps/gui/plug/report/_styleeditor.py index 092e49390..9a838ff79 100644 --- a/gramps/gui/plug/report/_styleeditor.py +++ b/gramps/gui/plug/report/_styleeditor.py @@ -53,9 +53,9 @@ from gi.repository import Gdk from gramps.gen.plug.docgen import (StyleSheet, FONT_SERIF, FONT_SANS_SERIF, PARA_ALIGN_RIGHT, PARA_ALIGN_CENTER, PARA_ALIGN_LEFT, PARA_ALIGN_JUSTIFY) -from gramps.gui.listmodel import ListModel -from gramps.gui.managedwindow import set_titles -from gramps.gui.glade import Glade +from ...listmodel import ListModel +from ...managedwindow import set_titles +from ...glade import Glade #------------------------------------------------------------------------ # @@ -134,7 +134,7 @@ class StyleListDisplay(object): try: self.sheetlist.save() except IOError, msg: - from gramps.gui.dialog import ErrorDialog + from ...dialog import ErrorDialog ErrorDialog(_("Error saving stylesheet"), str(msg)) except: log.error("Failed to save stylesheet", exc_info=True) diff --git a/gramps/gui/plug/report/_textreportdialog.py b/gramps/gui/plug/report/_textreportdialog.py index ce461cd33..45574a2b4 100644 --- a/gramps/gui/plug/report/_textreportdialog.py +++ b/gramps/gui/plug/report/_textreportdialog.py @@ -35,7 +35,7 @@ from gi.repository import GObject # GRAMPS modules # #------------------------------------------------------------------------- -from gramps.gui.pluginmanager import GuiPluginManager +from ...pluginmanager import GuiPluginManager from gramps.gen.plug.report._constants import CATEGORY_TEXT from _docreportdialog import DocReportDialog diff --git a/gramps/gui/plug/tool.py b/gramps/gui/plug/tool.py index 540b385e6..5822c233f 100644 --- a/gramps/gui/plug/tool.py +++ b/gramps/gui/plug/tool.py @@ -74,7 +74,7 @@ class Tool(object): """ def __init__(self, dbstate, options_class, name): - from gramps.gui.plug import MenuToolOptions + from . import MenuToolOptions self.db = dbstate.db try: if issubclass(options_class, MenuToolOptions): @@ -105,7 +105,7 @@ class BatchTool(Tool): def __init__(self, dbstate, options_class, name): # TODO: should we replace this with a callback? - from gramps.gui.dialog import QuestionDialog2 + from ..dialog import QuestionDialog2 warn_dialog = QuestionDialog2( _('Undo history warning'), _('Proceeding with this tool will erase the undo history ' @@ -134,7 +134,7 @@ class ActivePersonTool(Tool): if not uistate.get_active('Person'): # TODO: should we replace this with a callback? - from gramps.gui.dialog import ErrorDialog + from ..dialog import ErrorDialog ErrorDialog(_('Active person has not been set'), _('You must select an active person for this '