GNOME Bugzilla – Bug 696372
Changing file association makes the original default application disappear from properties, but not from menu
Last modified: 2013-11-09 13:35:26 UTC
https://fedoraproject.org/wiki/Test_Day:2013-03-21_Gnome_3.8 , I used the provided x86_64 live image.
In Nautilus the image files are opened by Shotwell Photo Viewer by default, and Image Viewer is the second choice. In file properties dialog, this matches - Shotwell Viewer is the Default Application, and Image Viewer is the Recommended Application. See shotwell-default.png.
However, if I make Image Viewer the default association by clicking "Set as default" button, things get confusing. The file menu is displayed fine - Image Viewer is the default one, and Shotwell Photo Viewer is the second one. But in the file properties dialog, only Image Viewer is displayed, and Shotwell Viewer disappeared completely. Also the Recommended Applications section disappeared completely. See eog-default.png. I would expect that there should be Recommended Applications section and inside should be Shotwell Viewer.
Created attachment 239524 [details]
shotwell as default
Created attachment 239525 [details]
eog as default
Kamil, thanks for this report. There are multiple bugs involved here, let me try to clear this up:
* The fundamental bug is really in the Shotwell viewer desktop file. It has NoDisplay=true which keeps it hidden from the list of applications exposed in the dialog. At the same time, Fedora's shared-mime-info defaults set it as handler for images. GtkAppChooserWidget skips such a check for the default application, as it needs to be consistent with what happens on double click; when the default association is changed, the app is not returned anymore in the available list. I don't think such a behavior is unreasonable here — the alternative would be hiding the default application as well in that case, which would be even more confusing. The correct fix is to remove NoDisplay=true from the Shotwell viewer desktop file.
* Nautilus should apply the same check when populating its Open With menu, which it doesn't do right now. That's a bug in Nautilus and we should fix it here.
* GtkAppChooserButton also needs to be fixed to the same extent. I'll open a new bug for this.
Created attachment 239558 [details] [review]
mime-actions: filter applications not supposed to be visible
Ensure NoDisplay=True applications don't end up in our Open With context
https://bugzilla.gnome.org/show_bug.cgi?id=696405 has the GTK part of this.
Attachment 239558 [details] pushed as 7770b63 - mime-actions: filter applications not supposed to be visible
Pushed this after r-t approval.
do I understand correctly that I should open a bug against Shotwell as well, and ask to use NoDisplay=False in their Shotwell Photo Viewer desktop file? Wouldn't that display the application in the All Applications dialog in the Overview mode? Because I can understand Shotwell creators that they don't want to display it there. There are basically two modes for the same application:
Shotwell Photo Manager
Shotwell Photo Viewer
And only the Manager should be displayed in the All Applications menu, but the Viewer should be the default mode when double-clicking the image file. Also, if I have a different default application (EOG), I should be able to assign the Viewer as a second option. What is the preferred approach then? How should the Shotwell desktop files look like?
(In reply to comment #7)
> Hello Cosimo,
> do I understand correctly that I should open a bug against Shotwell as well,
> and ask to use NoDisplay=False in their Shotwell Photo Viewer desktop file?
> Wouldn't that display the application in the All Applications dialog in the
> Overview mode? Because I can understand Shotwell creators that they don't want
> to display it there. There are basically two modes for the same application:
> Shotwell Photo Manager
> Shotwell Photo Viewer
> And only the Manager should be displayed in the All Applications menu, but the
> Viewer should be the default mode when double-clicking the image file. Also, if
> I have a different default application (EOG), I should be able to assign the
> Viewer as a second option. What is the preferred approach then? How should the
> Shotwell desktop files look like?
there are two ways to approach the issue in my opinion, but yeah, the basic bug is that applications handling mime types and NoDisplay=true are fundamentally incompatible.
- Shotwell viewer could omit NoDisplay=true from its desktop file. That would make it show in the All Applications dialog and in the Shell overview as a separate application (which it is, since it has a different desktop file).
- If manager and viewer are in reality two modes for the same application, there should be a single desktop file, and code inside Shotwell that starts the application in "viewer mode" when invoked with a file and in "manager mode" when it's launched without any argument.
The latter is a better approach IMO, but it's up to Shotwell developers to choose the best solution for them.
I have reported the issue to Shotwell developers here:
Thanks, Cosimo, for detailed explanation.
This Commit violates desktop rules and makes alot of problems for many applications, That's better if bug fixed by another way.
See (NoDisplay) function here:
(In reply to comment #10)
The commit was reverted. See bug 702681.