Convert widgets to use relative imports

svn: r20512
This commit is contained in:
Nick Hall
2012-10-03 16:03:49 +00:00
parent e97bf17488
commit 251aff61a0
12 changed files with 36 additions and 36 deletions

View File

@@ -46,15 +46,15 @@ import ConfigParser
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.errors import WindowActiveError from gramps.gen.errors import WindowActiveError
from gramps.gen.const import URL_MANUAL_PAGE, VERSION_DIR from gramps.gen.const import URL_MANUAL_PAGE, VERSION_DIR
from gramps.gui.editors import EditPerson, EditFamily from ..editors import EditPerson, EditFamily
from gramps.gui.managedwindow import ManagedWindow from ..managedwindow import ManagedWindow
from gramps.gui.utils import is_right_click, rgb_to_hex from ..utils import is_right_click, rgb_to_hex
from gramps.gui.widgets.menuitem import add_menuitem from .menuitem import add_menuitem
from gramps.gui.plug.quick import run_quick_report_by_name from ..plug.quick import run_quick_report_by_name
from gramps.gui.display import display_help, display_url from ..display import display_help, display_url
from gramps.gui.glade import Glade from ..glade import Glade
from gramps.gui.pluginmanager import GuiPluginManager from ..pluginmanager import GuiPluginManager
from gramps.gui.widgets.undoablebuffer import UndoableBuffer from .undoablebuffer import UndoableBuffer
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@@ -50,7 +50,7 @@ from gi.repository import Pango
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.constfunc import has_display, win from gramps.gen.constfunc import has_display, win
from gramps.gui.utils import rgb_to_hex from ..utils import rgb_to_hex
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@@ -52,7 +52,7 @@ from gi.repository import Pango
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.ggettext import gettext as _ from gramps.gen.ggettext import gettext as _
from gramps.gui.autocomp import StandardCustomSelector, fill_entry from ..autocomp import StandardCustomSelector, fill_entry
from gramps.gen.datehandler import displayer, parser from gramps.gen.datehandler import displayer, parser
from gramps.gen.lib.date import Date, NextYear from gramps.gen.lib.date import Date, NextYear
from gramps.gen.errors import ValidationError from gramps.gen.errors import ValidationError
@@ -651,7 +651,7 @@ class MonitoredDate(object):
If date was in fact built, sets the date_obj to the newly built If date was in fact built, sets the date_obj to the newly built
date. date.
""" """
from gramps.gui.editors import EditDate from ..editors import EditDate
date_dialog = EditDate(self.date_obj, self.uistate, self.track) date_dialog = EditDate(self.date_obj, self.uistate, self.track)
the_date = date_dialog.return_date the_date = date_dialog.return_date
self.update_after_editor(the_date) self.update_after_editor(the_date)
@@ -860,7 +860,7 @@ class MonitoredTagList(object):
if (event.type == Gdk.EventType.BUTTON_PRESS or if (event.type == Gdk.EventType.BUTTON_PRESS or
(event.type == Gdk.EventType.KEY_PRESS and (event.type == Gdk.EventType.KEY_PRESS and
event.keyval in (_RETURN, _KP_ENTER))): event.keyval in (_RETURN, _KP_ENTER))):
from gramps.gui.editors import EditTagList from ..editors import EditTagList
editor = EditTagList(self.tag_list, self.all_tags, editor = EditTagList(self.tag_list, self.all_tags,
self.uistate, self.track) self.uistate, self.track)
if editor.return_list is not None: if editor.return_list is not None:

View File

@@ -33,8 +33,8 @@ from gi.repository import Gtk
# Gramps modules # Gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.thumbnails import get_thumbnail_image, SIZE_NORMAL, SIZE_LARGE from ..thumbnails import get_thumbnail_image, SIZE_NORMAL, SIZE_LARGE
from gramps.gui.utils import open_file_with_default_application from ..utils import open_file_with_default_application
from gramps.gen.ggettext import gettext as _ from gramps.gen.ggettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@@ -47,9 +47,9 @@ _LOG = logging.getLogger("gui.widgets.reorderfam")
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.db import DbTxn from gramps.gen.db import DbTxn
from gramps.gui.listmodel import ListModel from ..listmodel import ListModel
from gramps.gui.managedwindow import ManagedWindow from ..managedwindow import ManagedWindow
from gramps.gui.glade import Glade from ..glade import Glade
from gramps.gen.display.name import displayer as name_displayer from gramps.gen.display.name import displayer as name_displayer
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@@ -45,7 +45,7 @@ from gi.repository import Gtk
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.widgets.validatedcomboentry import ValidatedComboEntry from .validatedcomboentry import ValidatedComboEntry
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@@ -44,7 +44,7 @@ _LOG = logging.getLogger(".widgets.styledtextbuffer")
from gi.repository import GObject from gi.repository import GObject
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import Pango from gi.repository import Pango
from gramps.gui.widgets.undoablebuffer import UndoableBuffer from .undoablebuffer import UndoableBuffer
WEIGHT_BOLD = Pango.Weight.BOLD WEIGHT_BOLD = Pango.Weight.BOLD
STYLE_ITALIC = Pango.Style.ITALIC STYLE_ITALIC = Pango.Style.ITALIC
UNDERLINE_SINGLE = Pango.Underline.SINGLE UNDERLINE_SINGLE = Pango.Underline.SINGLE

View File

@@ -51,17 +51,17 @@ from gi.repository import Pango
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.lib import StyledTextTagType from gramps.gen.lib import StyledTextTagType
from gramps.gui.widgets.styledtextbuffer import (ALLOWED_STYLES, from .styledtextbuffer import (ALLOWED_STYLES,
MATCH_START, MATCH_END, MATCH_START, MATCH_END,
MATCH_FLAVOR, MATCH_STRING, MATCH_FLAVOR, MATCH_STRING,
LinkTag) LinkTag)
from gramps.gui.widgets.undoablestyledbuffer import UndoableStyledBuffer from .undoablestyledbuffer import UndoableStyledBuffer
from gramps.gui.widgets.valueaction import ValueAction from .valueaction import ValueAction
from gramps.gui.widgets.toolcomboentry import ToolComboEntry from .toolcomboentry import ToolComboEntry
from gramps.gui.widgets.springseparator import SpringSeparatorAction from .springseparator import SpringSeparatorAction
from gramps.gui.spell import Spell from ..spell import Spell
from gramps.gui.display import display_url from ..display import display_url
from gramps.gui.utils import SystemFonts, rgb_to_hex, hex_to_color, color_to_hex from ..utils import SystemFonts, rgb_to_hex, hex_to_color, color_to_hex
from gramps.gen.config import config from gramps.gen.config import config
from gramps.gen.constfunc import has_display from gramps.gen.constfunc import has_display
@@ -752,7 +752,7 @@ class StyledTextEditor(Gtk.TextView):
if win_obj: if win_obj:
# Edit the object: # Edit the object:
obj_class, prop, value = url[9:].split("/") obj_class, prop, value = url[9:].split("/")
from gramps.gui.editors import EditObject from ..editors import EditObject
EditObject(win_obj.dbstate, EditObject(win_obj.dbstate,
win_obj.uistate, win_obj.uistate,
win_obj.track, win_obj.track,
@@ -833,7 +833,7 @@ def uri_dialog(self, uri, callback):
""" """
Function to spawn the link editor. Function to spawn the link editor.
""" """
from gramps.gui.editors.editlink import EditLink from ..editors.editlink import EditLink
obj = find_parent_with_attr(self, attr="dbstate") obj = find_parent_with_attr(self, attr="dbstate")
if obj: if obj:
if uri is None: if uri is None:

View File

@@ -45,8 +45,8 @@ from gi.repository import Gtk
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.widgets.valuetoolitem import ValueToolItem from .valuetoolitem import ValueToolItem
from gramps.gui.widgets.shortlistcomboentry import ShortlistComboEntry from .shortlistcomboentry import ShortlistComboEntry
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@@ -31,8 +31,8 @@ __all__ = ["UndoableStyledBuffer"]
from gi.repository import Gtk from gi.repository import Gtk
from gramps.gen.lib.styledtext import StyledText from gramps.gen.lib.styledtext import StyledText
from gramps.gui.widgets.undoablebuffer import UndoableInsert, UndoableDelete from .undoablebuffer import UndoableInsert, UndoableDelete
from gramps.gui.widgets.styledtextbuffer import StyledTextBuffer from .styledtextbuffer import StyledTextBuffer
class UndoableInsertStyled(UndoableInsert): class UndoableInsertStyled(UndoableInsert):
"""something that has been inserted into our styledtextbuffer""" """something that has been inserted into our styledtextbuffer"""

View File

@@ -50,7 +50,7 @@ from gi.repository import Pango
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.errors import MaskError, ValidationError, WindowActiveError from gramps.gen.errors import MaskError, ValidationError, WindowActiveError
from gramps.gui.widgets.undoableentry import UndoableEntry from .undoableentry import UndoableEntry
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@@ -45,7 +45,7 @@ from gi.repository import Gtk
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gui.widgets.valuetoolitem import ValueToolItem from .valuetoolitem import ValueToolItem
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #