[packagekit] [PATCH] PK_GROUP_ENUM_POWERMANAGEMENT

S.Çağlar Onur caglar at pardus.org.tr
Fri Nov 2 04:37:17 PDT 2007


Hi;

If there is no objection i'll commit following to PK to add a powermanagement 
group which holds powermanagement related goodies like 
kpowersave/gnome-powersave/acpi/acpid/powertop/suspend/pm-tools and others

diff --git a/libpackagekit/pk-enum.c b/libpackagekit/pk-enum.c
index 14956c1..298e21f 100644
--- a/libpackagekit/pk-enum.c
+++ b/libpackagekit/pk-enum.c
@@ -146,6 +146,7 @@ static PkEnumMatch enum_group[] = {
 	{PK_GROUP_ENUM_LEGACY,			"legacy"},
 	{PK_GROUP_ENUM_LOCALIZATION,		"localization"},
 	{PK_GROUP_ENUM_VIRTUALIZATION,		"virtualization"},
+	{PK_GROUP_ENUM_POWERMANAGEMENT,		"powermanagement"},
 	{PK_GROUP_ENUM_SECURITY,		"security"},
 	{0, NULL},
 };
diff --git a/libpackagekit/pk-enum.h b/libpackagekit/pk-enum.h
index 260c774..3d81692 100644
--- a/libpackagekit/pk-enum.h
+++ b/libpackagekit/pk-enum.h
@@ -143,6 +143,7 @@ typedef enum {
 	PK_GROUP_ENUM_LOCALIZATION,
 	PK_GROUP_ENUM_VIRTUALIZATION,
 	PK_GROUP_ENUM_SECURITY,
+	PK_GROUP_ENUM_POWERMANAGEMENT,
 	PK_GROUP_ENUM_UNKNOWN
 } PkGroupEnum;
 
diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py
index e0285ef..4676e37 100644
--- a/python/packagekit/backend.py
+++ b/python/packagekit/backend.py
@@ -99,6 +99,7 @@ GROUP_LEGACY            = "legacy"
 GROUP_LOCALIZATION      = "localization"
 GROUP_VIRTUALIZATION    = "virtualization"
 GROUP_SECURITY          = "security"
+GROUP_POWERMANAGEMENT   = "powermanagement"
 GROUP_UNKNOWN           = "unknown"
 
 # Classes

and PK-Gnome (again i cannot select the icon name :))

diff --git a/src/pk-common-gui.c b/src/pk-common-gui.c
index cf4580a..5259e66 100644
--- a/src/pk-common-gui.c
+++ b/src/pk-common-gui.c
@@ -114,6 +114,7 @@ static PkEnumMatch enum_group_icon_name[] = {
 	{PK_GROUP_ENUM_LOCALIZATION,		"preferences-desktop-locale"},
 	{PK_GROUP_ENUM_VIRTUALIZATION,		"computer"},
 	{PK_GROUP_ENUM_SECURITY,		"network-wireless-encrypted"},
+	{PK_GROUP_ENUM_POWERMANAGEMENT,		"network-wireless-encrypted"},
 	{0, NULL},
 };
 
@@ -676,6 +677,9 @@ pk_group_enum_to_localised_text (PkGroupEnum group)
 	case PK_GROUP_ENUM_SECURITY:
 		text = _("Security");
 		break;
+	case PK_GROUP_ENUM_POWERMANAGEMENT:
+		text = _("Powermanagement");
+		break;
 	case PK_GROUP_ENUM_UNKNOWN:
 		text = _("Unknown");
 		break;


Cheers
-- 
S.Çağlar Onur <caglar at pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20071102/c2257a25/attachment-0004.pgp>


More information about the PackageKit mailing list