'Toggle view'

def toggle_view(self, checked):

    if checked:
        self.dockwidget.show()
        self.dockwidget.raise_()
        if (not self.clients):
            if self.main.is_setting_up:
                self.create_new_client(give_focus=False)
            else:
                self.create_new_client(give_focus=True)
    else:
        self.dockwidget.hide()
