[gnome-shell-extensions] places-menu: Reindent to conform with new style
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] places-menu: Reindent to conform with new style
- Date: Wed, 22 May 2019 18:46:17 +0000 (UTC)
commit 6a66cd4fa60ffb11b83a06f8a61252331f4a3bbb
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Mar 3 02:07:00 2019 +0100
places-menu: Reindent to conform with new style
Instead of aligning arguments like we used to do, use a consistent
four-space indent as mandated by gjs' current style guide.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/66
extensions/places-menu/extension.js | 2 +-
extensions/places-menu/placeDisplay.js | 54 ++++++++++++++++++----------------
2 files changed, 30 insertions(+), 26 deletions(-)
---
diff --git a/extensions/places-menu/extension.js b/extensions/places-menu/extension.js
index c477a4a..a648c0a 100644
--- a/extensions/places-menu/extension.js
+++ b/extensions/places-menu/extension.js
@@ -42,7 +42,7 @@ class PlaceMenuItem extends PopupMenu.PopupBaseMenuItem {
}
this._changedId = info.connect('changed',
- this._propertiesChanged.bind(this));
+ this._propertiesChanged.bind(this));
}
destroy() {
diff --git a/extensions/places-menu/placeDisplay.js b/extensions/places-menu/placeDisplay.js
index e97cef4..ff41eb0 100644
--- a/extensions/places-menu/placeDisplay.js
+++ b/extensions/places-menu/placeDisplay.js
@@ -71,18 +71,21 @@ class PlaceInfo {
}
getIcon() {
- this.file.query_info_async('standard::symbolic-icon', 0, 0, null,
- (file, result) => {
- try {
- let info = file.query_info_finish(result);
- this.icon = info.get_symbolic_icon();
- this.emit('changed');
- } catch (e) {
- if (e instanceof Gio.IOErrorEnum)
- return;
- throw e;
- }
- });
+ this.file.query_info_async('standard::symbolic-icon',
+ Gio.FileQueryInfoFlags.NONE,
+ 0,
+ null,
+ (file, result) => {
+ try {
+ let info = file.query_info_finish(result);
+ this.icon = info.get_symbolic_icon();
+ this.emit('changed');
+ } catch (e) {
+ if (e instanceof Gio.IOErrorEnum)
+ return;
+ throw e;
+ }
+ });
// return a generic icon for this kind for now, until we have the
// icon from the query info above
@@ -152,7 +155,7 @@ class RootInfo extends PlaceInfo {
this._proxy = obj;
this._proxy.connect('g-properties-changed',
- this._propertiesChanged.bind(this));
+ this._propertiesChanged.bind(this));
this._propertiesChanged(obj);
});
}
@@ -203,10 +206,10 @@ class PlaceDeviceInfo extends PlaceInfo {
if (this._mount.can_eject())
this._mount.eject_with_operation(...unmountArgs,
- this._ejectFinish.bind(this));
+ this._ejectFinish.bind(this));
else
this._mount.unmount_with_operation(...unmountArgs,
- this._unmountFinish.bind(this));
+ this._unmountFinish.bind(this));
}
_ejectFinish(mount, result) {
@@ -275,9 +278,8 @@ var PlacesManager = class {
};
this._settings = new Gio.Settings({ schema_id: BACKGROUND_SCHEMA });
- this._showDesktopIconsChangedId =
- this._settings.connect('changed::show-desktop-icons',
- this._updateSpecials.bind(this));
+ this._showDesktopIconsChangedId = this._settings.connect(
+ 'changed::show-desktop-icons', this._updateSpecials.bind(this));
this._updateSpecials();
/*
@@ -350,9 +352,10 @@ var PlacesManager = class {
let homePath = GLib.get_home_dir();
- this._places.special.push(new PlaceInfo('special',
- Gio.File.new_for_path(homePath),
- _('Home')));
+ this._places.special.push(new PlaceInfo(
+ 'special',
+ Gio.File.new_for_path(homePath),
+ _('Home')));
let specials = [];
let dirs = DEFAULT_DIRECTORIES.slice();
@@ -394,10 +397,11 @@ var PlacesManager = class {
/* Add standard places */
this._places.devices.push(new RootInfo());
- this._places.network.push(new PlaceInfo('network',
- Gio.File.new_for_uri('network:///'),
- _('Browse Network'),
- 'network-workgroup-symbolic'));
+ this._places.network.push(new PlaceInfo(
+ 'network',
+ Gio.File.new_for_uri('network:///'),
+ _('Browse Network'),
+ 'network-workgroup-symbolic'));
/* first go through all connected drives */
let drives = this._volumeMonitor.get_connected_drives();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]