Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/Utils.vala
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,14 @@ namespace Scratch.Utils {
}

public GLib.Menu create_executable_app_items_for_file (GLib.File file, string file_type) {
List<AppInfo> external_apps = GLib.AppInfo.get_all_for_type (file_type);
var files_appinfo = AppInfo.get_default_for_type ("inode/directory", true);
external_apps.prepend (files_appinfo);

string this_id = GLib.Application.get_default ().application_id + ".desktop";
var external_apps = GLib.AppInfo.get_all_for_type (file_type);
var this_id = GLib.Application.get_default ().application_id + ".desktop";
var menu = new GLib.Menu ();

external_apps.sort ((a, b) => {
return a.get_name ().collate (b.get_name ());
});

foreach (AppInfo app_info in external_apps) {
string app_id = app_info.get_id ();
if (app_id == this_id) {
Expand Down
Loading