[gnome-packagekit] Do not show the full path when installing local files



commit 79782f344f177598ac2ff304698b0f3827b9ac2a
Author: Richard Hughes <richard hughsie com>
Date:   Wed Aug 24 15:54:42 2011 +0100

    Do not show the full path when installing local files

 src/gpk-dbus-task.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index eda869e..94060c5 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -994,6 +994,7 @@ gpk_dbus_task_install_package_files (GpkDbusTask *dtask, gchar **files_rel, GpkD
 	gboolean ret;
 	GPtrArray *array;
 	guint len;
+	guint i;
 
 	g_return_if_fail (GPK_IS_DBUS_TASK (dtask));
 	g_return_if_fail (files_rel != NULL);
@@ -1002,7 +1003,10 @@ gpk_dbus_task_install_package_files (GpkDbusTask *dtask, gchar **files_rel, GpkD
 	dtask->priv->finished_cb = finished_cb;
 	dtask->priv->finished_userdata = userdata;
 
-	array = pk_strv_to_ptr_array (files_rel);
+	/* only show the basenames */
+	array = g_ptr_array_new_with_free_func (g_free);
+	for (i = 0; files_rel[i] != NULL; i++)
+		g_ptr_array_add (array, g_path_get_basename (files_rel[i]));
 
 	/* check the user wanted to call this method */
 	if (dtask->priv->show_confirm_search) {



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