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 696372 - Changing file association makes the original default application disappear from properties, but not from menu
Changing file association makes the original default application disappear fr...
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File Properties Dialog
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-22 10:15 UTC by Kamil Páral
Modified: 2013-11-09 13:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shotwell as default (1.23 MB, image/png)
2013-03-22 10:16 UTC, Kamil Páral
  Details
eog as default (1.23 MB, image/png)
2013-03-22 10:16 UTC, Kamil Páral
  Details
mime-actions: filter applications not supposed to be visible (1.38 KB, patch)
2013-03-22 16:44 UTC, Cosimo Cecchi
committed Details | Review

Description Kamil Páral 2013-03-22 10:15:20 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.

nautilus-3.7.92-1.fc19.x86_64
shotwell-0.14.0-2.fc19.x86_64
eog-3.7.92-1.fc19.x86_64
Comment 1 Kamil Páral 2013-03-22 10:16:21 UTC
Created attachment 239524 [details]
shotwell as default
Comment 2 Kamil Páral 2013-03-22 10:16:40 UTC
Created attachment 239525 [details]
eog as default
Comment 3 Cosimo Cecchi 2013-03-22 16:34:43 UTC
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.
Comment 4 Cosimo Cecchi 2013-03-22 16:44:26 UTC
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
menus.
Comment 5 Cosimo Cecchi 2013-03-22 16:46:48 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=696405 has the GTK part of this.
Comment 6 Cosimo Cecchi 2013-03-22 21:43:02 UTC
Attachment 239558 [details] pushed as 7770b63 - mime-actions: filter applications not supposed to be visible

Pushed this after r-t approval.
Comment 7 Kamil Páral 2013-03-25 09:46:02 UTC
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?
Comment 8 Cosimo Cecchi 2013-03-25 13:42:06 UTC
(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?

Hey Kamil,

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.
Comment 9 Kamil Páral 2013-03-25 15:07:26 UTC
I have reported the issue to Shotwell developers here:
http://redmine.yorba.org/issues/6660

Thanks, Cosimo, for detailed explanation.
Comment 10 Mosaab Alzoubi 2013-11-09 05:36:59 UTC
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: 
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
Comment 11 António Fernandes 2013-11-09 12:47:17 UTC
(In reply to comment #10)
The commit was reverted. See bug 702681.
Comment 12 Mosaab Alzoubi 2013-11-09 13:35:26 UTC
Thank You.
Regards.