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:
Benny Malengier 2008-01-17 15:14:25 +00:00
parent 5856e4f10e
commit ea262ce318
2 changed files with 13 additions and 2 deletions

View File

@ -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> 2008-01-17 Raphael Ackermann <raphael.ackermann@gmail.com>
* src/ArgHandler.py: 0001588: -a summary does nothing * src/ArgHandler.py: 0001588: -a summary does nothing

View File

@ -49,6 +49,12 @@ import gtk
import gtk.glade import gtk.glade
import Errors 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: try:
import gnome import gnome
except ImportError: except ImportError:
@ -57,9 +63,11 @@ except ImportError:
"for GNOME are not installed")) "for GNOME are not installed"))
try: try:
from gnomevfs import URI, create, OPEN_WRITE, make_directory, FileExistsError from gnomevfs import URI, create, OPEN_WRITE, make_directory, \
FileExistsError
except: except:
from gnome.vfs import URI, create, OPEN_WRITE, make_directory, FileExistsError from gnome.vfs import URI, create, OPEN_WRITE, make_directory, \
FileExistsError
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #