Bug 769305 - patches for unknown DE
Summary: patches for unknown DE
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: xdg-utils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-20 13:33 UTC by Marcus Moeller
Modified: 2012-03-02 19:52 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-03-02 19:52:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
xdg-mime Patch (25.01 KB, patch)
2011-12-20 13:33 UTC, Marcus Moeller
no flags Details | Diff
xdg-open Patch (9.98 KB, patch)
2011-12-20 13:34 UTC, Marcus Moeller
no flags Details | Diff
xdg-mime.in.diff for comment 2 (2011-12-21 14:02:23) (1.46 KB, patch)
2011-12-21 19:04 UTC, Alexander Sokolov
no flags Details | Diff
xdg-open.in.diff for comment 2 (2011-12-21 14:02:23) (2.74 KB, patch)
2011-12-21 19:05 UTC, Alexander Sokolov
no flags Details | Diff
Patched xdg-mime for comment 2 (2011-12-21 14:02:23) (37.61 KB, application/octet-stream)
2011-12-21 19:06 UTC, Alexander Sokolov
no flags Details
Patched xdg-open for comment 2 (2011-12-21 14:02:23) (17.95 KB, application/octet-stream)
2011-12-21 19:07 UTC, Alexander Sokolov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
FreeDesktop.org 45295 0 None None None Never

Description Marcus Moeller 2011-12-20 13:33:37 UTC
Created attachment 548838 [details]
xdg-mime Patch

In order to get Razor-qt to work correctly, some patches to xdg-mime and xdg-open are required.

Comment 1 Marcus Moeller 2011-12-20 13:34:31 UTC
Created attachment 548839 [details]
xdg-open Patch

Comment 2 Alexander Sokolov 2011-12-21 19:02:23 UTC
The first name of the bug is invalid. The patch does not contain any changes specific for the Razor. Changes are suitable for all "unknown" DE.

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.

I attach diffs for source xdg-mime.in & xdg-open.in. And already fixed files for the tests.

Comment 3 Alexander Sokolov 2011-12-21 19:04:54 UTC
Created attachment 549068 [details]
xdg-mime.in.diff for comment 2 (2011-12-21 14:02:23)

Comment 4 Alexander Sokolov 2011-12-21 19:05:25 UTC
Created attachment 549069 [details]
xdg-open.in.diff for comment 2 (2011-12-21 14:02:23)

Comment 5 Alexander Sokolov 2011-12-21 19:06:22 UTC
Created attachment 549071 [details]
Patched xdg-mime for comment 2 (2011-12-21 14:02:23)

Comment 6 Alexander Sokolov 2011-12-21 19:07:38 UTC
Created attachment 549073 [details]
Patched xdg-open for comment 2 (2011-12-21 14:02:23)

Comment 7 Marcus Moeller 2011-12-21 19:08:50 UTC
renamed bug according to Alexanders hint.

Comment 8 Rex Dieter 2012-03-02 18:32:25 UTC
sorry for the delay, I'll try to carve out some time today to review your contribution (and thanks! by the way).

Comment 9 Rex Dieter 2012-03-02 18:38:27 UTC
patch commited upstream (thanks!),

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

I'll review a few others, and see about spinning up a build for some testing and feedback.

Comment 10 Rex Dieter 2012-03-02 19:52:03 UTC
test build for rawhide,
http://koji.fedoraproject.org/koji/taskinfo?taskID=3847653


Note You need to log in before you can comment on or make changes to this bug.