'Dock widget visibility has changed.'

def visibility_changed(self, enable):

    if enable:
        self.dockwidget.raise_()
        widget = self.get_focus_widget()
        if (widget is not None):
            widget.setFocus()
    visible = (self.dockwidget.isVisible() or self.ismaximized)
    if self.DISABLE_ACTIONS_WHEN_HIDDEN:
        toggle_actions(self.plugin_actions, visible)
    self.isvisible = (enable and visible)
    if self.isvisible:
        self.refresh_plugin()
