[Kst] branches/work/kst/kst1kde4/kst/src/libkstapp

Zongyi Zhang freebody.kst at gmail.com
Tue Mar 23 23:53:51 CET 2010


SVN commit 1106792 by zhang:

continue kst1kde4

 M  +1 -1      kst2dplot.cpp  
 M  +1 -1      kstdatamanager.cpp  
 M  +1 -1      kstdatawizard.cpp  
 M  +2 -2      kstdoc.cpp  
 M  +2 -2      kstvectorsavedialog.cpp  
 M  +1 -1      kstviewwindow.cpp  


--- branches/work/kst/kst1kde4/kst/src/libkstapp/kst2dplot.cpp #1106791:1106792
@@ -3868,7 +3868,7 @@
     
     tlv  = kst_cast<KstTopLevelView>(KstViewObjectPtr(_topObjectForMenu));
     if (tlv) {
-      if (QMessageBox::warning(tlv->widget(), i18n("Kst"), i18n("Are you sure you want to delete plot '%1'?").arg(tagName()), QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
+      if (QMessageBox::warning(tlv->widget(), i18n("Kst"), i18n("Are you sure you want to delete plot '%1'?").arg(tagName(), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
         remove = true;
       }
     }
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstdatamanager.cpp #1106791:1106792
@@ -1238,7 +1238,7 @@
   } else {
     // Don't prompt for base curves
     KstBaseCurvePtr bc = kst_cast<KstBaseCurve>(koi->dataObject());
-    if (bc || QMessageBox::warning(this, i18n("Kst"), i18n("There are other objects in memory that depend on %1.  Do you wish to delete them too?").arg(koi->tag().tag())) == QMessageBox::Yes) {
+    if (bc || QMessageBox::warning(this, i18n("Kst"), i18n("There are other objects in memory that depend on %1.  Do you wish to delete them too?").arg(koi->tag().tag()), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
 
       if (qi->rtti() == RTTI_OBJ_OBJECT) {
         koi->dataObject()->deleteDependents();
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstdatawizard.cpp #1106791:1106792
@@ -747,7 +747,7 @@
       QMessageBox::warning(this, i18n("Kst"), i18n("You requested to read in over %1 of data but it seems that you have approximately only %2 of usable memory available. You cannot load this much data.").arg(strMemoryRequested).arg(strMemoryAvailable));
       rc = false;
     } else {
-      if (QMessageBox::warning(this, i18n("Kst"), i18n("You requested to read in approximately %1 of data but it seems that you have slightly less usable memory than this available. Would you like to try and load the data anyway?").arg(strMemoryRequested)) == QMessageBox::Yes) {
+      if (QMessageBox::warning(this, i18n("Kst"), i18n("You requested to read in approximately %1 of data but it seems that you have slightly less usable memory than this available. Would you like to try and load the data anyway?").arg(strMemoryRequested), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
         rc = true;
       } else {
         rc = false;
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstdoc.cpp #1106791:1106792
@@ -123,7 +123,7 @@
   if (_modified) {
     KstApp *win = KstApp::inst();
     if (win->activeWindow()) {
-      int want_save = QMessageBox::warning( win, i18n("Question"), i18n("The current plot definition has been modified. Do you want to save it?"));
+      int want_save = QMessageBox::warning( win, i18n("Question"), i18n("The current plot definition has been modified. Do you want to save it?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
       switch (want_save) {
         case QMessageBox::Yes:
           if (_title == "Untitled") {
@@ -827,7 +827,7 @@
 
   if (KIO::NetAccess::exists(url, false, KstApp::inst())) {
     if (prompt) {
-      int rc = QMessageBox::warning(KstApp::inst(), i18n("Kst"), i18n("File %1 exists.  Overwrite?").arg(url.prettyURL()));
+      int rc = QMessageBox::warning(KstApp::inst(), i18n("Kst"), i18n("File %1 exists.  Overwrite?").arg(url.prettyURL()), QMessageBox::Yes | QMessageBox::No);
       if (rc == QMessageBox::No) {
         return false;
       }
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstvectorsavedialog.cpp #1106791:1106792
@@ -27,7 +27,7 @@
 #include <kio/netaccess.h>
 #include <kstandarddirs.h>
 
-#include "kstvectorsavedialog_i.h"
+#include "kstvectorsavedialog.h"
 #include "vectorselector.h"
 
 KstVectorSaveDialog::KstVectorSaveDialog(QWidget* parent,
@@ -99,7 +99,7 @@
           tf.close();
 
           if (KIO::NetAccess::exists(url, false, this)) {
-            int rc = QMessageBox::warning(this, i18n("Kst"), i18n("File %1 exists.  Overwrite?").arg(url.prettyURL()), i18n("Kst"));
+            int rc = QMessageBox::warning(this, i18n("Kst"), i18n("File %1 exists.  Overwrite?").arg(url.prettyURL()), i18n("Kst"), QMessageBox::Yes | QMessageBox::No);
             if (rc == QMessageBox::No) {
               return;
             }
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstviewwindow.cpp #1106791:1106792
@@ -421,7 +421,7 @@
 
 void KstViewWindow::closeEvent(QCloseEvent *e) {
   if (KstSettings::globalSettings()->promptWindowClose && !view()->children().isEmpty()) {
-    if (QMessageBox::warning(this, i18n("Kst"), i18n("Are you sure you want to close window '%1'?\nClosing a window deletes all plots in the window.").arg(caption())) != QMessageBox::Yes) {
+    if (QMessageBox::warning(this, i18n("Kst"), i18n("Are you sure you want to close window '%1'?\nClosing a window deletes all plots in the window.").arg(caption()), QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
       e->ignore();
       return;
     }


More information about the Kst mailing list