[Tux4kids-commits] r652 - tuxtype/trunk/src
mobin-guest at alioth.debian.org
mobin-guest at alioth.debian.org
Mon Aug 18 15:32:08 UTC 2008
Author: mobin-guest
Date: 2008-08-18 15:32:07 +0000 (Mon, 18 Aug 2008)
New Revision: 652
Modified:
tuxtype/trunk/src/titlescreen.c
Log:
Modified: tuxtype/trunk/src/titlescreen.c
===================================================================
--- tuxtype/trunk/src/titlescreen.c 2008-08-18 14:28:20 UTC (rev 651)
+++ tuxtype/trunk/src/titlescreen.c 2008-08-18 15:32:07 UTC (rev 652)
@@ -1532,7 +1532,14 @@
if (event.key.keysym.sym == SDLK_UP) {
if (loc > 0)
loc--;
- }
+ if(settings.use_english){
+ sprintf(fn , "%s/words", settings.default_data_path);
+ fprintf(stderr , "%s/words", settings.default_data_path);
+}
+else{
+ sprintf(fn , "%s/words", settings.theme_data_path);
+ fprintf(stderr , "%s/words", settings.theme_data_path);
+} }
if (event.key.keysym.sym == SDLK_DOWN) {
if (loc+1<lists)
@@ -1620,8 +1627,11 @@
old_use_english = settings.use_english;
strncpy(old_theme_path, settings.theme_data_path, FNLEN - 1);
- sprintf(fn , "%s/words", settings.theme_data_path);
-
+ if(settings.use_english)
+ sprintf(fn , "%s/words", settings.default_data_path);
+ else
+ sprintf(fn , "%s/words", settings.theme_data_path);
+
themesDir = opendir(fn);
if (!themesDir)
@@ -1644,10 +1654,11 @@
if (strcmp("CVS", themesFile->d_name)==0)
continue;
-
- sprintf(fn, "%s/words/%s", settings.theme_data_path, themesFile->d_name);
+ if(settings.use_english)
+ sprintf(fn, "%s/words/%s",settings.default_data_path, themesFile->d_name);
+ else
+ sprintf(fn, "%s/words/%s", settings.theme_data_path, themesFile->d_name);
-
/* CheckFile() returns 2 if dir, 1 if file, 0 if neither: */
if (CheckFile(fn) == 1) {
fp=fopen(fn,"r");
@@ -1822,8 +1833,11 @@
old_use_english = settings.use_english;
strncpy(old_theme_path, settings.theme_data_path, FNLEN - 1);
- sprintf(fn , "%s/words/%s", settings.theme_data_path,words_file);
-
+ if(settings.use_english)
+ sprintf(fn , "%s/words/%s", settings.default_data_path,words_file);
+ else
+ sprintf(fn , "%s/words/%s", settings.theme_data_path,words_file);
+
fp=fopen(fn,"r");
fscanf(fp, "%[^\n]\n", str);
More information about the Tux4kids-commits
mailing list