fix marker type, search bar tuple problem
svn: r6622
This commit is contained in:
parent
e70020113b
commit
46068b01c1
@ -1,3 +1,9 @@
|
||||
2006-05-11 Don Allingham <don@gramps-project.org>
|
||||
* src/PageView.py: fix search tuple
|
||||
* src/GrampsWidgets.py: handle Marker type properly
|
||||
* src/DataViews/_PersonView.py: fix cache problem
|
||||
* src/RelLib/_MarkerType.py: handle NONE/CUSTOM conflict
|
||||
|
||||
2006-05-11 Alex Roitman <shura@gramps-project.org>
|
||||
* src/UndoHistory.py: Paint all rows in a selected block; Require
|
||||
exploicit button click on any action.
|
||||
|
@ -462,8 +462,9 @@ class PersonView(PageView.PersonNavView):
|
||||
def edit(self,obj):
|
||||
if self.dbstate.active:
|
||||
try:
|
||||
EditPerson(self.dbstate, self.uistate, [],
|
||||
self.dbstate.active)
|
||||
handle = self.dbstate.active.handle
|
||||
person = self.dbstate.db.get_person_from_handle(handle)
|
||||
EditPerson(self.dbstate, self.uistate, [], person)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
|
@ -370,11 +370,12 @@ class MonitoredDataType:
|
||||
default,
|
||||
additional=custom_values)
|
||||
|
||||
value = self.sel.get_values()
|
||||
self.set_val(self.fix_value(value))
|
||||
|
||||
if val.is_custom():
|
||||
if get_val().is_custom():
|
||||
self.obj.set_active(get_val().get_custom())
|
||||
obj.child.set_text(str(val))
|
||||
else:
|
||||
active = int(get_val())
|
||||
self.obj.set_active(active)
|
||||
|
||||
self.obj.set_sensitive(not readonly)
|
||||
self.obj.connect('changed', self.on_change)
|
||||
|
@ -51,6 +51,8 @@ import const
|
||||
NAVIGATION_NONE = -1
|
||||
NAVIGATION_PERSON = 0
|
||||
|
||||
EMPTY_SEARCH = (0, '', False)
|
||||
|
||||
#----------------------------------------------------------------
|
||||
#
|
||||
# PageView
|
||||
@ -570,7 +572,7 @@ class ListView(BookMarkView):
|
||||
handle = self.first_selected()
|
||||
|
||||
if Config.get(Config.FILTER):
|
||||
search = (0, '', False)
|
||||
search = EMPTY_SEARCH
|
||||
else:
|
||||
search = self.search_bar.get_value()
|
||||
|
||||
@ -610,7 +612,7 @@ class ListView(BookMarkView):
|
||||
if self.active:
|
||||
|
||||
if Config.get(Config.FILTER):
|
||||
search = (0, '')
|
||||
search = EMPTY_SEARCH
|
||||
else:
|
||||
search = self.search_bar.get_value()
|
||||
|
||||
@ -631,7 +633,7 @@ class ListView(BookMarkView):
|
||||
db.connect(sig, self.signal_map[sig])
|
||||
|
||||
if Config.get(Config.FILTER):
|
||||
search = (0, '')
|
||||
search = EMPTY_SEARCH
|
||||
else:
|
||||
search = self.search_bar.get_value()
|
||||
|
||||
|
@ -46,3 +46,31 @@ class MarkerType(GrampsType):
|
||||
|
||||
def __init__(self, value=None):
|
||||
GrampsType.__init__(self, value)
|
||||
|
||||
def set(self, value):
|
||||
if isinstance(value,self.__class__):
|
||||
if value.val == self.CUSTOM and value.string == '':
|
||||
self.val = self.NONE
|
||||
self.string = ''
|
||||
else:
|
||||
self.val = value.val
|
||||
self.string = value.string
|
||||
elif type(value) == tuple:
|
||||
if value[0] == self.CUSTOM and value[1] == '':
|
||||
self.value = self.NONE
|
||||
self.string = ''
|
||||
else:
|
||||
self.val = value[0]
|
||||
self.string = value[1]
|
||||
elif type(value) == int:
|
||||
self.val = value
|
||||
self.string = ''
|
||||
elif type(value) == str:
|
||||
self.val = self._S2IMAP.get(value,self._CUSTOM)
|
||||
if self.val == self._CUSTOM:
|
||||
self.string = value
|
||||
else:
|
||||
self.string = ''
|
||||
else:
|
||||
self.val = self._DEFAULT
|
||||
self.string = ''
|
||||
|
Loading…
Reference in New Issue
Block a user