author | zecke <zecke> | 2002-04-12 13:05:42 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-12 13:05:42 (UTC) |
commit | c1c9ac64f7f4871642d645ac1da1a2f36853ccb2 (patch) (unidiff) | |
tree | 409bf1e97825de681692a8894671eccf745107eb | |
parent | 26efd0a7135834626b4e6f275e57e85a97abd34f (diff) | |
download | opie-c1c9ac64f7f4871642d645ac1da1a2f36853ccb2.zip opie-c1c9ac64f7f4871642d645ac1da1a2f36853ccb2.tar.gz opie-c1c9ac64f7f4871642d645ac1da1a2f36853ccb2.tar.bz2 |
Port to OFileDialog for open
ljp would you please fix open a bit. I'm not in the mood to do it myself
we need to port save to OFileDialog::getSaveFileName()
-rw-r--r-- | core/apps/textedit/textedit.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index a66b967..cc3ccbc 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -36,9 +36,11 @@ | |||
36 | #include <qpe/qpemenubar.h> | 36 | #include <qpe/qpemenubar.h> |
37 | #include <qpe/qpetoolbar.h> | 37 | #include <qpe/qpetoolbar.h> |
38 | #include <qpe/qcopenvelope_qws.h> | 38 | #include <qpe/qcopenvelope_qws.h> |
39 | //#include <qpe/finddialog.h> | 39 | //#include <qpe/finddialog.h> |
40 | |||
40 | #include <opie/ofileselector.h> | 41 | #include <opie/ofileselector.h> |
42 | #include <opie/ofiledialog.h> | ||
41 | 43 | ||
42 | #include <qstringlist.h> | 44 | #include <qstringlist.h> |
43 | #include <qaction.h> | 45 | #include <qaction.h> |
44 | #include <qcolordialog.h> | 46 | #include <qcolordialog.h> |
@@ -498,12 +500,14 @@ void TextEdit::fileNew() | |||
498 | } | 500 | } |
499 | 501 | ||
500 | void TextEdit::fileOpen() | 502 | void TextEdit::fileOpen() |
501 | { | 503 | { |
502 | OFileSelector *fileSelector; | 504 | // OFileSelector *fileSelector; |
503 | fileSelector = new OFileSelector( this, 1,1,"/","", "text/*"); | 505 | // fileSelector = new OFileSelector( this, 1,1,"/","", "text/*"); |
504 | fileSelector->showMaximized(); | 506 | //fileSelector->showMaximized(); |
505 | 507 | QString str = OFileDialog::getOpenFileName(1,"/","", QStringList() , this ); | |
508 | if(!str.isEmpty() ) | ||
509 | openFile( str ); | ||
506 | // browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "text/*"); // | 510 | // browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "text/*"); // |
507 | // browseForFiles->setFileView( viewSelection ); | 511 | // browseForFiles->setFileView( viewSelection ); |
508 | // browseForFiles->showMaximized(); | 512 | // browseForFiles->showMaximized(); |
509 | // // if( result != -1 ) | 513 | // // if( result != -1 ) |
@@ -520,9 +524,9 @@ void TextEdit::fileOpen() | |||
520 | // QString fileName = fileTemp; | 524 | // QString fileName = fileTemp; |
521 | // if( fileName != "Unnamed" || fileName != "Empty Text" ) { | 525 | // if( fileName != "Unnamed" || fileName != "Empty Text" ) { |
522 | // currentFileName = fileName; | 526 | // currentFileName = fileName; |
523 | // qDebug("please open "+currentFileName); | 527 | // qDebug("please open "+currentFileName); |
524 | // openFile(fileName ); | 528 | // openFile(str ); |
525 | // } | 529 | // } |
526 | // } | 530 | // } |
527 | // viewSelection = browseForFiles->SelectionCombo->currentItem(); | 531 | // viewSelection = browseForFiles->SelectionCombo->currentItem(); |
528 | // } | 532 | // } |