[gnome-software] PackageKit: make use of the summary in details, when available
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] PackageKit: make use of the summary in details, when available
- Date: Wed, 26 Feb 2014 16:21:54 +0000 (UTC)
commit bd655a7416bb618853eb483f03062d80ad0e31e4
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Feb 24 18:42:57 2014 +0100
PackageKit: make use of the summary in details, when available
If PackageKit is recent enough, use the summary from GetDetails
as the application summary for normal apps, and use it as the
application name for local filenames (in place of the ugly
package name).
https://bugzilla.gnome.org/show_bug.cgi?id=724669
src/plugins/gs-plugin-packagekit-refine.c | 5 +++++
src/plugins/gs-plugin-packagekit-refresh.c | 8 +++++++-
2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
index 3bb6899..9c22d74 100644
--- a/src/plugins/gs-plugin-packagekit-refine.c
+++ b/src/plugins/gs-plugin-packagekit-refine.c
@@ -183,9 +183,11 @@ gs_plugin_packagekit_resolve_packages_app (GsPlugin *plugin,
gs_app_set_name (app,
GS_APP_QUALITY_LOWEST,
pk_package_get_name (package));
+#if PK_CHECK_VERSION(0,9,1)
gs_app_set_summary (app,
GS_APP_QUALITY_LOWEST,
pk_package_get_summary (package));
+#endif
}
}
}
@@ -497,6 +499,9 @@ gs_plugin_packagekit_refine_details_app (GsPlugin *plugin,
gs_app_set_description (app,
GS_APP_QUALITY_LOWEST,
desc);
+ gs_app_set_summary (app,
+ GS_APP_QUALITY_LOWEST,
+ pk_details_get_summary (details));
g_free (desc);
break;
}
diff --git a/src/plugins/gs-plugin-packagekit-refresh.c b/src/plugins/gs-plugin-packagekit-refresh.c
index a16a960..150cfb5 100644
--- a/src/plugins/gs-plugin-packagekit-refresh.c
+++ b/src/plugins/gs-plugin-packagekit-refresh.c
@@ -262,7 +262,13 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
gs_app_set_management_plugin (app, "PackageKit");
gs_app_set_kind (app, GS_APP_KIND_PACKAGE);
gs_app_set_state (app, GS_APP_STATE_LOCAL);
- gs_app_set_name (app, GS_APP_QUALITY_LOWEST, split[PK_PACKAGE_ID_NAME]);
+#if PK_CHECK_VERSION(0,9,1)
+ if (pk_details_get_summary (item))
+ gs_app_set_name (app, GS_APP_QUALITY_LOWEST,
+ pk_details_get_summary (item));
+ else
+#endif
+ gs_app_set_name (app, GS_APP_QUALITY_LOWEST, split[PK_PACKAGE_ID_NAME]);
gs_app_set_version (app, split[PK_PACKAGE_ID_VERSION]);
gs_app_set_metadata (app, "PackageKit::local-filename", filename);
gs_app_set_origin (app, basename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]