author | zecke <zecke> | 2002-10-21 22:37:55 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-21 22:37:55 (UTC) |
commit | d7a4ad19a8493dbb226e7f8355c49dafd1fa9597 (patch) (side-by-side diff) | |
tree | b9a77d8f25face1640a91b9030b93f61085fc2a4 | |
parent | d6a40efdb9d81d39972a1304bd62ac60bb45e996 (diff) | |
download | opie-d7a4ad19a8493dbb226e7f8355c49dafd1fa9597.zip opie-d7a4ad19a8493dbb226e7f8355c49dafd1fa9597.tar.gz opie-d7a4ad19a8493dbb226e7f8355c49dafd1fa9597.tar.bz2 |
one more mimetype for scripts
this makes play nirvana work ;)
-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 7ffeca7..89f3516 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -252,111 +252,113 @@ TabWidget* MainWindow::tabWidget() { } void MainWindow::populateProfiles() { m_sessionsPop->clear(); Profile::ValueList list = manager()->all(); for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); ++it ) { m_sessionsPop->insertItem( (*it).name() ); } } MainWindow::~MainWindow() { delete m_factory; manager()->save(); } MetaFactory* MainWindow::factory() { return m_factory; } Session* MainWindow::currentSession() { return m_curSession; } 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"; + script << "application/octet-stream"; 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"; + script << "application/octet-stream"; 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() ) { currentSession()->layer()->close(); m_connect->setEnabled( true ); m_disconnect->setEnabled( false ); } } void MainWindow::slotTerminate() { if ( currentSession() ) currentSession()->layer()->close(); slotClose(); /* FIXME move to the next session */ } void MainWindow::slotConfigure() { ConfigDialog conf( manager()->all(), factory() ); conf.showMaximized(); int ret = conf.exec(); if ( QDialog::Accepted == ret ) { manager()->setProfiles( conf.list() ); manager()->save(); populateProfiles(); |