[gnome-maps] route: Add error handler
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] route: Add error handler
- Date: Mon, 18 Jun 2018 20:31:04 +0000 (UTC)
commit 0f6158f1296e7ae5217d81935d0ed21a772877cb
Author: Marcus Lundblad <ml update uu se>
Date: Mon Apr 16 22:08:12 2018 +0200
route: Add error handler
Add an error signal and error function to trigger
an error signal with a message.
Closes #107
src/route.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/route.js b/src/route.js
index ec4121f..9777d67 100644
--- a/src/route.js
+++ b/src/route.js
@@ -44,7 +44,8 @@ var TurnPointType = {
var Route = GObject.registerClass({
Signals: {
'update': {},
- 'reset': {}
+ 'reset': {},
+ 'error': { param_types: [GObject.TYPE_STRING] }
}
}, class Route extends GObject.Object {
@@ -72,6 +73,10 @@ var Route = GObject.registerClass({
this.emit('reset');
}
+ error(msg) {
+ this.emit('error', msg);
+ }
+
createBBox(coordinates) {
let bbox = new Champlain.BoundingBox();
coordinates.forEach(function({ latitude, longitude }) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]