mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 16:44:46 +01:00
Merge branch 'ui2.0' into main: fixed UI icons
This commit is contained in:
commit
ab1513334b
8 changed files with 138 additions and 7 deletions
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB |
63
ui/opensnitch/res/icon-white.svg
Normal file
63
ui/opensnitch/res/icon-white.svg
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="48"
|
||||
height="48"
|
||||
viewBox="0 0 12.7 12.7"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="opensnitch.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="11.2"
|
||||
inkscape:cx="19.303571"
|
||||
inkscape:cy="20.32272"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="843"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="22"
|
||||
inkscape:window-maximized="1"
|
||||
units="px" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Capa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-284.30001)">
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.0245797;stroke-opacity:1"
|
||||
d="m 2.4110472,295.34968 c -1.0890422,-0.15882 -1.97641286,-0.9635 -2.26943585,-2.05789 -0.0569801,-0.21285 -0.06364,-0.28265 -0.06364,-0.66784 0,-0.38518 0.00663,-0.45498 0.06364,-0.6678 0.13469986,-0.50309 0.37403805,-0.92281 0.72817063,-1.27693 0.29692112,-0.29693 0.71853312,-0.56133 1.05654452,-0.66262 l 0.094435,-0.0281 0.014905,-0.2737 c 0.06535,-1.20079 0.8896319,-2.19921 2.0774265,-2.51629 0.2102802,-0.0562 0.2858346,-0.0637 0.6555276,-0.0645 0.2358646,-5.9e-4 0.4658404,0.0114 0.5280299,0.027 0.1101628,0.0281 0.1101856,0.0281 0.181866,-0.0629 0.142668,-0.18079 0.4658296,-0.4742 0.6804028,-0.6177 0.5045072,-0.33746 1.0168304,-0.5065 1.6234736,-0.53562 0.5389081,-0.0256 1.0259376,0.0746 1.5098826,0.31109 0.6657931,0.32548 1.1376885,0.79739 1.4631855,1.46319 0.234048,0.47874 0.335764,0.96701 0.312284,1.49906 l -0.01219,0.27678 0.19938,0.13128 c 0.109657,0.0722 0.317056,0.24806 0.460886,0.39074 0.81399,0.8075 1.115088,1.93261 0.817664,3.05541 -0.121324,0.45797 -0.457927,1.0356 -0.806849,1.3845 -0.333376,0.33338 -0.915819,0.67934 -1.341539,0.79684 -0.4507555,0.12445 -0.3946655,0.12289 -4.2399943,0.11981 -1.9737469,-0.002 -3.6540593,-0.0125 -3.7340265,-0.0242 z m 7.6534148,-0.82834 c 0.546395,-0.1461 1.032515,-0.47864 1.360332,-0.93055 0.135216,-0.18643 0.303054,-0.55751 0.365694,-0.80853 0.07729,-0.30967 0.07745,-0.79285 3.73e-4,-1.10158 -0.18597,-0.74499 -0.76082,-1.39061 -1.461267,-1.64119 -0.140048,-0.0501 -0.213134,-0.0884 -0.205663,-0.1079 0.231186,-0.60245 0.205751,-1.2656 -0.07094,-1.84969 -0.2423058,-0.51155 -0.6123029,-0.88174 -1.1213949,-1.12201 -0.3650686,-0.1723 -0.5821245,-0.2198 -1.0044907,-0.2198 -0.2921095,0 -0.3940948,0.0101 -0.565332,0.0557 -0.6762958,0.17987 -1.2431499,0.63564 -1.5377998,1.23642 l -0.06841,0.13949 -0.1124917,-0.0569 c -0.2092944,-0.10576 -0.5176658,-0.18751 -0.7638191,-0.20252 -0.85275,-0.052 -1.6823045,0.51274 -1.9549381,1.33076 -0.1543876,0.46323 -0.1388056,0.90554 0.049015,1.39126 0.012596,0.0324 -0.0081,0.0365 -0.1433824,0.0278 -0.190616,-0.0122 -0.5005549,0.0466 -0.7439852,0.14113 -0.50046,0.19422 -0.9543977,0.67125 -1.12429124,1.18155 -0.15751069,0.47307 -0.14731701,0.90357 0.032379,1.36764 0.19430044,0.50172 0.67077894,0.95419 1.18542864,1.12568 0.1036062,0.0344 0.2473974,0.0725 0.3195359,0.0848 0.07423,0.0126 1.6994369,0.0205 3.7443725,0.0181 l 3.6132124,-0.004 z m -5.2712705,-1.2975 c -0.527233,-0.31641 -0.9586066,-0.58634 -0.9586066,-0.59989 0,-0.0137 0.4313736,-0.28347 0.9586066,-0.59989 l 0.9586077,-0.5752 0.00675,0.39089 0.00675,0.39094 h 1.5724847 1.5724903 v 0.39326 0.39327 H 7.3377568 5.7652653 l -0.00675,0.39094 -0.00675,0.39093 z m 2.1507227,-2.17014 v -0.39612 H 5.3708161 3.7977151 v -0.39326 -0.39328 h 1.5724905 1.5724916 l 0.00675,-0.39093 0.00675,-0.39093 0.9585929,0.57524 c 0.5272291,0.3164 0.961696,0.58453 0.9654831,0.59591 0.00375,0.0115 -0.4054584,0.26764 -0.9094363,0.56956 -0.5039759,0.30187 -0.9412097,0.56487 -0.9716265,0.58441 l -0.055308,0.0354 z"
|
||||
id="path826"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.7 KiB |
|
@ -89,7 +89,7 @@ class UIService(ui_pb2_grpc.UIServicer, QtWidgets.QGraphicsObject):
|
|||
self.off_image = QtGui.QPixmap(os.path.join(self._path, "res/icon-off.png"))
|
||||
self.off_icon = QtGui.QIcon()
|
||||
self.off_icon.addPixmap(self.off_image, QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.white_image = QtGui.QPixmap(os.path.join(self._path, "res/icon-white.png"))
|
||||
self.white_image = QtGui.QPixmap(os.path.join(self._path, "res/icon-white.svg"))
|
||||
self.white_icon = QtGui.QIcon()
|
||||
self.white_icon.addPixmap(self.white_image, QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.red_image = QtGui.QPixmap(os.path.join(self._path, "res/icon-red.png"))
|
||||
|
@ -155,7 +155,10 @@ class UIService(ui_pb2_grpc.UIServicer, QtWidgets.QGraphicsObject):
|
|||
|
||||
@QtCore.pyqtSlot()
|
||||
def _on_stats_dialog_shown(self):
|
||||
self._tray.setIcon(self.white_icon)
|
||||
if self._connected:
|
||||
self._tray.setIcon(self.white_icon)
|
||||
else:
|
||||
self._tray.setIcon(self.off_icon)
|
||||
|
||||
def _on_remote_stats_menu(self, address):
|
||||
self._remote_stats[address].show()
|
||||
|
@ -312,7 +315,7 @@ class UIService(ui_pb2_grpc.UIServicer, QtWidgets.QGraphicsObject):
|
|||
_title = "%s:%d (%s)" % (request.dst_host, request.dst_port, request.protocol)
|
||||
|
||||
self._tray.setIcon(self.alert_icon)
|
||||
self._tray.showMessage(_title, "%s action applied\nArguments: %s" % (rule.action, request.process_args), QtWidgets.QSystemTrayIcon.Warning, 0)
|
||||
self._tray.showMessage(_title, "%s action applied\nArguments: %s" % (rule.action, request.process_args), QtWidgets.QSystemTrayIcon.NoIcon, 0)
|
||||
|
||||
self._last_ping = datetime.now()
|
||||
self._asking = False
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Exec=opensnitch-ui
|
||||
Icon=preferences-system-firewall
|
||||
Icon=opensnitch-ui
|
||||
Type=Service
|
||||
X-KDE-ServiceTypes=SystemSettingsExternalApp
|
||||
X-KDE-System-Settings-Parent-Category=system-administration
|
BIN
ui/resources/opensnitch-ui.png
Normal file
BIN
ui/resources/opensnitch-ui.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
63
ui/resources/opensnitch-ui.svg
Normal file
63
ui/resources/opensnitch-ui.svg
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="48"
|
||||
height="48"
|
||||
viewBox="0 0 12.7 12.7"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="opensnitch.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="11.2"
|
||||
inkscape:cx="19.303571"
|
||||
inkscape:cy="20.32272"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="843"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="22"
|
||||
inkscape:window-maximized="1"
|
||||
units="px" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Capa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-284.30001)">
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.0245797;stroke-opacity:1"
|
||||
d="m 2.4110472,295.34968 c -1.0890422,-0.15882 -1.97641286,-0.9635 -2.26943585,-2.05789 -0.0569801,-0.21285 -0.06364,-0.28265 -0.06364,-0.66784 0,-0.38518 0.00663,-0.45498 0.06364,-0.6678 0.13469986,-0.50309 0.37403805,-0.92281 0.72817063,-1.27693 0.29692112,-0.29693 0.71853312,-0.56133 1.05654452,-0.66262 l 0.094435,-0.0281 0.014905,-0.2737 c 0.06535,-1.20079 0.8896319,-2.19921 2.0774265,-2.51629 0.2102802,-0.0562 0.2858346,-0.0637 0.6555276,-0.0645 0.2358646,-5.9e-4 0.4658404,0.0114 0.5280299,0.027 0.1101628,0.0281 0.1101856,0.0281 0.181866,-0.0629 0.142668,-0.18079 0.4658296,-0.4742 0.6804028,-0.6177 0.5045072,-0.33746 1.0168304,-0.5065 1.6234736,-0.53562 0.5389081,-0.0256 1.0259376,0.0746 1.5098826,0.31109 0.6657931,0.32548 1.1376885,0.79739 1.4631855,1.46319 0.234048,0.47874 0.335764,0.96701 0.312284,1.49906 l -0.01219,0.27678 0.19938,0.13128 c 0.109657,0.0722 0.317056,0.24806 0.460886,0.39074 0.81399,0.8075 1.115088,1.93261 0.817664,3.05541 -0.121324,0.45797 -0.457927,1.0356 -0.806849,1.3845 -0.333376,0.33338 -0.915819,0.67934 -1.341539,0.79684 -0.4507555,0.12445 -0.3946655,0.12289 -4.2399943,0.11981 -1.9737469,-0.002 -3.6540593,-0.0125 -3.7340265,-0.0242 z m 7.6534148,-0.82834 c 0.546395,-0.1461 1.032515,-0.47864 1.360332,-0.93055 0.135216,-0.18643 0.303054,-0.55751 0.365694,-0.80853 0.07729,-0.30967 0.07745,-0.79285 3.73e-4,-1.10158 -0.18597,-0.74499 -0.76082,-1.39061 -1.461267,-1.64119 -0.140048,-0.0501 -0.213134,-0.0884 -0.205663,-0.1079 0.231186,-0.60245 0.205751,-1.2656 -0.07094,-1.84969 -0.2423058,-0.51155 -0.6123029,-0.88174 -1.1213949,-1.12201 -0.3650686,-0.1723 -0.5821245,-0.2198 -1.0044907,-0.2198 -0.2921095,0 -0.3940948,0.0101 -0.565332,0.0557 -0.6762958,0.17987 -1.2431499,0.63564 -1.5377998,1.23642 l -0.06841,0.13949 -0.1124917,-0.0569 c -0.2092944,-0.10576 -0.5176658,-0.18751 -0.7638191,-0.20252 -0.85275,-0.052 -1.6823045,0.51274 -1.9549381,1.33076 -0.1543876,0.46323 -0.1388056,0.90554 0.049015,1.39126 0.012596,0.0324 -0.0081,0.0365 -0.1433824,0.0278 -0.190616,-0.0122 -0.5005549,0.0466 -0.7439852,0.14113 -0.50046,0.19422 -0.9543977,0.67125 -1.12429124,1.18155 -0.15751069,0.47307 -0.14731701,0.90357 0.032379,1.36764 0.19430044,0.50172 0.67077894,0.95419 1.18542864,1.12568 0.1036062,0.0344 0.2473974,0.0725 0.3195359,0.0848 0.07423,0.0126 1.6994369,0.0205 3.7443725,0.0181 l 3.6132124,-0.004 z m -5.2712705,-1.2975 c -0.527233,-0.31641 -0.9586066,-0.58634 -0.9586066,-0.59989 0,-0.0137 0.4313736,-0.28347 0.9586066,-0.59989 l 0.9586077,-0.5752 0.00675,0.39089 0.00675,0.39094 h 1.5724847 1.5724903 v 0.39326 0.39327 H 7.3377568 5.7652653 l -0.00675,0.39094 -0.00675,0.39093 z m 2.1507227,-2.17014 v -0.39612 H 5.3708161 3.7977151 v -0.39326 -0.39328 h 1.5724905 1.5724916 l 0.00675,-0.39093 0.00675,-0.39093 0.9585929,0.57524 c 0.5272291,0.3164 0.961696,0.58453 0.9654831,0.59591 0.00375,0.0115 -0.4054584,0.26764 -0.9094363,0.56956 -0.5039759,0.30187 -0.9412097,0.56487 -0.9716265,0.58441 l -0.055308,0.0354 z"
|
||||
id="path826"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.7 KiB |
|
@ -2,7 +2,7 @@
|
|||
Type=Application
|
||||
Name=OpenSnitch
|
||||
Exec=opensnitch-ui
|
||||
Icon=preferences-system-firewall
|
||||
Icon=opensnitch-ui
|
||||
GenericName=OpenSnitch Firewall
|
||||
Terminal=false
|
||||
NoDisplay=false
|
|
@ -28,7 +28,9 @@ These rules can last forever, until the app restart or just one time.',
|
|||
packages=find_packages(),
|
||||
include_package_data = True,
|
||||
package_data={'': ['*.*']},
|
||||
data_files=[('/usr/share/applications', ['opensnitch_ui.desktop']),
|
||||
('/usr/share/kservices5', ['kcm_opensnitch.desktop'])],
|
||||
data_files=[('/usr/share/applications', ['resources/opensnitch_ui.desktop']),
|
||||
('/usr/share/kservices5', ['resources/kcm_opensnitch.desktop']),
|
||||
('/usr/share/icons/hicolor/scalable/apps', ['resources/opensnitch-ui.svg']),
|
||||
('/usr/share/icons/hicolor/48x48/apps', ['resources/opensnitch-ui.png'])],
|
||||
scripts = [ 'bin/opensnitch-ui' ],
|
||||
zip_safe=False)
|
||||
|
|
Loading…
Add table
Reference in a new issue