07-28-2014, 04:35 PM | #1 |
Grand Sorcerer
Posts: 28,039
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Editor plugin question
Is it possible for an editor plugin to leave an ebook in an unchanged (not needing to be saved) state?
At first I thought it might be : Code:
self.boss.commit_all_editors_to_container() Code:
self.boss.add_savepoint() "self.boss.show_current_diff()" even shows no changes (between current, the checkpoint my plugin creates, and the "Start of editing session" ) and I'm still prompted to save the book when closing. If it's not possible for an editor plugin to leave an ebook in a "clean" state, just let me know so I can stop trying to figure out what--in my plugin--is dirtying" it up! |
07-28-2014, 10:50 PM | #2 |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Yes, I hit that yesterday while playing with my Sort CSS plugin. I was simply writing lots of stuff to the console to get a better idea of what was in the files and not making changes, but I was still prompted to save changes when I exited.
OK, I just looked through my code and commented out all the things I thought it could be. Still had the update needed. But, the first pass I missed one. After the display of the differences I have Code:
self.boss.apply_container_update_to_gui() |
Advert | |
|
07-28-2014, 11:23 PM | #3 | |
Grand Sorcerer
Posts: 28,039
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Thanks again. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre plugin question | Firestorm1 | Plugins | 3 | 12-20-2013 12:30 PM |
Metadata Editor Question | locomouse | Sigil | 14 | 02-22-2013 03:12 PM |
Question on Index editor | rpitkin49 | Sigil | 10 | 12-14-2012 05:44 PM |
Another plugin dev question | DiapDealer | Plugins | 2 | 12-11-2010 02:46 PM |
Plugin Developer Question | KevinH | Plugins | 3 | 10-23-2010 09:17 PM |