After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 699073 - Install desktop file as gnome-calculator.desktop
Install desktop file as gnome-calculator.desktop
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
3.8.x
Other All
: Normal normal
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-27 20:37 UTC by Thomas Lange
Modified: 2013-08-03 19:38 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8


Attachments
AppMenu with Xfce (9.47 KB, image/png)
2013-04-27 20:37 UTC, Thomas Lange
  Details
Make WM_CLASS X property match the desktop file (941 bytes, patch)
2013-08-02 23:56 UTC, Michael Catanzaro
committed Details | Review

Description Thomas Lange 2013-04-27 20:37:50 UTC
Created attachment 242680 [details]
AppMenu with Xfce

Currently the desktop file is installed as gcalctool.desktop.
But the application name for the AppMenu is read from this file.
And because of the missing file the name is "Application" (default from GTK).

Renaming gcalctool.desktop to gnome-calculator.desktop
changes the name to "Calculator" again.
Comment 1 Mark Pariente 2013-05-07 03:29:12 UTC
Can confirm this with gnome-calculator 3.8.1, renaming the desktop file from gcalctool.desktop to gnome-calculator.desktop fixes the issue.
Comment 2 PioneerAxon 2013-06-18 19:16:10 UTC
Thomas, Mark,

Thank you for your bug report.

It has been fixed in master branch[1].

[1] : https://git.gnome.org/browse/gnome-calculator/commit/?id=ac5556034a9caccd6485a25336341d482f203d43
Comment 3 Jeremy Bicha 2013-06-20 18:10:16 UTC
No, this is the wrong fix as it breaks upgrades for those who have "favorited" gcalctool. See also bug 695382. I'm reopening this bug.
Comment 4 PioneerAxon 2013-06-21 13:26:07 UTC
Jeremy,

Sorry for that. I didn't notice it could happen.

But on the other side, sooner or later we will have to rename the .desktop file, and when we do it, it will break the compatibility.
If we do this for a major software release (at 3.10), most of the users won't be affected, as most distributions doesn't upgrade the packages in repositories which has a different major version of software they shipped with their OS (e.g. Ubuntu, Fedora, etc.).

And the best time for this to be applied would have been when we updated the name of software (from gcalctool to gnome-calculator), as it already broke many dependencies (e.g. main binary name from gcalctool to gnome-calculator, data directory for the .ui files, user preferences, saved constants, version number sequence 6.x.x to 3.x.x etc.) at the time of upgrade. And we should fix it as early as possible, so that it doesn't confuse GTK and other DEs, as we can see in this bug. :/

I'm not sure if I'm supposed to invert the commit or not at this point. :/
Comment 5 Thomas Lange 2013-06-21 13:48:33 UTC
In my opinion it should be gnome-calculator.desktop since the application is called gnome-calculator now.
A workaround (revert this commit) is not appropriate, the only way is to adjust keybindings/favourites.
Comment 6 Jeremy Bicha 2013-06-21 14:04:42 UTC
Pioneer, please do not rename the .desktop until you have a tool to automatically migrate user preferences, at least GNOME Shell and Unity's favorites. Until then, it's a minor implementation detail that doesn't affect anyone except "power users" and developers who should be able to easily find the right .desktop file by grepping or something.

None of the other changes you mentioned broke things for users.

I'm pretty sure there is a fix to this bug that does not involve renaming the .desktop. Maybe if we ask on #gnome-hackers we can find a fix.

Thomas, what distro are you running?
Comment 7 Thomas Lange 2013-06-21 14:06:38 UTC
(In reply to comment #6)
> Thomas, what distro are you running?

Arch Linux, gnome-calculator 3.8.2
Comment 8 Mark Pariente 2013-06-22 02:39:13 UTC
I'm running Gentoo and without renaming the .desktop file to gnome-calculator.desktop gnome-shell doesn't display the calculator app anywhere, not in the 'All Applications' menu nor through searching.
Comment 9 Jeremy Bicha 2013-06-22 02:44:35 UTC
Mark, you need to grab https://git.gnome.org/browse/gnome-menus/commit/?id=599c7b
Comment 10 PioneerAxon 2013-06-27 13:44:09 UTC
I reverted it back to gcalctool.desktop for now. I will try asking someone on #gnome-hackers tonight.
Comment 11 Michael Catanzaro 2013-08-02 23:56:21 UTC
Created attachment 250746 [details] [review]
Make WM_CLASS X property match the desktop file

GNOME Shell expects this; for details, see
https://wiki.gnome.org/GnomeShell/ApplicationBased
Comment 12 Michael Catanzaro 2013-08-03 00:02:42 UTC
When gnome-calculator is built from jhbuild, GNOME Shell displays the application menu name as "Gnome-calculator" rather than "Calculator."  This patch fixes that bug.  I attached it here because I'm pretty sure it will fix the Xfce issue, too... but I don't have not tested it in Xfce.
Comment 13 Thomas Lange 2013-08-03 13:05:22 UTC
(In reply to comment #12)
> I attached it here because I'm pretty sure it will fix
> the Xfce issue, too... but I don't have not tested it in Xfce.

It fixes the issue with Xfce, thanks for the patch.
Comment 14 Michael Catanzaro 2013-08-03 19:37:29 UTC
Cool.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.