[gnome-maps/gnome-3-30] mainWindow: Make file chooser instance a property on "this"
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/gnome-3-30] mainWindow: Make file chooser instance a property on "this"
- Date: Sun, 23 Sep 2018 20:06:08 +0000 (UTC)
commit 07f1c54fbb988ad13c5d4d423a49f801343667fa
Author: Marcus Lundblad <ml update uu se>
Date: Sun Sep 23 22:02:55 2018 +0200
mainWindow: Make file chooser instance a property on "this"
Closes #127
src/mainWindow.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 1d5cd2e..1c89f7e 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -554,17 +554,17 @@ var MainWindow = GObject.registerClass({
}
_onOpenShapeLayer() {
- let fileChooser = new ShapeLayerFileChooser({
+ this._fileChooser = new ShapeLayerFileChooser({
transient_for: this,
});
- fileChooser.connect('response', (widget, response) => {
+ this._fileChooser.connect('response', (widget, response) => {
if (response === Gtk.ResponseType.ACCEPT) {
- this._mapView.openShapeLayers(fileChooser.get_files());
+ this._mapView.openShapeLayers(this._fileChooser.get_files());
this.layersPopover.popdown();
}
- fileChooser.destroy();
+ this._fileChooser.destroy();
});
- fileChooser.show();
+ this._fileChooser.show();
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]