Added is_quartz() and has_display() functions to tell if running with quartz window manager, and if have a display, respectively. See #4467 for more details

svn: r16307
This commit is contained in:
Doug Blank
2010-12-23 16:51:04 +00:00
parent f009c7a1f5
commit 3833ee63a6
8 changed files with 126 additions and 13 deletions

View File

@@ -42,12 +42,6 @@ import sys
#-------------------------------------------------------------------------
import gtk
try:
import cairo
CAIRO_AVAILABLE = True
except ImportError:
CAIRO_AVAILABLE = False
#-------------------------------------------------------------------------
#
# Gramps Modules
@@ -68,6 +62,7 @@ import cPickle as pickle
import config
import Bookmarks
import const
import constfunc
from QuestionDialog import RunDatabaseRepair, ErrorDialog
#-------------------------------------------------------------------------
@@ -75,6 +70,15 @@ from QuestionDialog import RunDatabaseRepair, ErrorDialog
# Constants
#
#-------------------------------------------------------------------------
if constfunc.is_quartz():
CAIRO_AVAILABLE = False
else:
try:
import cairo
CAIRO_AVAILABLE = True
except ImportError:
CAIRO_AVAILABLE = False
_PERSON = "p"
_BORN = _('short for born|b.')
_DIED = _('short for died|d.')