Ejemplo n.º 1
0
 def restart_message(self):
     """
     Print a restart message when the client is connected to an external
     kernel
     """
     message = _("Kernel process is either remote or unspecified. "
                 "Cannot restart.")
     QMessageBox.information(self, "IPython", message)
Ejemplo n.º 2
0
 def show_message(is_checked):
     if is_checked or not msg_if_enabled:
         if msg_warning is not None:
             QMessageBox.warning(self, self.get_name(),
                                 msg_warning, QMessageBox.Ok)
         if msg_info is not None:
             QMessageBox.information(self, self.get_name(),
                                     msg_info, QMessageBox.Ok)
Ejemplo n.º 3
0
    def prompt_restart_required(self):
        """Prompt the user with a request to restart."""
        restart_opts = self.restart_options
        changed_opts = self.changed_options
        options = [restart_opts[o] for o in changed_opts if o in restart_opts]

        if len(options) == 1:
            msg_start = _("Spyder needs to restart to change the following "
                          "setting:")
        else:
            msg_start = _("Spyder needs to restart to change the following "
                          "settings:")
        msg_end = _("Do you wish to restart now?")

        msg_options = ""
        for option in options:
            msg_options += "<li>{0}</li>".format(option)

        msg_title = _("Information")
        msg = "{0}<ul>{1}</ul><br>{2}".format(msg_start, msg_options, msg_end)
        answer = QMessageBox.information(self, msg_title, msg,
                                         QMessageBox.Yes | QMessageBox.No)
        if answer == QMessageBox.Yes:
            self.restart()
Ejemplo n.º 4
0
    def prompt_restart_required(self):
        """Prompt the user with a request to restart."""
        restart_opts = self.restart_options
        changed_opts = self.changed_options
        options = [restart_opts[o] for o in changed_opts if o in restart_opts]

        if len(options) == 1:
            msg_start = _("Spyder needs to restart to change the following "
                          "setting:")
        else:
            msg_start = _("Spyder needs to restart to change the following "
                          "settings:")
        msg_end = _("Do you wish to restart now?")

        msg_options = ""
        for option in options:
            msg_options += "<li>{0}</li>".format(option)

        msg_title = _("Information")
        msg = "{0}<ul>{1}</ul><br>{2}".format(msg_start, msg_options, msg_end)
        answer = QMessageBox.information(self, msg_title, msg,
                                         QMessageBox.Yes | QMessageBox.No)
        if answer == QMessageBox.Yes:
            self.restart()
Ejemplo n.º 5
0
 def msgbox(self, msg=None):
     """Message box."""
     QMessageBox.information(self, 'Title', msg)
Ejemplo n.º 6
0
 def msgbox(self, msg=None):
     """Message box."""
     QMessageBox.information(self, 'Title', msg)