6085: Remove import from the gui module

This commit is contained in:
Nick Hall 2017-01-27 16:20:49 +00:00
parent dfdb11bfc9
commit c3c8a632de
2 changed files with 9 additions and 3 deletions

View File

@ -404,9 +404,7 @@ class Gramplet:
"""
Add an option to the GUI gramplet.
"""
from gramps.gui.plug import make_gui_option
widget, label = make_gui_option(
option, self.dbstate, self.uistate, self.track)
widget, label = self.gui.add_gui_option(option)
self.option_dict.update({option.get_label(): [widget, option]})
self.option_order.append(option.get_label())

View File

@ -50,6 +50,7 @@ from ..editors import EditPerson, EditFamily
from ..managedwindow import ManagedWindow
from ..utils import is_right_click, rgb_to_hex
from .menuitem import add_menuitem
from ..plug import make_gui_option
from ..plug.quick import run_quick_report_by_name
from ..display import display_help, display_url
from ..glade import Glade
@ -345,6 +346,7 @@ class GuiGramplet:
self.view = pane.pageview
self.dbstate = dbstate
self.uistate = uistate
self.track = []
self.title = title
self.detached_window = None
self.force_update = False
@ -549,6 +551,12 @@ class GuiGramplet:
def get_container_widget(self):
raise NotImplementedError
def add_gui_option(self, option):
"""
Add an option to the GUI gramplet.
"""
return make_gui_option(option, self.dbstate, self.uistate, self.track)
def make_gui_options(self):
if not self.pui: return
# BEGIN WORKAROUND: