1 /* main.c
2 *
3 * This file is part of GNOME Dictionary
4 *
5 * Copyright (C) 2005 Emmanuele Bassi
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "config.h"
22
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <libintl.h>
26
27 #include "gdict-app.h"
28 #include "gdict-common.h"
29
30 int
main(int argc,char * argv[])31 main (int argc, char *argv[])
32 {
33 bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
34 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
35 textdomain (GETTEXT_PACKAGE);
36
37 g_set_prgname (APPLICATION_ID);
38
39 if (!gdict_create_config_dir ())
40 exit (1);
41
42 if (!gdict_create_data_dir ())
43 exit (1);
44
45 gdict_init (&argc, &argv);
46
47 return g_application_run (gdict_app_new (), argc, argv);
48 }
49