[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Thu Sep 15 07:19:53 CEST 2005


SVN commit 460763 by staikos:

i18n() text.  this code is somewhat wrong in that it compares i18ned text now.


 M  +14 -12    kstmonochromedialog_i.cpp  


--- trunk/extragear/graphics/kst/kst/kstmonochromedialog_i.cpp #460762:460763
@@ -22,6 +22,8 @@
 #include <qpushbutton.h>
 #include <qspinbox.h>
 
+#include <klocale.h>
+
 #include "kstlinestyle.h"
 #include "kstmonochromedialog_i.h"
 
@@ -33,9 +35,9 @@
 
   availableListBox->clear();
   selectedListBox->clear();
-  availableListBox->insertItem("Point style");  
-  availableListBox->insertItem("Line style");
-  availableListBox->insertItem("Line width");
+  availableListBox->insertItem(i18n("Point Style"));  
+  availableListBox->insertItem(i18n("Line Style"));
+  availableListBox->insertItem(i18n("Line Width"));
   
   connect(_Cancel, SIGNAL(clicked()), this, SLOT(accept()));
   connect(enhanceReadability, SIGNAL(clicked()), this, SLOT(updateButtons()));
@@ -85,21 +87,21 @@
   availableListBox->clear();
   selectedListBox->clear();
   if (opts["kst-plot-monochromesettings-pointstyleorder"] == "-1") {
-    availableListBox->insertItem("Point style");
+    availableListBox->insertItem(i18n("Point Style"));
   } else {
-    selectedListBox->insertItem("Point style",
+    selectedListBox->insertItem(i18n("Point Style"),
     opts["kst-plot-monochromesettings-pointstyleorder"].toInt());
   }
   if (opts["kst-plot-monochromesettings-linestyleorder"] == "-1") {
-    availableListBox->insertItem("Line style");
+    availableListBox->insertItem(i18n("Line Style"));
   } else {
-    selectedListBox->insertItem("Line style",
+    selectedListBox->insertItem(i18n("Line Style"),
     opts["kst-plot-monochromesettings-linestyleorder"].toInt());
   }
   if (opts["kst-plot-monochromesettings-linewidthorder"] == "-1") {
-    availableListBox->insertItem("Line width");
+    availableListBox->insertItem(i18n("Line Width"));
   } else {
-    selectedListBox->insertItem("Line width",
+    selectedListBox->insertItem(i18n("Line Width"),
     opts["kst-plot-monochromesettings-linewidthorder"].toInt());
   }
   
@@ -113,17 +115,17 @@
     opts["kst-plot-monochromesettings-enhancereadability"] = enhanceReadability->isChecked() ? "1" : "0";
   }
   // point style order - default is 0
-  int pointStyleOrder = selectedListBox->index(selectedListBox->findItem("Point style", ExactMatch));
+  int pointStyleOrder = selectedListBox->index(selectedListBox->findItem(i18n("Point Style"), ExactMatch));
   if (pointStyleOrder != 0 || include_def) {
     opts["kst-plot-monochromesettings-pointstyleorder"] = QString::number(pointStyleOrder);
   }
   // line style order - default is 1
-  int lineStyleOrder = selectedListBox->index(selectedListBox->findItem("Line style", ExactMatch));
+  int lineStyleOrder = selectedListBox->index(selectedListBox->findItem(i18n("Line Style"), ExactMatch));
   if (lineStyleOrder != 1 || include_def) {
     opts["kst-plot-monochromesettings-linestyleorder"] = QString::number(lineStyleOrder);
   }
   // line width order - default is 2
-  int lineWidthOrder = selectedListBox->index(selectedListBox->findItem("Line width", ExactMatch));
+  int lineWidthOrder = selectedListBox->index(selectedListBox->findItem(i18n("Line Width"), ExactMatch));
   if (lineWidthOrder != 2 || include_def) {
     opts["kst-plot-monochromesettings-linewidthorder"] = QString::number(lineWidthOrder);
   }


More information about the Kst mailing list