#
# Caribou - text entry and UI navigation application
#
# Copyright (C) 2009 Adaptive Technology Resource Centre
#  * Contributor: Ben Konrath <ben@bagu.org>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
# for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

import os

# TODO: will need to be changed when build / install logic is sorted out
files = os.listdir('caribou/keyboards')

kbds = []
for f in files:
    if f != "keysyms.py" and f != "__init__.py" and f.endswith('.py'):
        module = f.rsplit('.', 1)[0]
        # TODO: verify keyboard before adding it to the list
        kbds.append(module)
del os, files, f, module
@@ -898,119 +898,52 @@
 os%0A%0A
-# TODO: will need to be changed when build / install logic is sorted out%0Afiles = os.listdir('caribou/keyboards'
+files = os.listdir(os.path.dirname(__file__)
 )%0A%0Ak
@@ -1184,12 +1184,13 @@
 s, f, module
+%0A

set correct path when discovering keyboards