GEPS008: Removed Utils module
svn: r19923
This commit is contained in:
@@ -58,7 +58,7 @@ from gen.errors import WindowActiveError
|
||||
from gui.filters import SearchBar
|
||||
from gui.utils import add_menuitem
|
||||
import const
|
||||
import Utils
|
||||
from gen.utils.debug import profile
|
||||
from gen.utils.string import data_recover_msg
|
||||
from gen.utils.file import get_unicode_path_from_file_chooser
|
||||
from gui.dialog import QuestionDialog, QuestionDialog2
|
||||
@@ -264,7 +264,7 @@ class ListView(NavigationView):
|
||||
self.model.total())
|
||||
|
||||
def __build_tree(self):
|
||||
Utils.profile(self._build_tree)
|
||||
profile(self._build_tree)
|
||||
|
||||
def build_tree(self, force_sidebar=False):
|
||||
if self.active:
|
||||
|
||||
@@ -8,6 +8,7 @@ pkgpythondir = $(datadir)/@PACKAGE@/gui/views/treemodels
|
||||
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
bugfix.py \
|
||||
eventmodel.py \
|
||||
familymodel.py \
|
||||
flatbasemodel.py \
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
# Copyright (C) 2011 Tim G L Lyons
|
||||
#
|
||||
# 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$
|
||||
|
||||
"""
|
||||
Bug fix for strxfrm.
|
||||
|
||||
strxfrm is apparently broken in Win ?? --> they should fix base lib,
|
||||
we need strxfrm, fix it in this module.
|
||||
"""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import locale
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Gramps modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.datehandler import codeset
|
||||
from gen.constfunc import win
|
||||
|
||||
if win():
|
||||
conv_unicode_tosrtkey_ongtk = lambda x: locale.strxfrm(x.encode(
|
||||
codeset,'replace'))
|
||||
else:
|
||||
conv_unicode_tosrtkey_ongtk = lambda x: locale.strxfrm(x)
|
||||
@@ -73,7 +73,7 @@ import gtk
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.filters import SearchFilter, ExactSearchFilter
|
||||
from Utils import conv_unicode_tosrtkey_ongtk
|
||||
from bugfix import conv_unicode_tosrtkey_ongtk
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -506,7 +506,7 @@ class FlatBaseModel(gtk.GenericTreeModel):
|
||||
This list is sorted ascending, via localized string sort.
|
||||
conv_unicode_tosrtkey_ongtk which uses strxfrm, which is apparently
|
||||
broken in Win ?? --> they should fix base lib, we need strxfrm, fix it
|
||||
in the Utils module.
|
||||
in the bugfix module.
|
||||
"""
|
||||
# use cursor as a context manager
|
||||
with self.gen_cursor() as cursor:
|
||||
|
||||
@@ -54,7 +54,7 @@ import gtk
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from Utils import conv_unicode_tosrtkey_ongtk
|
||||
from bugfix import conv_unicode_tosrtkey_ongtk
|
||||
import gui.widgets.progressdialog as progressdlg
|
||||
from lru import LRU
|
||||
from bisect import bisect_right
|
||||
|
||||
Reference in New Issue
Block a user