Calibre has a .destkop file named 'calibre' but the class of the window is 'Calibre-gui'

Bug #1206687 reported by Matthieu Baerts on 2013-07-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre (Ubuntu)
Undecided
Unassigned

Bug Description

Hello,

Firstly, thank you for maintaining Calibre packages!

It seems that Calibre's launcher is named 'calibre.desktop' but when you launch Calibre GUI, you can see that Calibre window's class is 'Calibre-gui' and not 'Calibre'. (according to `xprop`)

It's maybe a detail but if the name of the class and the launcher are different, it's harder for a taskbar manager (a shell, a panel, a dock, etc.) to make a link between them.

In the source code of Calibre, I see that it should produce a launcher named 'calibre-gui.desktop': https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py#L697
But it seems that Debian/Ubuntu packages are using their own launcher: https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/calibre/saucy/view/head:/debian/local/calibre.desktop

Is it possible to use the upstream launcher or to rename Debian/Ubuntu's launcher? (note that it's also maybe better to have an icon with the same name as the launcher => https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py#L856 )

description: updated
summary: - Calibre has a .destkop file and the main binary named 'calibre' but the
- class of the window is 'Calibre-gui'
+ Calibre has a .destkop file named 'calibre' but the class of the window
+ is 'Calibre-gui'
Martin Pitt (pitti) wrote :

Sure, no problem! Committed to packaging branch.

Changed in calibre (Ubuntu):
status: New → Fix Committed
Matthieu Baerts (matttbe) wrote :

@Martin: Thank you for this quick fix :)

Martin Pitt (pitti) wrote :

It's actually not that quick -- renaming the .desktop lost the icon entirely, at least in Unity. I need to look into this.

Changed in calibre (Ubuntu):
status: Fix Committed → In Progress
Matthieu Baerts (matttbe) wrote :

It's maybe better to rename the icon too:

debian/rules:
    - cp manual/resources/logo.png debian/tmp/usr/share/pixmaps/calibre.png
    + cp manual/resources/logo.png debian/tmp/usr/share/pixmaps/calibre-gui.png

debian/local/calibre-gui.desktop
    - Icon=calibre
    + Icon=calibre-gui

But why not using .desktop files from upstream? :-)

Martin Pitt (pitti) on 2013-08-01
Changed in calibre (Ubuntu):
status: In Progress → Fix Committed
Jeremy Bicha (jbicha) wrote :

I've only seen this problem with Python apps. Is there an underlying bug in python-gobject?

apport: bug 1207496
gparted: https://bugzilla.gnome.org/705323
ubiquity: bug 1203224

Jeremy Bicha (jbicha) wrote :

Never mind, gparted isn't a Python app which disproves my theory.

Martin Pitt (pitti) wrote :

I renamed the icon to "calibre-gui" as well, works fine here in Unity.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package calibre - 0.9.41+dfsg-1

---------------
calibre (0.9.41+dfsg-1) unstable; urgency=low

  * New upstream release.
  * debian/local/calibre.desktop: Rename to calibre-gui.desktop to match its
    window class. (LP: #1206687)
  * Add debian/local/ebook-viewer.desktop, so that one can directly open
    *.epub or *.mobi files in file browsers. Thanks Korey Lu!
    (Closes: #664182)
  * Make it possible to auto-start calibre when connecting an e-book reader
    device:
    - Add debian/local/mime/calibre.xml MIME association, install in
      debian/calibre.install.
    - debian/local/calibre-gui.desktop: Add MIME type and file argument.
    - Thanks to Thanks Korey Lu! (Closes: #715246)

 -- Martin Pitt <email address hidden> Thu, 01 Aug 2013 18:17:22 +0200

Changed in calibre (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers