Add API to get the name of the file bing currently edited

This commit is contained in:
Kovid Goyal 2014-07-26 09:04:23 +05:30
parent db3b08247e
commit 1ec7397544

View File

@ -131,6 +131,11 @@ class Boss(QObject):
self.gui.manage_fonts.embed_all_fonts.connect(self.manage_fonts_embed) self.gui.manage_fonts.embed_all_fonts.connect(self.manage_fonts_embed)
self.gui.manage_fonts.subset_all_fonts.connect(self.manage_fonts_subset) self.gui.manage_fonts.subset_all_fonts.connect(self.manage_fonts_subset)
@property
def currently_editing(self):
' Return the name of the file being edited currently or None if no file is being edited '
return editor_name(self.gui.current_editor)
def preferences(self): def preferences(self):
orig_spell = tprefs['inline_spell_check'] orig_spell = tprefs['inline_spell_check']
p = Preferences(self.gui) p = Preferences(self.gui)