diff --git a/src/DataViews/RelationView.py b/src/DataViews/RelationView.py
index 7c895cbed..4bada127a 100644
--- a/src/DataViews/RelationView.py
+++ b/src/DataViews/RelationView.py
@@ -50,7 +50,7 @@ from Utils import media_path_full
import DateHandler
import ThumbNails
import Config
-import GrampsWidgets
+import widgets
import Errors
import gen.utils
@@ -521,15 +521,15 @@ class RelationshipView(PageView.PersonNavView):
name = name_displayer.display(person)
fmt = '%s'
text = fmt % cgi.escape(name)
- label = GrampsWidgets.DualMarkupLabel(text, _GenderCode[person.gender],
- x_align=1, y_align=0)
+ label = widgets.DualMarkupLabel(text, _GenderCode[person.gender],
+ x_align=1, y_align=0)
if Config.get(Config.RELEDITBTN):
- button = GrampsWidgets.IconButton(self.edit_button_press,
- person.handle)
+ button = widgets.IconButton(self.edit_button_press,
+ person.handle)
self.tooltips.set_tip(button, _('Edit %s') % name)
else:
button = None
- hbox = GrampsWidgets.LinkBox(label, button)
+ hbox = widgets.LinkBox(label, button)
table.attach(hbox, 0, 2, 0, 1)
@@ -544,9 +544,9 @@ class RelationshipView(PageView.PersonNavView):
# GRAMPS ID
- subtbl.attach(GrampsWidgets.BasicLabel("%s:" % _('ID')),
+ subtbl.attach(widgets.BasicLabel("%s:" % _('ID')),
1, 2, 0, 1, xoptions=gtk.FILL, yoptions=0)
- subtbl.attach(GrampsWidgets.BasicLabel(person.gramps_id),
+ subtbl.attach(widgets.BasicLabel(person.gramps_id),
2, 3, 0, 1, yoptions=0)
# Birth event.
@@ -556,9 +556,9 @@ class RelationshipView(PageView.PersonNavView):
else:
birth_title = _("Birth")
- subtbl.attach(GrampsWidgets.BasicLabel("%s:" % birth_title),
+ subtbl.attach(widgets.BasicLabel("%s:" % birth_title),
1, 2, 1, 2, xoptions=gtk.FILL, yoptions=0)
- subtbl.attach(GrampsWidgets.BasicLabel(self.format_event(birth)),
+ subtbl.attach(widgets.BasicLabel(self.format_event(birth)),
2, 3, 1, 2, yoptions=0)
death = ReportUtils.get_death_or_fallback(self.dbstate.db, person)
@@ -567,9 +567,9 @@ class RelationshipView(PageView.PersonNavView):
else:
death_title = _("Death")
- subtbl.attach(GrampsWidgets.BasicLabel("%s:" % death_title),
+ subtbl.attach(widgets.BasicLabel("%s:" % death_title),
1, 2, 2, 3, xoptions=gtk.FILL, yoptions=0)
- subtbl.attach(GrampsWidgets.BasicLabel(self.format_event(death)),
+ subtbl.attach(widgets.BasicLabel(self.format_event(death)),
2, 3, 2, 3, yoptions=0)
@@ -649,10 +649,10 @@ class RelationshipView(PageView.PersonNavView):
return ''
def write_person_data(self, title, data):
- self.attach.attach(GrampsWidgets.BasicLabel(title), _ALABEL_START,
+ self.attach.attach(widgets.BasicLabel(title), _ALABEL_START,
_ALABEL_STOP, self.row, self.row+1,
xoptions=gtk.FILL|gtk.SHRINK)
- self.attach.attach(GrampsWidgets.BasicLabel(data),
+ self.attach.attach(widgets.BasicLabel(data),
_ADATA_START, _ADATA_STOP,
self.row, self.row+1)
self.row += 1
@@ -660,17 +660,17 @@ class RelationshipView(PageView.PersonNavView):
def write_label(self, title, family, is_parent, person = None):
msg = '%s' % cgi.escape(title)
hbox = gtk.HBox()
- label = GrampsWidgets.MarkupLabel(msg, x_align=1)
+ label = widgets.MarkupLabel(msg, x_align=1)
# Draw the collapse/expand button:
if family != None:
if self.check_collapsed(person.handle, family.handle):
- arrow = GrampsWidgets.ExpandCollapseArrow(True,
- self.expand_collapse_press,
- (person, family.handle))
+ arrow = widgets.ExpandCollapseArrow(True,
+ self.expand_collapse_press,
+ (person, family.handle))
else:
- arrow = GrampsWidgets.ExpandCollapseArrow(False,
- self.expand_collapse_press,
- (person, family.handle))
+ arrow = widgets.ExpandCollapseArrow(False,
+ self.expand_collapse_press,
+ (person, family.handle))
else :
arrow = gtk.Arrow(gtk.ARROW_RIGHT, gtk.SHADOW_OUT)
hbox.pack_start(arrow, False)
@@ -683,7 +683,7 @@ class RelationshipView(PageView.PersonNavView):
value = family.gramps_id
else:
value = ""
- self.attach.attach(GrampsWidgets.BasicLabel(value),
+ self.attach.attach(widgets.BasicLabel(value),
_DATA_START, _DATA_STOP,
self.row, self.row+1, gtk.SHRINK|gtk.FILL)
@@ -713,28 +713,29 @@ class RelationshipView(PageView.PersonNavView):
if not self.toolbar_visible and not self.dbstate.db.readonly:
# Show edit-Buttons if toolbar is not visible
if self.reorder_sensitive:
- add = GrampsWidgets.IconButton(self.reorder, None,
- gtk.STOCK_SORT_ASCENDING)
+ add = widgets.IconButton(self.reorder, None,
+ gtk.STOCK_SORT_ASCENDING)
self.tooltips.set_tip(add, ord_msg)
hbox.pack_start(add, False)
- add = GrampsWidgets.IconButton(call_fcn, None, gtk.STOCK_ADD)
+ add = widgets.IconButton(call_fcn, None, gtk.STOCK_ADD)
self.tooltips.set_tip(add, add_msg)
hbox.pack_start(add, False)
if is_parent:
- add = GrampsWidgets.IconButton(self.select_family, None, gtk.STOCK_INDEX)
+ add = widgets.IconButton(self.select_family, None,
+ gtk.STOCK_INDEX)
self.tooltips.set_tip(add, sel_msg)
hbox.pack_start(add, False)
if family:
- edit = GrampsWidgets.IconButton(self.edit_family, family.handle,
- gtk.STOCK_EDIT)
+ edit = widgets.IconButton(self.edit_family, family.handle,
+ gtk.STOCK_EDIT)
self.tooltips.set_tip(edit, edit_msg)
hbox.pack_start(edit, False)
if not self.dbstate.db.readonly:
- delete = GrampsWidgets.IconButton(del_fcn, family.handle,
- gtk.STOCK_REMOVE)
+ delete = widgets.IconButton(del_fcn, family.handle,
+ gtk.STOCK_REMOVE)
self.tooltips.set_tip(delete, del_msg)
hbox.pack_start(delete, False)
self.attach.attach(hbox, _BTN_START, _BTN_STOP, self.row, self.row+1)
@@ -790,13 +791,13 @@ class RelationshipView(PageView.PersonNavView):
active = self.dbstate.active.handle
hbox = gtk.HBox()
if self.check_collapsed(person.handle, "SIBLINGS"):
- arrow = GrampsWidgets.ExpandCollapseArrow(True,
- self.expand_collapse_press,
- (person, "SIBLINGS"))
+ arrow = widgets.ExpandCollapseArrow(True,
+ self.expand_collapse_press,
+ (person, "SIBLINGS"))
else:
- arrow = GrampsWidgets.ExpandCollapseArrow(False,
- self.expand_collapse_press,
- (person, "SIBLINGS"))
+ arrow = widgets.ExpandCollapseArrow(False,
+ self.expand_collapse_press,
+ (person, "SIBLINGS"))
hbox.pack_start(arrow, False)
label_cell = self.build_label_cell(_('Siblings'))
hbox.pack_start(label_cell, True)
@@ -837,16 +838,14 @@ class RelationshipView(PageView.PersonNavView):
self.row += 1 # now advance it
else:
hbox = gtk.HBox()
- addchild = GrampsWidgets.IconButton(
- self.add_child_to_fam,
- family.handle,
- gtk.STOCK_ADD)
+ addchild = widgets.IconButton(self.add_child_to_fam,
+ family.handle,
+ gtk.STOCK_ADD)
self.tooltips.set_tip(addchild,
_('Add new child to family'))
- selchild = GrampsWidgets.IconButton(
- self.sel_child_to_fam,
- family.handle,
- gtk.STOCK_INDEX)
+ selchild = widgets.IconButton(self.sel_child_to_fam,
+ family.handle,
+ gtk.STOCK_INDEX)
self.tooltips.set_tip(selchild,
_('Add existing child to family'))
hbox.pack_start(addchild, False)
@@ -886,17 +885,16 @@ class RelationshipView(PageView.PersonNavView):
initial_name = False
if handle:
name = self.get_name(handle, True)
- link_label = GrampsWidgets.LinkLabel(
- name, self._button_press, handle)
+ link_label = widgets.LinkLabel(name, self._button_press, handle)
if self.use_shade:
link_label.modify_bg(gtk.STATE_NORMAL, self.color)
if Config.get(Config.RELEDITBTN):
- button = GrampsWidgets.IconButton(self.edit_button_press,
- handle)
+ button = widgets.IconButton(self.edit_button_press,
+ handle)
self.tooltips.set_tip(button, _('Edit %s') % name[0])
else:
button = None
- vbox.pack_start(GrampsWidgets.LinkBox(link_label, button),
+ vbox.pack_start(widgets.LinkBox(link_label, button),
expand=False)
else:
link_label = gtk.Label(_('Unknown'))
@@ -914,8 +912,8 @@ class RelationshipView(PageView.PersonNavView):
else:
format = "%s"
- label = GrampsWidgets.MarkupLabel(format % cgi.escape(title),
- x_align=1, y_align=0)
+ label = widgets.MarkupLabel(format % cgi.escape(title),
+ x_align=1, y_align=0)
if Config.get(Config.RELEDITBTN):
label.set_padding(0, 5)
self.attach.attach(label, _PLABEL_START, _PLABEL_STOP, self.row,
@@ -926,16 +924,15 @@ class RelationshipView(PageView.PersonNavView):
if handle:
name = self.get_name(handle, True)
- link_label = GrampsWidgets.LinkLabel(
- name, self._button_press, handle)
+ link_label = widgets.LinkLabel(name, self._button_press, handle)
if self.use_shade:
link_label.modify_bg(gtk.STATE_NORMAL, self.color)
if Config.get(Config.RELEDITBTN):
- button = GrampsWidgets.IconButton(self.edit_button_press, handle)
+ button = widgets.IconButton(self.edit_button_press, handle)
self.tooltips.set_tip(button, _('Edit %s') % name[0])
else:
button = None
- vbox.pack_start(GrampsWidgets.LinkBox(link_label, button))
+ vbox.pack_start(widgets.LinkBox(link_label, button))
else:
link_label = gtk.Label(_('Unknown'))
link_label.set_alignment(0, 1)
@@ -945,7 +942,7 @@ class RelationshipView(PageView.PersonNavView):
if self.show_details:
value = self.info_string(handle)
if value:
- vbox.pack_start(GrampsWidgets.MarkupLabel(value))
+ vbox.pack_start(widgets.MarkupLabel(value))
eventbox = gtk.EventBox()
if self.use_shade:
@@ -963,8 +960,8 @@ class RelationshipView(PageView.PersonNavView):
else:
format = "%s"
- lbl = GrampsWidgets.MarkupLabel(format % cgi.escape(title),
- x_align=1, y_align=.5)
+ lbl = widgets.MarkupLabel(format % cgi.escape(title),
+ x_align=1, y_align=.5)
if Config.get(Config.RELEDITBTN):
lbl.set_padding(0, 5)
return lbl
@@ -1006,23 +1003,23 @@ class RelationshipView(PageView.PersonNavView):
link_func = None
name = self.get_name(handle, True)
- link_label = GrampsWidgets.LinkLabel(name, link_func, handle, format)
+ link_label = widgets.LinkLabel(name, link_func, handle, format)
if self.use_shade:
link_label.modify_bg(gtk.STATE_NORMAL, self.color)
link_label.set_padding(3, 0)
if child_should_be_linked and Config.get(Config.RELEDITBTN):
- button = GrampsWidgets.IconButton(self.edit_button_press, handle)
+ button = widgets.IconButton(self.edit_button_press, handle)
self.tooltips.set_tip(button, _('Edit %s') % name[0])
else:
button = None
hbox = gtk.HBox()
- l = GrampsWidgets.BasicLabel("%d." % index)
+ l = widgets.BasicLabel("%d." % index)
l.set_width_chars(3)
l.set_alignment(1.0, 0.5)
hbox.pack_start(l, False, False, 0)
- hbox.pack_start(GrampsWidgets.LinkBox(link_label, button),
+ hbox.pack_start(widgets.LinkBox(link_label, button),
False, False, 4)
hbox.show()
vbox.pack_start(hbox)
@@ -1030,13 +1027,13 @@ class RelationshipView(PageView.PersonNavView):
if self.show_details:
value = self.info_string(handle)
if value:
- l = GrampsWidgets.MarkupLabel(value)
+ l = widgets.MarkupLabel(value)
l.set_padding(48, 0)
vbox.add(l)
def write_data(self, box, title, start_col=_SDATA_START,
stop_col=_SDATA_STOP):
- box.add(GrampsWidgets.BasicLabel(title))
+ box.add(widgets.BasicLabel(title))
def info_string(self, handle):
person = self.dbstate.db.get_person_from_handle(handle)
@@ -1137,7 +1134,7 @@ class RelationshipView(PageView.PersonNavView):
def write_relationship(self, box, family):
msg = _('Relationship type: %s') % cgi.escape(str(family.get_relationship()))
- box.add(GrampsWidgets.MarkupLabel(msg))
+ box.add(widgets.MarkupLabel(msg))
def place_name(self, handle):
p = self.dbstate.db.get_place_from_handle(handle)
@@ -1242,13 +1239,13 @@ class RelationshipView(PageView.PersonNavView):
hbox = gtk.HBox()
if self.check_collapsed(person.handle, "CHILDREN"):
- arrow = GrampsWidgets.ExpandCollapseArrow(True,
- self.expand_collapse_press,
- (person, "CHILDREN"))
+ arrow = widgets.ExpandCollapseArrow(True,
+ self.expand_collapse_press,
+ (person, "CHILDREN"))
else:
- arrow = GrampsWidgets.ExpandCollapseArrow(False,
- self.expand_collapse_press,
- (person, "CHILDREN"))
+ arrow = widgets.ExpandCollapseArrow(False,
+ self.expand_collapse_press,
+ (person, "CHILDREN"))
hbox.pack_start(arrow, False)
label_cell = self.build_label_cell(_('Children'))
hbox.pack_start(label_cell, True)
@@ -1281,16 +1278,14 @@ class RelationshipView(PageView.PersonNavView):
self.row += 1 # now advance it
else:
hbox = gtk.HBox()
- addchild = GrampsWidgets.IconButton(
- self.add_child_to_fam,
- family.handle,
- gtk.STOCK_ADD)
+ addchild = widgets.IconButton(self.add_child_to_fam,
+ family.handle,
+ gtk.STOCK_ADD)
self.tooltips.set_tip(addchild,
_('Add new child to family'))
- selchild = GrampsWidgets.IconButton(
- self.sel_child_to_fam,
- family.handle,
- gtk.STOCK_INDEX)
+ selchild = widgets.IconButton(self.sel_child_to_fam,
+ family.handle,
+ gtk.STOCK_INDEX)
self.tooltips.set_tip(selchild,
_('Add existing child to family'))
hbox.pack_start(addchild, False)
diff --git a/src/DisplayTabs/_BackRefList.py b/src/DisplayTabs/_BackRefList.py
index 3349fa79b..73a5cd449 100644
--- a/src/DisplayTabs/_BackRefList.py
+++ b/src/DisplayTabs/_BackRefList.py
@@ -40,7 +40,7 @@ import gtk
#
#-------------------------------------------------------------------------
import Errors
-from GrampsWidgets import SimpleButton
+from widgets import SimpleButton
from _EmbeddedList import EmbeddedList
#-------------------------------------------------------------------------
diff --git a/src/DisplayTabs/_ButtonTab.py b/src/DisplayTabs/_ButtonTab.py
index 17f069319..50bb18590 100644
--- a/src/DisplayTabs/_ButtonTab.py
+++ b/src/DisplayTabs/_ButtonTab.py
@@ -39,7 +39,7 @@ import gtk
# GRAMPS classes
#
#-------------------------------------------------------------------------
-from GrampsWidgets import SimpleButton
+from widgets import SimpleButton
from _GrampsTab import GrampsTab
import Errors
diff --git a/src/Editors/_EditAddress.py b/src/Editors/_EditAddress.py
index d2c606370..33d111577 100644
--- a/src/Editors/_EditAddress.py
+++ b/src/Editors/_EditAddress.py
@@ -51,7 +51,7 @@ from _EditSecondary import EditSecondary
from gen.lib import NoteType
from DisplayTabs import SourceEmbedList, NoteTab
-from GrampsWidgets import MonitoredDate, MonitoredEntry, PrivacyButton
+from widgets import MonitoredDate, MonitoredEntry, PrivacyButton
#-------------------------------------------------------------------------
#
diff --git a/src/Editors/_EditAttribute.py b/src/Editors/_EditAttribute.py
index 32efee040..b1c8e4e84 100644
--- a/src/Editors/_EditAttribute.py
+++ b/src/Editors/_EditAttribute.py
@@ -51,7 +51,7 @@ from _EditSecondary import EditSecondary
from gen.lib import NoteType
from DisplayTabs import SourceEmbedList, NoteTab
-from GrampsWidgets import MonitoredEntry, PrivacyButton, MonitoredDataType
+from widgets import MonitoredEntry, PrivacyButton, MonitoredDataType
#-------------------------------------------------------------------------
#
diff --git a/src/Editors/_EditChildRef.py b/src/Editors/_EditChildRef.py
index e8670de66..b1fa9af21 100644
--- a/src/Editors/_EditChildRef.py
+++ b/src/Editors/_EditChildRef.py
@@ -51,7 +51,7 @@ from gen.lib import NoteType
import Errors
from DisplayTabs import SourceEmbedList, NoteTab
-from GrampsWidgets import MonitoredDataType, PrivacyButton
+from widgets import MonitoredDataType, PrivacyButton
from BasicUtils import name_displayer
#-------------------------------------------------------------------------
diff --git a/src/Editors/_EditEvent.py b/src/Editors/_EditEvent.py
index ad7fe8449..d8101d98a 100644
--- a/src/Editors/_EditEvent.py
+++ b/src/Editors/_EditEvent.py
@@ -48,8 +48,8 @@ from Editors import EditPrimary
from QuestionDialog import ErrorDialog
from DisplayTabs import (SourceEmbedList, NoteTab, GalleryTab,
EventBackRefList, AttrEmbedList)
-from GrampsWidgets import (MonitoredEntry, PlaceEntry, PrivacyButton,
- MonitoredDataType, MonitoredDate)
+from widgets import (MonitoredEntry, PlaceEntry, PrivacyButton,
+ MonitoredDataType, MonitoredDate)
#-------------------------------------------------------------------------
#
diff --git a/src/Editors/_EditEventRef.py b/src/Editors/_EditEventRef.py
index fcb67f5e0..bf9c9b3a0 100644
--- a/src/Editors/_EditEventRef.py
+++ b/src/Editors/_EditEventRef.py
@@ -45,8 +45,8 @@ import gen.lib
from DisplayTabs import (SourceEmbedList, NoteTab, GalleryTab,
EventBackRefList, AttrEmbedList)
-from GrampsWidgets import (PrivacyButton, MonitoredEntry, PlaceEntry,
- MonitoredDate, MonitoredDataType)
+from widgets import (PrivacyButton, MonitoredEntry, PlaceEntry,
+ MonitoredDate, MonitoredDataType)
from _EditReference import RefTab, EditReference
#-------------------------------------------------------------------------
diff --git a/src/Editors/_EditFamily.py b/src/Editors/_EditFamily.py
index 66d26842e..52aa9ea7b 100644
--- a/src/Editors/_EditFamily.py
+++ b/src/Editors/_EditFamily.py
@@ -64,8 +64,8 @@ from ReportBase import ReportUtils
from DisplayTabs import (EmbeddedList, EventEmbedList, SourceEmbedList,
FamilyAttrEmbedList, NoteTab, GalleryTab,
FamilyLdsEmbedList, ChildModel)
-from GrampsWidgets import (PrivacyButton, MonitoredEntry, MonitoredDataType,
- IconButton, LinkBox, BasicLabel)
+from widgets import (PrivacyButton, MonitoredEntry, MonitoredDataType,
+ IconButton, LinkBox, BasicLabel)
from ReportBase import CATEGORY_QR_FAMILY
from QuestionDialog import (ErrorDialog, RunDatabaseRepair, WarningDialog,
MessageHideDialog)
diff --git a/src/Editors/_EditLdsOrd.py b/src/Editors/_EditLdsOrd.py
index b0ac10623..3753cfe23 100644
--- a/src/Editors/_EditLdsOrd.py
+++ b/src/Editors/_EditLdsOrd.py
@@ -54,8 +54,8 @@ import LdsUtils
from _EditSecondary import EditSecondary
from DisplayTabs import SourceEmbedList,NoteTab
-from GrampsWidgets import (PrivacyButton, MonitoredDate, PlaceEntry,
- MonitoredMenu, MonitoredStrMenu)
+from widgets import (PrivacyButton, MonitoredDate, PlaceEntry,
+ MonitoredMenu, MonitoredStrMenu)
_DATA_MAP = {
gen.lib.LdsOrd.BAPTISM : [
diff --git a/src/Editors/_EditLocation.py b/src/Editors/_EditLocation.py
index 37cab3125..382e5904f 100644
--- a/src/Editors/_EditLocation.py
+++ b/src/Editors/_EditLocation.py
@@ -36,7 +36,7 @@ import const
import Config
from _EditSecondary import EditSecondary
-from GrampsWidgets import MonitoredEntry
+from widgets import MonitoredEntry
from gettext import gettext as _
#-------------------------------------------------------------------------
diff --git a/src/Editors/_EditMedia.py b/src/Editors/_EditMedia.py
index c2050ead3..45e9ef064 100644
--- a/src/Editors/_EditMedia.py
+++ b/src/Editors/_EditMedia.py
@@ -47,7 +47,7 @@ import Mime
import ThumbNails
import Utils
from Editors import EditPrimary
-from GrampsWidgets import MonitoredDate, MonitoredEntry, PrivacyButton
+from widgets import MonitoredDate, MonitoredEntry, PrivacyButton
from DisplayTabs import (SourceEmbedList, AttrEmbedList, NoteTab,
MediaBackRefList)
from Editors.AddMedia import AddMediaObject
diff --git a/src/Editors/_EditMediaRef.py b/src/Editors/_EditMediaRef.py
index 90665caf5..ac0a2aa14 100644
--- a/src/Editors/_EditMediaRef.py
+++ b/src/Editors/_EditMediaRef.py
@@ -49,7 +49,7 @@ from gen.lib import NoteType
from DisplayTabs import (SourceEmbedList, AttrEmbedList, MediaBackRefList,
NoteTab)
-from GrampsWidgets import MonitoredSpinButton, MonitoredEntry, PrivacyButton
+from widgets import MonitoredSpinButton, MonitoredEntry, PrivacyButton
from _EditReference import RefTab, EditReference
from AddMedia import AddMediaObject
diff --git a/src/Editors/_EditName.py b/src/Editors/_EditName.py
index ece0320e6..6b4577d80 100644
--- a/src/Editors/_EditName.py
+++ b/src/Editors/_EditName.py
@@ -46,8 +46,8 @@ from BasicUtils import name_displayer
from _EditSecondary import EditSecondary
from gen.lib import NoteType
from DisplayTabs import GrampsTab,SourceEmbedList,NoteTab
-from GrampsWidgets import (MonitoredEntry, MonitoredMenu, MonitoredDate,
- MonitoredDataType, PrivacyButton)
+from widgets import (MonitoredEntry, MonitoredMenu, MonitoredDate,
+ MonitoredDataType, PrivacyButton)
#-------------------------------------------------------------------------
diff --git a/src/Editors/_EditNote.py b/src/Editors/_EditNote.py
index d4f25d25a..3b6589dcb 100644
--- a/src/Editors/_EditNote.py
+++ b/src/Editors/_EditNote.py
@@ -47,11 +47,11 @@ import pango
#-------------------------------------------------------------------------
import Config
from const import GLADE_FILE
-from Editors._StyledTextEditor import StyledTextEditor
+from widgets import StyledTextEditor
from Editors._EditPrimary import EditPrimary
from DisplayTabs import GrampsTab, NoteBackRefList
-from GrampsWidgets import (MonitoredDataType, MonitoredCheckbox,
- MonitoredEntry, PrivacyButton)
+from widgets import (MonitoredDataType, MonitoredCheckbox,
+ MonitoredEntry, PrivacyButton)
from gen.lib import Note
from QuestionDialog import ErrorDialog
diff --git a/src/Editors/_EditPerson.py b/src/Editors/_EditPerson.py
index e9d45ee75..8bb14b04d 100644
--- a/src/Editors/_EditPerson.py
+++ b/src/Editors/_EditPerson.py
@@ -50,7 +50,7 @@ import const
import Utils
import Mime
import gen.lib
-import GrampsWidgets
+import widgets
from BasicUtils import name_displayer
import Errors
@@ -224,12 +224,12 @@ class EditPerson(EditPrimary):
"""
- self.private = GrampsWidgets.PrivacyButton(
+ self.private = widgets.PrivacyButton(
self.top.get_widget('private'),
self.obj,
self.db.readonly)
- self.gender = GrampsWidgets.MonitoredMenu(
+ self.gender = widgets.MonitoredMenu(
self.top.get_widget('gender'),
self.obj.set_gender,
self.obj.get_gender,
@@ -240,7 +240,7 @@ class EditPerson(EditPrimary):
),
self.db.readonly)
- self.marker = GrampsWidgets.MonitoredDataType(
+ self.marker = widgets.MonitoredDataType(
self.top.get_widget('marker'),
self.obj.set_marker,
self.obj.get_marker,
@@ -248,7 +248,7 @@ class EditPerson(EditPrimary):
self.db.get_marker_types(),
)
- self.ntype_field = GrampsWidgets.MonitoredDataType(
+ self.ntype_field = widgets.MonitoredDataType(
self.top.get_widget("ntype"),
self.pname.set_type,
self.pname.get_type,
@@ -256,7 +256,7 @@ class EditPerson(EditPrimary):
self.db.get_name_types())
if self.use_patronymic:
- self.prefix = GrampsWidgets.MonitoredEntry(
+ self.prefix = widgets.MonitoredEntry(
self.top.get_widget("prefix"),
self.pname.set_patronymic,
self.pname.get_patronymic,
@@ -266,44 +266,44 @@ class EditPerson(EditPrimary):
prefix_label.set_text(_('Patronymic:'))
prefix_label.set_use_underline(True)
else:
- self.prefix = GrampsWidgets.MonitoredEntry(
+ self.prefix = widgets.MonitoredEntry(
self.top.get_widget("prefix"),
self.pname.set_surname_prefix,
self.pname.get_surname_prefix,
self.db.readonly)
- self.suffix = GrampsWidgets.MonitoredEntry(
+ self.suffix = widgets.MonitoredEntry(
self.top.get_widget("suffix"),
self.pname.set_suffix,
self.pname.get_suffix,
self.db.readonly)
- self.call = GrampsWidgets.MonitoredEntry(
+ self.call = widgets.MonitoredEntry(
self.top.get_widget("call"),
self.pname.set_call_name,
self.pname.get_call_name,
self.db.readonly)
- self.given = GrampsWidgets.MonitoredEntry(
+ self.given = widgets.MonitoredEntry(
self.top.get_widget("given_name"),
self.pname.set_first_name,
self.pname.get_first_name,
self.db.readonly)
- self.title = GrampsWidgets.MonitoredEntry(
+ self.title = widgets.MonitoredEntry(
self.top.get_widget("title"),
self.pname.set_title,
self.pname.get_title,
self.db.readonly)
- self.surname_field = GrampsWidgets.MonitoredEntry(
+ self.surname_field = widgets.MonitoredEntry(
self.top.get_widget("surname"),
self.pname.set_surname,
self.pname.get_surname,
self.db.readonly,
autolist=self.db.get_surname_list())
- self.gid = GrampsWidgets.MonitoredEntry(
+ self.gid = widgets.MonitoredEntry(
self.top.get_widget("gid"),
self.obj.set_gramps_id,
self.obj.get_gramps_id,
diff --git a/src/Editors/_EditPersonRef.py b/src/Editors/_EditPersonRef.py
index e44517d5a..15c908895 100644
--- a/src/Editors/_EditPersonRef.py
+++ b/src/Editors/_EditPersonRef.py
@@ -50,7 +50,7 @@ import Config
from BasicUtils import name_displayer
from _EditSecondary import EditSecondary
from gen.lib import NoteType
-from GrampsWidgets import MonitoredEntry, PrivacyButton
+from widgets import MonitoredEntry, PrivacyButton
from DisplayTabs import SourceEmbedList, NoteTab
#-------------------------------------------------------------------------
diff --git a/src/Editors/_EditPlace.py b/src/Editors/_EditPlace.py
index 9fdbb347d..eb2e45384 100644
--- a/src/Editors/_EditPlace.py
+++ b/src/Editors/_EditPlace.py
@@ -49,7 +49,7 @@ import gen.lib
from Editors._EditPrimary import EditPrimary
from DisplayTabs import (GrampsTab, LocationEmbedList, SourceEmbedList,
GalleryTab, NoteTab, WebEmbedList, PlaceBackRefList)
-from GrampsWidgets import MonitoredEntry, PrivacyButton
+from widgets import MonitoredEntry, PrivacyButton
from Errors import ValidationError
from PlaceUtils import conv_lat_lon
from QuestionDialog import ErrorDialog
diff --git a/src/Editors/_EditRepoRef.py b/src/Editors/_EditRepoRef.py
index 6a3595839..2e2cd7601 100644
--- a/src/Editors/_EditRepoRef.py
+++ b/src/Editors/_EditRepoRef.py
@@ -45,7 +45,7 @@ import Config
from gen.lib import NoteType
from DisplayTabs import NoteTab,AddrEmbedList,WebEmbedList,SourceBackRefList
-from GrampsWidgets import MonitoredEntry, PrivacyButton, MonitoredDataType
+from widgets import MonitoredEntry, PrivacyButton, MonitoredDataType
from _EditReference import RefTab, EditReference
#-------------------------------------------------------------------------
diff --git a/src/Editors/_EditRepository.py b/src/Editors/_EditRepository.py
index 5366d3e54..15484d53d 100644
--- a/src/Editors/_EditRepository.py
+++ b/src/Editors/_EditRepository.py
@@ -44,7 +44,7 @@ import const
import Config
import gen.lib
-from GrampsWidgets import MonitoredEntry, MonitoredDataType, PrivacyButton
+from widgets import MonitoredEntry, MonitoredDataType, PrivacyButton
from DisplayTabs import AddrEmbedList, WebEmbedList, NoteTab, SourceBackRefList
from Editors._EditPrimary import EditPrimary
from QuestionDialog import ErrorDialog
diff --git a/src/Editors/_EditSource.py b/src/Editors/_EditSource.py
index f07151fff..834a037a3 100644
--- a/src/Editors/_EditSource.py
+++ b/src/Editors/_EditSource.py
@@ -50,7 +50,7 @@ from Editors._EditPrimary import EditPrimary
from DisplayTabs import (NoteTab, GalleryTab, DataEmbedList,
SourceBackRefList, RepoEmbedList)
-from GrampsWidgets import MonitoredEntry, PrivacyButton
+from widgets import MonitoredEntry, PrivacyButton
from QuestionDialog import ErrorDialog
#-------------------------------------------------------------------------
diff --git a/src/Editors/_EditSourceRef.py b/src/Editors/_EditSourceRef.py
index 23771df23..8a1c78f61 100644
--- a/src/Editors/_EditSourceRef.py
+++ b/src/Editors/_EditSourceRef.py
@@ -45,8 +45,8 @@ import gen.lib
from DisplayTabs import (NoteTab, GalleryTab, SourceBackRefList,
DataEmbedList, RepoEmbedList)
-from GrampsWidgets import (PrivacyButton, MonitoredEntry, MonitoredMenu,
- MonitoredDate)
+from widgets import (PrivacyButton, MonitoredEntry, MonitoredMenu,
+ MonitoredDate)
from _EditReference import RefTab, EditReference
#-------------------------------------------------------------------------
diff --git a/src/Editors/_EditUrl.py b/src/Editors/_EditUrl.py
index 6b5dcfe9e..54583ebae 100644
--- a/src/Editors/_EditUrl.py
+++ b/src/Editors/_EditUrl.py
@@ -42,7 +42,7 @@ from gtk import glade
import const
import Config
from _EditSecondary import EditSecondary
-from GrampsWidgets import MonitoredEntry, PrivacyButton, MonitoredDataType
+from widgets import MonitoredEntry, PrivacyButton, MonitoredDataType
#-------------------------------------------------------------------------
#
diff --git a/src/Filters/SideBar/_EventSidebarFilter.py b/src/Filters/SideBar/_EventSidebarFilter.py
index 4d98947c6..0c2359dd2 100644
--- a/src/Filters/SideBar/_EventSidebarFilter.py
+++ b/src/Filters/SideBar/_EventSidebarFilter.py
@@ -39,7 +39,7 @@ import gtk
# GRAMPS modules
#
#-------------------------------------------------------------------------
-import GrampsWidgets
+import widgets
import gen.lib
from Filters.SideBar import SidebarFilter
@@ -64,11 +64,11 @@ class EventSidebarFilter(SidebarFilter):
self.filter_event.set_type((gen.lib.EventType.CUSTOM, u''))
self.etype = gtk.ComboBoxEntry()
- self.event_menu = GrampsWidgets.MonitoredDataType(
+ self.event_menu = widgets.MonitoredDataType(
self.etype,
self.filter_event.set_type,
self.filter_event.get_type)
-
+
self.filter_date = gtk.Entry()
self.filter_place = gtk.Entry()
self.filter_note = gtk.Entry()
diff --git a/src/Filters/SideBar/_FamilySidebarFilter.py b/src/Filters/SideBar/_FamilySidebarFilter.py
index 53af48ccd..50a387fde 100644
--- a/src/Filters/SideBar/_FamilySidebarFilter.py
+++ b/src/Filters/SideBar/_FamilySidebarFilter.py
@@ -39,7 +39,7 @@ import gtk
# GRAMPS modules
#
#-------------------------------------------------------------------------
-import GrampsWidgets
+import widgets
import gen.lib
from Filters.SideBar import SidebarFilter
@@ -74,12 +74,12 @@ class FamilySidebarFilter(SidebarFilter):
self.family_stub.set_relationship((gen.lib.FamilyRelType.CUSTOM, u''))
self.rtype = gtk.ComboBoxEntry()
- self.event_menu = GrampsWidgets.MonitoredDataType(
+ self.event_menu = widgets.MonitoredDataType(
self.etype,
self.filter_event.set_type,
self.filter_event.get_type)
- self.rel_menu = GrampsWidgets.MonitoredDataType(
+ self.rel_menu = widgets.MonitoredDataType(
self.rtype,
self.family_stub.set_relationship,
self.family_stub.get_relationship)
@@ -87,7 +87,7 @@ class FamilySidebarFilter(SidebarFilter):
self.filter_marker = gen.lib.Family()
self.filter_marker.set_marker((gen.lib.MarkerType.CUSTOM, u''))
self.mtype = gtk.ComboBoxEntry()
- self.marker_menu = GrampsWidgets.MonitoredDataType(
+ self.marker_menu = widgets.MonitoredDataType(
self.mtype,
self.filter_marker.set_marker,
self.filter_marker.get_marker)
diff --git a/src/Filters/SideBar/_NoteSidebarFilter.py b/src/Filters/SideBar/_NoteSidebarFilter.py
index 13b195bd3..889a8da09 100644
--- a/src/Filters/SideBar/_NoteSidebarFilter.py
+++ b/src/Filters/SideBar/_NoteSidebarFilter.py
@@ -39,7 +39,7 @@ import gtk
# GRAMPS modules
#
#-------------------------------------------------------------------------
-import GrampsWidgets
+import widgets
from gen.lib import Note, NoteType
from Filters.SideBar import SidebarFilter
@@ -62,7 +62,7 @@ class NoteSidebarFilter(SidebarFilter):
self.note = Note()
self.note.set_type((NoteType.CUSTOM,''))
self.ntype = gtk.ComboBoxEntry()
- self.event_menu = GrampsWidgets.MonitoredDataType(
+ self.event_menu = widgets.MonitoredDataType(
self.ntype,
self.note.set_type,
self.note.get_type)
diff --git a/src/Filters/SideBar/_PersonSidebarFilter.py b/src/Filters/SideBar/_PersonSidebarFilter.py
index 90546c15f..9ec2500e1 100644
--- a/src/Filters/SideBar/_PersonSidebarFilter.py
+++ b/src/Filters/SideBar/_PersonSidebarFilter.py
@@ -39,7 +39,7 @@ import gtk
# GRAMPS modules
#
#-------------------------------------------------------------------------
-import GrampsWidgets
+import widgets
import gen.lib
import DateHandler
@@ -79,7 +79,7 @@ class PersonSidebarFilter(SidebarFilter):
self.filter_event = gen.lib.Event()
self.filter_event.set_type((gen.lib.EventType.CUSTOM, u''))
self.etype = gtk.ComboBoxEntry()
- self.event_menu = GrampsWidgets.MonitoredDataType(
+ self.event_menu = widgets.MonitoredDataType(
self.etype,
self.filter_event.set_type,
self.filter_event.get_type)
@@ -87,7 +87,7 @@ class PersonSidebarFilter(SidebarFilter):
self.filter_marker = gen.lib.Person()
self.filter_marker.set_marker((gen.lib.MarkerType.CUSTOM, u''))
self.mtype = gtk.ComboBoxEntry()
- self.marker_menu = GrampsWidgets.MonitoredDataType(
+ self.marker_menu = widgets.MonitoredDataType(
self.mtype,
self.filter_marker.set_marker,
self.filter_marker.get_marker)
diff --git a/src/Filters/SideBar/_RepoSidebarFilter.py b/src/Filters/SideBar/_RepoSidebarFilter.py
index fdce88e46..c40b205e7 100644
--- a/src/Filters/SideBar/_RepoSidebarFilter.py
+++ b/src/Filters/SideBar/_RepoSidebarFilter.py
@@ -39,7 +39,7 @@ import gtk
# GRAMPS modules
#
#-------------------------------------------------------------------------
-import GrampsWidgets
+import widgets
from gen.lib import Repository, RepositoryType
from Filters.SideBar import SidebarFilter
@@ -66,7 +66,7 @@ class RepoSidebarFilter(SidebarFilter):
self.repo = Repository()
self.repo.set_type((RepositoryType.CUSTOM,''))
self.rtype = gtk.ComboBoxEntry()
- self.event_menu = GrampsWidgets.MonitoredDataType(
+ self.event_menu = widgets.MonitoredDataType(
self.rtype,
self.repo.set_type,
self.repo.get_type)
diff --git a/src/Filters/SideBar/_SidebarFilter.py b/src/Filters/SideBar/_SidebarFilter.py
index 53b77a520..01831191a 100644
--- a/src/Filters/SideBar/_SidebarFilter.py
+++ b/src/Filters/SideBar/_SidebarFilter.py
@@ -24,7 +24,7 @@ from gettext import gettext as _
import gtk
import pango
-import GrampsWidgets
+import widgets
import Config
_RETURN = gtk.gdk.keyval_from_name("Return")
@@ -51,7 +51,7 @@ class SidebarFilter:
self.dbstate = dbstate
def _init_interface(self):
- self.table.attach(GrampsWidgets.MarkupLabel(_('Filter')),
+ self.table.attach(widgets.MarkupLabel(_('Filter')),
0, 2, 0, 1, xoptions=gtk.FILL|gtk.EXPAND, yoptions=0)
btn = gtk.Button()
img = gtk.image_new_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_MENU)
@@ -129,7 +129,7 @@ class SidebarFilter:
def add_entry(self, name, widget):
if name:
- self.table.attach(GrampsWidgets.BasicLabel(name),
+ self.table.attach(widgets.BasicLabel(name),
1, 2, self.position, self.position+1,
xoptions=gtk.FILL, yoptions=0)
self.table.attach(widget, 2, 4, self.position, self.position+1,
diff --git a/src/GrampsCfg.py b/src/GrampsCfg.py
index ec69184fc..d60921f1d 100644
--- a/src/GrampsCfg.py
+++ b/src/GrampsCfg.py
@@ -52,7 +52,7 @@ from BasicUtils import name_displayer as _nd
import Utils
from gen.lib import Name
import ManagedWindow
-from GrampsWidgets import MarkupLabel, BasicLabel
+from widgets import MarkupLabel, BasicLabel
from QuestionDialog import ErrorDialog, QuestionDialog2
from Errors import NameDisplayError
diff --git a/src/PluginUtils/_GuiOptions.py b/src/PluginUtils/_GuiOptions.py
index 9da9357ea..c27e469bc 100644
--- a/src/PluginUtils/_GuiOptions.py
+++ b/src/PluginUtils/_GuiOptions.py
@@ -45,7 +45,7 @@ import gobject
#
#-------------------------------------------------------------------------
import Utils
-import GrampsWidgets
+import widgets
import ManagedWindow
from QuestionDialog import OptionDialog
from Selectors import selector_factory
@@ -398,8 +398,8 @@ class GuiPersonOption(gtk.HBox):
pevt = gtk.EventBox()
pevt.add(self.__person_label)
- person_button = GrampsWidgets.SimpleButton(gtk.STOCK_INDEX,
- self.__get_person_clicked)
+ person_button = widgets.SimpleButton(gtk.STOCK_INDEX,
+ self.__get_person_clicked)
person_button.set_relief(gtk.RELIEF_NORMAL)
self.pack_start(pevt, False)
@@ -489,8 +489,8 @@ class GuiFamilyOption(gtk.HBox):
pevt = gtk.EventBox()
pevt.add(self.__family_label)
- family_button = GrampsWidgets.SimpleButton(gtk.STOCK_INDEX,
- self.__get_family_clicked)
+ family_button = widgets.SimpleButton(gtk.STOCK_INDEX,
+ self.__get_family_clicked)
family_button.set_relief(gtk.RELIEF_NORMAL)
self.pack_start(pevt, False)
@@ -628,8 +628,8 @@ class GuiNoteOption(gtk.HBox):
pevt = gtk.EventBox()
pevt.add(self.__note_label)
- note_button = GrampsWidgets.SimpleButton(gtk.STOCK_INDEX,
- self.__get_note_clicked)
+ note_button = widgets.SimpleButton(gtk.STOCK_INDEX,
+ self.__get_note_clicked)
note_button.set_relief(gtk.RELIEF_NORMAL)
self.pack_start(pevt, False)
@@ -710,8 +710,8 @@ class GuiMediaOption(gtk.HBox):
pevt = gtk.EventBox()
pevt.add(self.__media_label)
- media_button = GrampsWidgets.SimpleButton(gtk.STOCK_INDEX,
- self.__get_media_clicked)
+ media_button = widgets.SimpleButton(gtk.STOCK_INDEX,
+ self.__get_media_clicked)
media_button.set_relief(gtk.RELIEF_NORMAL)
self.pack_start(pevt, False)
@@ -813,9 +813,9 @@ class GuiPersonListOption(gtk.HBox):
# now setup the '+' and '-' pushbutton for adding/removing people from
# the container
- self.__add_person = GrampsWidgets.SimpleButton(gtk.STOCK_ADD,
+ self.__add_person = widgets.SimpleButton(gtk.STOCK_ADD,
self.__add_person_clicked)
- self.__del_person = GrampsWidgets.SimpleButton(gtk.STOCK_REMOVE,
+ self.__del_person = widgets.SimpleButton(gtk.STOCK_REMOVE,
self.__del_person_clicked)
self.__vbbox = gtk.VButtonBox()
self.__vbbox.add(self.__add_person)
@@ -948,10 +948,10 @@ class GuiSurnameColourOption(gtk.HBox):
self.scrolled_window.set_shadow_type(gtk.SHADOW_OUT)
self.pack_start(self.scrolled_window, expand=True, fill=True)
- self.add_surname = GrampsWidgets.SimpleButton(gtk.STOCK_ADD,
- self.__add_clicked)
- self.del_surname = GrampsWidgets.SimpleButton(gtk.STOCK_REMOVE,
- self.__del_clicked)
+ self.add_surname = widgets.SimpleButton(gtk.STOCK_ADD,
+ self.__add_clicked)
+ self.del_surname = widgets.SimpleButton(gtk.STOCK_REMOVE,
+ self.__del_clicked)
self.vbbox = gtk.VButtonBox()
self.vbbox.add(self.add_surname)
self.vbbox.add(self.del_surname)
diff --git a/src/ViewManager.py b/src/ViewManager.py
index 59b4864b7..0bf4983c8 100644
--- a/src/ViewManager.py
+++ b/src/ViewManager.py
@@ -70,7 +70,7 @@ import PageView
import Navigation
import RecentFiles
from BasicUtils import name_displayer
-import GrampsWidgets
+import widgets
import UndoHistory
from DbLoader import DbLoader
import GrampsDisplay
@@ -313,10 +313,10 @@ class ViewManager:
self.progress.set_size_request(100, -1)
self.progress.hide()
- self.statusbar = GrampsWidgets.Statusbar()
+ self.statusbar = widgets.Statusbar()
self.statusbar.show()
- self.warnbtn = GrampsWidgets.WarnButton()
+ self.warnbtn = widgets.WarnButton()
hbox2 = gtk.HBox()
hbox2.set_spacing(4)
diff --git a/src/gen/lib/styledtexttag.py b/src/gen/lib/styledtexttag.py
index 2a9e66cfb..5ee4b6164 100644
--- a/src/gen/lib/styledtexttag.py
+++ b/src/gen/lib/styledtexttag.py
@@ -48,7 +48,14 @@ class StyledTextTag():
"""
def __init__(self, name=None, value=None, ranges=None):
- """Setup initial instance variable values."""
+ """Setup initial instance variable values.
+
+ @note: Since L{GrampsType} supports the instance initialization
+ with several different base types, please note that C{name} parameter
+ can be int, str, unicode, tuple, or even another L{StyledTextTagType}
+ instance.
+
+ """
self.name = StyledTextTagType(name)
self.value = value
if ranges is None:
diff --git a/src/plugins/OwnerEditor.py b/src/plugins/OwnerEditor.py
index 63e6deed5..c70334137 100644
--- a/src/plugins/OwnerEditor.py
+++ b/src/plugins/OwnerEditor.py
@@ -45,7 +45,7 @@ from gtk import glade
import Config
import GrampsCfg
import GrampsDisplay
-from GrampsWidgets import MonitoredEntry
+from widgets import MonitoredEntry
import ManagedWindow
from PluginUtils import Tool, register_tool
from TransUtils import sgettext as _
diff --git a/src/widgets/__init__.py b/src/widgets/__init__.py
new file mode 100644
index 000000000..8986ec7c3
--- /dev/null
+++ b/src/widgets/__init__.py
@@ -0,0 +1,38 @@
+#
+# Gramps - a GTK+/GNOME based genealogy program
+#
+# Copyright (C) 2008 The Gramps Developers
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+# $Id$
+
+"""Custom widgets."""
+
+from grampswidgets import *
+from styledtextbuffer import *
+from styledtexteditor import *
+
+from gtk.glade import set_custom_handler
+
+def get_custom_handler(glade, function_name, widget_name,
+ str1, str2, int1, int2):
+ if function_name == 'ValidatableMaskedEntry':
+ return ValidatableMaskedEntry()
+ if function_name == 'StyledTextEditor':
+ return StyledTextEditor()
+
+set_custom_handler(get_custom_handler)
diff --git a/src/GrampsWidgets.py b/src/widgets/grampswidgets.py
similarity index 99%
rename from src/GrampsWidgets.py
rename to src/widgets/grampswidgets.py
index 0bbbf5b0f..01ded0da9 100644
--- a/src/GrampsWidgets.py
+++ b/src/widgets/grampswidgets.py
@@ -75,15 +75,15 @@ except:
INFO_ICON = gtk.STOCK_DIALOG_INFO
# Enabling custom widgets to be included in Glade
-def get_custom_handler(glade, function_name, widget_name,
- str1, str2, int1, int2):
- from Editors._StyledTextEditor import StyledTextEditor
- if function_name == 'ValidatableMaskedEntry':
- return ValidatableMaskedEntry()
- if function_name == 'StyledTextEditor':
- return StyledTextEditor()
+##def get_custom_handler(glade, function_name, widget_name,
+ ##str1, str2, int1, int2):
+ ##from Editors._StyledTextEditor import StyledTextEditor
+ ##if function_name == 'ValidatableMaskedEntry':
+ ##return ValidatableMaskedEntry()
+ ##if function_name == 'StyledTextEditor':
+ ##return StyledTextEditor()
-gtk.glade.set_custom_handler(get_custom_handler)
+##gtk.glade.set_custom_handler(get_custom_handler)
hand_cursor = gtk.gdk.Cursor(gtk.gdk.HAND2)
diff --git a/src/Editors/_StyledTextBuffer.py b/src/widgets/styledtextbuffer.py
similarity index 100%
rename from src/Editors/_StyledTextBuffer.py
rename to src/widgets/styledtextbuffer.py
diff --git a/src/Editors/_StyledTextEditor.py b/src/widgets/styledtexteditor.py
similarity index 99%
rename from src/Editors/_StyledTextEditor.py
rename to src/widgets/styledtexteditor.py
index a24d38c70..e2d40451c 100644
--- a/src/Editors/_StyledTextEditor.py
+++ b/src/widgets/styledtexteditor.py
@@ -47,9 +47,9 @@ from pango import UNDERLINE_SINGLE
#
#-------------------------------------------------------------------------
from gen.lib import StyledTextTagType
-from Editors._StyledTextBuffer import (StyledTextBuffer, ALLOWED_STYLES,
- MATCH_START, MATCH_END,
- MATCH_FLAVOR, MATCH_STRING)
+from widgets import (StyledTextBuffer, ALLOWED_STYLES,
+ MATCH_START, MATCH_END,
+ MATCH_FLAVOR, MATCH_STRING)
from Spell import Spell
from GrampsDisplay import url as display_url