1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2001-2007 Bastien Nocera <hadess@hadess.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* The Totem project hereby grant permission for non-gpl compatible GStreamer
* plugins to be used and distributed together with GStreamer and Totem. This
* permission are above and beyond the permissions granted by the GPL license
* Totem is covered by.
*
* Monday 7th February 2005: Christian Schaller: Add exception clause.
* See license_change file for details.
*
*/
#include "config.h"
#include <glib.h>
#include <glib-object.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <locale.h>
#include <string.h>
#ifdef GDK_WINDOWING_X11
/* X11 headers */
#include <X11/Xlib.h>
#endif
#include "totem.h"
#include "totem-private.h"
#include "totem-interface.h"
#include "totem-options.h"
#include "totem-menu.h"
#include "totem-uri.h"
#include "totem-preferences.h"
#include "totem-session.h"
int
main (int argc, char **argv)
{
Totem *totem;
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
#ifdef GDK_WINDOWING_X11
if (XInitThreads () == 0)
{
gtk_init (&argc, &argv);
g_set_application_name (_("Videos"));
totem_object_show_error_and_exit (_("Could not initialize the thread-safe libraries."), _("Verify your system installation. Totem will now exit."), NULL);
}
#endif
g_set_prgname ("totem");
g_set_application_name (_("Videos"));
gtk_window_set_default_icon_name (APPLICATION_ID);
g_setenv("PULSE_PROP_media.role", "video", TRUE);
g_setenv("PULSE_PROP_application.icon_name", APPLICATION_ID, TRUE);
/* Build the main Totem object */
totem = g_object_new (TOTEM_TYPE_OBJECT,
"application-id", APPLICATION_ID,
"flags", G_APPLICATION_HANDLES_OPEN,
NULL);
g_application_run (G_APPLICATION (totem), argc, argv);
return 0;
}
|