Skip to content

Commit

Permalink
locations: Add missing xdtduri property to Volume icons
Browse files Browse the repository at this point in the history
I forgot to add this originally. Without it, we don't know that
the icon is a location rather than an app, and some undesired items
are added to the menu.

Mount icons already had this set and didn't have a problem.

Fixes #1037
  • Loading branch information
philipl authored and 3v1n0 committed Jan 7, 2020
1 parent 4fd2776 commit c541d2d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion locations.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,17 @@ var Removables = class DashToDock_Removables {
// don't normally unmount them anyway.
return;
}
let uri = GLib.uri_unescape_string(activationRoot.get_uri(), null);

let escapedUri = activationRoot.get_uri()
let uri = GLib.uri_unescape_string(escapedUri, null);

let volumeKeys = new GLib.KeyFile();
volumeKeys.set_string('Desktop Entry', 'Name', volume.get_name());
volumeKeys.set_string('Desktop Entry', 'Icon', this._getWorkingIconName(volume.get_icon()));
volumeKeys.set_string('Desktop Entry', 'Type', 'Application');
volumeKeys.set_string('Desktop Entry', 'Exec', 'gio open "' + uri + '"');
volumeKeys.set_string('Desktop Entry', 'StartupNotify', 'false');
volumeKeys.set_string('Desktop Entry', 'XdtdUri', escapedUri);
volumeKeys.set_string('Desktop Entry', 'Actions', 'mount;');
volumeKeys.set_string('Desktop Action mount', 'Name', __('Mount'));
volumeKeys.set_string('Desktop Action mount', 'Exec', 'gio mount "' + uri + '"');
Expand Down

0 comments on commit c541d2d

Please sign in to comment.