Merge remote-tracking branch 'qubesos/pr/93'

* qubesos/pr/93:
  Tiny fix to make pylint stop complaining
  Fixes unwanted behavior in VM settings
This commit is contained in:
Marek Marczykowski-Górecki 2018-05-22 03:50:16 +02:00
commit 24a5850507
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -136,6 +136,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
####### services tab
self.__init_services_tab__()
self.service_line_edit.returnPressed.connect(self.__add_service__)
self.add_srv_button.clicked.connect(self.__add_service__)
self.remove_srv_button.clicked.connect(self.__remove_service__)
@ -147,6 +148,13 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
self.refresh_apps_button.clicked.connect(
self.refresh_apps_button_pressed)
def keyPressEvent(self, event): # pylint: disable=invalid-name
if event.key() == QtCore.Qt.Key_Enter \
or event.key() == QtCore.Qt.Key_Return:
return
else:
super(VMSettingsWindow, self).keyPressEvent(event)
def reject(self):
self.done(0)