summaryrefslogtreecommitdiff
authorjosef <josef>2002-10-14 18:36:44 (UTC)
committer josef <josef>2002-10-14 18:36:44 (UTC)
commit481d98eabc371d473fef7c640a710c5535637750 (patch) (unidiff)
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() {
240 currentSession()->emulationLayer()->script()->saveTo(filename); 240 currentSession()->emulationLayer()->script()->saveTo(filename);
241 currentSession()->emulationLayer()->clearScript(); 241 currentSession()->emulationLayer()->clearScript();
242 } 242 }
243 } 243 }
244 */ 244 */
245} 245}
246 246
247void MainWindow::slotRunScript() { 247void MainWindow::slotRunScript() {
248/* 248/*
249 if (currentSession()) { 249 if (currentSession()) {
250 MimeTypes types; 250 MimeTypes types;
251 QStringList script; 251 QStringList script;
252 script << "text/plain"; 252 script << "text/plain";
253 types.insert("Script", script); 253 types.insert("Script", script);
254 QString filename = OFileDialog::getOpenFileName(2, "/", QString::null, types); 254 QString filename = OFileDialog::getOpenFileName(2, "/", QString::null, types);
255 if (!filename.isEmpty()) { 255 if (!filename.isEmpty()) {
256 Script script(DocLnk(filename).file()); 256 Script script(DocLnk(filename).file());
257 currentSession()->emulationLayer()->runScript(&script); 257 currentSession()->emulationLayer()->runScript(&script);
258 } 258 }
259 } 259 }
260 */ 260 */
261} 261}
262 262
263void MainWindow::slotConnect() { 263void MainWindow::slotConnect() {
264 if ( currentSession() ) 264 if ( currentSession() ) {
265 currentSession()->layer()->open(); 265 bool ret = currentSession()->layer()->open();
266 if(!ret) QMessageBox::warning(currentSession()->widgetStack(),
267 QObject::tr("Failed"),
268 QObject::tr("Connecting failed for this session."));
269 }
266} 270}
267 271
268void MainWindow::slotDisconnect() { 272void MainWindow::slotDisconnect() {
269 if ( currentSession() ) 273 if ( currentSession() )
270 currentSession()->layer()->close(); 274 currentSession()->layer()->close();
271} 275}
272 276
273void MainWindow::slotTerminate() { 277void MainWindow::slotTerminate() {
274 if ( currentSession() ) 278 if ( currentSession() )
275 currentSession()->layer()->close(); 279 currentSession()->layer()->close();
276 280
277 slotClose(); 281 slotClose();
278 /* FIXME move to the next session */ 282 /* FIXME move to the next session */
279} 283}
280 284
281void MainWindow::slotConfigure() { 285void MainWindow::slotConfigure() {
282 qWarning("configure"); 286 qWarning("configure");
283 ConfigDialog conf( manager()->all(), factory() ); 287 ConfigDialog conf( manager()->all(), factory() );
284 conf.showMaximized(); 288 conf.showMaximized();
285 289
286 int ret = conf.exec(); 290 int ret = conf.exec();
287 291
288 if ( QDialog::Accepted == ret ) { 292 if ( QDialog::Accepted == ret ) {
289 qWarning("conf %d", conf.list().count() ); 293 qWarning("conf %d", conf.list().count() );