View Single Post
Old 07-26-2014, 05:31 AM   #67
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,906
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by kovidgoyal View Post
No plugins are book wide only. If you wish to run it only only the currently opened file, you can do so by simply restricting the files your plugin processes. Get the name of the file like this

from calibre.gui2.tweak_book import editor_name

name = editor_name(self.gui.current_editor)
Thanks. Should the second line be:

Code:
name = editor_name(self.gui.central.current_editor)
Or did I miss something?
davidfor is offline   Reply With Quote