Support DateTime widget in add_operators
The filter box is already using this way but the changeset d1af53492682 make it fails because the DateTime doesn't have get_editable method. issue5338 review20741002
This commit is contained in:
1 parent
9cca7d2475
commit
3109a05d57
1 file changed
+5
-2
@@ -525,6 +525,10 @@ def add_operators(widget):
|
||||
return True
|
||||
return False
|
||||
|
||||
if isinstance(widget, DateTime):
|
||||
for child in widget.get_children():
|
||||
add_operators(child)
|
||||
return widget
|
||||
if isinstance(widget, gtk.ComboBoxEntry):
|
||||
editable = widget.get_child()
|
||||
else:
|
||||
@@ -569,8 +573,7 @@ if __name__ == '__main__':
|
||||
t.show()
|
||||
v.pack_start(t, False, False)
|
||||
|
||||
dt = DateTime()
|
||||
[add_operators(c) for c in dt.get_children()]
|
||||
dt = add_operators(DateTime())
|
||||
dt.show()
|
||||
v.pack_start(dt, False, False)
|
||||
|
||||
|
||||
Reference in new issue
Block a user