From a9e336965e1cccb41d3e9f5c31168c85cf4e7d36 Mon Sep 17 00:00:00 2001
From: llornkcor <llornkcor>
Date: Sat, 29 Jun 2002 00:51:23 +0000
Subject: on your way out, save dialog

---
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
@@ -506,15 +506,15 @@ void TextEdit::fileOpen()
     bool b=FALSE;
 
     QMap<QString, QStringList> map;
-  map.insert(tr("All"), QStringList() );
-  QStringList text;
-  text << "text/*";
-  map.insert(tr("Text"), text );
-  text << "*";
-  map.insert(tr("All"), text );
-        QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map);
-        if(!str.isEmpty() )
-            openFile( str );
+    map.insert(tr("All"), QStringList() );
+    QStringList text;
+    text << "text/*";
+    map.insert(tr("Text"), text );
+    text << "*";
+    map.insert(tr("All"), text );
+    QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map);
+    if(!str.isEmpty() )
+        openFile( str );
     
 }
 
@@ -792,17 +792,26 @@ bool TextEdit::saveAs()
         }
     }
 
-    
-//         QString str = OFileDialog::getSaveFileName( 2,"/");//,"", "*", this );
-//         if(!str.isEmpty() ) {
-//            openFile( str );
-
-     fileSaveDlg=new fileSaver(this,tr("Save File As?"),TRUE, 0, currentFileName);
-     qDebug("wanna save filename "+currentFileName);
-     fileSaveDlg->exec();
-     if( fileSaveDlg->result() == 1 ) {
+/*    
+    QMap<QString, QStringList> map;
+    map.insert(tr("All"), QStringList() );
+    QStringList text;
+    text << "text/*";
+    map.insert(tr("Text"), text );
+    text << "*";
+    map.insert(tr("All"), text );
+    QString str = OFileDialog::getSaveFileName( 2,"/", QString::null, map);
+    if(!str.isEmpty() ) {
+        QString fileNm=str;
+*/
+
+      fileSaveDlg=new fileSaver(this,tr("Save File As?"),TRUE, 0, currentFileName);
+      qDebug("wanna save filename "+currentFileName);
+      fileSaveDlg->exec();
+      if( fileSaveDlg->result() == 1 ) {
         QString fileNm=fileSaveDlg->selectedFileName;
-//             QString fileNm=srt;
+
+
         qDebug("saving filename "+fileNm);
         QFileInfo fi(fileNm);
         currentFileName=fi.fileName();
@@ -837,7 +846,7 @@ bool TextEdit::saveAs()
     edited1=FALSE;
     edited=TRUE;
     if(caption().left(1)=="*")
-    setCaption(caption().right(caption().length()-1));
+        setCaption(caption().right(caption().length()-1));
 
     if(fileSaveDlg)
         delete fileSaveDlg;
--
cgit v0.9.0.2