ROX-Lib2 Shared code for ROX applications by Thomas Leonard http://rox.sourceforge.net Note: for a detailed changelog, do: svn log -v https://svn.sourceforge.net/svnroot/rox/trunk/ROX-Lib2 Release 2.0.5: General: - Added a 'parent' argument to the SaveBox constructor (Thomas Leonard). - Python 2.4 is now the base version, so test against that. - Fix example Menu definition. Allow option widgets to expand vertically by setting the _rox_lib_expand property to True (Stephen Watson, suggested by Thomas Leonard). Bugfixs: - Fix scaling of MIME icons (Stephen Watson) - Work-around possible PyGTK bug (Lars Hansson and Tony Houghton, reported by Peter): "assertion `GTK_IS_TREE_SELECTION (selection)' failed" - Added an assertion to detect a mysterious error (Thomas Leonard; reported by Carl Bolduc). Release 2.0.4: General: - Fix unit tests to use correct path (Thomas Leonard). - Removed a load of unused imports spotted by PyFlakes (Thomas Leonard). - ROX base platform is now Python 2.3, so run unit tests against that by default (Thomas Leonard). - Bugfix: Must use '..' in interface for backwards compat (Thomas Leonard). - Removed some more deprecation warnings. Do not run testsu as part of testall as it is interactive (Thomas Leonard). - Ensure window response codes are treated as int(), required for python 2.5 and pygtk 2.6 (Stephen Watson). - Drag-and-drop didn't work if the hostname contained '-', due to an error in a regular expression (Thomas Leonard, reported by Lennon Cook). - Function to fetch an appropriate icon for a file (Lennon Cook). Changed to return a Pixbuf instead of an Image, to use the existing icon theme lookup and to first check for a .DirIcon for directories (Stephen Watson). Translations: - Update Chinese Translations (Babyfai Cheung). - Update French translations (Vincent Lefèvre). debug: - Exception handler now copes with old-style non-class exceptions and with missing tracebacks (Thomas Leonard). mime: - Added xattr support including test for user set MIME types (Stephen Watson). OptionsBox: - When there is only one section in the options box, don't show a frame (Thomas Leonard). - Added note about size-groups(Thomas Leonard). - Added widget to OptionsBox, which lets the user choose a file using a GtkFileChooser or by drag-and-drop (Jim Ramsay). Requires GTK >= 2.6. - Added Clear button to filename options (Jim Ramsay and Thomas Leonard). saving: - Lookup icons from /rox.sourceforge.net/MIME-icons before /MIME-ICONS (Stephen Watson) session: - Prefered launcher for a URL scheme now part of uri_handler (Stephen Watson). settings: - Prefered launcher for a URL scheme now part of uri_handler (Stephen Watson). tasks: - Fixed some deprecation warnings (Thomas Leonard). - Bugfix: InputBlocker and OutputBlocker now trigger on IO_HUP too (Thomas Leonard). - Added Task.finished blocker, which is triggered when the task finishes, successfully or by throwing an exception (Thomas Leonard; suggested by Ken Hayber). - Ensure that IO blocker callbacks return False, not None, or we get a warning from PyGTK (Thomas Leonard). templates: *NEW* - Added templates module as an interface to glade (Stephen Watson). - Templates now has full dict behaviour and derives from glade.XML. Method names have therefore changed to be the same used by glade.XML (Stephen Watson). thumbnail: *NEW* - Added thumbnail module to access thumbnail images of files and also to generate them (Stephen Watson). uri_handler: *NEW* - Suppor shared configuration for launching URIs (Stephen Watson). xattr: *NEW* - Added xattr support including test for user set MIME types (Stephen Watson). Release 2.0.3: General: - Added ROX-Lib.xml file, which makes it easy to register a CVS copy of ROX-Lib with the 0launch, using '0launch --add-feed' (Thomas Leonard). - If pygtk is found, but not gtk, give a better error (Thomas Leonard; reported by Albert). - Double-click on a line in the stacktrace display of the debug box to open the source code in Edit. - Added rox.isappdir() function to test the validity of an AppDir (Stephen Watson). - Set sys.excepthook to our graphical exception explorer so that untrapped exceptions are reported nicely. - Don't display KeyboardInterrupt in an error box. - Added unittests. Support Python 2.2. - When displaying an uncaught exception, still write it to stderr as well as opening the exception dialog box. Translations: - Made message in AppRun translatable (Andras Mohari). - Include AppRun when generating translations, and rename translation function in OptionsBox to avoid confusing pygettext (reported by Andras Mohari). - Added Hungarian translation. - More strings marked for translation. Current translations: de Guido Schimmels es Juan Carlos Jimenez Garcia fr Vincent Lefèvre hu Andras Mohari it Yuri Bongiorno pl Bart Kreska pt_BR * Jose Carlos do Nascimento zh_CN * cheungsiufai zh_TW * cheungsiufai * indicates a translation which is out-of-date. applet: - Added method for applets to determine the panel orientation (Stephen Watson). filer: - Made filer.py use 0launch if available (Thomas Leonard; requested by Christopher Arndt). launch: *NEW* - Added launch module, which allows running programs easily using the injector, and made filer.py use 0launch if available (Thomas Leonard; requested by Christopher Arndt). Menu: - Changed the doc string in Menu.py to prefer the new MenuItem based method of defining menus not the old tuple method (Stephen Watson). mime: - Added mime.get_type_handler(), which uses the same algorithm as ROX-Filer to find the handler for a file (Ken Hayber and Thomas Leonard). mime_handler: - EXPERIMENTAL code for installing MIME handlers via 0launch (Stephen Watson) - Better detection of the MIME-types/MIME-thumb location when installing type handlers (Stephen Watson). - Improve installation of MIME type handler under Zero Install (Stephen Watson) - Bugfix: spurious argument when installing SendTo handler under Zero Install (Stephen Watson, reported by Andras Mohari) OptionsBox: - Rename translation function in OptionsBox to avoid confusing pygettext. - Make the options box use ComboBox instead of OptionMenu whenever possible. It also makes sure that the OptionMenu's initial width is large enough to display the widest item (Andras Mohari). saving: - When saving a file to a FAT filesystem, the chmod would fail. Log a warning instead of aborting (Thomas Leonard; reported by QS Computing). - Save box now selects icon from same icon theme as ROX-Filer (Stephen Watson). session: *NEW* - Added rox.session module for communicating with ROX-Session. - Use XMLRPC if the DBUS version is too old. - Check that ROX-Session is providing the dbus service, don't just assume that it is (Stephen Watson). settings: *NEW* - Added settings module (Tony Houghton, based on code from LookAndFeel). - Don't create bus object until constructor is called. - rox.settings now uses rox.session to communicate with ROX-Session and the duplicate Options work has been removed from rox.session (Stephen Watson). su: - If 'xterm' isn't available, give a sensible error message when using the su module (Thomas Leonard; reported by Vincent Lefevre). xxmlrpc: *NEW* - Added 'xxmlrpc' module. This allows sending XML-RPC messages to other processes, via the X server. - Extended XML-RPC code to return response values and faults to caller. - Better error codes (NoSuchService, UnknownObject, NoSuchMethod). Cope with returning None (returns True instead). Simplified API (no need to subclass ExportedObject, call register, or use invoke). - If a service property exists but the window it points to doesn't, then report that the service is no longer running. - XXMLRPC call objects support the Blocker interface (so you can block until the reply is available). - If an XXMLRPC Call object is destroyed before the response is read then display a warning and destroy the IPC window. 25-May-2006 ~~~~~~~~~~~ Updated French translation (Vincent Lefèvre). 10-Mar-2006 ~~~~~~~~~~~ Bugfix: spurious argument when installing SendTo handler under Zero Install (Stephen Watson, reported by Andras Mohari) 04-Mar-2006 ~~~~~~~~~~~ When installing a type handler under Zero Install, make sure to pass the arguments to the program and run 0launch in console mode (Stephen Watson). 25-Feb-2006 ~~~~~~~~~~~ Added mime.get_type_handler(), which uses the same algorithm as ROX-Filer to find the handler for a file (Ken Hayber and Thomas Leonard). 17-Feb-2006 ~~~~~~~~~~~ New class Setting in rox.session is an option tied to a ROX-Session setting (Stephen Watson). 14-Feb-2006 ~~~~~~~~~~~ Added rox.session module for communicating with ROX-Session. Added method for applets to determine the panel orientation (Stephen Watson). 21-Jan-2006 ~~~~~~~~~~~ Set sys.excepthook to our graphical exception explorer so that untrapped exceptions are reported nicely. 13-Jan-2006 ~~~~~~~~~~~ Save box now selects icon from same icon theme as ROX-Filer (Stephen Watson). 29-Dec-2005 ~~~~~~~~~~~ When saving a file to a FAT filesystem, the chmod would fail. Log a warning instead of aborting (Thomas Leonard; reported by QS Computing). 25-Nov-2005 ~~~~~~~~~~~ Better detection of the MIME-types/MIME-thumb location when installing type handlers (Stephen Watson). 12-Nov-2005 ~~~~~~~~~~~ Added rox.isappdir() function to test the validity of an AppDir (Stephen Watson). EXPERIMENTAL code for installing MIME handlers via 0launch (Stephen Watson). 05-Nov-2005 ~~~~~~~~~~~ Changed the doc string in Menu.py to prefer the new MenuItem based method of defining menus not the old tuple method (Stephen Watson). 22-Oct-2005 ~~~~~~~~~~~ Added Hungarian translation (Andras Mohari). 21-Oct-2005 ~~~~~~~~~~~ Made message in AppRun translatable (Andras Mohari). 02-Sep-2005 ~~~~~~~~~~~ Added launch module, which allows running programs easily using the injector, and made filer.py use 0launch if available (Thomas Leonard; requested by Christopher Arndt). Double-click on a line in the stack-trace display of an error to open the source file in Edit (Thomas Leonard). 30-Aug-2005 ~~~~~~~~~~~ If pygtk is found, but not gtk, give a better error (Thomas Leonard; reported by Albert). 20-Aug-2005 ~~~~~~~~~~~ If 'xterm' isn't available, give a sensible error message when using the su module (Thomas Leonard; reported by Vincent Lefevre). 18-Aug-2005 ~~~~~~~~~~~ Added ROX-Lib.xml file, which makes it easy to register a CVS copy of ROX-Lib with the 0launch, using '0launch --add-feed' (Thomas Leonard). 25-Jul-2005 (Release 2.0.2) ~~~~~~~~~~~ Bugfix: Installing MIME handlers under the XDG base dir system didn't work (Stephen Watson). 17-Jun-2005 (Release 2.0.1) ~~~~~~~~~~~ Send deprecation warnings to stdout, not stderr, so only developers will see them (Thomas Leonard). 10-Jun-2005 ~~~~~~~~~~~ Fixed deprecation warning in processes.py (Thomas Leonard). 01-Jun-2005 ~~~~~~~~~~~ Avoid apparent PyGTK bug related to icon themes, may result in a memory leak but probably won't (Stephen Watson). 19-May-2005 ~~~~~~~~~~~ Clean up of icon theme handling (Stephen Watson). 18-May-2005 ~~~~~~~~~~~ Compatability with PyGTK 2.4 retaining backwards compatability with 2.2 at least (Ken Hayber, Stephen Watson). 12-May-2005 ~~~~~~~~~~~ Updated Chinese translation (Babyfai Cheung). 11-May-2005 ~~~~~~~~~~~ Added Portuguese translation (José Carlos do Nascimento). 07-May-2005 ~~~~~~~~~~~ Don't try to get pygtk through Zero Install. The injector can be used to choose the implementation of pygtk to use, including a version in Zero Install if desired (Thomas Leonard). 06-May-2005 ~~~~~~~~~~~ MIME handler install now uses basedir (Stephen Watson). Tests use gtk.main() instead of the deprecated gtk.mainloop() (Stephen Watson). 05-May-2005 ~~~~~~~~~~~ Some versions of GTK silently remove '-' from sys.argv (GTK bug #303166). Added a work-around (Thomas Leonard). 02-May-2005 ~~~~~~~~~~~ Put "root" back in su command, but detect what the exact string should be, as Solaris needs something here (reported by Stephen Watson). 01-May-2005 ~~~~~~~~~~~ The default SaveArea.confirm_new_path() now shows an error if the target exists as a directory, instead of asking if you want to overwrite it (Thomas Leonard; reported by Jonatan Liljedahl). Remove "root" from the su command, as some systems call user 0 something else (Thomas Leonard; reported by Jonatan Liljedahl). 30-Apr-2005 ~~~~~~~~~~~ When getting an icon for saving, specify the size if PyGTK is recent enough. This prevents SVG icons from appearing in huge sizes (Thomas Leonard; requested by John Pettigrew). Bugfix: Theme index parser failed to cope with comments at the start of the file (Thomas Leonard). 29-Apr-2005 ~~~~~~~~~~~ Compatability fixes for the su module (Stephen Watson). 17-Apr-2005 ~~~~~~~~~~~ Fixed Zero Install version test in findrox.py (Thomas Leonard). 16-Apr-2005 (Release 2.0.0) ~~~~~~~~~~~ Run unit tests in alphabetical order as it fixes a strange interaction between them (Stephen Watson). 10-Apr-2005 ~~~~~~~~~~~ Added unit tests for processes module, based on old tests in Archive (Thomas Leonard). 09-Apr-2005 ~~~~~~~~~~~ Changed MakeDist to allow use of other SourceForge accounts (Stephen Watson). 01-Apr-2005 ~~~~~~~~~~~ Added 'testall' script to run all the unit tests together (Thomas Leonard). 23-Mar-2005 (Release 1.9.18) ~~~~~~~~~~~ German translation (Guido Schimmels). 13-Mar-2005 ~~~~~~~~~~~ Added TODO file to track bugs and changes needed for 2.0.0 release. 10-Mar-2005 ~~~~~~~~~~~ Bugfix: Set default in Options box to OK to avoid triggering a GTK bug (Thomas Leonard, reported by Guido Schimmels). 16-Jan-2005 (Release 1.9.17) ~~~~~~~~~~~ Added OutputBlocker, which works in a similar way to InputBlocker (Thomas Leonard). 15-Jan-2005 ~~~~~~~~~~~ Be consistent about URI escaping. set_uri() is now always passed an unescaped UTF-8 string (Thomas Leonard). 03-Jan-2004 ~~~~~~~~~~~ Added fixedlist and varlist widgets to OptionsBox (Stephen Watson). 31-Dec-2004 ~~~~~~~~~~~ Added MIME type matching by file contents (Stephen Watson). 29-Dec-2004 ~~~~~~~~~~~ If a 'rox' module is in PYTHONPATH, use that without any searching (Thomas Leonard). 23-Dec-2004 ~~~~~~~~~~~ Added Chinese translation (Babyfai Cheung). 11-Dec-2004 ~~~~~~~~~~~ Suppress warning when we use GtkItemFactory under pygtk 2.4 (Stephen Watson). 25-Nov-2004 ~~~~~~~~~~~ Added tasks.InputBlocker, which triggers when an input source becomes readable (Thomas Leonard). 21-Nov-2004 ~~~~~~~~~~~ Bugfix: Use only text nodes when getting the tool tip from the Options.xml file (Stephen Watson). 22-Oct-2004 ~~~~~~~~~~~ Bugfix: Theme subdirectories are separated by ',' not ';' (reported by Denis Prost). 20-Oct-2004 ~~~~~~~~~~~ Bugfix: When a menu has more than one toggle item, only one is updated correctly (Ken Hayber). 07-Oct-2004 ~~~~~~~~~~~ Replace g.mainloop() and g.mainquit() with g.main() and g.main_quit() as recommended since pygtk 2.0.0 to avoid warnings with pygtk 2.4.0 (Stephen Watson). 03-Oct-2004 ~~~~~~~~~~~ Added options.ListOption to support multi-valued option widgets, such as lists (Stephen Watson). 02-Oct-2004 (Release 1.9.16) ~~~~~~~~~~~ Cope better with user cancelling su operation. New interface to replace create_su_proxy (Thomas Leonard). 27-Sep-2004 ~~~~~~~~~~~ The choices module is now deprecated. You can use choices.migrate() to move settings over to the basedir system (Thomas Leonard). Also added basedir.load_first_config(), which works like the old choices.load(). 26-Sep-2004 ~~~~~~~~~~~ Several incompatible changes to the experimental proxy API to make it simpler (Thomas Leonard): - Create_su_proxy now returns the MasterObject directly, not the MasterProxy. - You can call finish on the MasterObject (so the MasterProxy isn't needed). - Slave methods no longer take a 'request' argument. Instead, the return value of the function is returned. - Methods can only return one value. dequeue and dequeue_last have been replaced with a 'result' property. - Methods on MasterObject now return a RequestBlocker, not a Queue. This means you just yield the object itself, not object.blocker. Tasks API is no longer experimental, but proxy API is. 22-Sep-2004 ~~~~~~~~~~~ Added a Help button to the exception dialog, which opens the new Help/Errors file (Thomas Leonard). 08-Sep-2004 ~~~~~~~~~~~ Bugfix: Failed to call the parent constructor to AbortSave correctly. 06-Sep-2004 ~~~~~~~~~~~ Simplified su code and interface. New suchild methods: open, close, read, write, chmod and rename, which work just like their normal Python counterparts (Thomas Leonard). 29-Aug-2004 ~~~~~~~~~~~ Removed code to turn off the separator in the debug dialog. GTK 2.4 doesn't need it, and generates a warning if you use it (Thomas Leonard). 27-Aug-2004 (Release 1.9.15) ~~~~~~~~~~~ Added spawnvpe and waitpid methods to suchild. 08-Aug-2004 ~~~~~~~~~~~ If the unit field for a option is blank, don't try to translate it (reported by Guido Schimmels). 30-Jun-2004 ~~~~~~~~~~~ Added 'su' module for performing operations as root. 11-Jun-2004 ~~~~~~~~~~~ Allow "" as a valid value in a OptionsBox menu (reported by Guido Schimmels). 10-Jun-2004 ~~~~~~~~~~~ Added 'proxy' module. This allows one Python process to invoke methods on another asynchronously. Added rox.UserAbort exception, to be raised when users cancel something manually. 07-Jun-2004 ~~~~~~~~~~~ Fix syntax error I caused when I added a docstring (Stephen Watson). 30-May-2004 ~~~~~~~~~~~ Get update-mime-database command through Zero Install, if possible. 24-May-2004 ~~~~~~~~~~~ mime_handler can now uninstall (Stephen Watson). 04-May-2004 ~~~~~~~~~~~ Translate menu items in options (Guido Schimmels). 26-Apr-2004 ~~~~~~~~~~~ Added widget to options. 25-Apr-2004 ~~~~~~~~~~~ Added 'size-group' attribute to Options.xml elements. This allows grouping elements so that their labels all appear the same width. 20-Apr-2004 ~~~~~~~~~~~ Bugfix: Colour buttons in the Options boxes didn't work with some themes (Jonatan Liljedahl). 17-Apr-2004 (Release 1.9.14) ~~~~~~~~~~~ Added ToggleItem (based on a patch from Ken Hayber). 15-Apr-2004 ~~~~~~~~~~~ Better