Worked on some cleanups for translatable strings in gnome-blog today. Finished the protocols directory and I'm now moving on to the rest of the files. It's going fast, I'm really just removing the markup text from any error messages, as per instruction of the L10N folks. I really appreciate their quick and easy guidelines for developers, it wasn't that hard to look through and seems well thought out.
Blog categories in gnome-blog
Finished up the categories system for gnome-blog, this has really been a bug for way too long. Honestly, I've never really needed to post to different categories before so it wasn't really a concern of mine (and no one yelled too loudly). However now that I need to blog to different categories often I can see how bad it is when you're trying to quickly post to different sections of your blog and you'd have to open the preferences each time. Sheesh. Well right now I've only upgraded the preferences section, I haven't figured out a good place to put the categories drop-down list in the UI. Here are the obligitory screenshots: first time setup of blog and subsequent opening of preferences. On first setup the button says 'Lookup Blog' and then the categories are stored in a GConf key for quick access later. Everytime you open up the preferences after that your categories stay in the drop-down list, but you have the option to refresh the list from your blog. Sounds pretty simple? Yes, but I had a hell of a time finding out how to use the gnome-python gconf set_list and get_list methods as they were no examples that I could find anywhere.
gnome-python gconf lists
And so, an example for everyone else to use in case they need:
client = gconf.client_get_default()
fav_things = ["bright copper kettles","warm woolen mittens","brown paper packages tied up with string"]
client.set_list(gconf_key, gconf.VALUE_STRING, fav_things)
fav_things = client.get_list(gconf_key,gconf.VALUE_STRING)
The 1st line is the usual setup. The 2nd line are a few of my favorite things... ha ha ha. The 3rd line will set the gconf_key value to be a list of strings. In the GConf key you'll see the comma separated list of strings. Then the 4th line will return the list of strings just like python expects (isn't pygtk great!). I'm supposing (but haven't really tried) that using the gconf.VALUE_INT will work the same way in storing a list of integers.