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

systrayicon: Use --debug #1793

Open
buhtz opened this issue Jul 11, 2024 · 0 comments
Open

systrayicon: Use --debug #1793

buhtz opened this issue Jul 11, 2024 · 0 comments
Assignees
Labels
Discussion decision or consensus needed Low relevant, but not urgent Notifications desktop, email, GUI/tray status messages

Comments

@buhtz
Copy link
Member

buhtz commented Jul 11, 2024

I am not into qtsystrayicon.py so much. So I leave it to you Jürgen.

To my current observation the qtsystrayicon.py is not called with --debug if BIT is in debug mode. This should be changed.

But before that there is another problem. The first argument to qtsystrayicon.py is interpreted as the profile id. So if you call qtsystrayicon.py --debug the "--debug" is the profile id and will fail of course. One solution would be to remove the argument like this:

if __name__ == '__main__':

    logger.openlog()

    if "--debug" in sys.argv:  # HACK: Minimal arg parsing to enable debug-level logging
        logger.DEBUG = True
        sys.argv.remove('--debug')

Or to modify QtSysTrayIcon.__init()__ where you can find such a section:

        if len(sys.argv) > 1:
            if not self.config.setCurrentProfile(sys.argv[1]):
                logger.warning("Failed to change Profile_ID %s"
                               %sys.argv[1], self)

Not sure if the systrayicon will need to interpret more arguments then the profileid and --debug? Maybe just check all arguments if one of them is a number and use this?

My observation is based on research in relation to #1785

@buhtz buhtz added Discussion decision or consensus needed Low relevant, but not urgent Notifications desktop, email, GUI/tray status messages labels Jul 11, 2024
@buhtz buhtz added this to the 2nd release from now milestone Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion decision or consensus needed Low relevant, but not urgent Notifications desktop, email, GUI/tray status messages
Projects
None yet
Development

No branches or pull requests

2 participants