diff --git a/ChangeLog b/ChangeLog index 300202e43..3fb873eff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2008-01-17 Benny Malengier + * src/plugins/WriteCD.py: check if gnome is the desktop, #1599 + 2008-01-17 Raphael Ackermann * src/ArgHandler.py: 0001588: -a summary does nothing diff --git a/src/plugins/WriteCD.py b/src/plugins/WriteCD.py index 036f14c0d..19286ae9b 100644 --- a/src/plugins/WriteCD.py +++ b/src/plugins/WriteCD.py @@ -49,6 +49,12 @@ import gtk import gtk.glade import Errors +#This is a GNOME only plugin +_gnome_session = os.getenv('GNOME_DESKTOP_SESSION_ID') +if not _gnome_session: + raise Errors.UnavailableError( + _("WriteCD is a GNOME plugin and you are not running GNOME")) + try: import gnome except ImportError: @@ -57,9 +63,11 @@ except ImportError: "for GNOME are not installed")) try: - from gnomevfs import URI, create, OPEN_WRITE, make_directory, FileExistsError + from gnomevfs import URI, create, OPEN_WRITE, make_directory, \ + FileExistsError except: - from gnome.vfs import URI, create, OPEN_WRITE, make_directory, FileExistsError + from gnome.vfs import URI, create, OPEN_WRITE, make_directory, \ + FileExistsError #------------------------------------------------------------------------- #