[gnome-power-manager] trivial: Remove an unused function



commit 57dedb8d38a7723550a3107d03743b2aa6507f75
Author: Richard Hughes <richard hughsie com>
Date:   Mon Mar 14 09:38:31 2011 +0000

    trivial: Remove an unused function

 src/gpm-manager.c |   54 -----------------------------------------------------
 1 files changed, 0 insertions(+), 54 deletions(-)
---
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index 9dbfda8..b9c6ac3 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -693,60 +693,6 @@ gpm_manager_action_hibernate (GpmManager *manager, const gchar *reason)
 }
 
 /**
- * gpm_manager_logout:
- **/
-static gboolean
-gpm_manager_logout (GpmManager *manager)
-{
-	gboolean ret = FALSE;
-	GVariant *retval = NULL;
-	GError *error = NULL;
-	GDBusProxy *proxy = NULL;
-	GDBusConnection *connection;
-
-	/* connect to gnome-session */
-	connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
-	if (connection == NULL) {
-		g_warning ("Failed to connect to the session: %s", error->message);
-		g_error_free (error);
-		goto out;
-	}
-	proxy = g_dbus_proxy_new_sync (connection,
-			G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
-			G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
-			NULL,
-			"org.gnome.SessionManager",
-			"/org/gnome/SessionManager",
-			"org.gnome.SessionManager",
-			NULL, &error);
-	if (proxy == NULL) {
-		g_warning ("Failed to shutdown session: %s", error->message);
-		g_error_free (error);
-		goto out;
-	}
-
-	/* ask to shut it down */
-	retval = g_dbus_proxy_call_sync (proxy,
-					 "Shutdown",
-					 NULL, G_DBUS_CALL_FLAGS_NONE,
-					 -1, NULL, &error);
-	if (retval == NULL) {
-		g_debug ("Failed to shutdown session: %s", error->message);
-		g_error_free (error);
-		goto out;
-	}
-
-	/* success */
-	ret = TRUE;
-out:
-	if (retval != NULL)
-		g_variant_unref (retval);
-	if (proxy != NULL)
-		g_object_unref (proxy);
-	return ret;
-}
-
-/**
  * gpm_manager_perform_policy:
  * @manager: This class instance
  * @policy: The policy that we should do, e.g. "suspend"



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