4646: reports cannot be run from the command line in a non-GUI environment -- partial fix

svn: r18556
This commit is contained in:
Paul Franklin 2011-12-08 16:40:27 +00:00
parent 129198e0e5
commit 99d804ea45
2 changed files with 13 additions and 8 deletions

View File

@ -48,8 +48,11 @@ def reload_custom_filters():
if not CustomFilters:
reload_custom_filters()
from _FilterComboBox import FilterComboBox
from _FilterMenu import build_filter_model
from _FilterStore import FilterStore
from _SearchBar import SearchBar
try: # the Gramps-Connect server has no DISPLAY
from _FilterComboBox import FilterComboBox
from _FilterMenu import build_filter_model
from _FilterStore import FilterStore
from _SearchBar import SearchBar
except:
pass
from _SearchFilter import SearchFilter, ExactSearchFilter

View File

@ -60,11 +60,13 @@ log = logging.getLogger(".GtkPrint")
# GTK modules
#
#-------------------------------------------------------------------------
import gtk
import cairo
if gtk.pygtk_version < (2, 10, 0):
raise Errors.UnavailableError(_("PyGtk 2.10 or later is required"))
try: # the Gramps-Connect server has no DISPLAY
import gtk
if gtk.pygtk_version < (2, 10, 0):
raise Errors.UnavailableError(_("PyGtk 2.10 or later is required"))
except:
pass
#------------------------------------------------------------------------
#