author | llornkcor <llornkcor> | 2002-04-11 23:53:23 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-11 23:53:23 (UTC) |
commit | a1615d98bdd7430e0533c0325dfdc39bf6627ab2 (patch) (unidiff) | |
tree | 14989f0603a32abaa90826b2eff5fb318f99bf70 | |
parent | 2599e347d9444cfa6282fec9f2bfb9df4743d6d2 (diff) | |
download | opie-a1615d98bdd7430e0533c0325dfdc39bf6627ab2.zip opie-a1615d98bdd7430e0533c0325dfdc39bf6627ab2.tar.gz opie-a1615d98bdd7430e0533c0325dfdc39bf6627ab2.tar.bz2 |
here ya go
-rw-r--r-- | core/apps/textedit/textedit.cpp | 65 | ||||
-rw-r--r-- | core/apps/textedit/textedit.pro | 2 |
2 files changed, 36 insertions, 31 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 943fecd..a66b967 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -28,24 +28,25 @@ | |||
28 | 28 | ||
29 | #include <qpe/fontdatabase.h> | 29 | #include <qpe/fontdatabase.h> |
30 | #include <qpe/global.h> | 30 | #include <qpe/global.h> |
31 | #include <qpe/fileselector.h> | 31 | #include <qpe/fileselector.h> |
32 | #include <qpe/applnk.h> | 32 | #include <qpe/applnk.h> |
33 | #include <qpe/resource.h> | 33 | #include <qpe/resource.h> |
34 | #include <qpe/config.h> | 34 | #include <qpe/config.h> |
35 | #include <qpe/qpeapplication.h> | 35 | #include <qpe/qpeapplication.h> |
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 | #include <opie/ofileselector.h> | ||
40 | 41 | ||
41 | #include <qstringlist.h> | 42 | #include <qstringlist.h> |
42 | #include <qaction.h> | 43 | #include <qaction.h> |
43 | #include <qcolordialog.h> | 44 | #include <qcolordialog.h> |
44 | #include <qfileinfo.h> | 45 | #include <qfileinfo.h> |
45 | #include <qlineedit.h> | 46 | #include <qlineedit.h> |
46 | #include <qmessagebox.h> | 47 | #include <qmessagebox.h> |
47 | #include <qobjectlist.h> | 48 | #include <qobjectlist.h> |
48 | #include <qpopupmenu.h> | 49 | #include <qpopupmenu.h> |
49 | #include <qspinbox.h> | 50 | #include <qspinbox.h> |
50 | #include <qtoolbutton.h> | 51 | #include <qtoolbutton.h> |
51 | #include <qwidgetstack.h> | 52 | #include <qwidgetstack.h> |
@@ -489,54 +490,58 @@ void TextEdit::setWordWrap(bool y) | |||
489 | } | 490 | } |
490 | 491 | ||
491 | void TextEdit::fileNew() | 492 | void TextEdit::fileNew() |
492 | { | 493 | { |
493 | // if( !bFromDocView ) { | 494 | // if( !bFromDocView ) { |
494 | // saveAs(); | 495 | // saveAs(); |
495 | // } | 496 | // } |
496 | newFile(DocLnk()); | 497 | newFile(DocLnk()); |
497 | } | 498 | } |
498 | 499 | ||
499 | void TextEdit::fileOpen() | 500 | void TextEdit::fileOpen() |
500 | { | 501 | { |
501 | browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "text/*"); // | 502 | OFileSelector *fileSelector; |
502 | browseForFiles->setFileView( viewSelection ); | 503 | fileSelector = new OFileSelector( this, 1,1,"/","", "text/*"); |
503 | browseForFiles->showMaximized(); | 504 | fileSelector->showMaximized(); |
504 | // if( result != -1 ) | 505 | |
505 | 506 | // browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "text/*"); // | |
506 | if( browseForFiles->exec() != -1 ) { | 507 | // browseForFiles->setFileView( viewSelection ); |
507 | QString selFile = browseForFiles->selectedFileName; | 508 | // browseForFiles->showMaximized(); |
508 | QStringList fileList = browseForFiles->fileList; | 509 | // // if( result != -1 ) |
509 | qDebug(selFile); | 510 | |
510 | QStringList::ConstIterator f; | 511 | // if( browseForFiles->exec() != -1 ) { |
511 | QString fileTemp; | 512 | // QString selFile = browseForFiles->selectedFileName; |
512 | for ( f = fileList.begin(); f != fileList.end(); f++ ) { | 513 | // QStringList fileList = browseForFiles->fileList; |
513 | fileTemp = *f; | 514 | // qDebug(selFile); |
514 | fileTemp.right( fileTemp.length()-5); | 515 | // QStringList::ConstIterator f; |
515 | QString fileName = fileTemp; | 516 | // QString fileTemp; |
516 | if( fileName != "Unnamed" || fileName != "Empty Text" ) { | 517 | // for ( f = fileList.begin(); f != fileList.end(); f++ ) { |
517 | currentFileName = fileName; | 518 | // fileTemp = *f; |
518 | qDebug("please open "+currentFileName); | 519 | // fileTemp.right( fileTemp.length()-5); |
519 | openFile(fileName ); | 520 | // QString fileName = fileTemp; |
520 | } | 521 | // if( fileName != "Unnamed" || fileName != "Empty Text" ) { |
521 | } | 522 | // currentFileName = fileName; |
522 | viewSelection = browseForFiles->SelectionCombo->currentItem(); | 523 | // qDebug("please open "+currentFileName); |
523 | } | 524 | // openFile(fileName ); |
524 | delete browseForFiles; | 525 | // } |
525 | editor->setEdited( FALSE); | 526 | // } |
526 | edited1=FALSE; | 527 | // viewSelection = browseForFiles->SelectionCombo->currentItem(); |
527 | edited=FALSE; | 528 | // } |
528 | if(caption().left(1)=="*") | 529 | // delete browseForFiles; |
529 | setCaption(caption().right(caption().length()-1)); | 530 | // editor->setEdited( FALSE); |
530 | doSearchBar(); | 531 | // edited1=FALSE; |
532 | // edited=FALSE; | ||
533 | // if(caption().left(1)=="*") | ||
534 | // setCaption(caption().right(caption().length()-1)); | ||
535 | // doSearchBar(); | ||
531 | } | 536 | } |
532 | 537 | ||
533 | void TextEdit::doSearchBar() | 538 | void TextEdit::doSearchBar() |
534 | { | 539 | { |
535 | Config cfg("TextEdit"); | 540 | Config cfg("TextEdit"); |
536 | cfg.setGroup("View"); | 541 | cfg.setGroup("View"); |
537 | if(cfg.readEntry("SearchBar","Closed") != "Opened") | 542 | if(cfg.readEntry("SearchBar","Closed") != "Opened") |
538 | searchBar->hide(); | 543 | searchBar->hide(); |
539 | } | 544 | } |
540 | 545 | ||
541 | #if 0 | 546 | #if 0 |
542 | void TextEdit::slotFind() | 547 | void TextEdit::slotFind() |
diff --git a/core/apps/textedit/textedit.pro b/core/apps/textedit/textedit.pro index fce76bd..aae7f89 100644 --- a/core/apps/textedit/textedit.pro +++ b/core/apps/textedit/textedit.pro | |||
@@ -1,22 +1,22 @@ | |||
1 | TEMPLATE = app | 1 | 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 fileBrowser.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 fileBrowser.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 |
10 | LIBS += -lqpe | 10 | LIBS += -lqpe -lopie |
11 | 11 | ||
12 | TARGET = textedit | 12 | TARGET = textedit |
13 | 13 | ||
14 | TRANSLATIONS += ../i18n/de/textedit.ts | 14 | TRANSLATIONS += ../i18n/de/textedit.ts |
15 | TRANSLATIONS += ../i18n/pt_BR/textedit.ts | 15 | TRANSLATIONS += ../i18n/pt_BR/textedit.ts |
16 | TRANSLATIONS += ../i18n/en/textedit.ts | 16 | TRANSLATIONS += ../i18n/en/textedit.ts |
17 | TRANSLATIONS += ../i18n/hu/textedit.ts | 17 | TRANSLATIONS += ../i18n/hu/textedit.ts |
18 | TRANSLATIONS += ../i18n/fr/textedit.ts | 18 | TRANSLATIONS += ../i18n/fr/textedit.ts |
19 | TRANSLATIONS += ../i18n/ja/textedit.ts | 19 | TRANSLATIONS += ../i18n/ja/textedit.ts |
20 | TRANSLATIONS += ../i18n/sl/textedit.ts | 20 | TRANSLATIONS += ../i18n/sl/textedit.ts |
21 | TRANSLATIONS += ../i18n/ko/textedit.ts | 21 | TRANSLATIONS += ../i18n/ko/textedit.ts |
22 | TRANSLATIONS += ../i18n/no/textedit.ts | 22 | TRANSLATIONS += ../i18n/no/textedit.ts |