'Global callback'

@Slot()
def global_callback(self):

    widget = QApplication.focusWidget()
    action = self.sender()
    callback = from_qvariant(action.data(), to_text_string)
    from spyder.widgets.editor import TextEditBaseWidget
    if (not isinstance(widget, TextEditBaseWidget)):
        widget = self.previous_focused_widget
    if isinstance(widget, TextEditBaseWidget):
        getattr(widget, callback)()
