summaryrefslogtreecommitdiff
Side-by-side diff
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 @@
#include <qpe/config.h>
#include <qpe/qpeapplication.h>
#include <qpe/qpemenubar.h>
#include <qpe/qpetoolbar.h>
#include <qpe/qcopenvelope_qws.h>
//#include <qpe/finddialog.h>
+#include <opie/ofileselector.h>
#include <qstringlist.h>
#include <qaction.h>
#include <qcolordialog.h>
#include <qfileinfo.h>
#include <qlineedit.h>
@@ -495,42 +496,46 @@ void TextEdit::fileNew()
// }
newFile(DocLnk());
}
void TextEdit::fileOpen()
{
- browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "text/*"); //
- browseForFiles->setFileView( viewSelection );
- browseForFiles->showMaximized();
-// if( result != -1 )
-
- if( browseForFiles->exec() != -1 ) {
- QString selFile = browseForFiles->selectedFileName;
- QStringList fileList = browseForFiles->fileList;
- qDebug(selFile);
- QStringList::ConstIterator f;
- QString fileTemp;
- for ( f = fileList.begin(); f != fileList.end(); f++ ) {
- fileTemp = *f;
- fileTemp.right( fileTemp.length()-5);
- QString fileName = fileTemp;
- if( fileName != "Unnamed" || fileName != "Empty Text" ) {
- currentFileName = fileName;
- qDebug("please open "+currentFileName);
- openFile(fileName );
- }
- }
- viewSelection = browseForFiles->SelectionCombo->currentItem();
- }
- delete browseForFiles;
- editor->setEdited( FALSE);
- edited1=FALSE;
- edited=FALSE;
- if(caption().left(1)=="*")
- setCaption(caption().right(caption().length()-1));
- doSearchBar();
+ OFileSelector *fileSelector;
+ fileSelector = new OFileSelector( this, 1,1,"/","", "text/*");
+ fileSelector->showMaximized();
+
+// browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "text/*"); //
+// browseForFiles->setFileView( viewSelection );
+// browseForFiles->showMaximized();
+// // if( result != -1 )
+
+// if( browseForFiles->exec() != -1 ) {
+// QString selFile = browseForFiles->selectedFileName;
+// QStringList fileList = browseForFiles->fileList;
+// qDebug(selFile);
+// QStringList::ConstIterator f;
+// QString fileTemp;
+// for ( f = fileList.begin(); f != fileList.end(); f++ ) {
+// fileTemp = *f;
+// fileTemp.right( fileTemp.length()-5);
+// QString fileName = fileTemp;
+// if( fileName != "Unnamed" || fileName != "Empty Text" ) {
+// currentFileName = fileName;
+// qDebug("please open "+currentFileName);
+// openFile(fileName );
+// }
+// }
+// viewSelection = browseForFiles->SelectionCombo->currentItem();
+// }
+// delete browseForFiles;
+// editor->setEdited( FALSE);
+// edited1=FALSE;
+// edited=FALSE;
+// if(caption().left(1)=="*")
+// setCaption(caption().right(caption().length()-1));
+// doSearchBar();
}
void TextEdit::doSearchBar()
{
Config cfg("TextEdit");
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
DESTDIR = $(OPIEDIR)/bin
HEADERS = textedit.h fileBrowser.h fontDialog.h fileSaver.h filePermissions.h
SOURCES = main.cpp textedit.cpp fileBrowser.cpp fontDialog.cpp fileSaver.cpp filePermissions.cpp
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe
+LIBS += -lqpe -lopie
TARGET = textedit
TRANSLATIONS += ../i18n/de/textedit.ts
TRANSLATIONS += ../i18n/pt_BR/textedit.ts
TRANSLATIONS += ../i18n/en/textedit.ts