2 * Copyright © 2009 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 void aoview_voice_open(void)
31 aoview_flite = aoview_flite_start();
34 void aoview_voice_close(void)
42 void aoview_voice_speak(char *format, ...)
48 vfprintf(aoview_flite, format, ap);
55 void aoview_voice_open(void)
59 void aoview_voice_close(void)
63 void aoview_voice_speak(char *format, ...)
69 static GtkCheckMenuItem *voice_enable;
71 #define ALTOS_VOICE_PATH "/apps/aoview/voice"
74 aoview_voice_enable(GtkWidget *widget, gpointer data)
76 gboolean enabled = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget));
78 GConfClient *gconf_client;
82 aoview_voice_speak("enable voice\n");
84 aoview_voice_speak("disable voice\n");
87 gconf_client = gconf_client_get_default();
88 gconf_client_set_bool(gconf_client,
95 aoview_voice_init(GladeXML *xml)
98 GConfClient *gconf_client;
100 voice_enable = GTK_CHECK_MENU_ITEM(glade_xml_get_widget(xml, "voice_enable"));
101 assert(voice_enable);
103 gconf_client = gconf_client_get_default();
110 enabled = gconf_client_get_bool(gconf_client,
116 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(voice_enable), enabled);
120 g_signal_connect(G_OBJECT(voice_enable), "toggled",
121 G_CALLBACK(aoview_voice_enable),