Do not have the fetch news dialog close when the user presses Enter

This commit is contained in:
Kovid Goyal 2010-09-28 18:21:52 -06:00
parent ca0e8729d2
commit c8477338a6

View File

@ -57,6 +57,10 @@ class SchedulerDialog(QDialog, Ui_Dialog):
self.old_news.setValue(gconf['oldest_news']) self.old_news.setValue(gconf['oldest_news'])
def keyPressEvent(self, ev):
if ev.key() not in (Qt.Key_Enter, Qt.Key_Return):
return QDialog.keyPressEvent(self, ev)
def break_cycles(self): def break_cycles(self):
self.disconnect(self.recipe_model, SIGNAL('searched(PyQt_PyObject)'), self.disconnect(self.recipe_model, SIGNAL('searched(PyQt_PyObject)'),
self.search_done) self.search_done)