2008-01-17 Benny Malengier <benny.malengier@gramps-project.org>
* src/plugins/WriteCD.py: check if gnome is the desktop, #1599 svn: r9868
This commit is contained in:
		| @@ -1,3 +1,6 @@ | ||||
| 2008-01-17 Benny Malengier <benny.malengier@gramps-project.org> | ||||
| 	* src/plugins/WriteCD.py: check if gnome is the desktop, #1599 | ||||
|  | ||||
| 2008-01-17  Raphael Ackermann <raphael.ackermann@gmail.com> | ||||
|     * src/ArgHandler.py: 0001588: -a summary does nothing | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
|  | ||||
| #------------------------------------------------------------------------- | ||||
| # | ||||
|   | ||||
		Reference in New Issue
	
	Block a user