* src/RelImage.py: replace system call with Utils.search_for
* src/Utils.py: added search_for to look for an executable in the current path * FAQ: removed question 18 (how fast is GRAMPS) * src/PeopleStore.py: set sort data for top level nodes. Allows the first and last nodes to be sorted properly. svn: r2374
This commit is contained in:
@@ -269,6 +269,7 @@ class PeopleStore:
|
||||
self.tree_open[name] = 0
|
||||
self.tree_list[name] = []
|
||||
self.model.set_value(top,0,name)
|
||||
self.model.set_value(top,5,name.upper())
|
||||
self.model.set_value(top,_BCOL,pango.WEIGHT_BOLD)
|
||||
self.tree_roots[name] = top
|
||||
|
||||
|
@@ -204,5 +204,5 @@ def is_pil():
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def is_cnv():
|
||||
return not os.system('which convert>/dev/null')
|
||||
return Utils.search_for('convert')
|
||||
|
||||
|
@@ -586,6 +586,13 @@ def gformat(val):
|
||||
decimal_point = locale.localeconv()['decimal_point']
|
||||
return_val = "%.3f" % val
|
||||
return return_val.replace(decimal_point,'.')
|
||||
|
||||
def search_for(name):
|
||||
for i in os.environ['PATH'].split(':'):
|
||||
fname = os.path.join(i,name)
|
||||
if os.access(fname,os.X_OK):
|
||||
return 1
|
||||
return 0
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@@ -56,6 +56,8 @@ else:
|
||||
|
||||
try:
|
||||
locale.setlocale(locale.LC_ALL,'')
|
||||
except locale.Error:
|
||||
pass
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user