[gnome-software/gnome-3-20] Do not show a warning when an AppStream update description contains markup



commit 84fcc0028ab7027228c82f1bffedaf3620f9197c
Author: Richard Hughes <richard hughsie com>
Date:   Fri May 27 16:14:22 2016 +0100

    Do not show a warning when an AppStream update description contains markup

 src/gs-app-row.c           |    6 ++----
 src/gs-update-dialog.c     |    2 +-
 src/plugins/gs-appstream.c |    2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index b40dab0..f1114f9 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -82,7 +82,6 @@ gs_app_row_get_description (GsAppRow *app_row)
 {
        GsAppRowPrivate *priv = gs_app_row_get_instance_private (app_row);
        const gchar *tmp = NULL;
-       g_autofree gchar *escaped = NULL;
 
        /* convert the markdown update description into PangoMarkup */
        if (priv->show_update &&
@@ -105,8 +104,7 @@ gs_app_row_get_description (GsAppRow *app_row)
                tmp = gs_app_get_name (priv->app);
        if (tmp == NULL)
                return NULL;
-       escaped = g_markup_escape_text (tmp, -1);
-       return g_string_new (escaped);
+       return g_string_new (tmp);
 }
 
 /**
@@ -138,7 +136,7 @@ gs_app_row_refresh (GsAppRow *app_row)
        str = gs_app_row_get_description (app_row);
        if (str != NULL) {
                as_utils_string_replace (str, "\n", " ");
-               gtk_label_set_markup (GTK_LABEL (priv->description_label), str->str);
+               gtk_label_set_label (GTK_LABEL (priv->description_label), str->str);
                g_string_free (str, TRUE);
        } else {
                gtk_label_set_text (GTK_LABEL (priv->description_label), NULL);
diff --git a/src/gs-update-dialog.c b/src/gs-update-dialog.c
index 45bae7d..74c96d9 100644
--- a/src/gs-update-dialog.c
+++ b/src/gs-update-dialog.c
@@ -120,7 +120,7 @@ set_updates_description_ui (GsUpdateDialog *dialog, GsApp *app)
                 * a description for the update */
                update_details = _("No update description available.");
        }
-       gtk_label_set_markup (GTK_LABEL (dialog->label_details), update_details);
+       gtk_label_set_label (GTK_LABEL (dialog->label_details), update_details);
        gtk_label_set_label (GTK_LABEL (dialog->label_name), gs_app_get_name (app));
        gtk_label_set_label (GTK_LABEL (dialog->label_summary), gs_app_get_summary (app));
 
diff --git a/src/plugins/gs-appstream.c b/src/plugins/gs-appstream.c
index 5d85e16..18287c6 100644
--- a/src/plugins/gs-appstream.c
+++ b/src/plugins/gs-appstream.c
@@ -427,7 +427,7 @@ gs_appstream_refine_app_updates (GsPlugin *plugin,
                        if (desc == NULL)
                                return FALSE;
                        g_string_append_printf (update_desc,
-                                               "<b>Version %s:</b>\n%s\n\n",
+                                               "Version %s:\n%s\n\n",
                                                as_release_get_version (rel),
                                                desc);
                }


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