[tuxdroid-svn] r161 - software/gtdi/trunk
Status: Beta
Brought to you by:
ks156
From: remi <c2m...@c2...> - 2007-03-14 13:06:12
|
Author: remi Date: 2007-03-14 14:05:53 +0100 (Wed, 14 Mar 2007) New Revision: 161 Modified: software/gtdi/trunk/gtdi.py Log: UPD : - Connection to the tuxdaemon and the tuxttsdaemon has been modified Modified: software/gtdi/trunk/gtdi.py =================================================================== --- software/gtdi/trunk/gtdi.py 2007-03-14 13:02:47 UTC (rev 160) +++ software/gtdi/trunk/gtdi.py 2007-03-14 13:05:53 UTC (rev 161) @@ -256,14 +256,18 @@ # test daemon not present and client not connected if not tux.connected: tux.sys.shell_free('gnome-terminal -e"tuxdaemon"') - tux.sys.wait(4) - tux.connect_to_daemon() + for i in range(10): + tux.sys.wait(1) + tux.connect_to_daemon() + if tux.connected: + break + print "TUX daemon not found !" else: tux.sdaemon.kill() def on_tddaemon_bt_clicked(self, widget, *args): global toggled_by_event if toggled_by_event: return - print "Bt clicked by user" + thread.start_new_thread(self.connect_disconnect_tux_daemon,()) #-------------------------------------------------------------------------- @@ -277,14 +281,17 @@ # test daemon not present and client not connected if not tux.tts.connected: tux.sys.shell_free('gnome-terminal -e"tuxttsdaemon"') - tux.sys.wait(4) - tux.tts.connect_to_daemon() + for i in range(10): + tux.sys.wait(1) + tux.tts.connect_to_daemon() + if tux.tts.connected: + break + print "TTS daemon not found !" else: tux.tts.kill_daemon() def on_ttsdaemon_bt_clicked(self, widget, *args): global toggled_by_event if toggled_by_event: return - print "Bt clicked by user" thread.start_new_thread(self.connect_disconnect_tts_daemon,()) #-------------------------------------------------------------------------- |