Commits

Anonymous committed bd81a3c

Added a version header to ~/.pyradrc, proper copyright statements and updated the Changelog for v0.1.1

Comments (0)

Files changed (3)

+pyRad 0.1.1
+
+- moved the Rad class into a seperate file (rad.py) - same performance but cleaner.
+- added a version header to the .pyradrc file, so it will be possible to update it transparently when changes should be necessary.
+
 pyRad 0.1
 
-- Initial version
+- Initial version.
 
 ### Basic Data ###
 
-__version__ = "0.1"
-__copyright__ = "GPLv3 or later" # TODO: Proper copyright info
+__copyright__ = """pyRad - a wheel type command menu.
 
+    Copyright (c) 2009 Arne Babenhauserheise
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>
+"""
 
 ### Imports ###
 
 # First the GUI class and the Data about the program
 from rad import Rad, aboutData
+from rad import version as __version__
 
 # Then commandline arguments and handling
 from sys import argv
 PROGRAM_ICON = "kreversi"
 CENTER_ICON = "kreversi"
 CONFIG_FILE_NAME = ".pyradrc"
+DEFAULT_CONFIG = '''# v0.1 keep this line!
+[
+    ("''' + CENTER_ICON + '''", None), # the center item: (icon, action); action == None means "quit"
+    ("kate","kate"), ("kmail","kmail"), ("kmix","kmix"), ("wesnoth","wesnoth"), # normal items
+    ("krita","""[("''' + CENTER_ICON + '''", None), ("gimp","gimp")]""") # a folder with the center icon and only one real item
+]
+'''
+
+
 
 # If there's no config, we use standard items
 if not isfile(join(home, CONFIG_FILE_NAME)): 
     #: The items the menu should show in top-level (via folders this contains the whole of the wheel menu). 
-    ITEMS = [(CENTER_ICON, None), # the center item
-                 ("kate","kate"), ("kmail","kmail"), ("kmix","kmix"), ("wesnoth","wesnoth"), # normal items
-                 ("krita","[('" + CENTER_ICON + "', None), ('gimp','gimp')]") # a folder with the center icon and only one real item
-                 ]
+    ITEMS = eval(DEFAULT_CONFIG)
+    # also create the config file -> this is an initial run
+    f = open(join(home, CONFIG_FILE_NAME), "w")
+    f.write(DEFAULT_CONFIG)
+    f.close()
 else:
     # if a config file is present, we load the items from there.
     f = open(join(home, CONFIG_FILE_NAME))
-    ITEMS = eval(f.read())
+    config = f.read()
+    assert(config.startswith("# v0.1"))
+    ITEMS = eval(config)
     f.close()
     del f
+    del config
 
 
 ### About the Program ###
 appName     = "pyRad"
 catalog     = ""
 programName = ki18n ("Rad")
-version     = "1.0"
+version     = "0.1.1"
 description = ki18n ("A simple radial command menu - best called with a gesture")
 license     = KAboutData.License_GPL
 copyright   = ki18n ("(c) 2009 Arne Babenhauserheide")