~ubuntu-branches/ubuntu/utopic/gramps/utopic

« back to all changes in this revision

Viewing changes to gramps/plugins/view/geography.gpr.py

  • Committer: Package Import Robot
  • Author(s): Ross Gammon
  • Date: 2014-06-17 17:21:59 UTC
  • mto: (39.1.10 sid)
  • mto: This revision was merged to the branch mainline in revision 49.
  • Revision ID: package-import@ubuntu.com-20140617172159-p726lth3zkhpvkvw
Tags: upstream-4.0.4+dfsg
ImportĀ upstreamĀ versionĀ 4.0.4+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 
60
60
if not OSMGPSMAP:
61
61
    from gramps.gen.config import config
62
 
    from gramps.gui.dialog import MessageHideDialog
63
62
    if not config.get('interface.ignore-osmgpsmap'):
64
 
        title = _("OsmGpsMap module not loaded.")
65
 
        message = _("Geography functionality will not be available.\n"
66
 
                   "To build it for Gramps see "
67
 
                   "http://www.gramps-project.org/wiki/index.php?"
68
 
                   "title=GEPS_029:_GTK3-GObject_introspection_Conversion"
69
 
                   "#OsmGpsMap_for_Geography")
70
 
        MessageHideDialog(title, message, 'interface.ignore-osmgpsmap')
 
63
        from gramps.gen.constfunc import has_display
 
64
        if has_display():
 
65
            from gramps.gui.dialog import MessageHideDialog
 
66
            title = _("OsmGpsMap module not loaded.")
 
67
            message = _("Geography functionality will not be available.\n"
 
68
                       "To build it for Gramps see "
 
69
                       "http://www.gramps-project.org/wiki/index.php?"
 
70
                       "title=GEPS_029:_GTK3-GObject_introspection_Conversion"
 
71
                       "#OsmGpsMap_for_Geography")
 
72
            MessageHideDialog(title, message, 'interface.ignore-osmgpsmap')
71
73
else:
72
74
    # Load the view only if osmgpsmap library is present.
73
75
    register(VIEW,