After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783089 - Remember the choice of transportation mode for routing
Remember the choice of transportation mode for routing
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2017-05-25 12:32 UTC by Marcus Lundblad
Modified: 2017-06-19 19:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gschema: Add key for last used transportation type (1.36 KB, patch)
2017-05-28 21:42 UTC, Marcus Lundblad
committed Details | Review
routeQuery: Store the transportation type used (1.61 KB, patch)
2017-05-28 21:43 UTC, Marcus Lundblad
committed Details | Review
sidebar: Use the transportation type from the query (2.61 KB, patch)
2017-05-28 21:43 UTC, Marcus Lundblad
committed Details | Review
routingDelegator: Revert to fallback transportation when needed (1.63 KB, patch)
2017-05-28 21:43 UTC, Marcus Lundblad
committed Details | Review

Description Marcus Lundblad 2017-05-25 12:32:32 UTC
One thing we've been discussing was changing the default transportation mode (which is currently car) to something else (like i.e. walking). Maybe one option might be to actually remember the last selected mode, so that the mode that was last used will be the one selected on the start by default (with a pre-defined default value used the first time, or when no saved value could be found).
Comment 1 Marcus Lundblad 2017-05-28 21:42:49 UTC
Created attachment 352741 [details] [review]
gschema: Add key for last used transportation type
Comment 2 Marcus Lundblad 2017-05-28 21:43:02 UTC
Created attachment 352742 [details] [review]
routeQuery: Store the transportation type used

Store the last used transportation type to gsettings and use
that when initing.
Comment 3 Marcus Lundblad 2017-05-28 21:43:17 UTC
Created attachment 352743 [details] [review]
sidebar: Use the transportation type from the query

Start off with the transportation type for the route query
at startup. Also move initilization of the transit options panel
before setting up the toggles, as it needs to be ready in the
case where the saved mode is transit.
Comment 4 Marcus Lundblad 2017-05-28 21:43:33 UTC
Created attachment 352744 [details] [review]
routingDelegator: Revert to fallback transportation when needed

When OpenTripPlanner is not available and the initial mode of the
route query object is set to transit, revert back a fallback mode.
This is done here as the route query object must be constructed before
this.
Comment 5 Marcus Lundblad 2017-05-28 21:45:59 UTC
To run this, the new gsettings schema must available. Run with something like:
GSETTINGS_SCHEMA_DIR=$PREFIX/share/glib-2.0/schemas
Comment 6 Andreas Nilsson 2017-06-15 12:00:36 UTC
Making walking the default sounds good to me.
Comment 7 Marcus Lundblad 2017-06-19 19:53:47 UTC
Attachment 352741 [details] pushed as cafaf83 - gschema: Add key for last used transportation type
Attachment 352742 [details] pushed as bf9305b - routeQuery: Store the transportation type used
Attachment 352743 [details] pushed as 3f4e61d - sidebar: Use the transportation type from the query
Attachment 352744 [details] pushed as bfb40c9 - routingDelegator: Revert to fallback transportation when needed