summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index b199c81..8b3c4c6 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -567,49 +567,49 @@ void TextEdit::setSearchBar(bool b) {
567 searchBar->show(); 567 searchBar->show();
568 else 568 else
569 searchBar->hide(); 569 searchBar->hide();
570 editor->setFocus(); 570 editor->setFocus();
571} 571}
572 572
573void TextEdit::fileNew() { 573void TextEdit::fileNew() {
574// if( !bFromDocView ) { 574// if( !bFromDocView ) {
575// saveAs(); 575// saveAs();
576// } 576// }
577 newFile(DocLnk()); 577 newFile(DocLnk());
578} 578}
579 579
580void TextEdit::fileOpen() { 580void TextEdit::fileOpen() {
581 QMap<QString, QStringList> map; 581 QMap<QString, QStringList> map;
582 map.insert(tr("All"), QStringList() ); 582 map.insert(tr("All"), QStringList() );
583 QStringList text; 583 QStringList text;
584 text << "text/*"; 584 text << "text/*";
585 map.insert(tr("Text"), text ); 585 map.insert(tr("Text"), text );
586 text << "*"; 586 text << "*";
587 map.insert(tr("All"), text ); 587 map.insert(tr("All"), text );
588 QString str = OFileDialog::getOpenFileName( 2, 588 QString str = OFileDialog::getOpenFileName( 2,
589 QPEApplication::documentDir(), 589 QPEApplication::documentDir(),
590 QString::null, map); 590 QString::null, map);
591 if(!str.isEmpty() ) 591 if( QFile(str).exists())
592 openFile( str ); 592 openFile( str );
593 else 593 else
594 updateCaption(); 594 updateCaption();
595} 595}
596 596
597void TextEdit::doSearchBar() { 597void TextEdit::doSearchBar() {
598 if(!useSearchBar) 598 if(!useSearchBar)
599 searchBar->hide(); 599 searchBar->hide();
600 else 600 else
601 searchBar->show(); 601 searchBar->show();
602} 602}
603 603
604#if 0 604#if 0
605void TextEdit::slotFind() { 605void TextEdit::slotFind() {
606 FindDialog frmFind( tr("Text Editor"), this ); 606 FindDialog frmFind( tr("Text Editor"), this );
607 connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), 607 connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)),
608 editor, SLOT(slotDoFind( const QString&,bool,bool))); 608 editor, SLOT(slotDoFind( const QString&,bool,bool)));
609 609
610 //case sensitive, backwards, [category] 610 //case sensitive, backwards, [category]
611 611
612 connect( editor, SIGNAL(notFound()), 612 connect( editor, SIGNAL(notFound()),
613 &frmFind, SLOT(slotNotFound()) ); 613 &frmFind, SLOT(slotNotFound()) );
614 connect( editor, SIGNAL(searchWrapped()), 614 connect( editor, SIGNAL(searchWrapped()),
615 &frmFind, SLOT(slotWrapAround()) ); 615 &frmFind, SLOT(slotWrapAround()) );