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



Author: rhughes
Date: Fri Dec 26 11:29:03 2008
New Revision: 3141
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=3141&view=rev

Log:
2008-12-26  Richard Hughes  <richard hughsie com>

* src/gpm-phone.c: (gpm_phone_class_init), (monitor_connection_cb),
(phone_device_refresh_cb), (gpm_phone_test):
* src/gpm-phone.h:
Trivial whitespace cleanups, and removing an unused signal.


Modified:
   trunk/ChangeLog
   trunk/src/gpm-phone.c
   trunk/src/gpm-phone.h

Modified: trunk/src/gpm-phone.c
==============================================================================
--- trunk/src/gpm-phone.c	(original)
+++ trunk/src/gpm-phone.c	Fri Dec 26 11:29:03 2008
@@ -1,6 +1,6 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
  *
- * Copyright (C) 2007 Richard Hughes <richard hughsie com>
+ * Copyright (C) 2007-2008 Richard Hughes <richard hughsie com>
  *
  * Licensed under the GNU General Public License Version 2
  *
@@ -53,7 +53,6 @@
 	DEVICE_ADDED,
 	DEVICE_REMOVED,
 	DEVICE_REFRESH,
-	CONNECTION_CHANGED,
 	LAST_SIGNAL
 };
 
@@ -216,9 +215,7 @@
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
 			      G_STRUCT_OFFSET (GpmPhoneClass, device_added),
-			      NULL,
-			      NULL,
-			      g_cclosure_marshal_VOID__UINT,
+			      NULL, NULL, g_cclosure_marshal_VOID__UINT,
 			      G_TYPE_NONE, 1, G_TYPE_UINT);
 
 	signals [DEVICE_REMOVED] =
@@ -226,9 +223,7 @@
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
 			      G_STRUCT_OFFSET (GpmPhoneClass, device_removed),
-			      NULL,
-			      NULL,
-			      g_cclosure_marshal_VOID__UINT,
+			      NULL, NULL, g_cclosure_marshal_VOID__UINT,
 			      G_TYPE_NONE, 1, G_TYPE_UINT);
 
 	signals [DEVICE_REFRESH] =
@@ -236,20 +231,8 @@
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
 			      G_STRUCT_OFFSET (GpmPhoneClass, device_refresh),
-			      NULL,
-			      NULL,
-			      g_cclosure_marshal_VOID__UINT,
+			      NULL, NULL, g_cclosure_marshal_VOID__UINT,
 			      G_TYPE_NONE, 1, G_TYPE_UINT);
-
-	signals [CONNECTION_CHANGED] =
-		g_signal_new ("connection-changed",
-			      G_TYPE_FROM_CLASS (object_class),
-			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (GpmPhoneClass, connection_changed),
-			      NULL,
-			      NULL,
-			      g_cclosure_marshal_VOID__BOOLEAN,
-			      G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
 }
 
 /**
@@ -346,11 +329,10 @@
 		     gboolean   status,
 		     GpmPhone  *phone)
 {
-	if (status) {
+	if (status)
 		gpm_phone_dbus_connect (phone);
-	} else {
+	else
 		gpm_phone_dbus_disconnect (phone);
-	}
 }
 
 /**
@@ -437,9 +419,8 @@
 		         gpointer     *data)
 {
 	g_debug ("index refresh = %i", index);
-	if (index == 0 && GPOINTER_TO_UINT (data) == 44) {
+	if (index == 0 && GPOINTER_TO_UINT (data) == 44)
 		test_got_refresh = TRUE;
-	}
 }
 
 void
@@ -456,11 +437,10 @@
 	/************************************************************/
 	egg_test_title (test, "make sure we get a non null phone");
 	phone = gpm_phone_new ();
-	if (phone != NULL) {
+	if (phone != NULL)
 		egg_test_success (test, "got GpmPhone");
-	} else {
+	else
 		egg_test_failed (test, "could not get GpmPhone");
-	}
 
 	/* connect signals */
 	g_signal_connect (phone, "device-refresh",

Modified: trunk/src/gpm-phone.h
==============================================================================
--- trunk/src/gpm-phone.h	(original)
+++ trunk/src/gpm-phone.h	Fri Dec 26 11:29:03 2008
@@ -48,8 +48,6 @@
 typedef struct
 {
 	GObjectClass	parent_class;
-	void		(* connection_changed)		(GpmPhone	*phone,
-					    		 gboolean	 connected);
 	void		(* device_added)		(GpmPhone	*phone,
 							 guint		 index);
 	void		(* device_removed)		(GpmPhone	*phone,



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