Fixed About dialog to show proper BSDDB version
This commit is contained in:
parent
b2ed5d1cbb
commit
e4d05f301a
@ -29,12 +29,6 @@ import os
|
||||
import sys
|
||||
import io
|
||||
|
||||
try:
|
||||
import bsddb3 as bsddb ## ok, in try/except
|
||||
BSDDB_STR = ellipses(str(bsddb.__version__) + " " + str(bsddb.db.version()))
|
||||
except:
|
||||
BSDDB_STR = 'not found'
|
||||
|
||||
##import logging
|
||||
##_LOG = logging.getLogger(".GrampsAboutDialog")
|
||||
|
||||
@ -65,6 +59,20 @@ _ = glocale.translation.gettext
|
||||
from gramps.gen.constfunc import get_env_var
|
||||
from .display import display_url
|
||||
|
||||
def ellipses(text):
|
||||
"""
|
||||
Ellipsize text on length 40
|
||||
"""
|
||||
if len(text) > 40:
|
||||
return text[:40] + "..."
|
||||
return text
|
||||
|
||||
try:
|
||||
import bsddb3 as bsddb ## ok, in try/except
|
||||
BSDDB_STR = ellipses(str(bsddb.__version__) + " " + str(bsddb.db.version()))
|
||||
except:
|
||||
BSDDB_STR = 'not found'
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GrampsAboutDialog
|
||||
@ -135,14 +143,6 @@ class GrampsAboutDialog(Gtk.AboutDialog):
|
||||
ellipses(operatingsystem),
|
||||
ellipses(distribution)))
|
||||
|
||||
def ellipses(text):
|
||||
"""
|
||||
Ellipsize text on length 40
|
||||
"""
|
||||
if len(text) > 40:
|
||||
return text[:40] + "..."
|
||||
return text
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# AuthorParser
|
||||
|
Loading…
Reference in New Issue
Block a user