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; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 void aoview_voice_open(void)
30 aoview_flite = aoview_flite_start();
33 void aoview_voice_close(void)
41 void aoview_voice_speak(char *format, ...)
47 vfprintf(aoview_flite, format, ap);
54 void aoview_voice_open(void)
58 void aoview_voice_close(void)
62 void aoview_voice_speak(char *format, ...)
68 static GtkCheckMenuItem *voice_enable;
70 #define ALTOS_VOICE_PATH "/apps/aoview/voice"
73 aoview_voice_enable(GtkWidget *widget, gpointer data)
75 gboolean enabled = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget));
77 GConfClient *gconf_client;
81 aoview_voice_speak("enable voice\n");
83 aoview_voice_speak("disable voice\n");
86 gconf_client = gconf_client_get_default();
87 gconf_client_set_bool(gconf_client,
94 aoview_voice_init(GladeXML *xml)
97 GConfClient *gconf_client;
99 voice_enable = GTK_CHECK_MENU_ITEM(glade_xml_get_widget(xml, "voice_enable"));
100 assert(voice_enable);
102 gconf_client = gconf_client_get_default();
109 enabled = gconf_client_get_bool(gconf_client,
115 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(voice_enable), enabled);
119 g_signal_connect(G_OBJECT(voice_enable), "toggled",
120 G_CALLBACK(aoview_voice_enable),