Bug 45295

Summary: Proposed changes for "unknown DE"
Product: Portland Reporter: petr vanek <petr>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: medium CC: alecm, sokoloff.a
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Fix for 45295 bug.

Description petr vanek 2012-01-26 23:59:22 UTC
If the scripts knows DE, it uses DE-specific tools like kde-open or gvfs-open.
So all trubles occur when DE was not detected.

1. Improvement in xdg-mime 
The defapp_fallback function searches default application only in the
~/.local/share/applications/defaults.list. I added the defapp_fallback that
recurse scans .desktop files in $XDG_DATA_DIRS/applications and search deafult
app based on InitialPreference line. The algorithm is similar KDE.

2. Improvement in xdg-open
The open_generic_xdg_mime The function does not search .desktop files
recursively. I added a recursive search.

https://bugzilla.redhat.com/show_bug.cgi?id=769305
Comment 1 Alex Sokoloff 2012-02-08 00:04:55 UTC
Created attachment 56737 [details] [review]
Fix for 45295 bug.
Comment 2 Alex Sokoloff 2012-02-08 00:05:53 UTC
The previous file was a mistake. Here's a corrected patch.
Comment 3 Rex Dieter 2012-03-02 10:37:22 UTC
thanks, a cursory review looks good, so I committed as-is for now.  Let's see how it works in practice. :)

http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=687127b9cd9c858491fd5e3109a6ad1ab06be396

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.