summaryrefslogtreecommitdiff
authorzecke <zecke>2002-10-21 22:35:37 (UTC)
committer zecke <zecke>2002-10-21 22:35:37 (UTC)
commitd6a40efdb9d81d39972a1304bd62ac60bb45e996 (patch) (unidiff)
tree47cc96d6457e809621f40610737407532f04f98c
parent151729eb3e4e4cfbb69db1f027e74188cf55c328 (diff)
downloadopie-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 (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp2
-rw-r--r--noncore/apps/opie-console/script.cpp1
2 files changed, 3 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
@@ -296,6 +296,7 @@ void MainWindow::slotSaveScript() {
296 MimeTypes types; 296 MimeTypes types;
297 QStringList script; 297 QStringList script;
298 script << "text/plain"; 298 script << "text/plain";
299 script << "text/all";
299 types.insert("Script", script); 300 types.insert("Script", script);
300 QString filename = OFileDialog::getSaveFileName(2, "/", QString::null, types); 301 QString filename = OFileDialog::getSaveFileName(2, "/", QString::null, types);
301 if (!filename.isEmpty()) { 302 if (!filename.isEmpty()) {
@@ -310,6 +311,7 @@ void MainWindow::slotRunScript() {
310 MimeTypes types; 311 MimeTypes types;
311 QStringList script; 312 QStringList script;
312 script << "text/plain"; 313 script << "text/plain";
314 script << "text/all";
313 types.insert("Script", script); 315 types.insert("Script", script);
314 QString filename = OFileDialog::getOpenFileName(2, "/", QString::null, types); 316 QString filename = OFileDialog::getOpenFileName(2, "/", QString::null, types);
315 if (!filename.isEmpty()) { 317 if (!filename.isEmpty()) {
diff --git a/noncore/apps/opie-console/script.cpp b/noncore/apps/opie-console/script.cpp
index 9cb1cd3..e6e9d6d 100644
--- a/noncore/apps/opie-console/script.cpp
+++ b/noncore/apps/opie-console/script.cpp
@@ -7,6 +7,7 @@ Script::Script() {
7 7
8Script::Script(const QString fileName) { 8Script::Script(const QString fileName) {
9 QFile file(fileName); 9 QFile file(fileName);
10 file.open(IO_ReadOnly );
10 m_script = file.readAll(); 11 m_script = file.readAll();
11} 12}
12 13