[gnome-settings-daemon] updates: Do not use deprecated PackageKit #defines



commit 124feb75d8d89d93dced6053232f6f47b9bddcab
Author: Richard Hughes <richard hughsie com>
Date:   Wed Aug 3 11:07:18 2011 +0100

    updates: Do not use deprecated PackageKit #defines
    
    This fixes the compile if a developer installed PackageKit from the
    PACKAGEKIT_0_7_X branch, which hasn't yet had any public releases.
    
    The new symbols have been around since 0.6.12 (over 8 months ago) and so also
    bump the required version of PackageKit in configure.

 configure.ac                           |    2 +-
 plugins/updates/gsd-updates-firmware.c |    4 ++--
 plugins/updates/gsd-updates-manager.c  |   16 ++++++++--------
 3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5d0efa4..f511b39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -319,7 +319,7 @@ AC_ARG_ENABLE(packagekit,
        [WANT_PACKAGEKIT=yes]) dnl Default value
 
 if test x$WANT_PACKAGEKIT = xyes ; then
-       PK_REQUIRED_VERSION=0.6.4
+       PK_REQUIRED_VERSION=0.6.12
        PKG_CHECK_MODULES(PACKAGEKIT, glib-2.0 packagekit-glib2 >= $PK_REQUIRED_VERSION upower-glib >= 0.9.1 gudev-1.0 libnotify >= $LIBNOTIFY_REQUIRED_VERSION,
              [have_packagekit=true
               AC_DEFINE(HAVE_PACKAGEKIT, 1, [Define if PackageKit should be used])],
diff --git a/plugins/updates/gsd-updates-firmware.c b/plugins/updates/gsd-updates-firmware.c
index 24f97bf..9abd2dd 100644
--- a/plugins/updates/gsd-updates-firmware.c
+++ b/plugins/updates/gsd-updates-firmware.c
@@ -330,7 +330,7 @@ install_packages_cb (GObject *object,
         error_code = pk_results_get_error_code (results);
         if (error_code != NULL) {
                 g_warning ("failed to install file: %s, %s",
-                           pk_error_enum_to_text (pk_error_get_code (error_code)),
+                           pk_error_enum_to_string (pk_error_get_code (error_code)),
                            pk_error_get_details (error_code));
                 goto out;
         }
@@ -476,7 +476,7 @@ check_available (GsdUpdatesFirmware *firmware, const gchar *filename)
         error_code = pk_results_get_error_code (results);
         if (error_code != NULL) {
                 g_warning ("failed to search file: %s, %s",
-                           pk_error_enum_to_text (pk_error_get_code (error_code)),
+                           pk_error_enum_to_string (pk_error_get_code (error_code)),
                            pk_error_get_details (error_code));
                 goto out;
         }
diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c
index a81aa1f..db6db32 100644
--- a/plugins/updates/gsd-updates-manager.c
+++ b/plugins/updates/gsd-updates-manager.c
@@ -152,7 +152,7 @@ get_distro_upgrades_finished_cb (GObject *object,
         error_code = pk_results_get_error_code (results);
         if (error_code != NULL) {
                 g_warning ("failed to get upgrades: %s, %s",
-                           pk_error_enum_to_text (pk_error_get_code (error_code)),
+                           pk_error_enum_to_string (pk_error_get_code (error_code)),
                            pk_error_get_details (error_code));
                 goto out;
         }
@@ -184,7 +184,7 @@ get_distro_upgrades_finished_cb (GObject *object,
                               NULL);
                 g_string_append_printf (string, "%s (%s)\n",
                                         name,
-                                        pk_distro_upgrade_enum_to_text (state));
+                                        pk_distro_upgrade_enum_to_string (state));
                 g_free (name);
         }
         if (string->len != 0)
@@ -254,7 +254,7 @@ refresh_cache_finished_cb (GObject *object, GAsyncResult *res, GsdUpdatesManager
         error_code = pk_results_get_error_code (results);
         if (error_code != NULL) {
                 g_warning ("failed to refresh the cache: %s, %s",
-                           pk_error_enum_to_text (pk_error_get_code (error_code)),
+                           pk_error_enum_to_string (pk_error_get_code (error_code)),
                            pk_error_get_details (error_code));
                 goto out;
         }
@@ -510,8 +510,8 @@ notify_update_finished (GsdUpdatesManager *manager, PkResults *results)
                               NULL);
 
                 split = pk_package_id_split (package_id);
-                g_debug ("%s, %s, %s", pk_info_enum_to_text (info),
-                           split[PK_PACKAGE_ID_NAME], summary);
+                g_debug ("%s, %s, %s", pk_info_enum_to_string (info),
+                         split[PK_PACKAGE_ID_NAME], summary);
                 if (info == PK_INFO_ENUM_BLOCKED) {
                         skipped_number++;
                         g_string_append_printf (message_text, "<b>%s</b> - %s\n",
@@ -603,7 +603,7 @@ update_packages_finished_cb (PkTask *task,
         error_code = pk_results_get_error_code (results);
         if (error_code != NULL) {
                 g_warning ("failed to update system: %s, %s",
-                           pk_error_enum_to_text (pk_error_get_code (error_code)),
+                           pk_error_enum_to_string (pk_error_get_code (error_code)),
                            pk_error_get_details (error_code));
                 goto out;
         }
@@ -688,7 +688,7 @@ package_download_finished_cb (GObject *object,
         error_code = pk_results_get_error_code (results);
         if (error_code != NULL) {
                 g_warning ("failed to download: %s, %s",
-                           pk_error_enum_to_text (pk_error_get_code (error_code)),
+                           pk_error_enum_to_string (pk_error_get_code (error_code)),
                            pk_error_get_details (error_code));
                 notify_failed_get_updates_maybe (manager);
                 goto out;
@@ -761,7 +761,7 @@ get_updates_finished_cb (GObject *object,
         error_code = pk_results_get_error_code (results);
         if (error_code != NULL) {
                 g_warning ("failed to get updates: %s, %s",
-                           pk_error_enum_to_text (pk_error_get_code (error_code)),
+                           pk_error_enum_to_string (pk_error_get_code (error_code)),
                            pk_error_get_details (error_code));
                 notify_failed_get_updates_maybe (manager);
                 goto out;



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