''

def toggle_layout(self, direction='next'):

    get = CONF.get
    names = get('quick_layouts', 'names')
    order = get('quick_layouts', 'order')
    active = get('quick_layouts', 'active')
    if (len(active) == 0):
        return
    layout_index = ['default']
    for name in order:
        if (name in active):
            layout_index.append(names.index(name))
    current_layout = self.current_quick_layout
    dic = {'next': 1, 'previous': (-1)}
    if (current_layout is None):
        current_layout = 'default'
    if (current_layout in layout_index):
        current_index = layout_index.index(current_layout)
    else:
        current_index = 0
    new_index = ((current_index + dic[direction]) % len(layout_index))
    self.quick_layout_switch(layout_index[new_index])
