From b820476df8c4bad1ff5f8ff5a2d95495d905e183 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Wed, 17 Mar 2004 10:38:04 +0000 Subject: [PATCH] Warn about old versions of findrox.py. Bugfix: Bug in new menu API prevented submenus from working. git-svn-id: https://rox.svn.sourceforge.net/svnroot/rox/trunk/ROX-Lib2@3381 66de3db3-b00d-0410-b41b-f4738ad19bea --- Help/Changes | 5 +++++ MakeDist | 4 ++-- python/rox/Menu.py | 2 +- python/rox/OptionsBox.py | 15 ++------------- python/rox/__init__.py | 8 ++++++++ 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Help/Changes b/Help/Changes index f88b357..ffef391 100644 --- a/Help/Changes +++ b/Help/Changes @@ -3,6 +3,11 @@ by Thomas Leonard http://rox.sourceforge.net +17-Mar-2004 +~~~~~~~~~~~ +Warn about old versions of findrox.py. +Bugfix: Bug in new menu API prevented submenus from working. + 16-Mar-2004 (Release 1.9.13) ~~~~~~~~~~~ Bugfix: Icon themes didn't work with python versions older than 2.2.2 diff --git a/MakeDist b/MakeDist index 3dcdc69..c02c6d2 100755 --- a/MakeDist +++ b/MakeDist @@ -39,8 +39,8 @@ os.mkdir(dir) os.chdir(dir) #os.system('cvs -d:pserver:anonymous@cvs.rox.sourceforge.net:/cvsroot/rox export -r Release-%d-%d-%d ROX-Lib2' % (a, b, c)) os.system('cvs -dtal197@cvs.rox.sourceforge.net:/cvsroot/rox export -r Release-%d-%d-%d ROX-Lib2' % (a, b, c)) -os.system('cd ROX-Lib2/python; ./make_docs.py; rm rox/.cvsignore rox/*.pyc') -os.system('cd ROX-Lib2/Messages; ./update-po; ./dist') +os.system('cd ROX-Lib2/Messages; ./update-po; ./dist; rm *.old') +os.system('cd ROX-Lib2/python; ./make_docs.py; rm rox/.cvsignore rox/*.pyc rox/messages.pot') os.chdir(os.environ['HOME']) os.system('tar czf %s.tgz %s' % (dir, dir)) print "%s.tgz is ready!" % dir diff --git a/python/rox/Menu.py b/python/rox/Menu.py index 8fb7718..328e8b4 100644 --- a/python/rox/Menu.py +++ b/python/rox/Menu.py @@ -89,7 +89,7 @@ def _walk(items): yield "/" + x.label, x if isinstance(x, SubMenu): for l, y in _walk(x.submenu): - yield x.label + l, y + yield "/" + x.label + l, y class Menu: def __init__(self, name, items): diff --git a/python/rox/OptionsBox.py b/python/rox/OptionsBox.py index 37281bf..ebc25b2 100644 --- a/python/rox/OptionsBox.py +++ b/python/rox/OptionsBox.py @@ -49,19 +49,8 @@ def data(node): if text.nodeType == Node.TEXT_NODE]) class OptionsBox(g.Dialog): - """OptionsBox can be sub-classed to provide your own widgets, by - creating extra build_* functions. Each build funtion takes a DOM - Element from the /Options.xml file and returns a list of - GtkWidgets to add to the box. The function should be named after - the element ( -> def build_foo()). - - When creating the widget, self.handlers[option] should be set to - a pair of functions (get, set) called to get and set the value - shown in the widget. - - When the widget is modified, call self.check_widget(option) to - update the stored values. - """ + """A dialog box which lets the user edit the options. The file + Options.xml specifies the layout of this box.""" def __init__(self, options_group, options_xml, translation = None): """options_xml is an XML file, usually /Options.xml, which defines the layout of the OptionsBox. diff --git a/python/rox/__init__.py b/python/rox/__init__.py index 51a2787..0c8894e 100644 --- a/python/rox/__init__.py +++ b/python/rox/__init__.py @@ -101,6 +101,14 @@ except: # Put argv back the way it was, now that Gtk has initialised sys.argv[0] = _path +def _warn_old_findrox(): + import findrox + if not hasattr(findrox, 'version'): + print >>sys.stderr, "WARNING from ROX-Lib: the version of " \ + "findrox.py used by this application (%s) is very " \ + "old and may cause problems." % app_dir +_warn_old_findrox() + TRUE = True FALSE = False -- 2.11.4.GIT