-
Notifications
You must be signed in to change notification settings - Fork 250
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
hamster: explicitly set application ID and prgname on startup #556
Conversation
Under wayland, passing application_id to Gtk.Application.Init() is not sufficient to set the application ID and program name so that the shell sees it. See e.g. https://www.programcreek.com/python/example/87806/gi.repository.GLib.set_prgname https://gitlab.gnome.org/GNOME/gtk/issues/653 https://gitlab.gnome.org/GNOME/gtk/commit/72ec8963d7df0e39f688838e42445c869e4875c9
src/hamster-cli.py
Outdated
@@ -141,6 +144,8 @@ def on_activate_quit(self, data=None): | |||
|
|||
def on_startup(self, data=None): | |||
logger.debug("startup") | |||
glib.set_application_name(self.__app_id__) | |||
glib.set_prgname(self.__app_id__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are both of those necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, not to fix the icon name. But I think this way we're on the safe side.
Interesting, and thanks for the links ! Need to test and read. |
That yields both under wayland and gnome the left image. which is exactly what Your link to commit eventually lead me to
So the Let's just use the |
Wow, thanks for sorting this out. Not really obvious for the casual programmer, is it? |
Fine with me, please merge at your discretion. |
Under wayland, passing application_id to Gtk.Application.Init()
is not sufficient to set the application ID and program name
so that the shell sees it. See e.g.
https://www.programcreek.com/python/example/87806/gi.repository.GLib.set_prgname
https://gitlab.gnome.org/GNOME/gtk/issues/653
https://gitlab.gnome.org/GNOME/gtk/commit/72ec8963d7df0e39f688838e42445c869e4875c9
This should fix #541.