[gnome-software] trivial: Don't show 'unknown' for a source in the results



commit 3122ab7de986af9bfc18c5763f00627335074b15
Author: Richard Hughes <richard hughsie com>
Date:   Wed Aug 10 14:28:28 2016 +0100

    trivial: Don't show 'unknown' for a source in the results

 src/gs-app-row.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 90945b6..8459bef 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -332,15 +332,13 @@ gs_app_row_refresh (GsAppRow *app_row)
 
        /* where did this app come from */
        if (priv->show_source) {
-               g_autofree gchar *origin_tmp = NULL;
                tmp = gs_app_get_origin_hostname (priv->app);
-               if (tmp == NULL) {
+               if (tmp != NULL) {
+                       g_autofree gchar *origin_tmp = NULL;
                        /* TRANSLATORS: this refers to where the app came from */
-                       tmp = _("unknown");
+                       origin_tmp = g_strdup_printf ("%s: %s", _("Source"), tmp);
+                       gtk_label_set_label (GTK_LABEL (priv->label_origin), origin_tmp);
                }
-               /* TRANSLATORS: this refers to where the app came from */
-               origin_tmp = g_strdup_printf ("%s: %s", _("Source"), tmp);
-               gtk_label_set_label (GTK_LABEL (priv->label_origin), origin_tmp);
                gtk_widget_set_visible (priv->label_origin, tmp != NULL);
        } else {
                gtk_widget_set_visible (priv->label_origin, FALSE);


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