! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Incorrect default app shown in file context menu with glib >= 2.41
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Evangelos Foutras 2014-11-16 08:40:05 CET
Similarly to Thunar [1], xfdesktop needs a minor adjustment to account for the behavior change of g_app_info_get_all_for_type() in glib >= 2.41. (It no longer puts the default application in front of the list.)

As it currently stands, the applications are ordered as returned by g_app_info_get_all_for_type() and the first application might not be the default; though double clicking will correctly launch the default app.

The relevant code is in src/xfdesktop-file-icon-manager.c.

[1] https://bugzilla.xfce.org/show_bug.cgi?id=11212
Comment 1 Eric Koegel editbugs 2014-11-16 14:46:11 CET
Created attachment 5753 
Default application not respected with glib >= 2.41

Oh right, you did mention that xfdesktop would need it to. Is this patch sufficient? It's just thunar's patch stuffed in xfdesktop.
Comment 2 Evangelos Foutras 2014-11-16 22:03:41 CET
(In reply to Eric Koegel from comment #1)
> Created attachment 5753 
> Default application not respected with glib >= 2.41
> 
> Oh right, you did mention that xfdesktop would need it to. Is this patch
> sufficient? It's just thunar's patch stuffed in xfdesktop.

The patch fixes the issue. Thanks!
Comment 3 Eric Koegel editbugs 2014-11-17 08:41:09 CET
Thanks for verifying it.

commit a4d701b2836724f101d319c11205fa03201134fb
Author: Eric Koegel <eric.koegel@gmail.com>
Date:   Sun Nov 16 16:35:26 2014 +0300

    Default application not respected with glib >= 2.41 (Bug #11306)
    
    Ensure xfdesktop's right click menu has the default
    application as the first element of the returned list. This is
    just a copy of Thunar's patch adapted for xfdesktop. See:
    https://bugzilla.xfce.org/show_bug.cgi?id=11212 and
    http://git.xfce.org/xfce/thunar/commit/?id=4b142af9dfe19f90ffe5529e2f099dc55298ecef

http://git.xfce.org/xfce/xfdesktop/commit/?id=a4d701b2836724f101d319c11205fa03201134fb

Bug #11306

Reported by:
Evangelos Foutras
Reported on: 2014-11-16
Last modified on: 2014-11-17

People

Assignee:
Eric Koegel
CC List:
1 user

Version

Version:
Unspecified

Attachments

Additional information