gnome-power-manager r3197 - in trunk: . src



Author: rhughes
Date: Wed Jan 28 09:05:40 2009
New Revision: 3197
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=3197&view=rev

Log:
2009-01-28  Richard Hughes  <richard hughsie com>

* src/gpm-inhibit.c: (gpm_inhibit_error_quark),
(gpm_inhibit_inhibit), (gpm_inhibit_un_inhibit),
(gpm_inhibit_has_inhibit):
* src/gpm-inhibit.h:
* src/org.freedesktop.PowerManagement.Inhibit.xml:
Remove org.freedesktop.PowerManagement.Inhibit.GetRequests() -
it's never worked so nothing must be using it. gnome-session
provides a better alternative.


Modified:
   trunk/ChangeLog
   trunk/src/gpm-inhibit.c
   trunk/src/gpm-inhibit.h
   trunk/src/org.freedesktop.PowerManagement.Inhibit.xml

Modified: trunk/src/gpm-inhibit.c
==============================================================================
--- trunk/src/gpm-inhibit.c	(original)
+++ trunk/src/gpm-inhibit.c	Wed Jan 28 09:05:40 2009
@@ -48,7 +48,7 @@
 {
 	GSList			*list;
 	DBusGProxy		*proxy;
-	GConfClient			*conf;
+	GConfClient		*conf;
 	gboolean		 ignore_inhibits;
 };
 
@@ -69,9 +69,8 @@
 gpm_inhibit_error_quark (void)
 {
 	static GQuark quark = 0;
-	if (!quark) {
+	if (!quark)
 		quark = g_quark_from_static_string ("gpm_inhibit_error");
-	}
 	return quark;
 }
 
@@ -109,7 +108,7 @@
 gpm_inhibit_find_cookie (GpmInhibit *inhibit, guint32 cookie)
 {
 	GpmInhibitData *data;
-	GSList	       *ret;
+	GSList *ret;
 	/* search list */
 	ret = g_slist_find_custom (inhibit->priv->list, &cookie,
 				   gpm_inhibit_cookie_compare_func);
@@ -130,7 +129,7 @@
 static guint32
 gpm_inhibit_generate_cookie (GpmInhibit *inhibit)
 {
-	guint32		cookie;
+	guint32 cookie;
 
 	/* Iterate until we have a unique cookie */
 	do {
@@ -142,7 +141,7 @@
 /**
  * gpm_inhibit_inhibit:
  * @connection: Connection name, e.g. ":0.13"
- * @application:	Application name, e.g. "Nautilus"
+ * @application: Application name, e.g. "Nautilus"
  * @reason: Reason for inhibiting, e.g. "Copying files"
  *
  * Allocates a random cookie used to identify the connection, as multiple
@@ -153,11 +152,8 @@
  * Return value: a new random cookie.
  **/
 void
-gpm_inhibit_inhibit (GpmInhibit  *inhibit,
-		          const gchar *application,
-		          const gchar *reason,
-		          DBusGMethodInvocation *context,
-		          GError     **error)
+gpm_inhibit_inhibit (GpmInhibit  *inhibit, const gchar *application, const gchar *reason,
+		     DBusGMethodInvocation *context, GError **error)
 {
 	const gchar *connection;
 	GpmInhibitData *data;
@@ -204,15 +200,13 @@
 
 /**
  * gpm_inhibit_un_inhibit:
- * @application:	Application name
+ * @application: Application name
  * @cookie: The cookie that we used to register
  *
  * Removes a cookie and associated data from the GpmInhibitData struct.
  **/
 gboolean
-gpm_inhibit_un_inhibit (GpmInhibit  *inhibit,
-		        guint32      cookie,
-		        GError     **error)
+gpm_inhibit_un_inhibit (GpmInhibit *inhibit, guint32 cookie, GError **error)
 {
 	GpmInhibitData *data;
 
@@ -239,28 +233,16 @@
 }
 
 /**
- * gpm_inhibit_get_requests:
- *
- * Gets a list of inhibits.
- **/
-gboolean
-gpm_inhibit_get_requests (GpmInhibit *inhibit, gchar ***requests, GError **error)
-{
-	egg_warning ("Not implimented");
-	return FALSE;
-}
-
-/**
  * gpm_inhibit_remove_dbus:
  * @connection: Connection name
- * @application:	Application name
+ * @application: Application name
  * @cookie: The cookie that we used to register
  *
  * Checks to see if the dbus closed session is registered, in which case
  * unregister it.
  **/
 static void
-gpm_inhibit_remove_dbus (GpmInhibit  *inhibit, const gchar *connection)
+gpm_inhibit_remove_dbus (GpmInhibit *inhibit, const gchar *connection)
 {
 	guint a;
 	GpmInhibitData *data;
@@ -298,9 +280,7 @@
  * TRUE if the action is OK, i.e. we have *not* been inhibited.
  **/
 gboolean
-gpm_inhibit_has_inhibit (GpmInhibit *inhibit,
-		         gboolean   *has_inihibit,
-		         GError    **error)
+gpm_inhibit_has_inhibit (GpmInhibit *inhibit, gboolean *has_inihibit, GError **error)
 {
 	guint length;
 
@@ -328,8 +308,8 @@
 /**
  * gpm_inhibit_get_message:
  *
- * @message:	Description string, e.g. "Nautilus because 'copying files'"
- * @action:	Action we wanted to do, e.g. "suspend"
+ * @message: Description string, e.g. "Nautilus because 'copying files'"
+ * @action: Action we wanted to do, e.g. "suspend"
  *
  * Returns a localised message text describing what application has inhibited
  * the action, and why.

Modified: trunk/src/gpm-inhibit.h
==============================================================================
--- trunk/src/gpm-inhibit.h	(original)
+++ trunk/src/gpm-inhibit.h	Wed Jan 28 09:05:40 2009
@@ -72,9 +72,6 @@
 gboolean	 gpm_inhibit_un_inhibit			(GpmInhibit	*inhibit,
 							 guint32	 cookie,
 							 GError		**error);
-gboolean	 gpm_inhibit_get_requests		(GpmInhibit	*inhibit,
-							 gchar		***requests,
-							 GError		**error);
 #ifdef EGG_TEST
 void		 gpm_inhibit_test			(gpointer	 data);
 #endif

Modified: trunk/src/org.freedesktop.PowerManagement.Inhibit.xml
==============================================================================
--- trunk/src/org.freedesktop.PowerManagement.Inhibit.xml	(original)
+++ trunk/src/org.freedesktop.PowerManagement.Inhibit.xml	Wed Jan 28 09:05:40 2009
@@ -13,9 +13,6 @@
     <method name="HasInhibit">
       <arg type="b" name="has_inhibit" direction="out"/>
     </method>
-    <method name="GetRequests">
-      <arg type="ass" name="requests" direction="out"/>
-    </method>
     <signal name="HasInhibitChanged"/>
   </interface>
 </node>



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