def init(): '''Return True if the plugin has loaded successfully.''' ok = not g.app.unitTesting # Not for unit tests. if ok: # Register the handlers... g.registerHandler("start2", onStart) g.plugin_signon(__name__) return ok
def init (): '''Return True if the plugin has loaded successfully.''' ok = g.app.gui.guiName() == "qt" if ok: g.app._global_search = GlobalSearch() g.plugin_signon(__name__) return ok
def init(): """Leo plugin init. function""" g.registerHandler('after-create-leo-frame',onCreate) g.plugin_signon(__name__) return True
def init (): g.registerHandler('new', new_hook) g.registerHandler('create-node', create_node_hook) g.registerHandler('select1', select1_hook) g.plugin_signon(__name__) return True
def init (): ok = g.app.gui.guiName() in ('qt','qttabs') if ok: g.registerHandler('after-create-leo-frame',onCreate) g.plugin_signon(__file__) return ok
def init(): '''Return True if the plugin has loaded successfully.''' ok = bool(QtSvg and QtWebKitWidgets) g.plugin_signon(__name__) g.registerHandler('after-create-leo-frame', onCreate) g.registerHandler('scrolledMessage', show_scrolled_message) return ok
def init(): if 1: # OK for unit testing. g.registerHandler("after-create-leo-frame", on_create) g.plugin_signon(__name__) return True
def init (): import leo.core.leoGlobals as g # print("bigdash init") set_leo(g) ok = g.app.gui.guiName() == "qt" g._global_search = None if ok: @g.command("global-search") def global_search_f(event): """ Do global search """ c = event['c'] if g._global_search: g._global_search.show() else: g._global_search = gs = GlobalSearch() set_leo(g) if leofts: leofts.init() g.plugin_signon(__name__) return ok
def init (): '''Return True if the plugin has loaded successfully.''' ok = g.app.gui.guiName() == "qt" if ok: g.plugin_signon(__name__) install_contextmenu_handlers() return ok
def init (): ok = True if ok: g.plugin_signon(__name__) return ok
def init(): '''Return True if the plugin has loaded successfully.''' ok = g.app.gui.guiName() in ('qt', 'qttabs') if ok: g.registerHandler('after-create-leo-frame', onCreate) g.plugin_signon(__name__) return ok
def init(): '''Return True if the plugin has loaded successfully.''' ok = g.app.gui.guiName() == "qt" if ok: g.registerHandler('select1', onSelect) g.plugin_signon(__name__) return ok
def init (): '''Return True if the plugin has loaded successfully.''' # Note: call onCreate _after_ reading the .leo file. # That is, the 'after-create-leo-frame' hook is too early! g.registerHandler(('new','open2'),onCreate) g.plugin_signon(__name__) return True
def init(): '''Return True if the plugin has loaded successfully.''' ok = Ft if ok: g.registerHandler(('menu2',"new"),addMenu) g.plugin_signon(__name__) return ok
def init (): '''Return True if the plugin has loaded successfully.''' g.registerHandler("create-optional-menus",createExportMenus) g.registerHandler('after-create-leo-frame', onCreate) g.plugin_signon(__name__) # I think this should be ok for unit testing. return True
def init(): '''Return True if the plugin has loaded successfully.''' g.registerHandler('after-create-leo-frame', onCreate) g.plugin_signon(__name__) if '_quickmove' not in g.app.db: g.app.db['_quickmove'] = {'global_targets': []} return True
def init(): ok = not g.app.unitTesting # Not safe for unit testing. Changes core class. if ok: #@+<< override write methods >> #@+node:ekr.20040419105219.1: ** << override write methods >> oldOpenNodeSentinel = leoAtFile.atFile.putOpenNodeSentinel def putLineNumberDirective(self,v,inAtAll=False,inAtOthers=False,middle=False): oldOpenNodeSentinel(self,v,inAtAll,inAtOthers,middle) if self.language in ("perl","perlpod"): line = 'line 1 "node:%s (%s)"' % (self.nodeSentinelText(v),self.shortFileName) self.putSentinel(line) g.funcToMethod(putLineNumberDirective, leoAtFile.atFile,"putOpenNodeSentinel") #@-<< override write methods >> #@+<< override read methods >> #@+node:ekr.20040419105219.2: ** << override read methods >> readNormalLine = leoAtFile.atFile.readNormalLine def skipLineNumberDirective(self, s, i): if linere.search(s): return # Skipt the line. else: readNormalLine(self,s,i) g.funcToMethod(skipLineNumberDirective, leoAtFile.atFile,"readNormalLine") #@-<< override read methods >> g.plugin_signon(__name__) return ok
def init (): '''Return True if the plugin has loaded successfully.''' ok = not g.app.unitTesting if ok: g.registerHandler("all",trace_tags) g.plugin_signon(__name__) return ok
def init(): ok = not g.app.unitTesting # Dangerous for unit testing. if ok: g.registerHandler("icondclick1", onIconDoubleClick) g.plugin_signon(__name__) return ok
def init (): '''Return True if the plugin has loaded successfully.''' ok = g.app.gui.guiName() == 'qt' if ok: g.plugin_signon(__name__) g.app.stickynotes = {} return ok
def init(): '''Return True if the plugin has loaded successfully.''' ok = not g.app.unitTesting # Not for unit testing. if ok: g.registerHandler(("bodykey1","bodykey2","headkey1","headkey2"), onKey) g.plugin_signon(__name__) return ok
def init(): '''Return True if the plugin has loaded successfully.''' ok = not g.unitTesting # Not for unit testing: overrides core methods. if ok: if 0: # Override the LeoFrame class. class myLeoFrame(leoFrame.LeoFrame): def __init__(self,title=None): g.pr("myLeoFrame ctor",title) leoFrame.LeoFrame.__init__(self,title) leoFrame.LeoFrame = myLeoFrame if 0: # Override methods of the LeoApp class. oldAppCloseLeoWindow = g.app.closeLeoWindow def myAppCloseLeoWindow(self,frame): global oldAppCloseLeoWindow oldAppCloseLeoWindow(frame) g.trace("after closeLeoWindow") g.funcToMethod(myAppCloseLeoWindow,leoApp.LeoApp,"closeLeoWindow") g.plugin_signon(__name__) return ok
def init (): # Ok for unit testing: adds command to Outline menu. g.registerHandler( ('new','menu2') ,onCreate) g.plugin_signon(__name__) return True
def init (): '''Return True if the plugin has loaded successfully.''' ok = g.app.gui.guiName() == "qt" g.plugin_signon(__name__) g._mylyn = ctr = MylynController() ctr.set_handlers() return ok
def init (): '''Return True if the plugin has loaded successfully.''' ok = not g.unitTesting if ok: # g.registerHandler("icondclick2", open_in_emacs) g.plugin_signon(__name__) return ok
def init(): '''Return True if the plugin has loaded successfully.''' if g.unitTesting: return False ok = g.app.gui.guiName() == 'qt' g.plugin_signon(__name__) return ok
def init (): '''Return True if the plugin has loaded successfully.''' g.registerHandler('new', new_hook) g.registerHandler('create-node', create_node_hook) g.registerHandler('select1', select1_hook) g.plugin_signon(__name__) return True
def init(): '''Return True if the plugin has loaded successfully.''' ok = not g.app.unitTesting # Dangerous for unit testing. if ok: g.registerHandler("icondclick1", onIconDoubleClick) g.plugin_signon(__name__) return ok
def init (): '''Return True if the plugin has loaded successfully.''' ok = client is not None # Ok for unit test: just uses Plugins menu. if ok: # No hooks, we just use the cmd_Export to trigger an export g.plugin_signon(__name__) return ok
def init (): '''Return True if the plugin has loaded successfully.''' ok = bool(Template) if ok: g.plugin_signon(__name__) jinja_install() return ok
def init(): '''Return True if the plugin has loaded successfully.''' g.registerHandler('after-create-leo-frame',onCreate) g.plugin_signon(__name__) return True
def init(): g.registerHandler('after-create-leo-frame', onCreate) g.plugin_signon(__name__) return True
def init(): '''Return True if the plugin has loaded successfully.''' leoPlugins.registerHandler(('open2', 'new'), onCreate) g.plugin_signon(__name__) return True
def init(): '''Return True if the plugin has loaded successfully.''' g.registerHandler("create-optional-menus", createPasteAsHeadlinesMenu) g.plugin_signon(__name__) return True # Ok for unit testing: creates menu.
def init(): '''Return True if the plugin has loaded successfully.''' g.registerHandler('save1', beforeSave) g.plugin_signon(__name__) return True
def init (): g.plugin_signon(__name__) return True
def init(): '''Return True if the plugin has loaded successfully.''' g.registerHandler("after-create-leo-frame", on_create) g.plugin_signon(__name__) return True # OK for unit testing.
def init(): '''Return True if the plugin has loaded successfully.''' g.plugin_signon(__name__) return True
def init(): """ Return True if plugin has loaded successfully.""" if ok: g.plugin_signon(__name__) g.act_on_node.add(anki_act_on_node, 50) return ok
def init(): '''Return True if the plugin has loaded successfully.''' leoPlugins.registerHandler("after-create-leo-frame", maximize_window) g.plugin_signon(__name__) return True
def init (): g.registerHandler(('new','open2'), onCreate) g.registerHandler(('save1'), onSave) g.plugin_signon(__name__) return True
def init(): '''Return True if the plugin has loaded successfully.''' g.registerHandler("select1", onSelect) g.plugin_signon(__name__) # Fix https://bugs.launchpad.net/leo-editor/+bug/1335310 return True
def init (): '''Return True if this plugin loaded correctly.''' # Ok for unit testing: adds command to Outline menu. g.registerHandler( ('new','menu2') ,onCreate) g.plugin_signon(__name__) return True
def init(): '''Return True if the plugin has loaded successfully.''' # g.registerHandler(('new','menu2'),addMenu) g.globalDirectiveList.append('produce') g.plugin_signon(__name__) return True
def init(): '''Return True if the plugin has loaded successfully.''' leoPlugins.registerHandler("after-auto", InitInClass) g.plugin_signon(__name__) return True
def init(): '''Top-level init function for qt_commands.py.''' ok = True g.plugin_signon(__name__) g.registerHandler("select2", onSelect) return ok
def init(): """Return True if the plugin has loaded successfully.""" # This plugin is gui-independent. g.registerHandler(('new', 'menu2'), create_import_cisco_menu) g.plugin_signon(__name__) return True
def init(): '''Return True if the plugin has loaded successfully.''' leoPlugins.registerHandler(('new', 'menu2'), CreateAscMenu) g.plugin_signon(__name__) return True
def init(): ok = True leoPlugins.registerHandler(('new','menu2'), CreateAscMenu) g.plugin_signon(__name__) return ok
def init(): """Return True if the plugin has loaded successfully.""" # 2031: Allow this plugin to run without Qt. g.registerHandler('after-create-leo-frame', onCreate) g.plugin_signon(__name__) return True
def init(): """Return True if the plugin has loaded successfully.""" g.registerHandler('after-create-leo-frame', DT) g.plugin_signon(__name__) return True
def init(): '''Return True if the plugin has loaded successfully.''' ok = True # Ok for unit testing: creates menu. g.registerHandler("create-optional-menus", createWordCountMenu) g.plugin_signon(__name__) return ok
def init(): '''Return True if the plugin has loaded successfully.''' # This plugin is now gui independent. g.registerHandler(("new2", "menu2"), onCreate) g.plugin_signon(__name__) return True
def init(): # Ok for unit testing: creates menu. g.registerHandler("create-optional-menus", createExportMenu) g.plugin_signon(__name__) return True
def init(): g.registerHandler("select1", onSelect) g.plugin_signon(__name__)
def init(): g.registerHandler("start2", onStart) # Needed to have the plugin show in the Plugin Manager list. g.plugin_signon(__name__) return True
def init(): '''Return True if the plugin has loaded successfully.''' g.registerHandler("command1", timestamp) g.plugin_signon(__name__) return True # OK for unit testing.
def init(): ok = not g.unitTesting if ok: # g.registerHandler("icondclick2", open_in_emacs) g.plugin_signon(__name__) return ok
def init(): """Return True if the plugin has loaded successfully.""" ok = not g.unitTesting if ok: g.plugin_signon(__name__) return ok
def init(): ok = not g.app.unitTesting # Not for unit tests. if ok: # Register the handlers... g.registerHandler("start2", onStart) g.plugin_signon(__name__) return ok