[gcompris] gletters: improved fallback if uppercase wordlist not found:



commit 809698cd972f4fca36a24a9a095e867a51a8f242
Author: GunChleoc <fios foramnagaidhlig net>
Date:   Wed May 8 17:21:57 2013 +0100

    gletters: improved fallback if uppercase wordlist not found:
    
    first try to load default for the locale, then if that fails, try to load english.

 src/gletters-activity/gletters.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gletters-activity/gletters.c b/src/gletters-activity/gletters.c
index 8e549c9..55c0187 100644
--- a/src/gletters-activity/gletters.c
+++ b/src/gletters-activity/gletters.c
@@ -198,7 +198,11 @@ static void load_letters(int uppercase_only)
       gchar *filename = (uppercase_only) ? "gletters/upper-$LOCALE.xml" : "gletters/default-$LOCALE.xml";
 
       gc_wordlist = gc_wordlist_get_from_file(filename);
-
+      if(!gc_wordlist && uppercase_only)
+      {
+          filename = "gletters/default-$LOCALE.xml";
+          gc_wordlist = gc_wordlist_get_from_file(filename);
+      }
       if(!gc_wordlist)
         {
           /* Fallback to english */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]