2007-01-10 Don Allingham <don@gramps-project.org>

* src/GrampsWidgets.py: add support for an "empty" signal on 
	ValidatableMaskedEntry so that we can update the value when the
	string has been cleared (bug #821)
	* src/DateEdit.py: catch empty signal (bug #821)



svn: r7891
This commit is contained in:
Don Allingham 2007-01-11 04:58:31 +00:00
parent 72a4cf6370
commit cd89a41bb4
3 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-01-10 Don Allingham <don@gramps-project.org>
* src/GrampsWidgets.py: add support for an "empty" signal on
ValidatableMaskedEntry so that we can update the value when the
string has been cleared (bug #821)
* src/DateEdit.py: catch empty signal (bug #821)
2007-01-09 Brian Matherly <brian@gramps-project.org>
* src/plugins/GraphViz.py: Fix 0000817: typo "syle" intead of "style"

View File

@ -126,6 +126,7 @@ class DateEdit:
self.pixmap_obj = button_obj.get_child()
self.text_obj.connect('validate',self.validate)
self.text_obj.connect('empty',self.validate)
self.button_obj.connect('clicked',self.invoke_date_editor)
self.text = unicode(self.text_obj.get_text())

View File

@ -2033,6 +2033,9 @@ class ValidatableMaskedEntry(MaskedEntry):
'validate': (gobject.SIGNAL_RUN_LAST,
gobject.TYPE_PYOBJECT,
(gobject.TYPE_PYOBJECT,)),
'empty': (gobject.SIGNAL_RUN_LAST,
gobject.TYPE_PYOBJECT,
(gobject.TYPE_PYOBJECT,)),
'changed': 'override',
}
@ -2153,6 +2156,11 @@ class ValidatableMaskedEntry(MaskedEntry):
error = self.emit("validate", text)
if error:
raise error
else:
error = self.emit("empty", text)
if error:
raise error
self.set_valid()
return text