[gnome-maps/wip/routing2: 6/9] fixup routeQuery
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/routing2: 6/9] fixup routeQuery
- Date: Sat, 3 May 2014 22:45:55 +0000 (UTC)
commit cc780534770f551bac01772bab542569073d7403
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date: Sat May 3 20:56:39 2014 +0200
fixup routeQuery
src/routeQuery.js | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/routeQuery.js b/src/routeQuery.js
index 354c841..fd02f8b 100644
--- a/src/routeQuery.js
+++ b/src/routeQuery.js
@@ -30,7 +30,16 @@ const Utils = imports.utils;
const Transportation = {
CAR: 0,
BIKE: 1,
- PEDESTRIAN: 2
+ PEDESTRIAN: 2,
+
+ toString: function (transportation) {
+ switch(transportation) {
+ case Transportation.CAR: return 'car';
+ case Transportation.BIKE: return 'bike';
+ case Transportation.PEDESTRIAN: return 'foot';
+ default: return null;
+ }
+ }
};
const RouteQuery = new Lang.Class({
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]