-rw-r--r-- | core/apps/textedit/textedit.cpp | 60 |
1 files changed, 12 insertions, 48 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index ccc43fa..ea27e1b 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -19,14 +19,15 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | // changes added by L. J. Potter Sun 02-17-2002 21:31:31 | 20 | // changes added by L. J. Potter Sun 02-17-2002 21:31:31 |
21 | 21 | ||
22 | #include "textedit.h" | 22 | #include "textedit.h" |
23 | //#include "fileBrowser.h" | ||
24 | #include "fileSaver.h" | 23 | #include "fileSaver.h" |
25 | #include "filePermissions.h" | 24 | #include "filePermissions.h" |
26 | |||
27 | #include "fontDialog.h" | 25 | #include "fontDialog.h" |
28 | 26 | ||
27 | #include <opie/ofileselector.h> | ||
28 | #include <opie/ofiledialog.h> | ||
29 | |||
29 | #include <qpe/fontdatabase.h> | 30 | #include <qpe/fontdatabase.h> |
30 | #include <qpe/global.h> | 31 | #include <qpe/global.h> |
31 | #include <qpe/fileselector.h> | 32 | #include <qpe/fileselector.h> |
32 | #include <qpe/applnk.h> | 33 | #include <qpe/applnk.h> |
@@ -35,12 +36,8 @@ | |||
35 | #include <qpe/qpeapplication.h> | 36 | #include <qpe/qpeapplication.h> |
36 | #include <qpe/qpemenubar.h> | 37 | #include <qpe/qpemenubar.h> |
37 | #include <qpe/qpetoolbar.h> | 38 | #include <qpe/qpetoolbar.h> |
38 | #include <qpe/qcopenvelope_qws.h> | 39 | #include <qpe/qcopenvelope_qws.h> |
39 | //#include <qpe/finddialog.h> | ||
40 | |||
41 | #include <opie/ofileselector.h> | ||
42 | #include <opie/ofiledialog.h> | ||
43 | 40 | ||
44 | #include <qstringlist.h> | 41 | #include <qstringlist.h> |
45 | #include <qaction.h> | 42 | #include <qaction.h> |
46 | #include <qcolordialog.h> | 43 | #include <qcolordialog.h> |
@@ -506,52 +503,19 @@ void TextEdit::fileOpen() | |||
506 | { | 503 | { |
507 | Config cfg("TextEdit"); | 504 | Config cfg("TextEdit"); |
508 | cfg.setGroup("View"); | 505 | cfg.setGroup("View"); |
509 | bool b=FALSE; | 506 | bool b=FALSE; |
510 | // if(cfg.readEntry("useOldFileDialog") == "TRUE") | 507 | |
511 | // b=TRUE; | 508 | QMap<QString, QStringList> map; |
512 | // if(!b) { | 509 | map.insert(tr("All"), QStringList() ); |
513 | QMap<QString, QStringList> map; | 510 | QStringList text; |
514 | map.insert(tr("All"), QStringList() ); | 511 | text << "text/*"; |
515 | QStringList text; | 512 | map.insert(tr("Text"), text ); |
516 | text << "text/*"; | 513 | text << "*"; |
517 | map.insert(tr("Text"), text ); | 514 | map.insert(tr("All"), text ); |
518 | QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map);//,"", "*", this ); | 515 | QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map); |
519 | if(!str.isEmpty() ) | 516 | if(!str.isEmpty() ) |
520 | openFile( str ); | 517 | openFile( str ); |
521 | // } else { | ||
522 | // QString str; | ||
523 | // browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "*"); // | ||
524 | // browseForFiles->setFileView( viewSelection ); | ||
525 | // browseForFiles->showMaximized(); | ||
526 | // // if( result != -1 ) | ||
527 | |||
528 | // if( browseForFiles->exec() != -1 ) { | ||
529 | // QString selFile = browseForFiles->selectedFileName; | ||
530 | // QStringList fileList = browseForFiles->fileList; | ||
531 | // qDebug(selFile); | ||
532 | // QStringList::ConstIterator f; | ||
533 | // QString fileTemp; | ||
534 | // for ( f = fileList.begin(); f != fileList.end(); f++ ) { | ||
535 | // fileTemp = *f; | ||
536 | // fileTemp.right( fileTemp.length()-5); | ||
537 | // QString fileName = fileTemp; | ||
538 | // if( fileName != "Unnamed" || fileName != "Empty Text" ) { | ||
539 | // currentFileName = fileName; | ||
540 | // qDebug("please open "+currentFileName); | ||
541 | // openFile(currentFileName ); | ||
542 | // } | ||
543 | // } | ||
544 | // viewSelection = browseForFiles->SelectionCombo->currentItem(); | ||
545 | // } | ||
546 | // delete browseForFiles; | ||
547 | // editor->setEdited( FALSE); | ||
548 | // edited1=FALSE; | ||
549 | // edited=FALSE; | ||
550 | // if(caption().left(1)=="*") | ||
551 | // setCaption(caption().right(caption().length()-1)); | ||
552 | // doSearchBar(); | ||
553 | // } | ||
554 | 518 | ||
555 | } | 519 | } |
556 | 520 | ||
557 | void TextEdit::doSearchBar() | 521 | void TextEdit::doSearchBar() |