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:
parent
72a4cf6370
commit
cd89a41bb4
@ -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>
|
2007-01-09 Brian Matherly <brian@gramps-project.org>
|
||||||
* src/plugins/GraphViz.py: Fix 0000817: typo "syle" intead of "style"
|
* src/plugins/GraphViz.py: Fix 0000817: typo "syle" intead of "style"
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ class DateEdit:
|
|||||||
self.pixmap_obj = button_obj.get_child()
|
self.pixmap_obj = button_obj.get_child()
|
||||||
|
|
||||||
self.text_obj.connect('validate',self.validate)
|
self.text_obj.connect('validate',self.validate)
|
||||||
|
self.text_obj.connect('empty',self.validate)
|
||||||
self.button_obj.connect('clicked',self.invoke_date_editor)
|
self.button_obj.connect('clicked',self.invoke_date_editor)
|
||||||
|
|
||||||
self.text = unicode(self.text_obj.get_text())
|
self.text = unicode(self.text_obj.get_text())
|
||||||
|
@ -2033,6 +2033,9 @@ class ValidatableMaskedEntry(MaskedEntry):
|
|||||||
'validate': (gobject.SIGNAL_RUN_LAST,
|
'validate': (gobject.SIGNAL_RUN_LAST,
|
||||||
gobject.TYPE_PYOBJECT,
|
gobject.TYPE_PYOBJECT,
|
||||||
(gobject.TYPE_PYOBJECT,)),
|
(gobject.TYPE_PYOBJECT,)),
|
||||||
|
'empty': (gobject.SIGNAL_RUN_LAST,
|
||||||
|
gobject.TYPE_PYOBJECT,
|
||||||
|
(gobject.TYPE_PYOBJECT,)),
|
||||||
'changed': 'override',
|
'changed': 'override',
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2153,6 +2156,11 @@ class ValidatableMaskedEntry(MaskedEntry):
|
|||||||
error = self.emit("validate", text)
|
error = self.emit("validate", text)
|
||||||
if error:
|
if error:
|
||||||
raise error
|
raise error
|
||||||
|
else:
|
||||||
|
error = self.emit("empty", text)
|
||||||
|
if error:
|
||||||
|
raise error
|
||||||
|
|
||||||
|
|
||||||
self.set_valid()
|
self.set_valid()
|
||||||
return text
|
return text
|
||||||
|
Loading…
Reference in New Issue
Block a user