def set_shortcut(self, name, shortcut):
        """
        Sets given action shortcut.

        :param name: Action to set the shortcut.
        :type name: unicode
        :param shortcut: Shortcut to set.
        :type shortcut: unicode
        :return: Method success.
        :rtype: bool
        """

        name = self.__normalize_name(name)
        action = self.get_action(name)
        if not action:
            return

        action.setShortcut(QKeySequence(shortcut))
        return True