]> www.fi.muni.cz Git - evince.git/blob - shell/main.c
Initial revision
[evince.git] / shell / main.c
1 /*
2  *  Copyright (C) 2004 Marco Pesenti Gritti
3  *
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, or (at your option)
7  *  any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  *  $Id$
19  */
20
21 #include "config.h"
22
23 #include <glib/gi18n.h>
24 #include <gtk/gtkmain.h>
25 #include <libgnome/gnome-program.h>
26 #include <libgnomeui/gnome-ui-init.h>
27
28 static struct poptOption popt_options[] =
29 {
30         { NULL, 0, 0, NULL, 0, NULL, NULL }
31 };
32
33 int
34 main (int argc, char *argv[])
35 {
36         poptContext context;
37         GValue context_as_value = { 0 };
38         GnomeProgram *program;
39
40 #ifdef ENABLE_NLS
41         /* Initialize the i18n stuff */
42         bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR);
43         bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
44         textdomain(GETTEXT_PACKAGE);
45 #endif
46
47         program = gnome_program_init (PACKAGE, VERSION,
48                                       LIBGNOMEUI_MODULE, argc, argv,
49                                       GNOME_PARAM_POPT_TABLE, popt_options,
50                                       GNOME_PARAM_HUMAN_READABLE_NAME, _("Evince"),
51                                       GNOME_PARAM_APP_DATADIR, DATADIR,
52                                       NULL);
53
54         g_set_application_name (_("Epiphany Web Browser"));
55
56         g_object_get_property (G_OBJECT (program),
57                                GNOME_PARAM_POPT_CONTEXT,
58                                g_value_init (&context_as_value, G_TYPE_POINTER));
59         context = g_value_get_pointer (&context_as_value);
60
61         gtk_main ();
62
63         poptFreeContext (context);
64
65         return 0;
66 }