[Kst] kdeextragear-2/kst/kst

Rick Chern rchern at interchange.ubc.ca
Sat Aug 14 02:30:17 CEST 2004


CVS commit by rchern: 

If Cancel is clicked on save as dialog, don't close kst


  M +5 -1      kst.cpp   1.209
  M +1 -1      kst.h   1.97
  M +3 -1      kstdoc.cpp   1.113


--- kdeextragear-2/kst/kst/kst.cpp  #1.208:1.209
@@ -866,5 +866,5 @@ void KstApp::slotFileSave() {
 }
 
-void KstApp::slotFileSaveAs() {
+bool KstApp::slotFileSaveAs() {
   slotUpdateStatusMsg(i18n("Saving file with a new filename..."));
 
@@ -883,6 +883,10 @@ void KstApp::slotFileSaveAs() {
       setCaption(kapp->caption() + ": " + doc->title());
     }
+  } else {
+    slotUpdateStatusMsg(i18n("Ready"));
+    return false;
   }
   slotUpdateStatusMsg(i18n("Ready"));
+  return true;
 }
 

--- kdeextragear-2/kst/kst/kstdoc.cpp  #1.112:1.113
@@ -113,5 +113,7 @@ bool KstDoc::saveModified(bool doDelete)
       case KMessageBox::Yes:
         if (_title == i18n("Untitled")) {
-          win->slotFileSaveAs();
+          if (!win->slotFileSaveAs()) {
+            return false;
+          }
         } else {
           saveDocument(absFilePath());

--- kdeextragear-2/kst/kst/kst.h  #1.96:1.97
@@ -199,5 +199,5 @@ class KstApp : public KMdiMainFrm {
 
     /** save a document by a new filename*/
-    void slotFileSaveAs();
+    bool slotFileSaveAs();
 
     /** asks for saving if the file is modified, then closes the actual





More information about the Kst mailing list