How to use the leo.core.leoGlobals.plugin_signon function in leo

To help you get started, we’ve selected a few leo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github leo-editor / leo-editor / leo / plugins / FileActions.py View on Github external
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
#@+node:ekr.20040915105758.14: ** onIconDoubleClick
github leo-editor / leo-editor / leo / plugins / nodeActions.py View on Github external
def init():
    '''Return True if the plugin has loaded successfully.'''
    if not g.app.batchMode:
        g.blue("nodeActions: Init")
    ok = not g.app.unitTesting # Dangerous for unit testing.
    if ok:
        g.registerHandler("icondclick1", onIconDoubleClickNA)
        g.plugin_signon(__name__)
    return ok
#@+node:TL.20080507213950.9: ** doNodeAction
github leo-editor / leo-editor / leo / plugins / rowcol.py View on Github external
def init():

    ok = Tk and g.app.gui.guiName() == "tkinter"

    if ok:
        g.registerHandler("after-create-leo-frame",onCreate)
        g.plugin_signon("rowcol")

    return ok
#@+node:ekr.20041120114651.1: ** onCreate
github leo-editor / leo-editor / leo / plugins / fastGotoNode.py View on Github external
def init ():

    ok = Tkinter and g.app.gui.guiName() == "tkinter"

    if ok:
        global smenu
        smenu = Tkinter.Menu(tearoff=0,activeforeground='blue',activebackground='white')
        calculateMenuSize()
        g.registerHandler(('menu2','new'),registerPopupMenu)
        g.plugin_signon(__name__)

        if 0: # We now use leoSettings.leo to get all settings.
            pth = os.path.split(g.app.loadDir)
            lkpm = pth [0] + r"/plugins/fgn.fgn"
            if os.path.exists(lkpm):
                loadLanguages(lkpm)
    return ok
#@+node:mork.20041018091414.20: *3* calculateMenuSize
github leo-editor / leo-editor / leo / plugins / viewrendered2.py View on Github external
def init():
    '''Return True if the plugin has loaded successfully.'''
    global got_docutils
    if import_ok: # Fix #734.
        if not got_docutils:
            g.es_print('Warning: viewrendered2.py running without docutils.')
        g.plugin_signon(__name__)
        g.registerHandler('after-create-leo-frame', onCreate)
        g.registerHandler('scrolledMessage', show_scrolled_message)
        return True
    return False
#@+node:ekr.20140226074510.4193: *3* vr2.onCreate
github leo-editor / leo-editor / leo / plugins / leoscreen.py View on Github external
def init():
    '''Return True if the plugin has loaded successfully.'''
    g.registerHandler('after-create-leo-frame',onCreate)
    g.plugin_signon(__name__)
    return True
#@+node:tbrown.20100226095909.12782: ** onCreate
github leo-editor / leo-editor / leo / plugins / UniversalScrolling.py View on Github external
def init ():

    ok = Tk and g.app.gui.guiName() == "tkinter" and not g.app.unitTesting

    if ok:
        tkGui.leoTkinterFrame.createCanvas = addUThreading
        g.plugin_signon(__name__)

    return ok
#@+node:ekr.20040915104230: ** addUThreading & callbacks
github leo-editor / leo-editor / leo / plugins / mod_read_dir_outline.py View on Github external
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
#@+node:ekr.20050301083306.5: ** onCreate
github leo-editor / leo-editor / leo / plugins / leo_babel / babel.py View on Github external
def init ():
    leoG.registerHandler('after-create-leo-frame', onCreate)
    leoG.plugin_signon(__name__)
    return True
#@+node:bob.20170720150504.1: ** onCreate()
github leo-editor / leo-editor / leo / plugins / color_markup.py View on Github external
# Ok for unit tests.

    if ok: 

        if not g.app.unitTesting and not g.app.batchMode:
            g.pr("wiki markup enabled")

        # default value for color-tagged wiki text
        global wikiColoredText
        wikiColoredText = "blue"
        g.registerHandler("color-optional-markup", colorWikiMarkup)
        g.registerHandler("init-color-markup", initAnyMarkup)
        #g.registerHandler("bodykey1", onBodykey1)
        g.registerHandler("bodydclick1", onBodydclick1)
        g.registerHandler(('new','menu2'), onCreate)
        g.plugin_signon(__name__)

    return ok
#@+node:edream.110403140857.9: *3* initAnyMarkup