1
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8; tab-width: 8 -*-
3
* Copyright (C) 2004-2005 William Jon McCann <mccann@jhu.edu>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License as
7
* published by the Free Software Foundation; either version 2 of the
8
* License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20
* Authors: William Jon McCann <mccann@jhu.edu>
28
#include <sys/types.h>
31
#include <glib/gi18n.h>
34
#include "gnome-screensaver.h"
35
#include "gs-monitor.h"
38
gnome_screensaver_quit (void)
49
static gboolean show_version = FALSE;
50
static GOptionEntry entries [] = {
51
{ "version", 0, 0, G_OPTION_ARG_NONE, &show_version,
52
N_("Version of this application"), NULL },
57
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
58
# ifdef HAVE_BIND_TEXTDOMAIN_CODESET
59
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
61
textdomain (GETTEXT_PACKAGE);
64
if (! gtk_init_with_args (&argc, &argv, NULL, entries, NULL, &error)) {
66
g_warning ("%s", error->message);
69
g_warning ("Unable to initialize GTK+");
75
g_print ("%s %s\n", argv [0], VERSION);
79
monitor = gs_monitor_new ();
85
if (! gs_monitor_start (monitor, &error)) {
87
g_warning ("%s", error->message);
90
g_warning ("Unable to start screensaver");
97
g_object_unref (monitor);