firewall: Warn earlier and improve message on empty service name for TCP/UDP
Fixes QubesOS/qubes-issues#2093
This commit is contained in:
parent
00caebda95
commit
49c209d077
@ -88,6 +88,14 @@ class NewFwRuleDlg (QDialog, ui_newfwruledlg.Ui_NewFwRuleDlg):
|
||||
self.populate_combos()
|
||||
self.serviceComboBox.setInsertPolicy(QComboBox.InsertAtTop)
|
||||
|
||||
def accept(self):
|
||||
if self.tcp_radio.isChecked() or self.udp_radio.isChecked():
|
||||
if len(self.serviceComboBox.currentText()) == 0:
|
||||
msg = QMessageBox()
|
||||
msg.warning(self, "Firewall rule",
|
||||
"You need to fill service name/port for TCP/UDP rule")
|
||||
return
|
||||
QDialog.accept(self)
|
||||
|
||||
def populate_combos(self):
|
||||
example_addresses = [
|
||||
|
Loading…
Reference in New Issue
Block a user