summaryrefslogtreecommitdiff
authorjosef <josef>2002-10-14 18:36:44 (UTC)
committer josef <josef>2002-10-14 18:36:44 (UTC)
commit481d98eabc371d473fef7c640a710c5535637750 (patch) (side-by-side diff)
treed9abf610d40d761109ced904a6b9618e28cd9022
parent66e2630b56989e149a04159d5273ec5cc1661dff (diff)
downloadopie-481d98eabc371d473fef7c640a710c5535637750.zip
opie-481d98eabc371d473fef7c640a710c5535637750.tar.gz
opie-481d98eabc371d473fef7c640a710c5535637750.tar.bz2
- display warning if connection cannot be established
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 02f8451..b143361 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -240,50 +240,54 @@ void MainWindow::slotSaveScript() {
currentSession()->emulationLayer()->script()->saveTo(filename);
currentSession()->emulationLayer()->clearScript();
}
}
*/
}
void MainWindow::slotRunScript() {
/*
if (currentSession()) {
MimeTypes types;
QStringList script;
script << "text/plain";
types.insert("Script", script);
QString filename = OFileDialog::getOpenFileName(2, "/", QString::null, types);
if (!filename.isEmpty()) {
Script script(DocLnk(filename).file());
currentSession()->emulationLayer()->runScript(&script);
}
}
*/
}
void MainWindow::slotConnect() {
- if ( currentSession() )
- currentSession()->layer()->open();
+ if ( currentSession() ) {
+ bool ret = currentSession()->layer()->open();
+ if(!ret) QMessageBox::warning(currentSession()->widgetStack(),
+ QObject::tr("Failed"),
+ QObject::tr("Connecting failed for this session."));
+ }
}
void MainWindow::slotDisconnect() {
if ( currentSession() )
currentSession()->layer()->close();
}
void MainWindow::slotTerminate() {
if ( currentSession() )
currentSession()->layer()->close();
slotClose();
/* FIXME move to the next session */
}
void MainWindow::slotConfigure() {
qWarning("configure");
ConfigDialog conf( manager()->all(), factory() );
conf.showMaximized();
int ret = conf.exec();
if ( QDialog::Accepted == ret ) {
qWarning("conf %d", conf.list().count() );