예제 #1
0
def toolbar_proc(id_toolbar,
                 id_action,
                 text="",
                 text2="",
                 command=0,
                 index=-1,
                 index2=-1):
    if callable(command):
        sid_callback = str(command)
        _live[sid_callback] = command
        command = 'module={};func=_menu_proc_callback_proxy;info="{}";'.format(
            __name__, sid_callback)
    return ct.toolbar_proc(str(id_toolbar), id_action, text, text2,
                           str(command), index, index2)
예제 #2
0
파일: cudatext.py 프로젝트: heX16/CudaText
def toolbar_proc(id_toolbar, id_action, text="", text2="", command=0, index=-1, index2=-1):
    if callable(command):
        sid_callback = str(command)
        _live[sid_callback] = command
        command = 'module={};func=_menu_proc_callback_proxy;info="{}";'.format(__name__, sid_callback)
    return ct.toolbar_proc(str(id_toolbar), id_action, text, text2, str(command), index, index2)