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



commit a72c541095e51e140df5ce207fef5fc91d94f0ac
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 28784e9..5f634c5 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -83,7 +83,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 &&
@@ -106,8 +105,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);
 }
 
 /**
@@ -139,7 +137,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 8620c87..d4f51b1 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 948485f..468d9cd 100644
--- a/src/plugins/gs-appstream.c
+++ b/src/plugins/gs-appstream.c
@@ -411,7 +411,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]