Silly question for adobe...
... isn't releasing software called exactly the same as another that exists previously, like, wrong?
... isn't releasing software called exactly the same as another that exists previously, like, wrong?
Took a while to implement, but BartleBlog finally got a functional menu editor:
Right now, it only works with the mootools-based menu gadget, but I will start working on the yahoo menu version in a moment.
The only thing not working is the preview button, because it needs more support on the backend side.
The Python config objects are convenient and simple, but they have a problem: you can only save strings. That means you need to store numbers as strings and remember to use the getint()/getfloat() methods (or coerce by hand!), which is error prone and anti-pythonic. Storing a list is even uglier.
You could store ascii pickles, but those are pretty unpleasant to read in some cases.
Here's my solution: Encode it using a JSON encoder first! (I am using demjson)
Silly obvious code fragment:
def getValue(section,key,default=None):
try:
return JSON().decode(conf.get (section,key))
except:
return default
def setValue(section,key,value):
value=JSON().encode(value)
try:
r=conf.set(section,key,value)
except ConfigParser.NoSectionError:
conf.add_section(section)
r=conf.set(section,key,value)
f=open(os.path.expanduser('~/.bartleblog/config'),'w')
conf.write(f)
return r
With just a little effort you can have a readable ascii typed python config file.
... has been all about UI.
I have always had a problem when writing PyQt apps: stock icons.
Which ones should I use? Where are they?
I usually fished through the crystalsvg icon set until I found one that seemed to be what I needed, and then copied it to my app.
Sadly, that's annoying in several ways:
Since those are PNG icons, you need to find the right size.
Not all icons are there for all sizes!
Because of 2, I need to check three or four folders to see all the icons.
So, I decided to cut my losses, and see what else could be done. And here it is:
I am now using all SVG icons, from the reinhardt set that will look equally out of place in all OSs, but which I like (and I think look awesome with this relaxed Domino theme). And because they are all SVG, I don't care about sizes, and they are all in the same place, and all is good.
And whenever Oxygen is released, all I need to do is switch the files around and that's that. Which is nice, too.
Of course there is a catch... it does look out of place, and I expect many to find it ugly. So what, since I am the only user of this app! ;-)
Done with the main blog config dialog.
Fixed a dozen bugs
Generate the blog in a reasonable place
Fixed a lot of UI bugs (tab orders, sizes)
Still lots and lots of things to be done, tho.