View Single Post
Old 02-04-2012, 10:27 PM   #1
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,709
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Question for plugin development gurus

OK here goes.

I have an old plugin that a couple of people use. I'd like to give it a bit of a face-lift—especially in the GUI configuration department.

I'd really, really, really like to continue using the same plugin name (the internal calibre plugin name), because I want to avoid the situation where someone might have both the old and the new plugin installed at the same time. Plus... consistency. Its value is absolutely immeasurable when it comes to supporting users through email and message boards.

Here's the problem: the old plugin uses the customization string that's accessible through self.site_customization. The updated plugin won't be using that. But when a user (who has the old plugin installed) updates to the new plugin... that old customization info is still in plain sight when viewing the list of installed plugins from calibre's preferences. And since the new plugin isn't configured that way anymore, that customization info is basically stranded there in "calibre limbo" for all time.

Is there any way for me to programmatically do anything to get rid of (or access) that customization info that's stranded in the plugin list view? Ideally, I'd like to be able to handle it (and hopefully import it) when installing the new, updated plugin—but I'm open to any and all possible solutions.

I'd just rather not have to instruct people to delete their customization strings before updating/removing (or even worse; have to tell them that reinstalling the old plugin is the only way they'll even be able to delete it—if they've already removed the old plugin without first wiping out the customization string). And as I first said, installing the new plugin under a different internal calibre name is anything but ideal. A user will inevitably have both versions installed simultaneously which could wreak a lot of havoc on a File Type plugin.

Wow! That was really long.... so sorry. Hopefully someone has run into this and has a simple solution? (hope, hope, hope).

UPDATE: Actually, I can still access the customization string from the new plugin, but I can't find a way to clear it. It still gets stranded unless someone remembers (or knows) to wipe it before updating.

Last edited by DiapDealer; 02-04-2012 at 10:31 PM.
DiapDealer is offline   Reply With Quote