[gnome-packagekit] Raise the required PackageKit version to something non-obsolete



commit dd29fba1953d52497c883fcb14d84c16744c339d
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jun 26 11:19:55 2012 +0100

    Raise the required PackageKit version to something non-obsolete

 configure.ac             |    2 +-
 src/gpk-distro-upgrade.c |   12 ------------
 src/gpk-enum.h           |   18 ------------------
 3 files changed, 1 insertions(+), 31 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 470c229..90dba80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,7 +99,7 @@ GLIB_GSETTINGS
 dnl ---------------------------------------------------------------------------
 dnl - Check library dependencies
 dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES(PACKAGEKIT, packagekit-glib2 >= 0.6.5)
+PKG_CHECK_MODULES(PACKAGEKIT, packagekit-glib2 >= 0.7.0)
 PKG_CHECK_MODULES(GLIB, \
  glib-2.0 >= 2.32.0
  gobject-2.0
diff --git a/src/gpk-distro-upgrade.c b/src/gpk-distro-upgrade.c
index 62a727a..4385316 100644
--- a/src/gpk-distro-upgrade.c
+++ b/src/gpk-distro-upgrade.c
@@ -210,7 +210,6 @@ out:
 static void
 gpk_distro_upgrade_assistant_apply_cb (GtkWidget *widget, GpkDistroUpgradePrivate *priv)
 {
-#if PK_CHECK_VERSION(0,6,11)
 	GtkTreeIter iter;
 	gchar *id;
 	PkUpgradeKindEnum upgrade_kind = PK_UPGRADE_KIND_ENUM_MINIMAL;
@@ -238,7 +237,6 @@ gpk_distro_upgrade_assistant_apply_cb (GtkWidget *widget, GpkDistroUpgradePrivat
 					(PkProgressCallback) gpk_distro_upgrade_progress_cb, priv,
 					(GAsyncReadyCallback) gpk_distro_upgrade_upgrade_system_cb, priv);
 	g_free (id);
-#endif
 }
 
 /**
@@ -261,10 +259,8 @@ gpk_distro_upgrade_add_item_to_list (GpkDistroUpgradePrivate *priv, PkDistroUpgr
 	const gchar *id = NULL;
 	const gchar *summary = NULL;
 
-#if PK_CHECK_VERSION(0,6,11)
 	id = pk_distro_upgrade_get_id (distro_upgrade);
 	summary = pk_distro_upgrade_get_summary (distro_upgrade);
-#endif
 
 	/* add item */
 	gtk_list_store_append (priv->distro_upgrade_store, &iter);
@@ -338,12 +334,10 @@ gpk_distro_upgrade_get_distro_upgrades_cb (PkClient *client, GAsyncResult *res,
 	show_unstable = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->checkbutton));
 	for (i=0; i<array->len; i++) {
 		distro_upgrade = g_ptr_array_index (array, i);
-#if PK_CHECK_VERSION(0,6,11)
 		if (show_unstable ||
 		    pk_distro_upgrade_get_state (distro_upgrade) == PK_DISTRO_UPGRADE_ENUM_STABLE) {
 			gpk_distro_upgrade_add_item_to_list (priv, distro_upgrade);
 		}
-#endif
 	}
 	gtk_widget_set_sensitive (GTK_WIDGET (priv->combobox), TRUE);
 	gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant), priv->page_choose_vbox, TRUE);
@@ -723,7 +717,6 @@ gpk_distro_upgrade_activate_cb (GApplication *application, GpkDistroUpgradePriva
 	g_object_get (control,
 		      "roles", &priv->roles,
 		      NULL);
-#if PK_CHECK_VERSION(0,6,11)
 	ret = pk_bitfield_contain (priv->roles, PK_ROLE_ENUM_GET_DISTRO_UPGRADES);
 	if (ret) {
 		ret = pk_bitfield_contain (priv->roles, PK_ROLE_ENUM_UPGRADE_SYSTEM);
@@ -735,11 +728,6 @@ gpk_distro_upgrade_activate_cb (GApplication *application, GpkDistroUpgradePriva
 		/* TRANSLATORS: message, we're unable to do this action as PackageKit is too old */
 		message = _("Cannot get operating system upgrade information.");
 	}
-#else
-	/* TRANSLATORS: message, we're unable to do this action */
-	message = _("Unsupported daemon version.");
-	ret = FALSE;
-#endif
 	if (!ret) {
 		GtkWidget *dialog;
 		dialog = gtk_message_dialog_new (GTK_WINDOW (priv->assistant),
diff --git a/src/gpk-enum.h b/src/gpk-enum.h
index 4ff2faf..462d0e4 100644
--- a/src/gpk-enum.h
+++ b/src/gpk-enum.h
@@ -56,24 +56,6 @@ typedef enum {
 } GpkInfoStatusEnum;
 
 /* 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		(PK_ERROR_ENUM_INSTALL_ROOT_INVALID+1)
-#endif
-
-#if (!PK_CHECK_VERSION(0,6,14))
-#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
-
-#if (!PK_CHECK_VERSION(0,6,16))
-#define PK_PROVIDES_ENUM_PLASMA_SERVICE			(PK_PROVIDES_ENUM_POSTSCRIPT_DRIVER+1)
-#endif
-
 #if (!PK_CHECK_VERSION(0,7,2))
 #define PK_ROLE_ENUM_REPAIR_SYSTEM			(PK_ROLE_ENUM_UPGRADE_SYSTEM+1)
 #define PK_ROLE_ENUM_SIMULATE_REPAIR_SYSTEM		(PK_ROLE_ENUM_REPAIR_SYSTEM+1)



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