places-menu: Stop sorting special locations
Nautilus uses a fixed order rather than sorting items alphabetically, so do the same. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/340>
This commit is contained in:
committed by
Marge Bot
parent
c4e344f1d7
commit
f0e7358de4
@@ -279,8 +279,6 @@ export class PlacesManager extends EventEmitter {
|
||||
homeFile,
|
||||
_('Home')));
|
||||
|
||||
let specials = [];
|
||||
|
||||
if (this._settings.get_boolean('show-desktop-icons')) {
|
||||
const desktopPath = GLib.get_user_special_dir(
|
||||
GLib.UserDirectory.DIRECTORY_DESKTOP);
|
||||
@@ -289,12 +287,11 @@ export class PlacesManager extends EventEmitter {
|
||||
: null;
|
||||
|
||||
if (desktopFile && !desktopFile.equal(homeFile)) {
|
||||
specials.push(new PlaceInfo('special', desktopFile));
|
||||
this._places.special.push(
|
||||
new PlaceInfo('special', desktopFile));
|
||||
}
|
||||
}
|
||||
|
||||
specials.sort((a, b) => GLib.utf8_collate(a.name, b.name));
|
||||
this._places.special = this._places.special.concat(specials);
|
||||
|
||||
this.emit('special-updated');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user