From c23723ac8b282f73ec0ded2f3a93f789797e46ef Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 25 Nov 2003 17:45:34 +0000 Subject: [PATCH] * 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 --- FAQ | 13 ++++--------- src/PeopleStore.py | 1 + src/RelImage.py | 2 +- src/Utils.py | 7 +++++++ src/gramps.py | 2 ++ 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/FAQ b/FAQ index 7b9f805c7..1e1500c81 100644 --- a/FAQ +++ b/FAQ @@ -188,12 +188,7 @@ We have found that on a typical system, GRAMPS tends to bog down after around 15,000 users. Again, this is dependant on how much memory you have. -17. How fast is GRAMPS? - -No idea. - - -18. My database is really big. +17. My database is really big. Is there a way around loading all the data into memory? Currently, there is no way around it. However, this is our biggest priority @@ -202,7 +197,7 @@ in the next stable release (1.2) which will dramatically improve performance in both speed and memory usage. -19. Can I create custom reports/filters/whatever? +18. Can I create custom reports/filters/whatever? Yes. There are many levels of customization. One is creating or modifying the templates used for the reports. This gives you some control over @@ -216,7 +211,7 @@ reports, research tools, import/export filters, etc. This assumes some knowledge of programming in Python. -20. Why is GRAMPS running so slowly? +19. Why is GRAMPS running so slowly? If GRAMPS seems too slow to you, it is most likely that you have a large database. Currently, GRAMPS loads all the database into memory, therefore @@ -230,7 +225,7 @@ with the implementation of the real database backend, please don't hesitate to email us at gramps-devel@lists.sourceforge.net -21. Why are non-latin characters displayed as garbage in PDF/PS reports? +20. Why are non-latin characters displayed as garbage in PDF/PS reports? This is a known problem -- PS (and PDF) have builtin fonts which pretty much reflect the latin-1 charset. Any font in principle could be used with PS/PDF diff --git a/src/PeopleStore.py b/src/PeopleStore.py index e75e2130f..e3dad5d85 100644 --- a/src/PeopleStore.py +++ b/src/PeopleStore.py @@ -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 diff --git a/src/RelImage.py b/src/RelImage.py index c9a362815..16d62471d 100644 --- a/src/RelImage.py +++ b/src/RelImage.py @@ -204,5 +204,5 @@ def is_pil(): # #------------------------------------------------------------------------- def is_cnv(): - return not os.system('which convert>/dev/null') + return Utils.search_for('convert') diff --git a/src/Utils.py b/src/Utils.py index 1a201032a..ba5ec7be0 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -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 #------------------------------------------------------------------------- # diff --git a/src/gramps.py b/src/gramps.py index 416a1f73a..cac697752 100755 --- a/src/gramps.py +++ b/src/gramps.py @@ -56,6 +56,8 @@ else: try: locale.setlocale(locale.LC_ALL,'') +except locale.Error: + pass except ValueError: pass