From 8f6ff64b3bd22b3cf6d86c6de9439bc99100117c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Jul 2012 19:59:16 +0530 Subject: [PATCH] On linux ensure that WM_CLASS for the main calibre GUI is set to 'calibre-gui' to match the name of the calibre-gui.desktop file. This is apparently required by the GNOME 3 shell. Fixes #1020297 (application icons in gnome3) --- src/calibre/gui2/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index d5e93c48c8..8aa4caf574 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -736,6 +736,9 @@ class Application(QApplication): def __init__(self, args, force_calibre_style=False): self.file_event_hook = None + if islinux and args[0].endswith(u'calibre'): + args = list(args) + args[0] += '-gui' qargs = [i.encode('utf-8') if isinstance(i, unicode) else i for i in args] QApplication.__init__(self, qargs) global gui_thread, qt_app