[gnome-screensaver] Don't check if screensaver service is running



commit 7bd27979d3e364efcbd6392edea9d233c1f19cad
Author: William Jon McCann <jmccann redhat com>
Date:   Mon Jun 21 16:57:48 2010 -0400

    Don't check if screensaver service is running
    
    Now that the screensaver is an activated service it doesn't
    make sense to check if it is running before use.
    https://bugzilla.gnome.org/show_bug.cgi?id=609029

 src/gnome-screensaver-command.c |   21 ---------------------
 1 files changed, 0 insertions(+), 21 deletions(-)
---
diff --git a/src/gnome-screensaver-command.c b/src/gnome-screensaver-command.c
index c10ddf8..474858f 100644
--- a/src/gnome-screensaver-command.c
+++ b/src/gnome-screensaver-command.c
@@ -87,22 +87,6 @@ static GOptionEntry entries [] = {
 
 static GMainLoop *loop = NULL;
 
-static gboolean
-screensaver_is_running (DBusConnection *connection)
-{
-        DBusError               error;
-        gboolean                exists;
-
-        g_return_val_if_fail (connection != NULL, FALSE);
-
-        dbus_error_init (&error);
-        exists = dbus_bus_name_has_owner (connection, GS_SERVICE, &error);
-        if (dbus_error_is_set (&error))
-                dbus_error_free (&error);
-
-        return exists;
-}
-
 static DBusMessage *
 screensaver_send_message_inhibit (DBusConnection *connection,
                                   const char     *application,
@@ -468,11 +452,6 @@ main (int    argc,
 
         dbus_connection_setup_with_g_main (connection, NULL);
 
-        if (! screensaver_is_running (connection)) {
-                g_message ("Screensaver is not running!");
-                exit (1);
-        }
-
         g_idle_add ((GSourceFunc)do_command, connection);
 
         loop = g_main_loop_new (NULL, FALSE);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]