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



Author: rhughes
Date: Sat Nov  8 16:32:31 2008
New Revision: 3081
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=3081&view=rev

Log:
2008-11-08  Richard Hughes  <richard hughsie com>

* src/egg-color.h:
* src/egg-debug.c: (pk_print_line):
* src/egg-obj-list.c: (egg_obj_list_clear):
Trivial egg updates.


Modified:
   trunk/ChangeLog
   trunk/src/egg-color.h
   trunk/src/egg-debug.c
   trunk/src/egg-obj-list.c

Modified: trunk/src/egg-color.h
==============================================================================
--- trunk/src/egg-color.h	(original)
+++ trunk/src/egg-color.h	Sat Nov  8 16:32:31 2008
@@ -46,7 +46,7 @@
 guint32		 egg_color_from_rgb			(guint8		 red,
 							 guint8		 green,
 							 guint8		 blue);
-void		 egg_color_to_rgb			(guint32	 colour,
+void		 egg_color_to_rgb			(guint32	 color,
 							 guint8		*red,
 							 guint8		*green,
 							 guint8		*blue);

Modified: trunk/src/egg-debug.c
==============================================================================
--- trunk/src/egg-debug.c	(original)
+++ trunk/src/egg-debug.c	Sat Nov  8 16:32:31 2008
@@ -146,7 +146,7 @@
 	pk_set_console_mode (CONSOLE_GREEN);
 	printf ("%s\n", header);
 
-	/* different colours according to the severity */
+	/* different colors according to the severity */
 	pk_set_console_mode (color);
 	printf (" - %s\n", buffer);
 	pk_set_console_mode (CONSOLE_RESET);

Modified: trunk/src/egg-obj-list.c
==============================================================================
--- trunk/src/egg-obj-list.c	(original)
+++ trunk/src/egg-obj-list.c	Sat Nov  8 16:32:31 2008
@@ -137,8 +137,6 @@
 void
 egg_obj_list_clear (EggObjList *list)
 {
-	guint i;
-	gpointer obj;
 	GPtrArray *array;
 	EggObjListFreeFunc func_free;
 
@@ -146,12 +144,10 @@
 
 	array = list->priv->array;
 	func_free = list->priv->func_free;
-	for (i=0; i<array->len; i++) {
-		obj = g_ptr_array_index (array, i);
-		if (func_free != NULL)
-			func_free (obj);
-		g_ptr_array_remove (array, obj);
-	}
+	if (func_free != NULL)
+		g_ptr_array_foreach (array, (GFunc) func_free, NULL);
+	g_ptr_array_remove_range (array, 0, array->len);
+
 	list->len = 0;
 }
 



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