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)
28 aoview_flite = aoview_flite_start();
31 void aoview_voice_close(void)
39 void aoview_voice_speak(char *format, ...)
45 vfprintf(aoview_flite, format, ap);
52 void aoview_voice_open(void)
56 void aoview_voice_close(void)
60 void aoview_voice_speak(char *format, ...)
66 static GtkCheckMenuItem *voice_enable;
68 #define ALTOS_VOICE_PATH "/apps/aoview/voice"
71 aoview_voice_enable(GtkWidget *widget, gpointer data)
73 gboolean enabled = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget));
75 GConfClient *gconf_client;
79 aoview_voice_speak("enable voice\n");
81 aoview_voice_speak("disable voice\n");
84 gconf_client = gconf_client_get_default();
85 gconf_client_set_bool(gconf_client,
92 aoview_voice_init(GladeXML *xml)
95 GConfClient *gconf_client;
97 voice_enable = GTK_CHECK_MENU_ITEM(glade_xml_get_widget(xml, "voice_enable"));
100 gconf_client = gconf_client_get_default();
107 enabled = gconf_client_get_bool(gconf_client,
113 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(voice_enable), enabled);
117 g_signal_connect(G_OBJECT(voice_enable), "toggled",
118 G_CALLBACK(aoview_voice_enable),