#783: Browser registra todas las salidas en fichero de log y el reloj queda siempre en la esquina derecha.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5291 a21b9725-9963-47de-94b9-378ad31fedc9remotes/github/master
parent
6fd35b6da6
commit
0dff9e1f6e
48
po/ca.po
48
po/ca.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: OpenGnsys Client Browser 1.1.0\n"
|
||||
"Report-Msgid-Bugs-To: http://opengnsys.es\n"
|
||||
"POT-Creation-Date: 2016-04-28 14:25+0200\n"
|
||||
"POT-Creation-Date: 2017-05-09 10:49+0000\n"
|
||||
"PO-Revision-Date: 2016-05-03 10:25+0200\n"
|
||||
"Last-Translator: Ramón M. Gómez <ramongomez@us.es>\n"
|
||||
"Language-Team: CATALAN <LL@li.org>\n"
|
||||
|
@ -17,7 +17,7 @@ msgstr ""
|
|||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../src/main.cpp:17
|
||||
#: ../src/main.cpp:20
|
||||
#, c-format
|
||||
msgid "Uso: %s -qws http://sitioweb.com/\n"
|
||||
msgstr "Ús: %s -qws http://web.com/\n"
|
||||
|
@ -30,81 +30,77 @@ msgstr "&Nova Terminal"
|
|||
msgid "Salida"
|
||||
msgstr "Sortida"
|
||||
|
||||
#: ../src/mainwindow.cpp:133
|
||||
#: ../src/mainwindow.cpp:131
|
||||
msgid "El fichero de log no ha podido ser abierto: "
|
||||
msgstr ""
|
||||
|
||||
#: ../src/mainwindow.cpp:163
|
||||
#: ../src/mainwindow.cpp:160
|
||||
msgid "Hay otro proceso en ejecución. Por favor espere."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/mainwindow.cpp:178 ../src/mainwindow.cpp:217
|
||||
#: ../src/mainwindow.cpp:175 ../src/mainwindow.cpp:214
|
||||
msgid "AVISO"
|
||||
msgstr "AVIS"
|
||||
|
||||
#: ../src/mainwindow.cpp:180
|
||||
#: ../src/mainwindow.cpp:177
|
||||
msgid ""
|
||||
"La siguiente acción puede modificar datos o tardar varios minutos. El "
|
||||
"equipo no podrá ser utilizado durante su ejecución."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/mainwindow.cpp:181
|
||||
#: ../src/mainwindow.cpp:178
|
||||
msgid "Ejecutar"
|
||||
msgstr "Executar"
|
||||
|
||||
#: ../src/mainwindow.cpp:182
|
||||
#: ../src/mainwindow.cpp:179
|
||||
msgid "Cancelar"
|
||||
msgstr "Cancel-lar"
|
||||
|
||||
#: ../src/mainwindow.cpp:200
|
||||
#: ../src/mainwindow.cpp:197
|
||||
#, c-format
|
||||
msgid "%p% Cargando"
|
||||
msgstr "%p% Carregat"
|
||||
|
||||
#: ../src/mainwindow.cpp:219
|
||||
#: ../src/mainwindow.cpp:216
|
||||
msgid "La página no se puede cargar."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/mainwindow.cpp:221
|
||||
msgid "Recarregar"
|
||||
msgstr ""
|
||||
#: ../src/mainwindow.cpp:218
|
||||
msgid "Recargar"
|
||||
msgstr "Recarregar"
|
||||
|
||||
#: ../src/mainwindow.cpp:222
|
||||
#: ../src/mainwindow.cpp:219
|
||||
msgid "Abortar"
|
||||
msgstr "Avortar"
|
||||
|
||||
#: ../src/mainwindow.cpp:253
|
||||
#: ../src/mainwindow.cpp:250
|
||||
msgid "Lanzado satisfactoriamente."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/mainwindow.cpp:287
|
||||
#: ../src/mainwindow.cpp:284
|
||||
msgid "Proceso acabado correctamente. Valor de retorno: "
|
||||
msgstr ""
|
||||
|
||||
#: ../src/mainwindow.cpp:291
|
||||
#: ../src/mainwindow.cpp:288
|
||||
msgid "El proceso ha fallado inesperadamente. Salida: "
|
||||
msgstr ""
|
||||
|
||||
#: ../src/mainwindow.cpp:302
|
||||
#: ../src/mainwindow.cpp:299
|
||||
msgid "Imposible lanzar el proceso."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/mainwindow.cpp:305
|
||||
#: ../src/mainwindow.cpp:302
|
||||
msgid "Error de escritura en el proceso."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/mainwindow.cpp:308
|
||||
#: ../src/mainwindow.cpp:305
|
||||
msgid "Error de lectura del proceso."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/mainwindow.cpp:316
|
||||
#: ../src/mainwindow.cpp:313
|
||||
msgid "Error desconocido."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/mainwindow.cpp:433
|
||||
msgid "Listo"
|
||||
msgstr "Llest"
|
||||
|
||||
#: ../src/mainwindow.cpp:446
|
||||
#: ../src/mainwindow.cpp:443
|
||||
msgid "Lanzando el comando: "
|
||||
msgstr ""
|
||||
|
|
50
po/en.po
50
po/en.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: OpenGnsys Client Browser 1.1.0\n"
|
||||
"Report-Msgid-Bugs-To: http://opengnsys.es\n"
|
||||
"POT-Creation-Date: 2016-04-28 14:25+0200\n"
|
||||
"POT-Creation-Date: 2017-05-09 10:49+0000\n"
|
||||
"PO-Revision-Date: 2016-05-03 10:16+0200\n"
|
||||
"Last-Translator: Ramón M. Gómez <ramongomez@us.es>\n"
|
||||
"Language-Team: ENGLISH <LL@li.org>\n"
|
||||
|
@ -17,7 +17,7 @@ msgstr ""
|
|||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../src/main.cpp:17
|
||||
#: ../src/main.cpp:20
|
||||
#, c-format
|
||||
msgid "Uso: %s -qws http://sitioweb.com/\n"
|
||||
msgstr "Usage: %s -qws http://website.com/\n"
|
||||
|
@ -30,19 +30,19 @@ msgstr "&New Terminal"
|
|||
msgid "Salida"
|
||||
msgstr "Output"
|
||||
|
||||
#: ../src/mainwindow.cpp:133
|
||||
#: ../src/mainwindow.cpp:131
|
||||
msgid "El fichero de log no ha podido ser abierto: "
|
||||
msgstr "The log file could not be opened: "
|
||||
|
||||
#: ../src/mainwindow.cpp:163
|
||||
#: ../src/mainwindow.cpp:160
|
||||
msgid "Hay otro proceso en ejecución. Por favor espere."
|
||||
msgstr "There is another process running. Please wait."
|
||||
|
||||
#: ../src/mainwindow.cpp:178 ../src/mainwindow.cpp:217
|
||||
#: ../src/mainwindow.cpp:175 ../src/mainwindow.cpp:214
|
||||
msgid "AVISO"
|
||||
msgstr "WARNING"
|
||||
|
||||
#: ../src/mainwindow.cpp:180
|
||||
#: ../src/mainwindow.cpp:177
|
||||
msgid ""
|
||||
"La siguiente acción puede modificar datos o tardar varios minutos. El "
|
||||
"equipo no podrá ser utilizado durante su ejecución."
|
||||
|
@ -50,63 +50,59 @@ msgstr ""
|
|||
"Following action can modify some data or take several minutes. This computer "
|
||||
"may not be used during execution."
|
||||
|
||||
#: ../src/mainwindow.cpp:181
|
||||
#: ../src/mainwindow.cpp:178
|
||||
msgid "Ejecutar"
|
||||
msgstr "Run"
|
||||
|
||||
#: ../src/mainwindow.cpp:182
|
||||
#: ../src/mainwindow.cpp:179
|
||||
msgid "Cancelar"
|
||||
msgstr "Cancel"
|
||||
|
||||
#: ../src/mainwindow.cpp:200
|
||||
#: ../src/mainwindow.cpp:197
|
||||
#, c-format
|
||||
msgid "%p% Cargando"
|
||||
msgstr "%p% Loaded"
|
||||
|
||||
#: ../src/mainwindow.cpp:219
|
||||
#: ../src/mainwindow.cpp:216
|
||||
msgid "La página no se puede cargar."
|
||||
msgstr "Page can not be loaded."
|
||||
|
||||
#: ../src/mainwindow.cpp:221
|
||||
#: ../src/mainwindow.cpp:218
|
||||
msgid "Recargar"
|
||||
msgstr "Reload"
|
||||
|
||||
#: ../src/mainwindow.cpp:222
|
||||
#: ../src/mainwindow.cpp:219
|
||||
msgid "Abortar"
|
||||
msgstr "Abort"
|
||||
|
||||
#: ../src/mainwindow.cpp:253
|
||||
#: ../src/mainwindow.cpp:250
|
||||
msgid "Lanzado satisfactoriamente."
|
||||
msgstr "Successfully launched."
|
||||
|
||||
#: ../src/mainwindow.cpp:287
|
||||
#: ../src/mainwindow.cpp:284
|
||||
msgid "Proceso acabado correctamente. Valor de retorno: "
|
||||
msgstr "Process completed successfully. Return value: "
|
||||
|
||||
#: ../src/mainwindow.cpp:291
|
||||
#: ../src/mainwindow.cpp:288
|
||||
msgid "El proceso ha fallado inesperadamente. Salida: "
|
||||
msgstr "The process crashed unexpectedly. Return value: "
|
||||
|
||||
#: ../src/mainwindow.cpp:302
|
||||
#: ../src/mainwindow.cpp:299
|
||||
msgid "Imposible lanzar el proceso."
|
||||
msgstr "Unable to launch the process."
|
||||
|
||||
#: ../src/mainwindow.cpp:305
|
||||
#: ../src/mainwindow.cpp:302
|
||||
msgid "Error de escritura en el proceso."
|
||||
msgstr "Error writing to the process"
|
||||
msgstr "Error writing to the process."
|
||||
|
||||
#: ../src/mainwindow.cpp:308
|
||||
#: ../src/mainwindow.cpp:305
|
||||
msgid "Error de lectura del proceso."
|
||||
msgstr "Error reading from the process"
|
||||
msgstr "Error reading from the process."
|
||||
|
||||
#: ../src/mainwindow.cpp:316
|
||||
#: ../src/mainwindow.cpp:313
|
||||
msgid "Error desconocido."
|
||||
msgstr "Unknown error."
|
||||
|
||||
#: ../src/mainwindow.cpp:433
|
||||
msgid "Listo"
|
||||
msgstr "Ready"
|
||||
|
||||
#: ../src/mainwindow.cpp:446
|
||||
#: ../src/mainwindow.cpp:443
|
||||
msgid "Lanzando el comando: "
|
||||
msgstr "Launching command:"
|
||||
msgstr "Launching command: "
|
||||
|
|
|
@ -60,10 +60,10 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
m_tabs->addTab(m_output,tr(gettext("Salida")));
|
||||
slotCreateTerminal();
|
||||
|
||||
// Las pestanyas al dock
|
||||
// Assign tabs to dock
|
||||
dock->setWidget(m_tabs);
|
||||
|
||||
// Y el dock al mainwindow
|
||||
// Assign tabs dock to the mainwindow if admin mode is active
|
||||
if(m_env.contains("ogactiveadmin") && m_env["ogactiveadmin"] == "true")
|
||||
addDockWidget(Qt::BottomDockWidgetArea,dock);
|
||||
|
||||
|
@ -77,10 +77,10 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
// WebBar
|
||||
m_webBar=new QLineEdit(dock);
|
||||
|
||||
// WebBar al dock
|
||||
// WebBar to dock
|
||||
dock->setWidget(m_webBar);
|
||||
|
||||
// dock al mainwindow
|
||||
// Assign top dock to the mainwindow if admin mode is active
|
||||
if(m_env.contains("ogactiveadmin") && m_env["ogactiveadmin"] == "true")
|
||||
addDockWidget(Qt::TopDockWidgetArea,dock);
|
||||
|
||||
|
@ -88,8 +88,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
QStatusBar* st=statusBar();
|
||||
st->setSizeGripEnabled(false);
|
||||
m_progressBar=new QProgressBar(this);
|
||||
m_progressBar->setMinimum(0);
|
||||
m_progressBar->setMaximum(100);
|
||||
m_progressBar->setRange(0,100);
|
||||
m_clock=new DigitalClock(this);
|
||||
|
||||
m_web->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
|
||||
|
@ -125,16 +124,14 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
|
||||
if(m_env.contains("OGLOGFILE") && m_env["OGLOGFILE"]!="")
|
||||
{
|
||||
QFile* file=new QFile(m_env["OGLOGFILE"]);
|
||||
if(!file->open(QIODevice::WriteOnly | QIODevice::Text |
|
||||
QIODevice::Append))
|
||||
QFile* m_logfile=new QFile(m_env["OGLOGFILE"]);
|
||||
if(!m_logfile->open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append))
|
||||
{
|
||||
delete file;
|
||||
delete m_logfile;
|
||||
print(tr(gettext("El fichero de log no ha podido ser abierto: "))+m_env["OGLOGFILE"]+".");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_logfile=file;
|
||||
m_logstream=new QTextStream(m_logfile);
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +154,7 @@ MainWindow::~MainWindow()
|
|||
|
||||
void MainWindow::slotLinkHandle(const QUrl &url)
|
||||
{
|
||||
// Si ya hay un proceso ejectuandose
|
||||
// Check if it's executing another process
|
||||
if(m_process->state()!=QProcess::NotRunning)
|
||||
{
|
||||
print(tr(gettext("Hay otro proceso en ejecución. Por favor espere.")));
|
||||
|
@ -167,12 +164,12 @@ void MainWindow::slotLinkHandle(const QUrl &url)
|
|||
QString urlString = url.toString();
|
||||
if(urlString.startsWith(COMMAND))
|
||||
{
|
||||
// Si es link de tipo COMMAND, ejecutar.
|
||||
// For COMMAND link, execute
|
||||
executeCommand(urlString.remove(0,QString(COMMAND).length()));
|
||||
}
|
||||
else if(urlString.startsWith(COMMAND_WITH_CONFIRMATION))
|
||||
{
|
||||
// Si es link de tipo COMMAND_WITH_CONFIRMATION, pedir confirmación de ejecutar.
|
||||
// For COMMAND_WITH_CONFIRMATION link, show confirmation box and execute, if accepted
|
||||
QMessageBox msgBox;
|
||||
msgBox.setIcon(QMessageBox::Question);
|
||||
msgBox.setWindowTitle(tr(gettext("AVISO")));
|
||||
|
@ -189,7 +186,7 @@ void MainWindow::slotLinkHandle(const QUrl &url)
|
|||
}
|
||||
else
|
||||
{
|
||||
// Si es otro link, cargar página web.
|
||||
// For other link, load webpage
|
||||
m_web->load(url);
|
||||
}
|
||||
}
|
||||
|
@ -250,7 +247,7 @@ void MainWindow::slotSslErrors(QNetworkReply* reply)
|
|||
|
||||
void MainWindow::slotProcessStarted()
|
||||
{
|
||||
print(tr(gettext("Lanzado satisfactoriamente.")));
|
||||
m_output->insertPlainText(tr(gettext("Lanzado satisfactoriamente.")));
|
||||
startProgressBar();
|
||||
}
|
||||
|
||||
|
@ -393,8 +390,10 @@ void MainWindow::print(QString s)
|
|||
{
|
||||
if(!s.endsWith("\n"))
|
||||
s+="\n";
|
||||
if(m_logstream)
|
||||
if(m_logstream) {
|
||||
*m_logstream<<CURRENT_TIME()<<": "<<s;
|
||||
m_logstream->flush();
|
||||
}
|
||||
if(m_output)
|
||||
m_output->insertPlainText(s);
|
||||
}
|
||||
|
@ -428,9 +427,7 @@ void MainWindow::startProgressBar()
|
|||
|
||||
void MainWindow::finishProgressBar()
|
||||
{
|
||||
QStatusBar* st=statusBar();
|
||||
st->removeWidget(m_progressBar);
|
||||
st->showMessage(tr(gettext("Listo")));
|
||||
m_progressBar->reset();
|
||||
m_web->setEnabled(true);
|
||||
}
|
||||
|
||||
|
@ -440,10 +437,10 @@ void MainWindow::executeCommand(QString &string)
|
|||
QStringList list=string.split(" ",QString::SkipEmptyParts);
|
||||
QString program=list.takeFirst();
|
||||
m_process->setReadChannel(QProcess::StandardOutput);
|
||||
// Le ponemos el mismo entorno que tiene el browser ahora mismo
|
||||
// Assign the same Browser's environment to the process.
|
||||
m_process->setEnvironment(QProcess::systemEnvironment());
|
||||
m_process->start(program,list);
|
||||
m_output->insertPlainText(tr(gettext("Lanzando el comando: ")));
|
||||
print(tr(gettext("Lanzando el comando: ")));
|
||||
m_output->setTextColor(QColor(Qt::darkGreen));
|
||||
print(program+" "+list.join(" "));
|
||||
m_output->setTextColor(QColor(Qt::black));
|
||||
|
|
Loading…
Reference in New Issue