From b7827030f5631f1a9c0ede3521f5bf9a17715696 Mon Sep 17 00:00:00 2001 From: Raphael Ackermann Date: Sat, 8 Aug 2009 16:21:57 +0000 Subject: [PATCH] 0002978: ExportCd plug-in should not load if burn:// scheme is unsupported applied patch by Brad Crittenden. Patch goes in the right direction but still not far enough. On my ubuntu gnome system (9.04) it doesn't load the plugin, but I can burn a cd in nautilus using the burn:/// scheme. svn: r12922 --- src/plugins/export/ExportCd.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugins/export/ExportCd.py b/src/plugins/export/ExportCd.py index 0ea50b4e1..33a6fe4c9 100644 --- a/src/plugins/export/ExportCd.py +++ b/src/plugins/export/ExportCd.py @@ -3,6 +3,7 @@ # # Copyright (C) 2000-2008 Donald N. Allingham # Copyright (C) 2008 Brian G. Matherly +# Contributions 2009 by Brad Crittenden # # 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 @@ -68,6 +69,14 @@ try: except: from gnome.vfs import (URI, create, OPEN_WRITE, make_directory, FileExistsError) + +#This plugin only works if the 'burn://' scheme is supported. +try: + uri = URI('burn:///test.txt') +except TypeError: + raise Errors.UnavailableError( + _("Cannot be loaded because the 'burn://' scheme " + "is not supported.")) #------------------------------------------------------------------------- #