ui,fw: added help button to open the fw rules wiki

This commit is contained in:
Gustavo Iñiguez Goia 2023-06-17 12:01:26 +02:00
parent 06f333c281
commit 01069d363b
Failed to generate hash of commit
3 changed files with 18 additions and 1 deletions

View file

@ -7,6 +7,7 @@ class Config:
HELP_URL = "https://github.com/evilsocket/opensnitch/wiki/"
HELP_RULES_URL = "https://github.com/evilsocket/opensnitch/wiki/Rules"
HELP_SYS_RULES_URL = "https://github.com/evilsocket/opensnitch/wiki/System-rules#upgrading-from-previous-versions"
HELP_SYSFW_URL = "https://github.com/evilsocket/opensnitch/wiki/System-rules"
HELP_CONFIG_URL = "https://github.com/evilsocket/opensnitch/wiki/Configurations"
HELP_SYSTRAY_WARN = "https://github.com/evilsocket/opensnitch/wiki/GUI-known-problems#gui-does-not-show-up"

View file

@ -65,6 +65,9 @@ class FirewallDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
self.comboProfile.currentIndexChanged.connect(self._cb_combo_profile_changed)
self.sliderFwEnable.valueChanged.connect(self._cb_enable_fw_changed)
self.cmdClose.clicked.connect(self._cb_close_clicked)
self.cmdHelp.clicked.connect(
lambda: QtGui.QDesktopServices.openUrl(QtCore.QUrl(Config.HELP_SYSFW_URL))
)
# TODO: when output policy is set to Drop, all outbound traffic is
# blocked.
@ -77,10 +80,12 @@ class FirewallDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
excludeIcon = Icons.new("go-up")
allowInIcon = Icons.new("go-down")
newIcon = Icons.new("document-new")
helpIcon = Icons.new("help-browser")
self.cmdClose.setIcon(closeIcon)
self.cmdAllowOUTService.setIcon(excludeIcon)
self.cmdAllowINService.setIcon(allowInIcon)
self.cmdNewRule.setIcon(newIcon)
self.cmdHelp.setIcon(helpIcon)
@QtCore.pyqtSlot(ui_pb2.NotificationReply)
def _cb_notification_callback(self, reply):

View file

@ -378,7 +378,8 @@ QSlider::sub-page:horizontal {
<string>Allow service (IN)</string>
</property>
<property name="icon">
<iconset theme="go-down"/>
<iconset theme="go-down">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -456,6 +457,16 @@ QSlider::sub-page:horizontal {
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="cmdHelp">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="help-browser"/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">