SOURCES: lightyears-config_path.patch (NEW), lightyears.desktop (NEW) - nam...

lisu lisu at pld-linux.org
Mon Nov 24 10:14:46 CET 2008


Author: lisu                         Date: Mon Nov 24 09:14:46 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- name change (LightYears* -> lightyears*)

---- Files affected:
SOURCES:
   lightyears-config_path.patch (NONE -> 1.1)  (NEW), lightyears.desktop (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/lightyears-config_path.patch
diff -u /dev/null SOURCES/lightyears-config_path.patch:1.1
--- /dev/null	Mon Nov 24 10:14:47 2008
+++ SOURCES/lightyears-config_path.patch	Mon Nov 24 10:14:41 2008
@@ -0,0 +1,38 @@
+--- LightYears.orig/code/config.py	2006-09-23 19:09:59.000000000 +0200
++++ LightYears/code/config.py	2006-09-23 19:10:17.000000000 +0200
+@@ -17,10 +17,12 @@
+ 
+ cfg = Config()
+ 
++DIR = "~/.LightYears"
+ FILENAME = None
+ 
+ def Initialise():
+-    global cfg, FILENAME
++    global cfg, DIR, FILENAME
++
+ 
+     home = extra.Get_Home()
+     if ( home == None ):
+@@ -29,7 +31,8 @@
+         FILENAME = os.path.join(home, ".20k.cfg")
+ 
+     try:
+-        f = file(FILENAME, "rb")
++	dir = os.path.expanduser(DIR)
++	f = file(os.path.join(dir, FILENAME), "rb")
+         cfg2 = pickle.load(f)
+         f.close()
+         if ( cfg2.version == startup.Get_Game_Version() ):
+@@ -42,7 +45,10 @@
+     global cfg, FILENAME
+ 
+     try:
+-        f = file(FILENAME, "wb")
++        dir = os.path.expanduser(DIR)
++        if not os.path.exists(dir):
++            os.makedirs(dir)
++        f = file(os.path.join(dir, FILENAME), "wb")
+         pickle.dump(cfg, f)
+         f.close()
+     except Exception, x:

================================================================
Index: SOURCES/lightyears.desktop
diff -u /dev/null SOURCES/lightyears.desktop:1.1
--- /dev/null	Mon Nov 24 10:14:47 2008
+++ SOURCES/lightyears.desktop	Mon Nov 24 10:14:41 2008
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Exec=LightYears
+Name=20,000 Light Years Into Space
+Name[pl]=20,000 Light Years Into Space
+Comment=Real time strategy Games
+Comment[pl]=Gra strategiczna w czasie rzeczywistym
+Icon=lightyears
+Terminal=false
+Type=Application
+Categories=Game;StrategyGame;
+# vi: encoding=utf-8
================================================================


More information about the pld-cvs-commit mailing list