GNOME Bugzilla – Bug 674084
Preferred application setting only affects one specific mime type
Last modified: 2013-01-11 08:50:23 UTC
(Filed under "Other Preferences" because "Preferred applications" is said to be obsolete. This is about the GNOME 3 Details panel, not the 2.* preferred app capplet). It is confusing when changing the preferred application in system info seems to have no effect, because you don't actually have any .ogv or .oga, but only .mkv and .mp3. So, instead of changing just one mime-type association, it should change all that make sense at once. This is very visible with music and video (where many formats exists, and ogg is not even the most common), but also affects web, as x-scheme-handler/http is not associated with text/html See patch for details.
Created attachment 212025 [details] [review] system info: set related mime types when changing preferred apps Setting the preferred music or video app only changed the handler for ogg audio/video, leaving an inconsistent state where the previous (system default) app would be used for almost everything. Instead this commit makes it so, when the user changes the default, the most common related types are affected too. Nothing changes if configuration is modified externally (e.g. by hand or through nautilus), we only pick the primary content type as the preferred app.
Review of attachment 212025 [details] [review]: I don't like the fact that all the mime-types are hard-coded. I'd rather it be more extensible, and used the application's advertised mime-types. For example, the movie player would then become the default player for all that it handles, minus what the audio player handles.
Created attachment 212051 [details] [review] system info: set related mime types when changing preferred apps Setting the preferred music or video app only changed the handler for ogg audio/video, leaving an inconsistent state where the previous (system default) app would be used for almost everything. Instead this commit makes it so, when the user changes his preferences, the application becomes the default for all mime types in the same group that it supports. Nothing changes if configuration is modified externally (e.g. by hand or through nautilus), we only pick the primary content type as the preferred app. Here it is. Still, I liked previous version better, as for example changing Music to Rhythmbox now changes only a fraction of mime types, compared to Totem, because its desktop file is more conservative.
Created attachment 213062 [details] [review] system info: set related mime types when changing preferred apps Setting the preferred music or video app only changed the handler for ogg audio/video, leaving an inconsistent state where the previous (system default) app would be used for almost everything. Instead this commit makes it so, when the user changes his preferences, the application becomes the default for all mime types in the same group that it supports. Nothing changes if configuration is modified externally (e.g. by hand or through nautilus), we only pick the primary content type as the preferred app. Updated following comments on gio patch.
duplicate of bug #662191?
Bastien: ping? Is this ready to go?
*** Bug 662191 has been marked as a duplicate of this bug. ***
Review of attachment 213062 [details] [review]: > for almost everything For other images, audio files, or videos. > Instead this commit There's no need to reference the commit itself, it's in the commit log > we only pick the primary content type as the preferred app. How can a content type be a preferred app? I think you tried to create a system which is far more generic than it needs to be. - Setting the default audio, image, web, mail and calendar handlers should make it the default handler for all the mime-types they handle - Setting the default video app should make it the default handler for all the mime-types it handles minus the ones the audio app handles ::: panels/info/cc-info-panel.c @@ +984,3 @@ +static DefaultAppData preferred_app_infos[] = { + /* XXX: for web, we need to support text/html, That strikes me as not ready to go.
(In reply to comment #8) > Review of attachment 213062 [details] [review]: > [...] > > I think you tried to create a system which is far more generic than it needs to > be. > > - Setting the default audio, image, web, mail and calendar handlers should make > it the default handler for all the mime-types they handle > - Setting the default video app should make it the default handler for all the > mime-types it handles minus the ones the audio app handles You're wrong: - Setting the audio player must only affect audio/* mime-types, or setting Totem for audio and MPlayer for video has different effects depending on the order (which is weird). By the same reasoning, changing the video player must only affect video/*. - Setting mail must only affect mailto, or you cannot have Thunderbird for mail and Evolution for calendar - Setting web must only affect web, or choosing Chromium modifies your mail app (yes, they expose that) > ::: panels/info/cc-info-panel.c > @@ +984,3 @@ > > +static DefaultAppData preferred_app_infos[] = { > + /* XXX: for web, we need to support text/html, > > That strikes me as not ready to go. The XXX there is wrong, the commit is meant to explain the "*" pattern (there is no single pattern that covers all of those)
Created attachment 218030 [details] [review] system info: set related mime types when changing preferred apps Setting the preferred music or video app only changed the handler for ogg audio/video, leaving an inconsistent state where the previous (system default) app would be used for other images, audio and video formats. Instead make it so that when the user changes his preferences, the application becomes the default for all mime types in the same group that it supports. Nothing changes if configuration is modified externally (e.g. by hand or through nautilus): expose as preferred app the one that is configured to handle the primary content type.
*** Bug 681571 has been marked as a duplicate of this bug. ***
Ping again?
Review of attachment 218030 [details] [review]: Looks good. Thanks for making the changes. I'm not sure how we could implement this better right now, so I'll leave it to bug reporters to explain their particular problems with the UI if we ever run into that.
Attachment 218030 [details] pushed as 4d80e47 - system info: set related mime types when changing preferred apps
*** Bug 621093 has been marked as a duplicate of this bug. ***