Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wacom-gui 'silent' when run via a .desktop file with no tablet attached #3

Closed
jcpearson opened this issue Apr 3, 2018 · 1 comment

Comments

@jcpearson
Copy link

If wacom-gui is launched from a .desktop file as a menu item when there is no tablet attached, the "No tablet detected" error to stdout isn't seen

A simple 'fix' is to report this via something like zenity - e.g.

--- ./wacom-gui/pad.py.dist     2018-02-02 18:10:47.000000000 +0000
+++ ./wacom-gui/pad.py  2018-04-03 13:58:12.000000000 +0100
@@ -28,8 +28,9 @@ class Pad(QtGui.QWidget):
         label = ''
         if len(tablets) == 0:
             label = "No tablet detected"
+            os.system("zenity --error --title=wacom-gui --text \"%s\"" % label)
             print label
-            sys.exit()
+            sys.exit(1)
         #if len(tablets) > 1:
             # no longer checking for multiple tablets; only the first is configured
         #    label = "Multiple tablets detected. Please connect only one at a time"

(also as it's an error, the app should have a non-zero exit status)

@tb2097
Copy link
Owner

tb2097 commented Apr 6, 2018

Used QMessage window to keep consistent with using QT; resolving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants