summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-06-29 00:34:32 (UTC)
committer llornkcor <llornkcor>2002-06-29 00:34:32 (UTC)
commit9cc6f3de75b884f338f708ff03900b197f281802 (patch) (unidiff)
treefa325ddf6fd61fbfcaa3cb9ec9e772dbef87fe0d
parent971f94ceb114149efbf8d90b607d25dcbd358435 (diff)
downloadopie-9cc6f3de75b884f338f708ff03900b197f281802.zip
opie-9cc6f3de75b884f338f708ff03900b197f281802.tar.gz
opie-9cc6f3de75b884f338f708ff03900b197f281802.tar.bz2
b bye and added all files to ofiledialog
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp60
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
@@ -11,44 +11,41 @@
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
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>
33#include <qpe/resource.h> 34#include <qpe/resource.h>
34#include <qpe/config.h> 35#include <qpe/config.h>
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>
47#include <qfileinfo.h> 44#include <qfileinfo.h>
48#include <qlineedit.h> 45#include <qlineedit.h>
49#include <qmessagebox.h> 46#include <qmessagebox.h>
50#include <qobjectlist.h> 47#include <qobjectlist.h>
51#include <qpopupmenu.h> 48#include <qpopupmenu.h>
52#include <qspinbox.h> 49#include <qspinbox.h>
53#include <qtoolbutton.h> 50#include <qtoolbutton.h>
54#include <qwidgetstack.h> 51#include <qwidgetstack.h>
@@ -498,68 +495,35 @@ void TextEdit::fileNew()
498{ 495{
499// if( !bFromDocView ) { 496// if( !bFromDocView ) {
500// saveAs(); 497// saveAs();
501// } 498// }
502 newFile(DocLnk()); 499 newFile(DocLnk());
503} 500}
504 501
505void TextEdit::fileOpen() 502void 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
557void TextEdit::doSearchBar() 521void TextEdit::doSearchBar()
558{ 522{
559 Config cfg("TextEdit"); 523 Config cfg("TextEdit");
560 cfg.setGroup("View"); 524 cfg.setGroup("View");
561 if(cfg.readEntry("SearchBar","Closed") != "Opened") 525 if(cfg.readEntry("SearchBar","Closed") != "Opened")
562 searchBar->hide(); 526 searchBar->hide();
563} 527}
564 528
565#if 0 529#if 0