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

Fixes 1244: KDE/Wayland: Wrong icon in taskbar (default Wayland instead of BiT icon) #1336

Merged
merged 2 commits into from
Oct 21, 2022
Merged

Fixes 1244: KDE/Wayland: Wrong icon in taskbar (default Wayland instead of BiT icon) #1336

merged 2 commits into from
Oct 21, 2022

Conversation

aryoda
Copy link
Contributor

@aryoda aryoda commented Oct 17, 2022

Tested on Manjaro KDE Plasma with Wayland for normal and root user: Boot GUIs show the disk icon now...

@aryoda aryoda changed the title Fixes 1244 (KDE/Wayland: Wrong icon in taskbar (default Wayland instead of BiT) Fixes 1244: KDE/Wayland: Wrong icon in taskbar (default Wayland instead of BiT) Oct 17, 2022
@aryoda
Copy link
Contributor Author

aryoda commented Oct 18, 2022

@emtiu The OP has backtested the fix and reports it is working. So the issue can be closes when merging this PR

@buhtz
Copy link
Member

buhtz commented Oct 18, 2022

@emtiu The OP has backtested the fix and reports it is working. So the issue can be closes when merging this PR

Just a nerdy side note: 🤓
When you write "Fixing #1244" or "Close #1244" in the original commit message I assume that GitHub does close the Issue automatically because Gitea (on codeberg.org) does it the same way.

@aryoda
Copy link
Contributor Author

aryoda commented Oct 18, 2022

Yes, I intentionally use this behavior of Github if possible to save work and link commits to issues:
https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests

What I didn't remembered is how multiple issues can be closed at once: Just use a comma-separated list of keyword/issue number pairs...

@aryoda aryoda changed the title Fixes 1244: KDE/Wayland: Wrong icon in taskbar (default Wayland instead of BiT) Fixes 1244: KDE/Wayland: Wrong icon in taskbar (default Wayland instead of BiT icon) Oct 19, 2022
@emtiu emtiu merged commit d5032ed into bit-team:master Oct 21, 2022
@emtiu
Copy link
Member

emtiu commented Oct 21, 2022

I guess the commit message was missing the # symbol in front of the issue number, I closed it manually ;)

@aryoda
Copy link
Contributor Author

aryoda commented Oct 21, 2022

Oops, I just saw my code has a stupid bug:

The last line overwrites the App ID of root again:

backintime/qt/qttools.py

Lines 167 to 178 in d5032ed

qapp.setApplicationName(app_name)
try:
if tools.isRoot():
logger.debug("Trying to set App ID for root user")
qapp.setDesktopFileName("backintime-qt-root")
else:
logger.debug("Trying to set App ID for non-privileged user")
qapp.setDesktopFileName("backintime-qt")
except Exception as e:
logger.warning("Could not set App ID (required for Wayland App icon and more)")
logger.warning("Reason: " + repr(e))
qapp.setDesktopFileName("backintime-qt")

Perhaps I was rebasing a little bit too often ;-)

Please let me check this again on my VM...

@emtiu
Copy link
Member

emtiu commented Oct 21, 2022

If removing that last line is the fix, tell me and I can do the commit myself. For anything else, kindly open another PR :)

@aryoda
Copy link
Contributor Author

aryoda commented Oct 22, 2022

@emtiu Can you please remove the last line from my prev. post (line number 178 with qapp.setDesktopFileName("backintime-qt") and commit it to master?

This fixes the bug correctly (the additional line was always using the icon from the non-root BiT version even for root which nobody realizes until the icons differ ;-).

I have tested this with Manjaro KDE Plasma Wayland...

THX a lot!

emtiu added a commit that referenced this pull request Oct 22, 2022
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

Successfully merging this pull request may close these issues.

3 participants