2006-07-25 Alex Roitman <shura@gramps-project.org>

* src/Filters/_SearchBar.py (get_value,apply_filter): Force unicode.
	* src/Filters/_PersonSidebarFilter.py (get_filter): Force unicode.
	* src/Filters/_FamilySidebarFilter.py (get_filter): Force unicode.



svn: r7074
This commit is contained in:
Alex Roitman 2006-07-25 19:11:24 +00:00
parent d13fa66d07
commit a34a20409a
5 changed files with 61 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2006-07-25 Alex Roitman <shura@gramps-project.org>
* src/Filters/_SearchBar.py (get_value,apply_filter): Force unicode.
* src/Filters/_PersonSidebarFilter.py (get_filter): Force unicode.
* src/Filters/_FamilySidebarFilter.py (get_filter): Force unicode.
2006-07-24 Alex Roitman <shura@gramps-project.org>
* configure.in: Bump up the version number.
* src/GrampsDb/_GrampsBSDDB.py (find_fidmap): Remove unused method.

View File

@ -18,10 +18,27 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id: _FilterList.py 6529 2006-05-03 06:29:07Z rshura $
# $Id$
#-------------------------------------------------------------------------
#
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# gtk
#
#-------------------------------------------------------------------------
import gtk
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
import GrampsWidgets
import RelLib
@ -29,6 +46,11 @@ from _SidebarFilter import SidebarFilter
from Filters import GenericFamilyFilter, build_filter_model, Rules
from Filters.Rules.Family import *
#-------------------------------------------------------------------------
#
# PersonSidebarFilter class
#
#-------------------------------------------------------------------------
class FamilySidebarFilter(SidebarFilter):
def __init__(self, clicked):
@ -88,8 +110,8 @@ class FamilySidebarFilter(SidebarFilter):
self.clicked_func()
def get_filter(self):
gid = self.filter_id.get_text().strip()
note = self.filter_note.get_text().strip()
gid = unicode(self.filter_id.get_text()).strip()
note = unicode(self.filter_note.get_text()).strip()
regex = self.filter_regex.get_active()
gen = self.generic.get_active() > 0

View File

@ -18,10 +18,27 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id: _FilterList.py 6529 2006-05-03 06:29:07Z rshura $
# $Id$
#-------------------------------------------------------------------------
#
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# gtk
#
#-------------------------------------------------------------------------
import gtk
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
import GrampsWidgets
import RelLib
@ -29,6 +46,11 @@ from _SidebarFilter import SidebarFilter
from Filters.Rules.Person import *
from Filters import GenericFilter, build_filter_model, Rules
#-------------------------------------------------------------------------
#
# PersonSidebarFilter class
#
#-------------------------------------------------------------------------
class PersonSidebarFilter(SidebarFilter):
def __init__(self, clicked):
@ -92,11 +114,11 @@ class PersonSidebarFilter(SidebarFilter):
self.clicked_func()
def get_filter(self):
name = self.filter_name.get_text().strip()
gid = self.filter_id.get_text().strip()
birth = self.filter_birth.get_text().strip()
death = self.filter_death.get_text().strip()
note = self.filter_note.get_text().strip()
name = unicode(self.filter_name.get_text()).strip()
gid = unicode(self.filter_id.get_text()).strip()
birth = unicode(self.filter_birth.get_text()).strip()
death = unicode(self.filter_death.get_text()).strip()
note = unicode(self.filter_note.get_text()).strip()
gender = self.filter_gender.get_active()
regex = self.filter_regex.get_active()
gen = self.generic.get_active() > 0

View File

@ -127,14 +127,14 @@ class SearchBar:
self.apply_filter()
def get_value(self):
text = self.filter_text.get_text().strip()
text = unicode(self.filter_text.get_text()).strip()
node = self.filter_list.get_active_iter()
index = self.filter_model.get_value(node,1)
inv = self.filter_model.get_value(node,2)
return (index, text, inv)
def apply_filter(self,current_model=None):
self.apply_text = self.filter_text.get_text()
self.apply_text = unicode(self.filter_text.get_text())
self.filter_button.set_sensitive(False)
self.uistate.status_text(_('Updating display...'))
self.on_apply_callback()

View File

@ -18,7 +18,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id: _FilterList.py 6529 2006-05-03 06:29:07Z rshura $
# $Id$
from gettext import gettext as _
import gtk