[gnome-packagekit/glib2-merge-candidate: 10/11] trivial: use PK_foo_LAST not PK_foo_UNKNOWN as the last entry



commit 30c79faa0865fdf177d6110f08d0fd84968142b6
Author: Richard Hughes <richard hughsie com>
Date:   Tue Oct 6 14:59:18 2009 +0100

    trivial: use PK_foo_LAST not PK_foo_UNKNOWN as the last entry

 src/gpk-enum.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gpk-enum.c b/src/gpk-enum.c
index 8ca2813..5c9a25d 100644
--- a/src/gpk-enum.c
+++ b/src/gpk-enum.c
@@ -1791,8 +1791,8 @@ gpk_message_enum_to_icon_name (PkMessageEnum message)
 const gchar *
 gpk_info_status_enum_to_text (GpkInfoStatusEnum info)
 {
-	if (info > PK_INFO_ENUM_UNKNOWN)
-		return gpk_info_enum_to_localised_past (info - PK_INFO_ENUM_UNKNOWN);
+	if (info >= PK_INFO_ENUM_LAST)
+		return gpk_info_enum_to_localised_past (info - PK_INFO_ENUM_LAST);
 	return gpk_info_enum_to_localised_present (info);
 }
 
@@ -1810,8 +1810,8 @@ gpk_info_status_enum_to_icon_name (GpkInfoStatusEnum info)
 		return "pk-package-installed";
 
 	/* use normal icon as a fallback */
-	if (info > PK_INFO_ENUM_UNKNOWN)
-		return gpk_info_enum_to_icon_name (info - PK_INFO_ENUM_UNKNOWN);
+	if (info >= PK_INFO_ENUM_LAST)
+		return gpk_info_enum_to_icon_name (info - PK_INFO_ENUM_LAST);
 
 	/* regular PkInfoEnum */
 	return gpk_info_enum_to_icon_name (info);



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