[Kst] kdeextragear-2/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Wed Aug 25 19:00:15 CEST 2004


CVS commit by netterfield: 

.Empty plot dialog uses the default font, by default.
-Data Wizard uses i18n("<Auto Name>") rather than "W?" to refer to auto
name, to be consistent with all other <Auto Name> situations.
-The "Enter a name for the new window" pupup default prompts to "<Auto Name>".


  M +3 -2      datawizard.ui.h   1.78
  M +6 -1      kst.cpp   1.218
  M +6 -3      kstplotdialog_i.cpp   1.91


--- kdeextragear-2/kst/kst/datawizard.ui.h  #1.77:1.78
@@ -7,4 +7,5 @@
 ** place of a destructor.
 *****************************************************************************/
+static const QString defaultTag = i18n("<Auto Name>");
 
 void DataWizard::init() {
@@ -24,5 +25,5 @@ void DataWizard::init() {
     _kstFFTOptions->update();
 
-    _newWindowName->setText("W?");
+    _newWindowName->setText(defaultTag);
 
     //setNextEnabled(_pageDataSource, false);
@@ -438,5 +439,5 @@ void DataWizard::finished()
     if (_newWindow->isChecked() || _newWindows->isChecked()) {
         newName = _newWindowName->text();
-        if (newName=="W?") newName = KST::suggestWinName();
+        if (newName==defaultTag) newName = KST::suggestWinName();
         QString n = app->newWindow(newName);
         w = static_cast<KstViewWindow*>(app->findWindow(n));

--- kdeextragear-2/kst/kst/kst.cpp  #1.217:1.218
@@ -79,4 +79,6 @@
 static KstApp *inst = 0L;
 
+static const QString defaultTag = "<Auto Name>";
+
 KstApp* KstApp::inst() {
   return ::inst;
@@ -1430,5 +1432,5 @@ QString KstApp::newWindow(const QString&
 QString KstApp::newWindow(bool prompt) {
   bool ok = false;
-  QString name;
+  QString name = defaultTag;
   QString nameUsed;
 
@@ -1438,4 +1440,7 @@ QString KstApp::newWindow(bool prompt) {
       QRegExpValidator val(exp, 0L);
       name = KLineEditDlg::getText(i18n("Enter a name for the new window:"), name, &ok, 0L, &val).stripWhiteSpace();
+      if (ok && (name==defaultTag)) {
+        name = KST::suggestWinName();
+      }
     } else {
       name = KST::suggestWinName();

--- kdeextragear-2/kst/kst/kstplotdialog_i.cpp  #1.90:1.91
@@ -372,4 +372,7 @@ void KstPlotDialogI::update(int new_inde
     plotColors->setForeground(plot->foregroundColor());
     plotColors->setBackground(plot->backgroundColor());
+  } else {
+    FontComboBox->setCurrentFont(KstApp::inst()->defaultFont());
+    LegendFontComboBox->setCurrentFont(KstApp::inst()->defaultFont());
   }
 





More information about the Kst mailing list