Convert views to use relative imports

svn: r20510
This commit is contained in:
Nick Hall 2012-10-03 15:55:24 +00:00
parent 9b3fd50329
commit 2e98c52cd5
15 changed files with 40 additions and 40 deletions

View File

@ -51,8 +51,8 @@ from gi.repository import Gtk
# gramps modules
#
#-------------------------------------------------------------------------
from gramps.gui.display import display_help
from gramps.gui.listmodel import ListModel
from ..display import display_help
from ..listmodel import ListModel
from gramps.gen.utils.db import navigation_label
from gramps.gen.const import URL_MANUAL_PAGE
from gramps.gen.ggettext import sgettext as _

View File

@ -51,23 +51,23 @@ from gi.repository import Pango
# GRAMPS
#
#----------------------------------------------------------------
from gramps.gui.views.pageview import PageView
from gramps.gui.views.navigationview import NavigationView
from gramps.gui.columnorder import ColumnOrder
from .pageview import PageView
from .navigationview import NavigationView
from ..columnorder import ColumnOrder
from gramps.gen.config import config
from gramps.gen.errors import WindowActiveError
from gramps.gui.filters import SearchBar
from gramps.gui.widgets.menuitem import add_menuitem
from ..filters import SearchBar
from ..widgets.menuitem import add_menuitem
from gramps.gen.const import CUSTOM_FILTERS, USE_TIPS
from gramps.gen.utils.debug import profile
from gramps.gen.utils.string import data_recover_msg
from gramps.gen.utils.file import get_unicode_path_from_file_chooser
from gramps.gui.dialog import QuestionDialog, QuestionDialog2
from gramps.gui.editors import FilterEditor
from ..dialog import QuestionDialog, QuestionDialog2
from ..editors import FilterEditor
from gramps.gen.ggettext import sgettext as _
from gramps.gui.ddtargets import DdTargets
from gramps.gui.plug.quick import create_quickreport_menu, create_web_connect_menu
from gramps.gui.utils import is_right_click
from ..ddtargets import DdTargets
from ..plug.quick import create_quickreport_menu, create_web_connect_menu
from ..utils import is_right_click
#----------------------------------------------------------------
#
@ -430,7 +430,7 @@ class ListView(NavigationView):
if mlist:
self.bookmarks.add(mlist[0])
else:
from gramps.gui.dialog import WarningDialog
from ..dialog import WarningDialog
WarningDialog(
_("Could Not Set a Bookmark"),
_("A bookmark could not be set because "

View File

@ -47,7 +47,7 @@ from gi.repository import Gtk
# GRAMPS
#
#----------------------------------------------------------------
from gramps.gui.views.pageview import PageView
from .pageview import PageView
from gramps.gen.ggettext import sgettext as _
from gramps.gen.utils.db import navigation_label
from gramps.gen.constfunc import mod_key
@ -251,7 +251,7 @@ class NavigationView(PageView):
self.uistate.push_message(self.dbstate,
_("%s has been bookmarked") % name)
else:
from gramps.gui.dialog import WarningDialog
from ..dialog import WarningDialog
WarningDialog(
_("Could Not Set a Bookmark"),
_("A bookmark could not be set because "
@ -332,7 +332,7 @@ class NavigationView(PageView):
if defperson:
self.change_active(defperson.get_handle())
else:
from gramps.gui.dialog import WarningDialog
from ..dialog import WarningDialog
WarningDialog(_("No Home Person"),
_("You need to set a 'default person' to go to."))

View File

@ -48,10 +48,10 @@ from gramps.gen.ggettext import gettext as _
#
#----------------------------------------------------------------
from gramps.gen.errors import WindowActiveError
from gramps.gui.dbguielement import DbGUIElement
from gramps.gui.widgets.menutoolbuttonaction import MenuToolButtonAction
from gramps.gui.grampsbar import GrampsBar
from gramps.gui.configure import ConfigureDialog
from ..dbguielement import DbGUIElement
from ..widgets.menutoolbuttonaction import MenuToolButtonAction
from ..grampsbar import GrampsBar
from ..configure import ConfigureDialog
from gramps.gen.config import config
#------------------------------------------------------------------------------
@ -232,7 +232,7 @@ class PageView(DbGUIElement):
system.
"""
import cPickle as pickle
from gramps.gui.clipboard import ClipboardWindow, obj2target
from ..clipboard import ClipboardWindow, obj2target
handled = False
for handle in handles:
if handle is None:
@ -277,7 +277,7 @@ class PageView(DbGUIElement):
The code creates the Clipboard if it does not already exist.
"""
from gramps.gui.clipboard import ClipboardWindow
from ..clipboard import ClipboardWindow
clipboard = None
for widget in self.uistate.gwm.window_tree:
if isinstance(widget, ClipboardWindow):

View File

@ -45,11 +45,11 @@ from gi.repository import Gdk
from gramps.gen.ggettext import sgettext as _
from gramps.gen.lib import Tag
from gramps.gen.db import DbTxn
from gramps.gui.dbguielement import DbGUIElement
from gramps.gui.listmodel import ListModel, NOSORT, COLOR, INTEGER
from ..dbguielement import DbGUIElement
from ..listmodel import ListModel, NOSORT, COLOR, INTEGER
from gramps.gen.const import URL_MANUAL_PAGE
from gramps.gui.display import display_help
from gramps.gui.dialog import ErrorDialog, QuestionDialog2
from ..display import display_help
from ..dialog import ErrorDialog, QuestionDialog2
import gramps.gui.widgets.progressdialog as progressdlg
#-------------------------------------------------------------------------

View File

@ -45,8 +45,8 @@ from gi.repository import Gtk
# GRAMPS modules
#
#-------------------------------------------------------------------------
from gramps.gui.views.treemodels.flatbasemodel import FlatBaseModel
from gramps.gui.views.treemodels.citationbasemodel import CitationBaseModel
from .flatbasemodel import FlatBaseModel
from .citationbasemodel import CitationBaseModel
#-------------------------------------------------------------------------
#

View File

@ -53,8 +53,8 @@ from gi.repository import Gtk
#
#-------------------------------------------------------------------------
from gramps.gen.utils.db import get_source_referents
from gramps.gui.views.treemodels.treebasemodel import TreeBaseModel
from gramps.gui.views.treemodels.citationbasemodel import CitationBaseModel
from .treebasemodel import TreeBaseModel
from .citationbasemodel import CitationBaseModel
#-------------------------------------------------------------------------
#

View File

@ -44,7 +44,7 @@ from gramps.gen.datehandler import format_time, get_date, get_date_valid
from gramps.gen.lib import Event, EventType
from gramps.gen.utils.db import get_participant_from_event
from gramps.gen.config import config
from gramps.gui.views.treemodels.flatbasemodel import FlatBaseModel
from .flatbasemodel import FlatBaseModel
#-------------------------------------------------------------------------
#

View File

@ -44,7 +44,7 @@ from gi.repository import Gtk
from gramps.gen.datehandler import displayer, format_time, get_date_valid
from gramps.gen.display.name import displayer as name_displayer
from gramps.gen.lib import EventRoleType, FamilyRelType
from gramps.gui.views.treemodels.flatbasemodel import FlatBaseModel
from .flatbasemodel import FlatBaseModel
from gramps.gen.utils.db import get_marriage_or_fallback
from gramps.gen.config import config

View File

@ -44,7 +44,7 @@ from gi.repository import Gtk
#-------------------------------------------------------------------------
from gramps.gen.datehandler import displayer, format_time
from gramps.gen.lib import Date, MediaObject
from gramps.gui.views.treemodels.flatbasemodel import FlatBaseModel
from .flatbasemodel import FlatBaseModel
#-------------------------------------------------------------------------
#

View File

@ -42,7 +42,7 @@ from gi.repository import Gtk
#
#-------------------------------------------------------------------------
from gramps.gen.datehandler import format_time
from gramps.gui.views.treemodels.flatbasemodel import FlatBaseModel
from .flatbasemodel import FlatBaseModel
from gramps.gen.lib import (Note, NoteType, StyledText)
#-------------------------------------------------------------------------

View File

@ -60,8 +60,8 @@ from gramps.gen.lib import Name, EventRef, EventType, EventRoleType
from gramps.gen.display.name import displayer as name_displayer
from gramps.gen.datehandler import format_time, get_date, get_date_valid
from lru import LRU
from gramps.gui.views.treemodels.flatbasemodel import FlatBaseModel
from gramps.gui.views.treemodels.treebasemodel import TreeBaseModel
from .flatbasemodel import FlatBaseModel
from .treebasemodel import TreeBaseModel
from gramps.gen.config import config
#-------------------------------------------------------------------------

View File

@ -48,8 +48,8 @@ from gi.repository import Gtk
#-------------------------------------------------------------------------
from gramps.gen.datehandler import format_time
from gramps.gen.utils.place import conv_lat_lon
from gramps.gui.views.treemodels.flatbasemodel import FlatBaseModel
from gramps.gui.views.treemodels.treebasemodel import TreeBaseModel
from .flatbasemodel import FlatBaseModel
from .treebasemodel import TreeBaseModel
#-------------------------------------------------------------------------
#

View File

@ -41,7 +41,7 @@ from gi.repository import Gtk
#-------------------------------------------------------------------------
from gramps.gen.lib import Address, RepositoryType, Url, UrlType
from gramps.gen.datehandler import format_time
from gramps.gui.views.treemodels.flatbasemodel import FlatBaseModel
from .flatbasemodel import FlatBaseModel
#-------------------------------------------------------------------------
#

View File

@ -40,7 +40,7 @@ from gi.repository import Gtk
#
#-------------------------------------------------------------------------
from gramps.gen.datehandler import format_time
from gramps.gui.views.treemodels.flatbasemodel import FlatBaseModel
from .flatbasemodel import FlatBaseModel
#-------------------------------------------------------------------------
#