[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kturtle
From: Anne-Marie Mahfouf <annma () kde ! org>
Date: 2004-01-06 13:47:52
Message-ID: 20040106134752.37F3393A7 () office ! kde ! org
[Download RAW message or body]
CVS commit by annma:
a xml file should be always found but we need to use KConfig XT properly to set a \
default for the TranslationFilePath. That'll clean the readConfig() method. I changed \
the checkTranslationFile() method to readConfig() as readConfig is more general.
M +2 -2 TODO 1.12
M +7 -7 src/kturtle.cpp 1.13
M +1 -1 src/kturtle.h 1.4
--- kdenonbeta/kturtle/TODO #1.11:1.12
@@ -4,8 +4,8 @@
**** URGENT ****
-cies: urgets issues are fixed
-
+cies: urgent issues are fixed
+annma: implement KConfigXT properly i.e. set the default xml file in the KConfig XT \
files plus clean the mess between TranslationFile and TranslationFilePath
--- kdenonbeta/kturtle/src/kturtle.cpp #1.12:1.13
@@ -47,5 +47,4 @@ MainWindow::MainWindow() : KMainWindow(
setCaption( i18n("Untitled") );
picker = 0; // for the colorpickerdialog
- //checkTranslationFile(); // translationFile should be know else: error.
// at last; must be sure everything is already set up ;)
@@ -57,5 +56,5 @@ MainWindow::MainWindow() : KMainWindow(
}
- //readConfig ();
+ readConfig ();
}
@@ -530,13 +529,14 @@ void MainWindow::slotConfigureKeys() {
}
-void MainWindow::checkTranslationFile() {
+void MainWindow::readConfig() {
// Here we check wether there is a TranslationFile selected in settings...
// if not we will set it to 'en_US' by default
- // if ( !QFile( Settings::translationFilePath() ).exists() ) {
+ // TODO use KConfig XT instead of KConfig
KConfig *config = kapp->config();
+ config->setGroup("language");
if ( !QFile( config->readPathEntry("TranslationFile") ).exists() ) {
kdDebug(0)<<"--1--"<<endl;
if ( !locate("data", "kturtle/data/logokeywords.en_US.xml").isNull() ) {
- config->setGroup("language");
+ //config->setGroup("language");
config->writeEntry("TranslationFile", locate("data", \
"kturtle/data/logokeywords.en_US.xml") ); config->sync(); // doesnt work
--- kdenonbeta/kturtle/src/kturtle.h #1.3:1.4
@@ -63,5 +63,5 @@ class MainWindow : public KMainWindow
void setupEditor();
void setupStatusBar();
- void checkTranslationFile();
+ void readConfig();
KTextEdit *editor;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic