Neroth / gnome-shell-extension-weather

A simple extension for displaying weather informations from several cities in GNOME Shell
GNU General Public License v3.0
138 stars 143 forks source link

set city - problem? #141

Closed stefaca closed 11 years ago

stefaca commented 11 years ago

I have a small issue: can't add city. I try manualy to add with dconf-editor. enter value for my town but nothing is happening? is there any solution?

PS. here is city data: 532697>Belgrade, Serbia

ferdnyc commented 11 years ago

That's a Yahoo Location ID, which is no longer how the extension handles city data. So, you can't add a city using just that ID.

However, when I did a search for "Belgrade" in gnome-weather (which is how the weather extension gets its data,now), Belgrade, Serbia came up as one of the supported locations, and I was able to pull up weather for that location just fine.

The location was stored in GSettings (as a serialized GVariant) as: <(uint32 1, <('Belgrade', 'LYBE', true, @m(dd) (0.78219839891988951, 0.35401094412841899), @m(dd) (0.78223232812054833, 0.35723496868258048))>)> which is how you'd have to enter/add it into the locations list at org.gnome.shell.extensions.weather.city if you wanted to do so manually. (With a pair of [ square braces ] around the entire comma-separated list.) However, that shouldn't be necessary, since the location-search interface seems to bring it up just fine.

Why do you feel you need to add it manually?

stefaca commented 11 years ago

I can't add city from settings withing weather extension. I found belgrade but on click on OK nothing is happening. so I must add city manualy :(

PS. error: Could not load schemas from org.gnome.shell.extensions.weather.city I don't get it :( PPS. nevermind. this extension is just not working after update

ferdnyc commented 11 years ago

Oh, sorry! That's not a schema, it's the full path to the key — you want the city key in the org.gnome.shell.extension.weather schema. But command-line gsettings won't find that either, unless you pass it --schemadir $HOME/.local/share/gnome-shell/extensions/weather-extension@xeked.com/schemas/.

(dconf-editor should show the org.gnome.shell.extensions.weather keys anyway, and simply indicate that it doesn't have a schema for them. If you're not seeing any keys, then there's a larger problem with the extension configuration not being instantiated at all.)

Anyway, the full contents of the org.gnome.shell.extensions.weather key city, for your purpose, should be:

[<(uint32 1, <('Belgrade', 'LYBE', true, @m(dd) (0.78219839891988951, 0.35401094412841899), @m(dd) (0.78223232812054833, 0.35723496868258048))>)>]

However, to be perfectly honest I'll be quite surprised if that makes any difference for you. If the graphical method isn't working, then something is wrong with either your extension install or one of its dependencies. It seems highly improbable that the only thing not working would be the settings tool, especially if it's able to successfully look up the city in the first place. But, hey, I've been wrong before, and I'd be happy to be wrong again.

It's worth double-checking other factors as well, though. One of the difficulties when installing the extension from the GNOME Shell extensions site (if you did) is that it doesn't ensure that the extension's dependencies are present. I see from another bug report that you're running debian; have you checked that you have all of the necessary packages installed for the weather extension? (Apparently, gir1.2-gweather-3.0 is a commonly-missing one.)

stefaca commented 11 years ago

all dependencyes are installed :( value for org.gnome.shell.extensions.weather.city is always empty whatever I did. I did rewrite xml and add value for city but after I check key for city is still empty. I don't know what to do anymore. I'm goind to forget this extension :(

PS. can you post me your values from org.gnome.shell.extensions.weather.gschema.xml file?

Avnerus commented 11 years ago

Hi, not sure if this will help, but I had the same error after upgrading to Gnome 3.8 (gentoo). I installed gnome-weather just to see if I can add my city from there. It printed an error about location.serialize and then I realized my libgweather was not updated to 3.8

stefaca commented 11 years ago

problem solved. after upgrade to gnome 3.8 package gir1.2-gweather-3.0 remain from gnome 3.4. I just upgrade this package and city is set. now just to see if extension is going to show weather