author | llornkcor <llornkcor> | 2002-06-29 00:51:23 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-29 00:51:23 (UTC) |
commit | a9e336965e1cccb41d3e9f5c31168c85cf4e7d36 (patch) (unidiff) | |
tree | bf902af67089de044833da378d1f491574ac4965 /core/apps/textedit/textedit.cpp | |
parent | 9cc6f3de75b884f338f708ff03900b197f281802 (diff) | |
download | opie-a9e336965e1cccb41d3e9f5c31168c85cf4e7d36.zip opie-a9e336965e1cccb41d3e9f5c31168c85cf4e7d36.tar.gz opie-a9e336965e1cccb41d3e9f5c31168c85cf4e7d36.tar.bz2 |
on your way out, save dialog
Diffstat (limited to 'core/apps/textedit/textedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/textedit/textedit.cpp | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index ea27e1b..40ea501 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -508,11 +508,11 @@ void TextEdit::fileOpen() | |||
508 | QMap<QString, QStringList> map; | 508 | QMap<QString, QStringList> map; |
509 | map.insert(tr("All"), QStringList() ); | 509 | map.insert(tr("All"), QStringList() ); |
510 | QStringList text; | 510 | QStringList text; |
511 | text << "text/*"; | 511 | text << "text/*"; |
512 | map.insert(tr("Text"), text ); | 512 | map.insert(tr("Text"), text ); |
513 | text << "*"; | 513 | text << "*"; |
514 | map.insert(tr("All"), text ); | 514 | map.insert(tr("All"), text ); |
515 | QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map); | 515 | QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map); |
516 | if(!str.isEmpty() ) | 516 | if(!str.isEmpty() ) |
517 | openFile( str ); | 517 | openFile( str ); |
518 | 518 | ||
@@ -794,13 +794,22 @@ bool TextEdit::saveAs() | |||
794 | 794 | ||
795 | 795 | /* | |
796 | // QString str = OFileDialog::getSaveFileName( 2,"/");//,"", "*", this ); | 796 | QMap<QString, QStringList> map; |
797 | // if(!str.isEmpty() ) { | 797 | map.insert(tr("All"), QStringList() ); |
798 | // openFile( str ); | 798 | QStringList text; |
799 | 799 | text << "text/*"; | |
800 | fileSaveDlg=new fileSaver(this,tr("Save File As?"),TRUE, 0, currentFileName); | 800 | map.insert(tr("Text"), text ); |
801 | qDebug("wanna save filename "+currentFileName); | 801 | text << "*"; |
802 | fileSaveDlg->exec(); | 802 | map.insert(tr("All"), text ); |
803 | if( fileSaveDlg->result() == 1 ) { | 803 | QString str = OFileDialog::getSaveFileName( 2,"/", QString::null, map); |
804 | if(!str.isEmpty() ) { | ||
805 | QString fileNm=str; | ||
806 | */ | ||
807 | |||
808 | fileSaveDlg=new fileSaver(this,tr("Save File As?"),TRUE, 0, currentFileName); | ||
809 | qDebug("wanna save filename "+currentFileName); | ||
810 | fileSaveDlg->exec(); | ||
811 | if( fileSaveDlg->result() == 1 ) { | ||
804 | QString fileNm=fileSaveDlg->selectedFileName; | 812 | QString fileNm=fileSaveDlg->selectedFileName; |
805 | // QString fileNm=srt; | 813 | |
814 | |||
806 | qDebug("saving filename "+fileNm); | 815 | qDebug("saving filename "+fileNm); |
@@ -839,3 +848,3 @@ bool TextEdit::saveAs() | |||
839 | if(caption().left(1)=="*") | 848 | if(caption().left(1)=="*") |
840 | setCaption(caption().right(caption().length()-1)); | 849 | setCaption(caption().right(caption().length()-1)); |
841 | 850 | ||