Bug 87161 - Click Cancel on the save dialog after being prompted to save on kst close causes kst to close
Summary: Click Cancel on the save dialog after being prompted to save on kst close cau...
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Rick Chern
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-13 23:38 UTC by Rick Chern
Modified: 2004-08-14 02:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Chern 2004-08-13 23:38:18 UTC
Version:           0.99-devel (using KDE KDE 3.2.1)
Installed from:    Compiled From Sources
OS:                Linux

Steps to reproduce
- start kst
- create some plots using data wizard or otherwise
- try to close kst by clicking X of window manager
- click Yes to prompt
- click cancel on save dialog

Kst exits.  
Also, if File->Quit is used instead of clicking X, the save prompt shows up twice, then exits.

Wish:
Clicking cancel on the save dialog cancels the kst exit. This is more consistent with other applications.
(Wishlist only).
Comment 1 George Staikos 2004-08-14 01:59:44 UTC
On Friday 13 August 2004 17:38, Rick Chern wrote:
> Steps to reproduce
> - start kst
> - create some plots using data wizard or otherwise
> - try to close kst by clicking X of window manager
> - click Yes to prompt
> - click cancel on save dialog
>
> Kst exits.
> Also, if File->Quit is used instead of clicking X, the save prompt shows up
> twice, then exits.

   This is a critical bug and can be fixed for 0.99.  I will add it to the 
release notes.

Comment 2 Netterfield 2004-08-14 02:16:21 UTC
I agree.

On August 13, 2004 07:59 pm, George Staikos wrote:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=87161
>
>
>
>
> ------- Additional Comments From staikos kde org  2004-08-14 01:59 -------
>
> On Friday 13 August 2004 17:38, Rick Chern wrote:
> > Steps to reproduce
> > - start kst
> > - create some plots using data wizard or otherwise
> > - try to close kst by clicking X of window manager
> > - click Yes to prompt
> > - click cancel on save dialog
> >
> > Kst exits.
> > Also, if File->Quit is used instead of clicking X, the save prompt shows
> > up twice, then exits.
>
>    This is a critical bug and can be fixed for 0.99.  I will add it to the
> release notes.
> _______________________________________________
> Kst mailing list
> Kst@kde.org
> https://mail.kde.org/mailman/listinfo/kst

Comment 3 Rick Chern 2004-08-14 02:31:47 UTC
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