GNOME Bugzilla – Bug 783089
Remember the choice of transportation mode for routing
Last modified: 2017-06-19 19:54:03 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).
Created attachment 352741 [details] [review] gschema: Add key for last used transportation type
Created attachment 352742 [details] [review] routeQuery: Store the transportation type used Store the last used transportation type to gsettings and use that when initing.
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.
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.
To run this, the new gsettings schema must available. Run with something like: GSETTINGS_SCHEMA_DIR=$PREFIX/share/glib-2.0/schemas
Making walking the default sounds good to me.
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