From: Anthony Geay Date: Wed, 24 Feb 2016 13:35:47 +0000 (+0100) Subject: Final touch X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7193e12dc98be70fef4a4734d8cac23b2a3b68bd;p=modules%2Fgui.git Final touch --- diff --git a/src/PyConsoleBase/PyConsole_EditorBase.cxx b/src/PyConsoleBase/PyConsole_EditorBase.cxx index d1f47414e..0fead3321 100644 --- a/src/PyConsoleBase/PyConsole_EditorBase.cxx +++ b/src/PyConsoleBase/PyConsole_EditorBase.cxx @@ -110,6 +110,8 @@ #include #include #include +#include +#include //VSR: uncomment below macro to support unicode text properly in SALOME // current commented out due to regressions @@ -1168,7 +1170,11 @@ void PyConsole_EditorBase::dump() void PyConsole_EditorBase::dumpSlot() { - //TODO + QString fileName(QFileDialog::getSaveFileName(this,tr("Choose python file where to store"),QString(),tr("Python scripts ext (*.py)"))); + if ( !fileName.isEmpty() ) + this->dump( fileName ); + else + QMessageBox::warning(this,tr("WARNING"),tr("Python file has not been written")); } /*! @@ -1212,7 +1218,17 @@ void PyConsole_EditorBase::startLog() void PyConsole_EditorBase::startLogSlot() { - //TODO + QString fileName(QFileDialog::getSaveFileName(this,tr("Choose python file where to store log"),QString(),tr("Log files ext (*.log *.txt)"))); + while (1) + { + if ( !fileName.isEmpty() ) + { + if ( startLogImpl( fileName ) ) + break; + else + QMessageBox::warning(this,tr("WARNING"),tr("Log file is not writable")); + } + } } /*! diff --git a/src/PyConsoleBase/resources/PyConsoleBase_msg_en.ts b/src/PyConsoleBase/resources/PyConsoleBase_msg_en.ts index 8ddc1ad90..1586df266 100644 --- a/src/PyConsoleBase/resources/PyConsoleBase_msg_en.ts +++ b/src/PyConsoleBase/resources/PyConsoleBase_msg_en.ts @@ -36,4 +36,35 @@ Stop &Log + + PyConsole_EditorBase + + Choose python file where to store + Choose python file where to store dump + + + Python scripts ext (*.py) + Python scripts (*.py) + + + WARNING + WARNING ! + + + Python file has not been written + Python file has not been written ! + + + Choose python file where to store log + Choose python file where to store log + + + Log files ext (*.log *.txt) + Log files extension (*.log *.txt) + + + Log file is not writable + Log file is not writable ! + + diff --git a/src/PyConsoleBase/resources/PyConsoleBase_msg_fr.ts b/src/PyConsoleBase/resources/PyConsoleBase_msg_fr.ts index 624e689a8..574f107bf 100644 --- a/src/PyConsoleBase/resources/PyConsoleBase_msg_fr.ts +++ b/src/PyConsoleBase/resources/PyConsoleBase_msg_fr.ts @@ -36,4 +36,35 @@ Arrêter la &trace + + PyConsole_EditorBase + + Choose python file where to store + Choose python file where to store dump + + + Python scripts ext (*.py) + Python scripts (*.py) + + + WARNING + WARNING ! + + + Python file has not been written + Python file has not been written ! + + + Choose python file where to store log + Choose python file where to store log + + + Log files ext (*.log *.txt) + Log files extension (*.log *.txt) + + + Log file is not writable + Log file is not writable ! + + diff --git a/src/PyConsoleBase/resources/PyConsoleBase_msg_ja.ts b/src/PyConsoleBase/resources/PyConsoleBase_msg_ja.ts index e7a98c078..ca1aacee3 100644 --- a/src/PyConsoleBase/resources/PyConsoleBase_msg_ja.ts +++ b/src/PyConsoleBase/resources/PyConsoleBase_msg_ja.ts @@ -36,4 +36,35 @@ ログの停止 (&L) + + PyConsole_EditorBase + + Choose python file where to store + Choose python file where to store dump + + + Python scripts ext (*.py) + Python scripts (*.py) + + + WARNING + WARNING ! + + + Python file has not been written + Python file has not been written ! + + + Choose python file where to store log + Choose python file where to store log + + + Log files ext (*.log *.txt) + Log files extension (*.log *.txt) + + + Log file is not writable + Log file is not writable ! + +