summaryrefslogtreecommitdiff
authorzecke <zecke>2003-02-11 17:49:47 (UTC)
committer zecke <zecke>2003-02-11 17:49:47 (UTC)
commit613ae8a0a9c82dea1332651ba4f4a8e2f06eee0b (patch) (unidiff)
tree46fd1cb0033e5d2aed86ba4e929afa337bae08be
parentf84b2b2bced083c3664099d5ae99e4732388812e (diff)
downloadopie-613ae8a0a9c82dea1332651ba4f4a8e2f06eee0b.zip
opie-613ae8a0a9c82dea1332651ba4f4a8e2f06eee0b.tar.gz
opie-613ae8a0a9c82dea1332651ba4f4a8e2f06eee0b.tar.bz2
do not allow to open directories...
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 9ef423c..4cf1b07 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -624,33 +624,33 @@ void TextEdit::fileNew() {
624// saveAs(); 624// saveAs();
625// } 625// }
626 newFile(DocLnk()); 626 newFile(DocLnk());
627} 627}
628 628
629void TextEdit::fileOpen() { 629void TextEdit::fileOpen() {
630 QMap<QString, QStringList> map; 630 QMap<QString, QStringList> map;
631 map.insert(tr("All"), QStringList() ); 631 map.insert(tr("All"), QStringList() );
632 QStringList text; 632 QStringList text;
633 text << "text/*"; 633 text << "text/*";
634 map.insert(tr("Text"), text ); 634 map.insert(tr("Text"), text );
635 text << "*"; 635 text << "*";
636 map.insert(tr("All"), text ); 636 map.insert(tr("All"), text );
637 QString str = OFileDialog::getOpenFileName( 2, 637 QString str = OFileDialog::getOpenFileName( 2,
638 QPEApplication::documentDir(), 638 QPEApplication::documentDir(),
639 QString::null, map); 639 QString::null, map);
640 if( QFile(str).exists()) 640 if( QFile(str).exists() && !QFileInfo(str).isDir() )
641 openFile( str ); 641 openFile( str );
642 else 642 else
643 updateCaption(); 643 updateCaption();
644} 644}
645 645
646void TextEdit::doSearchBar() { 646void TextEdit::doSearchBar() {
647 if(!useSearchBar) 647 if(!useSearchBar)
648 searchBar->hide(); 648 searchBar->hide();
649 else 649 else
650 searchBar->show(); 650 searchBar->show();
651} 651}
652 652
653#if 0 653#if 0
654void TextEdit::slotFind() { 654void TextEdit::slotFind() {
655 FindDialog frmFind( tr("Text Editor"), this ); 655 FindDialog frmFind( tr("Text Editor"), this );
656 connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), 656 connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)),