[gnome-software/wip/rancell/ubuntu-3-20-3: 47/56] Fix package name not being shown when using --details-pkg with unknown package
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/rancell/ubuntu-3-20-3: 47/56] Fix package name not being shown when using --details-pkg with unknown package
- Date: Sat, 17 Jun 2017 12:13:05 +0000 (UTC)
commit 22f5a1a6b5bef1adcf3ecf5355cd97aded4c8bc4
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Feb 2 14:28:27 2017 +1300
Fix package name not being shown when using --details-pkg with unknown package
src/gs-shell-details.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index f12c83d..e625564 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -1114,8 +1114,10 @@ gs_shell_details_app_refine_cb (GObject *source,
if (gs_app_get_kind (self->app) == AS_APP_KIND_UNKNOWN ||
gs_app_get_state (self->app) == AS_APP_STATE_UNKNOWN) {
g_autofree gchar *str = NULL;
+ const gchar *id;
- str = g_strdup_printf (_("Could not find '%s'"), gs_app_get_id (self->app));
+ id = gs_app_get_id (self->app);
+ str = g_strdup_printf (_("Could not find '%s'"), id == NULL ? gs_app_get_source_default
(self->app) : id);
gtk_label_set_text (GTK_LABEL (self->label_failed), str);
gs_shell_details_set_state (self, GS_SHELL_DETAILS_STATE_FAILED);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]