#!/usr/bin/python
# 
# Zeecontrol ((c) 2010 Ruediger Gad) lets you control your N900 
# via a Zeemote bluetooth remote control. Zeecontrol is 
# based on wiicontrol.
#   wiicontrol copyright notice: 
#     wiicontrol: Control your Internet Tablet from your wiimote
#     (c) 2008 Jose Luis Diaz
#
# Zeecontrol is like wiicontrol released under the terms of the
# GNU General Public License:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# ================================================================
# Configurable part (see wiicontrol README)
# Configurable part has been moved to /usr/lib/zeecontrol/KeyMappings.py
#  

import gtk
import sys
sys.path.append("/usr/lib/zeecontrol")
from ZeecontrolGUI import ZeecontrolGUI
import btutil

def main():
  btInitState = btutil.getBTState()
  if not btInitState:
    btutil.setBTState(True)

  gui = ZeecontrolGUI()
  gtk.main()

  if not btInitState:
    btutil.setBTState(False)

if __name__ == "__main__":
  main()

