Giter Site home page Giter Site logo

Comments (19)

humdingerb avatar humdingerb commented on September 15, 2024

Hey, @janus2 sold me it already uses the Locale kit... :)
It really should.
In the "Preferences" we should add as default something like "Automatic" which will then use the Locale setting. The other options can then be used to override the Locale. Useful, when I want to have one replicant with the weather of a US location, where I may want to see the temperature in °F (in order to communicate with our overseas misfits...) :)

from weather.

janus2 avatar janus2 commented on September 15, 2024

@humdingerb He is talking of geolocalization that Haiku does not support. We use the locale to establish the unit (I hope with the addition of all the other degrees someone has not broken the function)

from weather.

humdingerb avatar humdingerb commented on September 15, 2024

Then there's a bug somewhere. If I set the Locale prefs to English (US) for Language and Formatting, I still see °C in a newly opened Weather window.

from weather.

janus2 avatar janus2 commented on September 15, 2024

have you delete the settings?

from weather.

janus2 avatar janus2 commented on September 15, 2024

It works for me locale Formatting English (US) -> °F

from weather.

humdingerb avatar humdingerb commented on September 15, 2024

I now deleted the settings. Forecast is back in the game, thanks.
Still don't automatically see °F. Doesn't the "Preferences" setting of Weather override what comes from the Locale prefs?

from weather.

janus2 avatar janus2 commented on September 15, 2024

The app at the first start tries to figure the best choice for the user using the locale Formatting Settings... So if I live in USA I never need to touch the preferences... If the prediction is wrong very improbable I can change the unit in the preferences panel. This is how it works. Very clever if you allow me ;-)

from weather.

pulkomandy avatar pulkomandy commented on September 15, 2024

Haiku does support geolocalization. There is a BGeolocalization class for that in the locale kit, IIRC.
It is based on https://location.services.mozilla.com , which will locate you based on a scan of Wifi networks within reach.

However, it uses a private key which was only known by olta buildbots, which I think have been retired. We should find another way to securely store that key so that only buildbots can see it in cleartext.

Still, the API is there and can be used. We would be more motivated to keep it working if there are some apps actually using it (I planned to use it to implement HTML5 geoloc at the time, but never got to plugging WebKit to it).

from weather.

janus2 avatar janus2 commented on September 15, 2024

I tried with openGrok can't find this class is spelled wrong?

from weather.

janus2 avatar janus2 commented on September 15, 2024

When I asked three years ago the answer was not service no party!

from weather.

pulkomandy avatar pulkomandy commented on September 15, 2024

https://git.haiku-os.org/haiku/tree/headers/private/shared/Geolocation.h

from weather.

humdingerb avatar humdingerb commented on September 15, 2024

I don't think geolocation is what we want for Weather. I want to either have it use the unit I set in the Locale prefs, or I want to override it for this specific window/replicant. I don't want it changed depending where I'm currently located (that may be a desired optional feature in Haiku's Locale prefs).

from weather.

pulkomandy avatar pulkomandy commented on September 15, 2024

Not for the unit (that should be set according to Locale indeed), but for the initial location when you start the app. That is the point of this particular issue:

App should use location services to determine user's location to display local temperature and weather.

The units are a completely different thing.

from weather.

humdingerb avatar humdingerb commented on September 15, 2024

Sorry, I apparently took a wrong turn... :)

from weather.

janus2 avatar janus2 commented on September 15, 2024

@humdingerb I'm not totally sure but i think the units work as you expected.

from weather.

scottmc avatar scottmc commented on September 15, 2024

With this feature, someone opening their laptop in Albuquerque or Pismo Beach would have the correct location show up for them. ;)

from weather.

humdingerb avatar humdingerb commented on September 15, 2024

@humdingerb I'm not totally sure but i think the units work as you expected.
It only does on first run. If I change the Locale some time, it won't change. But that's for another issue.

from weather.

khallebal avatar khallebal commented on September 15, 2024

Can we use the GeoClue library for this?, it may not be tide to D-bus and thus can be used as a standalone lib?

from weather.

pulkomandy avatar pulkomandy commented on September 15, 2024

As mentionned, Haiu has a BGeolocationClass which does all we need here already.

We could improve it with geoip (currently it only uses wifi networks scanning). No need for ported libs/services such as geoclue however, this is easily implemented natively.

from weather.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.