Convert some gui imports from absolute to relative

This commit is contained in:
Nick Hall 2017-02-22 17:16:04 +00:00
parent 0c144c97a9
commit b3509ad3f4
18 changed files with 20 additions and 20 deletions

View File

@ -52,7 +52,7 @@ from gi.repository import Pango
# gramps modules
#
#-------------------------------------------------------------------------
from gramps.gui.display import display_help
from .display import display_help
from gramps.gen.const import URL_WIKISTRING, URL_MANUAL_PAGE
from .user import User
from .dialog import ErrorDialog, QuestionDialog, QuestionDialog2, ICON
@ -65,7 +65,7 @@ from .glade import Glade
from gramps.gen.db.exceptions import DbException
from gramps.gen.db.utils import make_database, open_database
from gramps.gen.config import config
from gramps.gui.listmodel import ListModel
from .listmodel import ListModel
from gramps.gen.constfunc import win
from gramps.gen.plug import BasePluginManager
from gramps.gen.const import GRAMPS_LOCALE as glocale

View File

@ -45,7 +45,8 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
from gramps.gen.const import ICON, URL_BUGHOME
from gramps.gen.config import config
from gramps.gui.glade import Glade
from .glade import Glade
from .display import display_url
try:
ICON = GdkPixbuf.Pixbuf.new_from_file(ICON)
@ -119,7 +120,6 @@ class QuestionDialog:
if response == Gtk.ResponseType.ACCEPT:
task()
from gramps.gui.display import display_url
def on_activate_link(label, uri):
# see aboutdialog.py _show_url()
display_url(uri)

View File

@ -35,7 +35,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
from gramps.gen.const import URL_MANUAL_PAGE, URL_WIKISTRING
from gramps.gen.constfunc import is_quartz
from gramps.gen.config import config
from gramps.gui.utils import open_file_with_default_application as run_file
from .utils import open_file_with_default_application as run_file
#list of manuals on wiki, map locale code to wiki extension, add language codes
#completely, or first part, so pt_BR if Brazilian portugeze wiki manual, and

View File

@ -37,7 +37,7 @@ from gramps.gen.lib import (Person, Family, Event, Source, Place, Citation,
from gramps.cli.user import User
from gramps.gen.dbstate import DbState
from gramps.gen.db.utils import make_database
from gramps.gui.editors.editreference import EditReference
from ..editreference import EditReference
class MockWindow:
def set_transient_for(self, *args, **kwargs):

View File

@ -480,7 +480,7 @@ class ListModel:
"""
Called when a button press is executed
"""
from gramps.gui.utils import is_right_click
from .utils import is_right_click
if event.type == Gdk.EventType._2BUTTON_PRESS and event.button == 1:
if self.double_click:
self.double_click(obj)

View File

@ -48,7 +48,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
from gramps.gen.simple import SimpleTable
from gramps.gen.errors import WindowActiveError
from gramps.gui.utils import model_to_text, text_to_clipboard
from ...utils import model_to_text, text_to_clipboard
from ...widgets.multitreeview import MultiTreeView
from ...ddtargets import DdTargets
from ..quick import run_quick_report_by_name

View File

@ -382,7 +382,7 @@ class ReportDialog(ManagedWindow):
row += 1
def setup_other_frames(self):
from gramps.gui.plug._guioptions import GuiTextOption
from .._guioptions import GuiTextOption
for key in self.frame_names:
flist = self.frames[key]
grid = Gtk.Grid()

View File

@ -39,7 +39,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
from ..views.treemodels import CitationTreeModel
from .baseselector import BaseSelector
from gramps.gui.display import display_help
from ..display import display_help
from gramps.gen.const import URL_MANUAL_SECT2
#-------------------------------------------------------------------------

View File

@ -34,7 +34,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
from ..views.treemodels import EventModel
from .baseselector import BaseSelector
from gramps.gui.display import display_help
from ..display import display_help
from gramps.gen.const import URL_MANUAL_SECT1
#-------------------------------------------------------------------------

View File

@ -34,7 +34,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
from ..views.treemodels import FamilyModel
from .baseselector import BaseSelector
from gramps.gui.display import display_help
from ..display import display_help
from gramps.gen.const import URL_MANUAL_PAGE
#-------------------------------------------------------------------------

View File

@ -37,7 +37,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
from ..views.treemodels import NoteModel
from .baseselector import BaseSelector
from gramps.gui.display import display_help
from ..display import display_help
from gramps.gen.const import URL_MANUAL_SECT1
#-------------------------------------------------------------------------

View File

@ -48,7 +48,7 @@ from gramps.gen.utils.file import media_path_full
from gramps.gen.utils.thumbnails import get_thumbnail_image
from ..views.treemodels import MediaModel
from .baseselector import BaseSelector
from gramps.gui.display import display_help
from ..display import display_help
from gramps.gen.const import URL_MANUAL_SECT1
#-------------------------------------------------------------------------

View File

@ -36,7 +36,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
from ..views.treemodels import PeopleBaseModel, PersonTreeModel
from .baseselector import BaseSelector
from gramps.gui.display import display_help
from ..display import display_help
from gramps.gen.const import URL_MANUAL_SECT1
#-------------------------------------------------------------------------

View File

@ -35,7 +35,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
from ..views.treemodels.placemodel import PlaceTreeModel
from .baseselector import BaseSelector
from gramps.gui.display import display_help
from ..display import display_help
from gramps.gen.const import URL_MANUAL_SECT2
#-------------------------------------------------------------------------

View File

@ -34,7 +34,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
from ..views.treemodels import RepositoryModel
from .baseselector import BaseSelector
from gramps.gui.display import display_help
from ..display import display_help
from gramps.gen.const import URL_MANUAL_SECT2
#-------------------------------------------------------------------------

View File

@ -34,7 +34,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
from ..views.treemodels import SourceModel
from .baseselector import BaseSelector
from gramps.gui.display import display_help
from ..display import display_help
from gramps.gen.const import URL_MANUAL_PAGE
#-------------------------------------------------------------------------

View File

@ -455,7 +455,7 @@ class CitationBookmarks(ListBookmarks):
# FIXME: See http://www.gramps-project.org/bugs/view.php?id=6352 a
# more comprehensive solution is needed in the long term. See also
# change_active in CitatinTreeView
from gramps.gui.dialog import WarningDialog
from ..dialog import WarningDialog
WarningDialog(
_("Cannot bookmark this reference"),
# FIXME should this next string be translated?

View File

@ -91,7 +91,7 @@ from gramps.gen.const import (
TYPE_BOX_NORMAL,
TYPE_BOX_FAMILY)
_ = glocale.translation.gettext
from gramps.gui.utilscairo import warpPath
from ..utilscairo import warpPath
#-------------------------------------------------------------------------
#