author | llornkcor <llornkcor> | 2002-05-28 15:30:43 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-05-28 15:30:43 (UTC) |
commit | f1f06e4cf8ec641852d1d464d8fa8c95b9d2fcb5 (patch) (unidiff) | |
tree | 62fbedb348fdcc02264f343c3a6f9a15b0202f7b | |
parent | 267db9835cb67a9fb65cf5cda592012d06caa57d (diff) | |
download | opie-f1f06e4cf8ec641852d1d464d8fa8c95b9d2fcb5.zip opie-f1f06e4cf8ec641852d1d464d8fa8c95b9d2fcb5.tar.gz opie-f1f06e4cf8ec641852d1d464d8fa8c95b9d2fcb5.tar.bz2 |
convert to ofileselector, and fixed bug
-rw-r--r-- | core/apps/textedit/textedit.cpp | 77 | ||||
-rw-r--r-- | core/apps/textedit/textedit.h | 4 | ||||
-rw-r--r-- | core/apps/textedit/textedit.pro | 4 |
3 files changed, 43 insertions, 42 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index b8d62db..403bd92 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -20,7 +20,7 @@ | |||
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" | 23 | //#include "fileBrowser.h" |
24 | #include "fileSaver.h" | 24 | #include "fileSaver.h" |
25 | #include "filePermissions.h" | 25 | #include "filePermissions.h" |
26 | 26 | ||
@@ -507,45 +507,46 @@ void TextEdit::fileOpen() | |||
507 | Config cfg("TextEdit"); | 507 | Config cfg("TextEdit"); |
508 | cfg.setGroup("View"); | 508 | cfg.setGroup("View"); |
509 | bool b=FALSE; | 509 | bool b=FALSE; |
510 | if(cfg.readEntry("useOldFileDialog") == "TRUE") | 510 | // if(cfg.readEntry("useOldFileDialog") == "TRUE") |
511 | b=TRUE; | 511 | // b=TRUE; |
512 | if(!b) { | 512 | // if(!b) { |
513 | QString str = OFileDialog::getOpenFileName( 1,"/","", "*", this ); | 513 | QString str = OFileDialog::getOpenFileName( 1,"/")://,"", "*", this ); |
514 | if(!str.isEmpty() ) | 514 | if(!str.isEmpty() ) |
515 | openFile( str ); | 515 | openFile( str ); |
516 | } else { | 516 | // } else { |
517 | QString str; | 517 | // QString str; |
518 | browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "*"); // | 518 | // browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "*"); // |
519 | browseForFiles->setFileView( viewSelection ); | 519 | // browseForFiles->setFileView( viewSelection ); |
520 | browseForFiles->showMaximized(); | 520 | // browseForFiles->showMaximized(); |
521 | // if( result != -1 ) | 521 | // // if( result != -1 ) |
522 | 522 | ||
523 | if( browseForFiles->exec() != -1 ) { | 523 | // if( browseForFiles->exec() != -1 ) { |
524 | QString selFile = browseForFiles->selectedFileName; | 524 | // QString selFile = browseForFiles->selectedFileName; |
525 | QStringList fileList = browseForFiles->fileList; | 525 | // QStringList fileList = browseForFiles->fileList; |
526 | qDebug(selFile); | 526 | // qDebug(selFile); |
527 | QStringList::ConstIterator f; | 527 | // QStringList::ConstIterator f; |
528 | QString fileTemp; | 528 | // QString fileTemp; |
529 | for ( f = fileList.begin(); f != fileList.end(); f++ ) { | 529 | // for ( f = fileList.begin(); f != fileList.end(); f++ ) { |
530 | fileTemp = *f; | 530 | // fileTemp = *f; |
531 | fileTemp.right( fileTemp.length()-5); | 531 | // fileTemp.right( fileTemp.length()-5); |
532 | QString fileName = fileTemp; | 532 | // QString fileName = fileTemp; |
533 | if( fileName != "Unnamed" || fileName != "Empty Text" ) { | 533 | // if( fileName != "Unnamed" || fileName != "Empty Text" ) { |
534 | currentFileName = fileName; | 534 | // currentFileName = fileName; |
535 | qDebug("please open "+currentFileName); | 535 | // qDebug("please open "+currentFileName); |
536 | openFile(currentFileName ); | 536 | // openFile(currentFileName ); |
537 | } | 537 | // } |
538 | } | 538 | // } |
539 | viewSelection = browseForFiles->SelectionCombo->currentItem(); | 539 | // viewSelection = browseForFiles->SelectionCombo->currentItem(); |
540 | } | 540 | // } |
541 | delete browseForFiles; | 541 | // delete browseForFiles; |
542 | editor->setEdited( FALSE); | 542 | // editor->setEdited( FALSE); |
543 | edited1=FALSE; | 543 | // edited1=FALSE; |
544 | edited=FALSE; | 544 | // edited=FALSE; |
545 | if(caption().left(1)=="*") | 545 | // if(caption().left(1)=="*") |
546 | setCaption(caption().right(caption().length()-1)); | 546 | // setCaption(caption().right(caption().length()-1)); |
547 | doSearchBar(); | 547 | // doSearchBar(); |
548 | } | 548 | // } |
549 | |||
549 | } | 550 | } |
550 | 551 | ||
551 | void TextEdit::doSearchBar() | 552 | void TextEdit::doSearchBar() |
diff --git a/core/apps/textedit/textedit.h b/core/apps/textedit/textedit.h index 9d27ab0..d8208b1 100644 --- a/core/apps/textedit/textedit.h +++ b/core/apps/textedit/textedit.h | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #define QTEXTEDIT_OPEN_API | 25 | #define QTEXTEDIT_OPEN_API |
26 | 26 | ||
27 | #include "fileBrowser.h" | 27 | //#include "fileBrowser.h" |
28 | #include "fileSaver.h" | 28 | #include "fileSaver.h" |
29 | 29 | ||
30 | #include <qpe/filemanager.h> | 30 | #include <qpe/filemanager.h> |
@@ -111,7 +111,7 @@ private: | |||
111 | 111 | ||
112 | private: | 112 | private: |
113 | fileSaver *fileSaveDlg; | 113 | fileSaver *fileSaveDlg; |
114 | fileBrowser *browseForFiles; | 114 | // fileBrowser *browseForFiles; |
115 | QpeEditor* editor; | 115 | QpeEditor* editor; |
116 | QToolBar *menu, *editBar, *searchBar; | 116 | QToolBar *menu, *editBar, *searchBar; |
117 | QLineEdit *searchEdit; | 117 | QLineEdit *searchEdit; |
diff --git a/core/apps/textedit/textedit.pro b/core/apps/textedit/textedit.pro index 4f20da3..d01a9f4 100644 --- a/core/apps/textedit/textedit.pro +++ b/core/apps/textedit/textedit.pro | |||
@@ -2,8 +2,8 @@ TEMPLATE = app | |||
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | 3 | ||
4 | DESTDIR = $(OPIEDIR)/bin | 4 | DESTDIR = $(OPIEDIR)/bin |
5 | HEADERS = textedit.h fileBrowser.h fontDialog.h fileSaver.h filePermissions.h | 5 | HEADERS = textedit.h fontDialog.h fileSaver.h filePermissions.h |
6 | SOURCES = main.cpp textedit.cpp fileBrowser.cpp fontDialog.cpp fileSaver.cpp filePermissions.cpp | 6 | SOURCES = main.cpp textedit.cpp fontDialog.cpp fileSaver.cpp filePermissions.cpp |
7 | 7 | ||
8 | INCLUDEPATH += $(OPIEDIR)/include | 8 | INCLUDEPATH += $(OPIEDIR)/include |
9 | DEPENDPATH += $(OPIEDIR)/include | 9 | DEPENDPATH += $(OPIEDIR)/include |