Skip to content

Commit

Permalink
ui: fixed pop-up crash on wayland
Browse files Browse the repository at this point in the history
Clicking on the [+] pop-up button crashes the GUI on wayland (f37).
Switching to xcb plugin fixes this problem (QT_QPA_PLATFORM=xcb)
  • Loading branch information
gustavo-iniguez-goya committed Jan 7, 2023
1 parent ba5208e commit 5264988
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions ui/bin/opensnitch-ui
Expand Up @@ -69,6 +69,7 @@ Examples:
import faulthandler
faulthandler.enable()

os.environ["QT_QPA_PLATFORM"] = "xcb"
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
if supported_qt_version(5,6,0):
try:
Expand Down
10 changes: 7 additions & 3 deletions ui/opensnitch/utils.py
Expand Up @@ -419,6 +419,9 @@ def index_by_port(self, port):
return self.ports_list.index(str(port))

class Icons():
"""
https://www.pythonguis.com/faq/built-in-qicons-pyqt/icons-builtin.png
"""

defaults = {
'document-new': "SP_FileIcon",
Expand All @@ -442,7 +445,8 @@ class Icons():
'edit-delete': "SP_DialogCancelButton",
'list-add': "SP_ArrowUp",
'list-remove': "SP_ArrowDown",
'system-search': "SP_FileDialogContentsView"
'system-search': "SP_FileDialogContentsView",
'application-exit': "SP_TitleBarCloseButton"
}

@staticmethod
Expand All @@ -461,9 +465,9 @@ class Versions():
def get():
try:
from google.protobuf import __version__ as proto_version
from grpc import __version__ as grpc_version
from grpc import _grpcio_metadata as grpcmeta

return gui_version, grpc_version, proto_version
return gui_version, grpcmeta.__version__, proto_version

except:
return "none", "none", "none"

0 comments on commit 5264988

Please sign in to comment.