@ -71,6 +71,7 @@ const OPENWEATHER_USE_DEFAULT_OWM_API_KEY = 'use-default-owm-key';
const OPENWEATHER _OWM _API _KEY = 'appid' ;
const OPENWEATHER _FC _API _KEY = 'appid-fc' ;
const OPENWEATHER _GC _APP _KEY = 'geolocation-appid-mapquest' ;
const OPENWEATHER _LOC _TEXT _LEN = 'location-text-length'
//URL
const OPENWEATHER _URL _MAPQUEST _BASE = 'https://open.mapquestapi.com/nominatim/v1/' ;
@ -396,6 +397,21 @@ const WeatherPrefsWidget = new GObject.Class({
arguments [ 1 ] . markup = arguments [ 2 ] . get _value ( arguments [ 3 ] , 1 ) ;
} ) ;
this . location _length _spin = this . Window . get _object ( "max_loc_chars" ) ;
this . location _length _spin . set _value ( this . loc _len _current ) ;
// prevent from continously updating the value
this . locLenSpinTimeout = undefined ;
this . location _length _spin . connect ( "value-changed" , Lang . bind ( this , function ( button ) {
if ( this . locLenSpinTimeout !== undefined )
Mainloop . source _remove ( this . locLenSpinTimeout ) ;
this . locLenSpinTimeout = Mainloop . timeout _add ( 250 , Lang . bind ( this , function ( ) {
this . loc _len _current = button . get _value ( ) ;
return false ;
} ) ) ;
} ) ) ;
let theObjects = this . Window . get _objects ( ) ;
for ( let i in theObjects ) {
@ -927,6 +943,19 @@ const WeatherPrefsWidget = new GObject.Class({
this . Settings . set _int ( OPENWEATHER _REFRESH _INTERVAL _CURRENT , ( ( v >= 600 ) ? v : 600 ) ) ;
} ,
get loc _len _current ( ) {
if ( ! this . Settings )
this . loadConfig ( ) ;
let v = this . Settings . get _int ( OPENWEATHER _LOC _TEXT _LEN ) ;
return ( ( v > 0 ) ? v : 0 ) ;
} ,
set loc _len _current ( v ) {
if ( ! this . Settings )
this . loadConfig ( ) ;
this . Settings . set _int ( OPENWEATHER _LOC _TEXT _LEN , ( ( v > 0 ) ? v : 0 ) ) ;
} ,
get refresh _interval _forecast ( ) {
if ( ! this . Settings )
this . loadConfig ( ) ;