[gnome-packagekit] Remove any references to UpdateSystem



commit 492987daa471cfa2e369354417ea916fe2ceda55
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jul 12 09:01:32 2012 +0100

    Remove any references to UpdateSystem
    
    The update system role has been removed in the latest version of PackageKit.

 src/gpk-enum.c          |    9 ---------
 src/gpk-task.c          |    3 +--
 src/gpk-update-viewer.c |   18 +++++-------------
 3 files changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/src/gpk-enum.c b/src/gpk-enum.c
index b8512f7..e11ec7d 100644
--- a/src/gpk-enum.c
+++ b/src/gpk-enum.c
@@ -169,7 +169,6 @@ static const PkEnumMatch enum_role_icon_name[] = {
 	{PK_ROLE_ENUM_SEARCH_GROUP,		"pk-package-search"},
 	{PK_ROLE_ENUM_SEARCH_NAME,		"pk-package-search"},
 	{PK_ROLE_ENUM_UPDATE_PACKAGES,		"pk-package-update"},
-	{PK_ROLE_ENUM_UPDATE_SYSTEM,		"system-software-update"},
 	{PK_ROLE_ENUM_WHAT_PROVIDES,		"pk-package-search"},
 	{PK_ROLE_ENUM_UPGRADE_SYSTEM,		"system-software-update"},
 	{PK_ROLE_ENUM_REPAIR_SYSTEM,		"system-software-update"},
@@ -1340,10 +1339,6 @@ gpk_role_enum_to_localised_present (PkRoleEnum role)
 		/* TRANSLATORS: The role of the transaction, in present tense */
 		text = _("Updating packages");
 		break;
-	case PK_ROLE_ENUM_UPDATE_SYSTEM:
-		/* TRANSLATORS: The role of the transaction, in present tense */
-		text = _("Updating system");
-		break;
 	case PK_ROLE_ENUM_CANCEL:
 		/* TRANSLATORS: The role of the transaction, in present tense */
 		text = _("Canceling");
@@ -1484,10 +1479,6 @@ gpk_role_enum_to_localised_past (PkRoleEnum role)
 		/* TRANSLATORS: The role of the transaction, in past tense */
 		text = _("Updated packages");
 		break;
-	case PK_ROLE_ENUM_UPDATE_SYSTEM:
-		/* TRANSLATORS: The role of the transaction, in past tense */
-		text = _("Updated system");
-		break;
 	case PK_ROLE_ENUM_CANCEL:
 		/* TRANSLATORS: The role of the transaction, in past tense */
 		text = _("Canceled");
diff --git a/src/gpk-task.c b/src/gpk-task.c
index 830df14..a7e6b8f 100644
--- a/src/gpk-task.c
+++ b/src/gpk-task.c
@@ -134,8 +134,7 @@ gpk_task_untrusted_question (PkTask *task, guint request, PkResults *results)
 
 	/* message */
 	g_object_get (results, "role", &role, NULL);
-	if (role == PK_ROLE_ENUM_UPDATE_PACKAGES ||
-	    role == PK_ROLE_ENUM_UPDATE_SYSTEM) {
+	if (role == PK_ROLE_ENUM_UPDATE_PACKAGES) {
 		message = g_strdup_printf ("%s\n%s\n\n%s\n%s",
 					   /* TRANSLATORS: is not GPG signed */
 					   _("The software is not signed by a trusted provider."),
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index c01423b..04ba4ee 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -879,8 +879,7 @@ gpk_update_viewer_progress_cb (PkProgress *progress,
 		model = gtk_tree_view_get_model (treeview);
 
 		/* enable or disable the correct spinners */
-		if (role == PK_ROLE_ENUM_UPDATE_PACKAGES ||
-		    role == PK_ROLE_ENUM_UPDATE_SYSTEM) {
+		if (role == PK_ROLE_ENUM_UPDATE_PACKAGES) {
 			path = gpk_update_viewer_model_get_path (model, package_id);
 			if (path != NULL) {
 				if (info == PK_INFO_ENUM_FINISHED)
@@ -948,8 +947,7 @@ gpk_update_viewer_progress_cb (PkProgress *progress,
 		}
 
 		/* only change the status when we're doing the actual update */
-		if (role == PK_ROLE_ENUM_UPDATE_PACKAGES ||
-		    role == PK_ROLE_ENUM_UPDATE_SYSTEM) {
+		if (role == PK_ROLE_ENUM_UPDATE_PACKAGES) {
 			/* if the info is finished, change the status to past tense */
 			if (info == PK_INFO_ENUM_FINISHED) {
 				/* clear the remaining size */
@@ -1226,15 +1224,9 @@ gpk_update_viewer_button_install_cb (GtkWidget *widget, gpointer user_data)
 	package_ids = pk_ptr_array_to_strv (array);
 
 	/* the backend is able to do UpdatePackages */
-	if (pk_bitfield_contain (roles, PK_ROLE_ENUM_UPDATE_PACKAGES)) {
-		pk_task_update_packages_async (task, package_ids, cancellable,
-					       (PkProgressCallback) gpk_update_viewer_progress_cb, NULL,
-					       (GAsyncReadyCallback) gpk_update_viewer_update_packages_cb, NULL);
-	} else {
-		pk_task_update_system_async (task, cancellable,
-					     (PkProgressCallback) gpk_update_viewer_progress_cb, NULL,
-					     (GAsyncReadyCallback) gpk_update_viewer_update_packages_cb, NULL);
-	}
+	pk_task_update_packages_async (task, package_ids, cancellable,
+				       (PkProgressCallback) gpk_update_viewer_progress_cb, NULL,
+				       (GAsyncReadyCallback) gpk_update_viewer_update_packages_cb, NULL);
 
 	/* from now on ignore updates-changed signals */
 	ignore_updates_changed = TRUE;



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