Update single word
[sgc.git] / singleword / main.c
blob108527f6f6dabf91b266fcbd636b3e6e162a933e
1 #include "singleword.h"
2 #include "praat.h"
3 #include "config.h"
4 #include "signals.h"
6 GladeXML *xml = NULL;
8 int main(int argc, char **argv)
10 void * needed;
11 needed = (void *)paint;
12 needed = (void *)buttonCommit_clicked_cb;
13 needed = (void *)buttonPlay_clicked_cb;
14 needed = (void *)entryPinyin_key_release_event_cb;
15 needed = (void *)buttonRecord_clicked_cb;
16 needed = (void *)buttonHum_clicked_cb;
18 gtk_init(&argc, &argv);
20 bindtextdomain(g_get_application_name(), LOCALEDIR);
22 /* textdomain(g_get_application_name());
24 * This makes the application use a standard domain,
25 * instead of a changing program name. For example
26 * on win32 it will be sgc.exe
29 textdomain("singleword");
31 xml = glade_xml_new(GLADESOURCE, NULL, g_get_application_name());
33 if (xml == NULL) {
34 g_error(_("Could not open the GUI!"));
35 return -1;
36 } else {
37 configOpen();
39 removeRecordings();
41 if (!g_thread_supported()) {
42 g_thread_init(NULL);
45 /* connect signal handlers */
46 glade_xml_signal_autoconnect(xml);
48 g_thread_create((GThreadFunc)sound_init, NULL, FALSE, NULL);
50 gtk_main();
52 removeRecordings();
53 return 0;