[dots] Detect tables directory with pkg-config. Thanks Rui Batista\!
- From: Eitan Isaacson <eitani src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [dots] Detect tables directory with pkg-config. Thanks Rui Batista\!
- Date: Mon, 10 Aug 2009 17:58:09 +0000 (UTC)
commit 0439d72e878ebffaba20cd887332e332d2c2ccff
Author: Eitan Isaacson <eitan ascender com>
Date: Mon Aug 10 10:57:55 2009 -0700
Detect tables directory with pkg-config. Thanks Rui Batista\!
configure.ac | 7 +++++++
dots/host_settings.py.in | 2 ++
dots/import_assistant.py | 4 ++--
3 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ebf69bd..71b4e58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,13 @@ GNOME_DOC_INIT
dnl == check for python ==
AM_PATH_PYTHON(2.4)
+dnl == Check for liblouis and liblouisxml
+PKG_CHECK_MODULES(LIBLOUIS, [liblouis >= 1.6.2 liblouisxml >= 1.9.1])
+
+dnl Find tables dir
+TABLES_DIR=`pkg-config --variable=tablesdir liblouis`
+AC_SUBST(TABLES_DIR)
+
dnl == check for xml2brl ==
AC_PATH_PROG(XML2BRL, xml2brl)
test -z "$XML2BRL" && AC_MSG_ERROR([
diff --git a/dots/host_settings.py.in b/dots/host_settings.py.in
index 8bfbc29..9c081f8 100644
--- a/dots/host_settings.py.in
+++ b/dots/host_settings.py.in
@@ -23,5 +23,7 @@ antiword = "@ANTIWORD@"
xml2brl = "@XML2BRL@"
+tablesdir = "@TABLES_DIR@"
+
gtkbuilder_dir = os.path.join(sys.prefix, 'share', 'dots')
diff --git a/dots/import_assistant.py b/dots/import_assistant.py
index 13ecda7..c7b0fa9 100644
--- a/dots/import_assistant.py
+++ b/dots/import_assistant.py
@@ -22,7 +22,7 @@ import os, tempfile
from config_builder import ConfigBuilder
import host_settings
-TABLES_DIR = '/home/eitan/svn/liblouis/tables'
+TABLES_DIR = host_settings.tablesdir
class ImportAssistant(object):
def __init__(self, main_app=None, xml_file=None):
@@ -177,7 +177,7 @@ class ImportAssistant(object):
def _sepatatorFunc(model, itr):
return model[itr][0] == None
combo = self.main_xml.get_object('trans_table_sel_combo')
- table_list = filter(lambda x: x.endswith('ctb'),
+ table_list = filter(lambda x: x.endswith('ctb') or x.endswith('utb'),
os.listdir(TABLES_DIR))
table_list.sort()
model = gtk.ListStore(str, str)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]