Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1489729
 поиск   регистрация   авторизация 
 
Группа :: Система/Интернационализация
Пакет: mova

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: mova-4.0-alt-festival.patch


--- usr/local/bin/movaMTK.orig	Sun Apr  1 20:18:40 2001
+++ usr/local/bin/movaMTK	Sun Apr  1 20:23:27 2001
@@ -164,6 +164,12 @@
 .button_upper.save configure -text "Rewrite \"$DIARY\""
 .button_upper.add configure -text "Add to \"$DIARY\""}}
 
+proc Say_word {} {
+global word
+set fd [open "|/usr/bin/festival" "a"]
+puts $fd "(SayText \"$word\")"
+close $fd
+}
 
 GetOptions
 switch $argc 0 - 1 - 2 {
@@ -280,7 +286,15 @@
 foreach dia $Diaries {$r add radiobutton -indicator 0 -label "$dia" -variable DIARY -value $dia -command {PutDiary}}
 
 pack .button_upper -side top -fill x
-pack .button_upper.help .button_upper.new .button_upper.add .button_upper.save .button_upper.read -side left -expand yes -fill both
+
+if {[catch {set fd [open "|/usr/bin/festival --version >/dev/null" "w"]} error] == 0} {
+  button .button_upper.say -relief  flat -background #22fafa -text "Say word" -command { Say_word }
+  pack .button_upper.help .button_upper.say .button_upper.new .button_upper.add .button_upper.save .button_upper.read -side left -expand yes -fill both
+  close $fd
+} else {
+  pack .button_upper.help .button_upper.new .button_upper.add .button_upper.save .button_upper.read -side left -expand yes -fill both
+}
+
 pack .scroll.top -side top -fill y -expand no
 pack .scroll.scroll -side top -fill both -expand yes
 pack .scroll.bottom -side top -fill y -expand no
 
design & coding: Vladimir Lettiev aka crux © 2004-2005