author | zecke <zecke> | 2002-10-21 22:35:37 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-21 22:35:37 (UTC) |
commit | d6a40efdb9d81d39972a1304bd62ac60bb45e996 (patch) (side-by-side diff) | |
tree | 47cc96d6457e809621f40610737407532f04f98c /noncore/apps/opie-console/mainwindow.cpp | |
parent | 151729eb3e4e4cfbb69db1f027e74188cf55c328 (diff) | |
download | opie-d6a40efdb9d81d39972a1304bd62ac60bb45e996.zip opie-d6a40efdb9d81d39972a1304bd62ac60bb45e996.tar.gz opie-d6a40efdb9d81d39972a1304bd62ac60bb45e996.tar.bz2 |
Fix scriptiong Open the file before reading from it
Add text/all to the mimetypes this makes recording, saving and
running work
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index afac542..7ffeca7 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -275,62 +275,64 @@ QList<Session> MainWindow::sessions() { return m_sessions; } void MainWindow::slotNew() { ProfileEditorDialog dlg(factory() ); dlg.showMaximized(); int ret = dlg.exec(); if ( ret == QDialog::Accepted ) { create( dlg.profile() ); } } void MainWindow::slotRecordScript() { if (currentSession()) { currentSession()->emulationHandler()->startRecording(); } } void MainWindow::slotSaveScript() { if (currentSession() && currentSession()->emulationHandler()->isRecording()) { MimeTypes types; QStringList script; script << "text/plain"; + script << "text/all"; types.insert("Script", script); QString filename = OFileDialog::getSaveFileName(2, "/", QString::null, types); if (!filename.isEmpty()) { currentSession()->emulationHandler()->script()->saveTo(filename); currentSession()->emulationHandler()->clearScript(); } } } void MainWindow::slotRunScript() { if (currentSession()) { MimeTypes types; QStringList script; script << "text/plain"; + script << "text/all"; types.insert("Script", script); QString filename = OFileDialog::getOpenFileName(2, "/", QString::null, types); if (!filename.isEmpty()) { Script script(DocLnk(filename).file()); currentSession()->emulationHandler()->runScript(&script); } } } void MainWindow::slotConnect() { if ( currentSession() ) { bool ret = currentSession()->layer()->open(); if(!ret) QMessageBox::warning(currentSession()->widgetStack(), QObject::tr("Failed"), QObject::tr("Connecting failed for this session.")); else { m_connect->setEnabled( false ); m_disconnect->setEnabled( true ); } } } void MainWindow::slotDisconnect() { if ( currentSession() ) { |