()
Extend the addon menu with toggle.
Extend the addon menu with toggle.
Extend the addon menu with toggle .
def siblingMenu():
    '''Extend the addon menu with toggle.'''
    m = None

    for action in mw.form.menuPlugins.actions():
        menu = action.menu()
        if menu and menu.title() == "anki-sibling-spacing-whitelist":
            m = menu
            break

    if not m:
        return

    a = QAction(_("Toggle ON/OFF..."), mw)
    mw.connect(a, SIGNAL("triggered()"), toggle)
    m.addAction(a)
    a = QAction(_("Debug ON/OFF..."), mw)
    mw.connect(a, SIGNAL("triggered()"), toggle_debug)
    m.addAction(a)
def siblingMenu ( ) : m = None for action in mw . form . menuPlugins . actions ( ) : menu = action . menu ( ) if menu and menu . title ( ) == "anki-sibling-spacing-whitelist" : m = menu break if not m : return a = QAction ( _ ( "Toggle ON/OFF..." ) , mw ) mw . connect ( a , SIGNAL ( "triggered()" ) , toggle ) m . addAction ( a ) a = QAction ( _ ( "Debug ON/OFF..." ) , mw ) mw . connect ( a , SIGNAL ( "triggered()" ) , toggle_debug ) m . addAction ( a )