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

Set program name to fix the missing icon when running under Wayland #1084

Merged
merged 3 commits into from Apr 19, 2024

Conversation

Integral-Tech
Copy link
Contributor

No description provided.

@dreua
Copy link
Member

dreua commented Apr 16, 2024

Huh, I'm surprised that didn't come up earlier. Is everyone like me still on X?

@kbengs
Copy link
Member

kbengs commented Apr 16, 2024

I am also still on X11. But I can confirm that this fixes the icon on wayland. This line actually make the test fail. Don't know why though.

@Integral-Tech
Copy link
Contributor Author

I am also still on X11. But I can confirm that this fixes the icon on wayland. This line actually make the test fail. Don't know why though.

Wayland is mature and worth trying in 2024 :)

@dreua
Copy link
Member

dreua commented Apr 17, 2024

Wayland is mature and worth trying in 2024 :)

Tried it multiple times and went back to X in less than a day each time. Mainly because I have some custom shortcuts to activate/bring to front or run applications on Gnome which rely on wmctrl+xprop which somene (me) would need to port to some alternative in wayland world. And then there used to be always a lot of bugs like this here or keepassxc (Qt) not using dark mode or whatever. But that is all quite off topic here, if you want to help with our migration to wayland we should create a ticket somewhere else 😉

It would be nice to get the dogtail tests fixed but on first glance I don't see the solution either.

@kbengs
Copy link
Member

kbengs commented Apr 17, 2024

I tested it only on KDE. @Integral-Tech are you also on KDE?

This should fix the test:

--- a/tests/test.py
+++ b/tests/test.py
@@ -185,7 +185,7 @@ class PdfArrangerTest(unittest.TestCase):
         return [
             a
             for a in root.applications()
-            if a.name == "__main__.py" or a.name == "pdfarranger"
+            if a.name in ["__main__.py", "pdfarranger", "com.github.jeromerobert.pdfarranger"]
         ]

However on KDE the name on the panel will be:
image

Also in Windows 11, in Task Manager the name will be 'com.github.jeromerobert.pdfarranger' which I think is not right.

Is there a better way to fix the icon?

@Integral-Tech
Copy link
Contributor Author

I tested it only on KDE. @Integral-Tech are you also on KDE?

This should fix the test:

--- a/tests/test.py
+++ b/tests/test.py
@@ -185,7 +185,7 @@ class PdfArrangerTest(unittest.TestCase):
         return [
             a
             for a in root.applications()
-            if a.name == "__main__.py" or a.name == "pdfarranger"
+            if a.name in ["__main__.py", "pdfarranger", "com.github.jeromerobert.pdfarranger"]
         ]

However on KDE the name on the panel will be: image

Also in Windows 11, in Task Manager the name will be 'com.github.jeromerobert.pdfarranger' which I think is not right.

Is there a better way to fix the icon?

I submitted a new commit to specify the application name. The display name should be correct now :)

@kbengs
Copy link
Member

kbengs commented Apr 19, 2024

Perfect, thanks!

@kbengs kbengs merged commit 7643541 into pdfarranger:main Apr 19, 2024
9 checks passed
@kbengs kbengs added this to the 1.11 milestone Apr 21, 2024
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.

None yet

3 participants