summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-04-11 23:53:23 (UTC)
committer llornkcor <llornkcor>2002-04-11 23:53:23 (UTC)
commita1615d98bdd7430e0533c0325dfdc39bf6627ab2 (patch) (unidiff)
tree14989f0603a32abaa90826b2eff5fb318f99bf70
parent2599e347d9444cfa6282fec9f2bfb9df4743d6d2 (diff)
downloadopie-a1615d98bdd7430e0533c0325dfdc39bf6627ab2.zip
opie-a1615d98bdd7430e0533c0325dfdc39bf6627ab2.tar.gz
opie-a1615d98bdd7430e0533c0325dfdc39bf6627ab2.tar.bz2
here ya go
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp65
-rw-r--r--core/apps/textedit/textedit.pro2
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
@@ -34,12 +34,13 @@
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>
@@ -495,42 +496,46 @@ void TextEdit::fileNew()
495// } 496// }
496 newFile(DocLnk()); 497 newFile(DocLnk());
497} 498}
498 499
499void TextEdit::fileOpen() 500void 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
533void TextEdit::doSearchBar() 538void TextEdit::doSearchBar()
534{ 539{
535 Config cfg("TextEdit"); 540 Config cfg("TextEdit");
536 cfg.setGroup("View"); 541 cfg.setGroup("View");
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
@@ -4,13 +4,13 @@ CONFIG += qt warn_on release
4DESTDIR = $(OPIEDIR)/bin 4DESTDIR = $(OPIEDIR)/bin
5HEADERS = textedit.h fileBrowser.h fontDialog.h fileSaver.h filePermissions.h 5HEADERS = textedit.h fileBrowser.h fontDialog.h fileSaver.h filePermissions.h
6SOURCES = main.cpp textedit.cpp fileBrowser.cpp fontDialog.cpp fileSaver.cpp filePermissions.cpp 6SOURCES = main.cpp textedit.cpp fileBrowser.cpp fontDialog.cpp fileSaver.cpp filePermissions.cpp
7 7
8INCLUDEPATH += $(OPIEDIR)/include 8INCLUDEPATH += $(OPIEDIR)/include
9DEPENDPATH += $(OPIEDIR)/include 9DEPENDPATH += $(OPIEDIR)/include
10LIBS += -lqpe 10LIBS += -lqpe -lopie
11 11
12TARGET = textedit 12TARGET = textedit
13 13
14TRANSLATIONS += ../i18n/de/textedit.ts 14TRANSLATIONS += ../i18n/de/textedit.ts
15TRANSLATIONS += ../i18n/pt_BR/textedit.ts 15TRANSLATIONS += ../i18n/pt_BR/textedit.ts
16TRANSLATIONS += ../i18n/en/textedit.ts 16TRANSLATIONS += ../i18n/en/textedit.ts