[gnome-packagekit] Add the new enumerated types



commit 2ddfcce3b99d31135b0b49b93544b669317ec7a1
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jun 14 14:31:33 2011 +0100

    Add the new enumerated types

 src/gpk-enum.c |   10 ++++++++++
 src/gpk-enum.h |    9 +++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/src/gpk-enum.c b/src/gpk-enum.c
index 7a72d83..7e55c84 100644
--- a/src/gpk-enum.c
+++ b/src/gpk-enum.c
@@ -55,6 +55,8 @@ static const PkEnumMatch enum_info_icon_name[] = {
 	{PK_INFO_ENUM_DOWNGRADING,		"pk-package-update"},
 	{PK_INFO_ENUM_PREPARING,		"dialog-information"},
 	{PK_INFO_ENUM_DECOMPRESSING,		"dialog-information"},
+	{PK_INFO_ENUM_TRUSTED,			"dialog-information"},
+	{PK_INFO_ENUM_UNTRUSTED,		"dialog-information"},
 	{0, NULL}
 };
 
@@ -1158,6 +1160,14 @@ gpk_info_enum_to_localised_text (PkInfoEnum info)
 		/* TRANSLATORS: The state of a package, i.e. not installed */
 		text = _("Available");
 		break;
+	case PK_INFO_ENUM_TRUSTED:
+		/* TRANSLATORS: The type of package */
+		text = _("Trusted");
+		break;
+	case PK_INFO_ENUM_UNTRUSTED:
+		/* TRANSLATORS: The type of package */
+		text = _("Untrusted");
+		break;
 	default:
 		g_warning ("info unrecognised: %s", pk_info_enum_to_text (info));
 	}
diff --git a/src/gpk-enum.h b/src/gpk-enum.h
index b1a2eb6..ff87487 100644
--- a/src/gpk-enum.h
+++ b/src/gpk-enum.h
@@ -58,11 +58,16 @@ typedef enum {
 /* constants defined in previous versions */
 #if (!PK_CHECK_VERSION(0,6,11))
 #define PK_ROLE_ENUM_UPGRADE_SYSTEM			G_MAXINT
-#define PK_ERROR_ENUM_CANNOT_FETCH_SOURCES		G_MAXINT
+#define PK_ERROR_ENUM_CANNOT_FETCH_SOURCES		(PK_ERROR_ENUM_INSTALL_ROOT_INVALID+1)
 #endif
 
 #if (!PK_CHECK_VERSION(0,6,14))
-#define PK_ERROR_ENUM_CANCELLED_PRIORITY		G_MAXINT
+#define PK_ERROR_ENUM_CANCELLED_PRIORITY		(PK_ERROR_ENUM_CANNOT_FETCH_SOURCES+1)
+#endif
+
+#if (!PK_CHECK_VERSION(0,6,15))
+#define PK_INFO_ENUM_UNTRUSTED				(PK_INFO_ENUM_DECOMPRESSING+1)
+#define PK_INFO_ENUM_TRUSTED				(PK_INFO_ENUM_UNTRUSTED+1)
 #endif
 
 void		 gpk_enum_test				(gpointer	 data);



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