[gnome-packagekit] Do not use deprecated #defines from PackageKit
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Do not use deprecated #defines from PackageKit
- Date: Thu, 14 Jul 2011 14:36:34 +0000 (UTC)
commit 4d5c5b2273cfa12376d5162a05a9631fc33f759a
Author: Richard Hughes <richard hughsie com>
Date: Thu Jul 14 15:36:24 2011 +0100
Do not use deprecated #defines from PackageKit
src/gpk-application.c | 24 ++++++++++++------------
src/gpk-cell-renderer-info.c | 2 +-
src/gpk-common.c | 2 +-
src/gpk-dbus-task.c | 12 ++++++------
src/gpk-distro-upgrade.c | 4 ++--
src/gpk-enum.c | 36 ++++++++++++++++++------------------
src/gpk-enum.h | 2 +-
src/gpk-log.c | 4 ++--
src/gpk-prefs.c | 6 +++---
src/gpk-service-pack.c | 10 +++++-----
src/gpk-task.c | 2 +-
src/gpk-update-viewer.c | 16 ++++++++--------
12 files changed, 60 insertions(+), 60 deletions(-)
---
diff --git a/src/gpk-application.c b/src/gpk-application.c
index c4c5647..890df52 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -514,7 +514,7 @@ gpk_application_get_files_cb (PkClient *client, GAsyncResult *res, gpointer user
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to get files: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to get files: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* if obvious message, don't tell the user */
if (pk_error_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
@@ -627,7 +627,7 @@ gpk_application_progress_cb (PkProgress *progress, PkProgressType type, gpointer
NULL);
if (type == PK_PROGRESS_TYPE_STATUS) {
- g_debug ("now %s", pk_status_enum_to_text (status));
+ g_debug ("now %s", pk_status_enum_to_string (status));
if (status == PK_STATUS_ENUM_FINISHED) {
/* re-enable UI */
@@ -863,7 +863,7 @@ gpk_application_get_requires_cb (PkClient *client, GAsyncResult *res, gpointer u
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to get requires: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to get requires: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* if obvious message, don't tell the user */
if (pk_error_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
@@ -990,7 +990,7 @@ gpk_application_get_depends_cb (PkClient *client, GAsyncResult *res, gpointer us
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to get depends: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to get depends: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* if obvious message, don't tell the user */
if (pk_error_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
@@ -1510,7 +1510,7 @@ gpk_application_search_cb (PkClient *client, GAsyncResult *res, gpointer user_da
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to search: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to search: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* if obvious message, don't tell the user */
if (pk_error_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
@@ -1956,7 +1956,7 @@ gpk_application_install_packages_cb (PkTask *_task, GAsyncResult *res, gpointer
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to install packages: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to install packages: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* if obvious message, don't tell the user */
if (pk_error_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
@@ -2008,7 +2008,7 @@ gpk_application_remove_packages_cb (PkTask *_task, GAsyncResult *res, gpointer u
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to remove packages: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to remove packages: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* if obvious message, don't tell the user */
if (pk_error_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
@@ -2229,7 +2229,7 @@ gpk_application_get_details_cb (PkClient *client, GAsyncResult *res, gpointer us
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to get details: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to get details: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* if obvious message, don't tell the user */
if (pk_error_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
@@ -2463,7 +2463,7 @@ gpk_application_group_add_data (PkGroupEnum group)
gtk_tree_store_set (groups_store, &iter,
GROUPS_COLUMN_NAME, text,
GROUPS_COLUMN_SUMMARY, NULL,
- GROUPS_COLUMN_ID, pk_group_enum_to_text (group),
+ GROUPS_COLUMN_ID, pk_group_enum_to_string (group),
GROUPS_COLUMN_ICON, icon_name,
GROUPS_COLUMN_ACTIVE, TRUE,
-1);
@@ -2784,7 +2784,7 @@ gpk_application_refresh_cache_cb (PkClient *client, GAsyncResult *res, gpointer
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to refresh: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to refresh: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* if obvious message, don't tell the user */
if (pk_error_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
@@ -3233,7 +3233,7 @@ gpk_application_get_categories_cb (PkClient *client, GAsyncResult *res, gpointer
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to get cats: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to get cats: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* if obvious message, don't tell the user */
if (pk_error_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
@@ -3596,7 +3596,7 @@ gpk_application_get_repo_list_cb (PkClient *client, GAsyncResult *res, gpointer
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to repo list: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to repo list: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* if obvious message, don't tell the user */
if (pk_error_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
diff --git a/src/gpk-cell-renderer-info.c b/src/gpk-cell-renderer-info.c
index 08e55ac..82f9fb9 100644
--- a/src/gpk-cell-renderer-info.c
+++ b/src/gpk-cell-renderer-info.c
@@ -111,7 +111,7 @@ gpk_cell_renderer_info_set_property (GObject *object, guint param_id,
text = g_value_get_string (value);
split = g_strsplit (text, ",", -1);
for (i=0; split[i] != NULL; i++) {
- info = pk_info_enum_from_text (split[i]);
+ info = pk_info_enum_from_string (split[i]);
g_ptr_array_add (cru->priv->ignore, GUINT_TO_POINTER (info));
}
g_strfreev (split);
diff --git a/src/gpk-common.c b/src/gpk-common.c
index 9f15ad2..e3d20a9 100644
--- a/src/gpk-common.c
+++ b/src/gpk-common.c
@@ -629,7 +629,7 @@ gpk_package_entry_completion_get_names_from_file (const gchar *filename)
continue;
item = pk_package_new ();
g_object_set (item,
- "info", pk_info_enum_from_text (split[0]),
+ "info", pk_info_enum_from_string (split[0]),
"package-id", split[1],
"summary", split[2],
NULL);
diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index 6c97962..9c9fe29 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -356,10 +356,10 @@ gpk_dbus_task_handle_error (GpkDbusTask *dtask, PkError *error_code)
if (pk_error_get_code (error_code) == PK_ERROR_ENUM_NO_LICENSE_AGREEMENT ||
pk_error_get_code (error_code) == PK_ERROR_ENUM_PROCESS_KILL ||
pk_error_get_code (error_code) == PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
- g_warning ("ignoring %s", pk_error_enum_to_text (pk_error_get_code (error_code)));
+ g_warning ("ignoring %s", pk_error_enum_to_string (pk_error_get_code (error_code)));
}
- g_debug ("code was %s", pk_error_enum_to_text (pk_error_get_code (error_code)));
+ g_debug ("code was %s", pk_error_enum_to_string (pk_error_get_code (error_code)));
/* use a modal dialog if showing progress, else use libnotify */
title = gpk_error_enum_to_localised_text (pk_error_get_code (error_code));
@@ -480,7 +480,7 @@ gpk_dbus_task_install_packages_cb (PkTask *task, GAsyncResult *res, GpkDbusTask
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to install package: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to install package: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
error_dbus = g_error_new (GPK_DBUS_ERROR, gpk_dbus_task_get_code_from_pkerror (error_code), "%s", pk_error_get_details (error_code));
gpk_dbus_task_handle_error (dtask, error_code);
gpk_dbus_task_dbus_return_error (dtask, error_dbus);
@@ -622,7 +622,7 @@ gpk_dbus_task_install_files_cb (PkTask *task, GAsyncResult *res, GpkDbusTask *dt
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));
gpk_dbus_task_handle_error (dtask, error_code);
error_dbus = g_error_new (GPK_DBUS_ERROR,
@@ -836,7 +836,7 @@ gpk_dbus_task_is_installed_resolve_cb (PkClient *client, GAsyncResult *res, GpkD
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to resolve: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to resolve: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
error_dbus = g_error_new (GPK_DBUS_ERROR, gpk_dbus_task_get_code_from_pkerror (error_code), "failed to resolve: %s", pk_error_get_details (error_code));
gpk_dbus_task_dbus_return_error (dtask, error_dbus);
g_error_free (error_dbus);
@@ -909,7 +909,7 @@ gpk_dbus_task_search_file_search_file_cb (PkClient *client, GAsyncResult *res, G
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to resolve: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to resolve: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
error_dbus = g_error_new (GPK_DBUS_ERROR, gpk_dbus_task_get_code_from_pkerror (error_code), "failed to search file: %s", pk_error_get_details (error_code));
gpk_dbus_task_dbus_return_error (dtask, error_dbus);
g_error_free (error_dbus);
diff --git a/src/gpk-distro-upgrade.c b/src/gpk-distro-upgrade.c
index 575a298..f74d14c 100644
--- a/src/gpk-distro-upgrade.c
+++ b/src/gpk-distro-upgrade.c
@@ -145,7 +145,7 @@ gpk_distro_upgrade_upgrade_system_cb (PkClient *client, GAsyncResult *res, GpkDi
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to upgrade: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to upgrade: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
gpk_error_dialog_modal (GTK_WINDOW (priv->assistant), gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
gpk_error_enum_to_localised_message (pk_error_get_code (error_code)), pk_error_get_details (error_code));
gtk_widget_destroy (priv->assistant);
@@ -299,7 +299,7 @@ gpk_distro_upgrade_get_distro_upgrades_cb (PkClient *client, GAsyncResult *res,
/* check error code */
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_get_details (error_code));
+ g_warning ("failed to get upgrades: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
gpk_error_dialog_modal (GTK_WINDOW (priv->assistant), gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
gpk_error_enum_to_localised_message (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
diff --git a/src/gpk-enum.c b/src/gpk-enum.c
index 7e55c84..59f8e3e 100644
--- a/src/gpk-enum.c
+++ b/src/gpk-enum.c
@@ -1067,7 +1067,7 @@ gpk_status_enum_to_localised_text (PkStatusEnum status)
text = _("Copying files");
break;
default:
- g_warning ("status unrecognised: %s", pk_status_enum_to_text (status));
+ g_warning ("status unrecognised: %s", pk_status_enum_to_string (status));
}
return text;
}
@@ -1109,7 +1109,7 @@ gpk_update_enum_to_localised_text (PkInfoEnum info, guint number)
text = g_strdup_printf (ngettext ("%i blocked update", "%i blocked updates", number), number);
break;
default:
- g_warning ("update info unrecognised: %s", pk_info_enum_to_text (info));
+ g_warning ("update info unrecognised: %s", pk_info_enum_to_string (info));
}
return text;
}
@@ -1169,7 +1169,7 @@ gpk_info_enum_to_localised_text (PkInfoEnum info)
text = _("Untrusted");
break;
default:
- g_warning ("info unrecognised: %s", pk_info_enum_to_text (info));
+ g_warning ("info unrecognised: %s", pk_info_enum_to_string (info));
}
return text;
}
@@ -1219,7 +1219,7 @@ gpk_info_enum_to_localised_present (PkInfoEnum info)
text = _("Decompressing");
break;
default:
- g_warning ("info unrecognised: %s", pk_info_enum_to_text (info));
+ g_warning ("info unrecognised: %s", pk_info_enum_to_string (info));
}
return text;
}
@@ -1269,7 +1269,7 @@ gpk_info_enum_to_localised_past (PkInfoEnum info)
text = _("Decompressed");
break;
default:
- g_warning ("info unrecognised: %s", pk_info_enum_to_text (info));
+ g_warning ("info unrecognised: %s", pk_info_enum_to_string (info));
}
return text;
}
@@ -1427,7 +1427,7 @@ gpk_role_enum_to_localised_present (PkRoleEnum role)
text = _("Upgrading system");
break;
default:
- g_warning ("role unrecognised: %s", pk_role_enum_to_text (role));
+ g_warning ("role unrecognised: %s", pk_role_enum_to_string (role));
}
return text;
}
@@ -1587,7 +1587,7 @@ gpk_role_enum_to_localised_past (PkRoleEnum role)
text = _("Upgraded system");
break;
default:
- g_warning ("role unrecognised: %s", pk_role_enum_to_text (role));
+ g_warning ("role unrecognised: %s", pk_role_enum_to_string (role));
}
return text;
}
@@ -1819,10 +1819,10 @@ gpk_message_enum_to_icon_name (PkMessageEnum message)
}
/**
- * gpk_info_status_enum_to_text:
+ * gpk_info_status_enum_to_string:
**/
const gchar *
-gpk_info_status_enum_to_text (GpkInfoStatusEnum info)
+gpk_info_status_enum_to_string (GpkInfoStatusEnum info)
{
if ((PkInfoEnum)info >= PK_INFO_ENUM_LAST)
return gpk_info_enum_to_localised_past (info - PK_INFO_ENUM_LAST);
@@ -1895,7 +1895,7 @@ gpk_enum_test (gpointer data)
for (i=PK_ROLE_ENUM_UNKNOWN+1; i<PK_ROLE_ENUM_LAST; i++) {
string = gpk_role_enum_to_icon_name (i);
if (string == NULL || g_strcmp0 (string, "help-browser") == 0) {
- egg_test_failed (test, "failed to get %s", pk_role_enum_to_text (i));
+ egg_test_failed (test, "failed to get %s", pk_role_enum_to_string (i));
break;
}
}
@@ -1906,7 +1906,7 @@ gpk_enum_test (gpointer data)
for (i=PK_ROLE_ENUM_UNKNOWN+1; i<PK_ROLE_ENUM_LAST; i++) {
string = gpk_status_enum_to_animation (i);
if (string == NULL || g_strcmp0 (string, "help-browser") == 0) {
- egg_test_failed (test, "failed to get %s", pk_role_enum_to_text (i));
+ egg_test_failed (test, "failed to get %s", pk_role_enum_to_string (i));
break;
}
}
@@ -1917,7 +1917,7 @@ gpk_enum_test (gpointer data)
for (i=PK_INFO_ENUM_UNKNOWN+1; i<PK_INFO_ENUM_LAST; i++) {
string = gpk_info_enum_to_icon_name (i);
if (string == NULL || g_strcmp0 (string, "help-browser") == 0) {
- egg_test_failed (test, "failed to get %s", pk_info_enum_to_text (i));
+ egg_test_failed (test, "failed to get %s", pk_info_enum_to_string (i));
break;
}
}
@@ -1939,7 +1939,7 @@ gpk_enum_test (gpointer data)
for (i=PK_STATUS_ENUM_UNKNOWN+1; i<PK_STATUS_ENUM_LAST; i++) {
string = gpk_status_enum_to_icon_name (i);
if (string == NULL || g_strcmp0 (string, "help-browser") == 0) {
- egg_test_failed (test, "failed to get %s", pk_status_enum_to_text (i));
+ egg_test_failed (test, "failed to get %s", pk_status_enum_to_string (i));
break;
}
}
@@ -1950,7 +1950,7 @@ gpk_enum_test (gpointer data)
for (i=PK_RESTART_ENUM_UNKNOWN+1; i<PK_RESTART_ENUM_LAST; i++) {
string = gpk_restart_enum_to_icon_name (i);
if (string == NULL || g_strcmp0 (string, "help-browser") == 0) {
- egg_test_failed (test, "failed to get %s", pk_restart_enum_to_text (i));
+ egg_test_failed (test, "failed to get %s", pk_restart_enum_to_string (i));
break;
}
}
@@ -1961,7 +1961,7 @@ gpk_enum_test (gpointer data)
for (i=0; i<PK_ERROR_ENUM_LAST; i++) {
string = gpk_error_enum_to_localised_text (i);
if (string == NULL) {
- egg_test_failed (test, "failed to get %s", pk_error_enum_to_text(i));
+ egg_test_failed (test, "failed to get %s", pk_error_enum_to_string(i));
break;
}
}
@@ -1972,7 +1972,7 @@ gpk_enum_test (gpointer data)
for (i=0; i<PK_ERROR_ENUM_LAST; i++) {
string = gpk_error_enum_to_localised_message (i);
if (string == NULL) {
- egg_test_failed (test, "failed to get %s", pk_error_enum_to_text(i));
+ egg_test_failed (test, "failed to get %s", pk_error_enum_to_string(i));
break;
}
}
@@ -1994,7 +1994,7 @@ gpk_enum_test (gpointer data)
for (i=PK_MESSAGE_ENUM_UNKNOWN+1; i<PK_MESSAGE_ENUM_LAST; i++) {
string = gpk_message_enum_to_icon_name (i);
if (string == NULL || g_strcmp0 (string, "help-browser") == 0) {
- egg_test_failed (test, "failed to get %s", pk_message_enum_to_text (i));
+ egg_test_failed (test, "failed to get %s", pk_message_enum_to_string (i));
break;
}
}
@@ -2038,7 +2038,7 @@ gpk_enum_test (gpointer data)
for (i=PK_GROUP_ENUM_UNKNOWN+1; i<PK_GROUP_ENUM_LAST; i++) {
string = gpk_group_enum_to_icon_name (i);
if (string == NULL || g_strcmp0 (string, "help-browser") == 0) {
- egg_test_failed (test, "failed to get %s", pk_group_enum_to_text (i));
+ egg_test_failed (test, "failed to get %s", pk_group_enum_to_string (i));
break;
}
}
diff --git a/src/gpk-enum.h b/src/gpk-enum.h
index 059070e..03c4928 100644
--- a/src/gpk-enum.h
+++ b/src/gpk-enum.h
@@ -113,7 +113,7 @@ const gchar *gpk_group_enum_to_icon_name (PkGroupEnum group);
gchar *gpk_update_enum_to_localised_text (PkInfoEnum info,
guint number)
G_GNUC_CONST;
-const gchar *gpk_info_status_enum_to_text (GpkInfoStatusEnum info);
+const gchar *gpk_info_status_enum_to_string (GpkInfoStatusEnum info);
const gchar *gpk_info_status_enum_to_icon_name (GpkInfoStatusEnum info);
G_END_DECLS
diff --git a/src/gpk-log.c b/src/gpk-log.c
index 27d46c8..d7d1556 100644
--- a/src/gpk-log.c
+++ b/src/gpk-log.c
@@ -196,7 +196,7 @@ gpk_log_get_type_line (gchar **array, PkInfoEnum info)
/* find all of this type */
for (i=0; i<size; i++) {
sections = g_strsplit (array[i], "\t", 0);
- info_local = pk_info_enum_from_text (sections[0]);
+ info_local = pk_info_enum_from_string (sections[0]);
if (info_local == info) {
text = gpk_package_id_format_oneline (sections[1], NULL);
g_string_append_printf (string, "%s, ", text);
@@ -598,7 +598,7 @@ gpk_log_get_old_transactions_cb (GObject *object, GAsyncResult *res, gpointer us
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to get old transactions: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to get old transactions: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}
diff --git a/src/gpk-prefs.c b/src/gpk-prefs.c
index 29129f5..b6defd1 100644
--- a/src/gpk-prefs.c
+++ b/src/gpk-prefs.c
@@ -428,7 +428,7 @@ gpk_prefs_progress_cb (PkProgress *progress, PkProgressType type, GpkPrefsPrivat
g_object_get (progress,
"status", &priv->status,
NULL);
- g_debug ("now %s", pk_status_enum_to_text (priv->status));
+ g_debug ("now %s", pk_status_enum_to_string (priv->status));
if (priv->status == PK_STATUS_ENUM_FINISHED) {
/* we've not yet shown, so don't bother */
@@ -503,7 +503,7 @@ gpk_prefs_repo_enable_cb (GObject *object, GAsyncResult *res, GpkPrefsPrivate *p
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to set repo: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to set repo: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
window = GTK_WINDOW (gtk_builder_get_object (priv->builder, "dialog_prefs"));
/* TRANSLATORS: for one reason or another, we could not enable or disable a software source */
gpk_error_dialog_modal (window, _("Failed to change status"),
@@ -649,7 +649,7 @@ gpk_prefs_get_repo_list_cb (GObject *object, GAsyncResult *res, GpkPrefsPrivate
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to get repo list: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to get repo list: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
window = GTK_WINDOW (gtk_builder_get_object (priv->builder, "dialog_prefs"));
/* TRANSLATORS: for one reason or another, we could not get the list of sources */
gpk_error_dialog_modal (window, _("Failed to get the list of sources"),
diff --git a/src/gpk-service-pack.c b/src/gpk-service-pack.c
index b418cd6..b087741 100644
--- a/src/gpk-service-pack.c
+++ b/src/gpk-service-pack.c
@@ -201,7 +201,7 @@ gpk_pack_resolve_package_id (const gchar *package)
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to resolve: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to resolve: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}
@@ -305,7 +305,7 @@ gpk_pack_package_array_to_string (GPtrArray *array)
"summary", &summary,
NULL);
g_string_append_printf (string, "%s\t%s\t%s\n",
- pk_info_enum_to_text (info), package_id, summary);
+ pk_info_enum_to_string (info), package_id, summary);
g_free (package_id);
g_free (summary);
}
@@ -341,7 +341,7 @@ gpk_pack_copy_package_lists (const gchar *filename, GError **error)
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to get packages: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to get packages: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}
@@ -430,7 +430,7 @@ gpk_pack_progress_cb (PkProgress *progress, PkProgressType type, gpointer userda
NULL);
if (type == PK_PROGRESS_TYPE_STATUS) {
- g_debug ("now %s", pk_status_enum_to_text (status));
+ g_debug ("now %s", pk_status_enum_to_string (status));
} else if (type == PK_PROGRESS_TYPE_PERCENTAGE) {
gpk_pack_set_percentage (percentage);
} else if (type == PK_PROGRESS_TYPE_PACKAGE_ID) {
@@ -585,7 +585,7 @@ gpk_pack_button_create_cb (GtkWidget *widget2, gpointer data)
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to refresh cache: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to refresh cache: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}
diff --git a/src/gpk-task.c b/src/gpk-task.c
index 088b93d..8643d3e 100644
--- a/src/gpk-task.c
+++ b/src/gpk-task.c
@@ -808,7 +808,7 @@ gpk_task_test_progress_cb (PkProgress *progress, PkProgressType type, EggTest *t
g_object_get (progress,
"status", &status,
NULL);
- g_debug ("now %s", pk_status_enum_to_text (status));
+ g_debug ("now %s", pk_status_enum_to_string (status));
}
}
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 29e6eec..f6770e8 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -438,7 +438,7 @@ gpk_update_viewer_update_packages_cb (PkTask *_task, GAsyncResult *res, gpointer
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
g_warning ("failed to update packages: %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));
window = GTK_WINDOW(gtk_builder_get_object (builder, "dialog_updates"));
@@ -937,7 +937,7 @@ gpk_update_viewer_progress_cb (PkProgress *progress, PkProgressType type, gpoint
GdkDisplay *display;
GdkCursor *cursor;
- g_debug ("status %s", pk_status_enum_to_text (status));
+ g_debug ("status %s", pk_status_enum_to_string (status));
/* use correct status pane */
widget = GTK_WIDGET(gtk_builder_get_object (builder, "hbox_status"));
@@ -1401,7 +1401,7 @@ gpk_update_viewer_reconsider_info (void)
NULL);
/* not when offline */
- g_debug ("network status is %s", pk_network_enum_to_text (state));
+ g_debug ("network status is %s", pk_network_enum_to_string (state));
if (state == PK_NETWORK_ENUM_OFFLINE) {
gpk_update_viewer_modal_error_with_timeout (
/* TRANSLATORS: title: nothing to do */
@@ -1614,7 +1614,7 @@ gpk_update_viewer_treeview_query_tooltip_cb (GtkWidget *widget, gint x, gint y,
ret = FALSE;
break;
}
- text = gpk_info_status_enum_to_text (info);
+ text = gpk_info_status_enum_to_string (info);
break;
default:
/* ignore */
@@ -2092,7 +2092,7 @@ gpk_update_viewer_get_details_cb (PkClient *client, GAsyncResult *res, gpointer
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to get details: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to get details: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
window = GTK_WINDOW(gtk_builder_get_object (builder, "dialog_updates"));
gpk_error_dialog_modal (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
@@ -2190,7 +2190,7 @@ gpk_update_viewer_get_update_detail_cb (PkClient *client, GAsyncResult *res, gpo
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to get update details: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to get update details: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
window = GTK_WINDOW(gtk_builder_get_object (builder, "dialog_updates"));
gpk_error_dialog_modal (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
@@ -2578,7 +2578,7 @@ gpk_update_viewer_get_updates_cb (PkClient *client, GAsyncResult *res, gpointer
/* check error code */
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_get_details (error_code));
+ g_warning ("failed to get updates: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
window = GTK_WINDOW(gtk_builder_get_object (builder, "dialog_updates"));
gpk_error_dialog_modal (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
@@ -3013,7 +3013,7 @@ gpk_update_viewer_get_distro_upgrades_cb (PkClient *client, GAsyncResult *res, g
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to get list of distro upgrades: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ g_warning ("failed to get list of distro upgrades: %s, %s", pk_error_enum_to_string (pk_error_get_code (error_code)), pk_error_get_details (error_code));
window = GTK_WINDOW(gtk_builder_get_object (builder, "dialog_updates"));
gpk_error_dialog_modal (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]