Re: [jokosher-devel] Extension Preferences...



This is exactly what I was thinking. Just call connfig() or prefs() or
something and have the extension handle the rest. There is already a
function in the API for saving and loading key/value pairs and I think
this used ~/.jokosher/extensions/config or something.

Yep. On loading an extension, check whether it has a preferences()
method. If it doesn't, then grey out the Preferences button in the
Extension Manager when that extension is highlighted (or otherwise
disable however you were going to make prefs available). If it does,
then just call thisextension.preferences(). If the extension wants to
create a Gtk window to ask for preferences then it is welcome to do
so. That's what Freesound does (sort of).

sil

--
A man, a plan, a canoe, pasta, heros, rajahs, a coloratura, maps,
snipe, percale, macaroni, a gag, a banana bag, a tan, a tag, a banana
bag again (or a camel), a crepe, pins, Spam, a rut, a Rolo, cash, a
jar, sore hats, a peon, a canal -- Panama!



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]