[gnome-software/wip/william/cherry-pick-4: 13/23] Format update descriptions to be suitable for Ubuntu.



commit 2c8ffa21f85bb18fa154aa1bfd6dafb1978e4057
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Jun 2 15:43:16 2016 -0400

    Format update descriptions to be suitable for Ubuntu.
    
    Don't show the update descriptions on the updates page - it's too complex to fit.
    Don't try and use markup - it doesn't work well with the information sourced from debian/changelog.

 src/gs-app-row.c                          |    9 ---------
 src/plugins/gs-plugin-packagekit-refine.c |   15 ---------------
 2 files changed, 0 insertions(+), 24 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 5f634c5..d04b9a9 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -84,15 +84,6 @@ gs_app_row_get_description (GsAppRow *app_row)
        GsAppRowPrivate *priv = gs_app_row_get_instance_private (app_row);
        const gchar *tmp = NULL;
 
-       /* convert the markdown update description into PangoMarkup */
-       if (priv->show_update &&
-           (gs_app_get_state (priv->app) == AS_APP_STATE_UPDATABLE ||
-            gs_app_get_state (priv->app) == AS_APP_STATE_UPDATABLE_LIVE)) {
-               tmp = gs_app_get_update_details (priv->app);
-               if (tmp != NULL && tmp[0] != '\0')
-                       return g_string_new (tmp);
-       }
-
        if (gs_app_get_state (priv->app) == AS_APP_STATE_UNAVAILABLE)
                return g_string_new (gs_app_get_summary_missing (priv->app));
 
diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
index d96ecd8..6c02bd6 100644
--- a/src/plugins/gs-plugin-packagekit-refine.c
+++ b/src/plugins/gs-plugin-packagekit-refine.c
@@ -341,21 +341,6 @@ gs_plugin_packagekit_refine_from_desktop (GsPlugin *plugin,
 static gchar *
 gs_plugin_packagekit_fixup_update_description (const gchar *text)
 {
-       gchar *tmp;
-       g_autoptr(GsMarkdown) markdown = NULL;
-
-       /* nothing to do */
-       if (text == NULL)
-               return NULL;
-
-       /* try to parse */
-       markdown = gs_markdown_new (GS_MARKDOWN_OUTPUT_TEXT);
-       gs_markdown_set_smart_quoting (markdown, FALSE);
-       gs_markdown_set_autocode (markdown, FALSE);
-       gs_markdown_set_autolinkify (markdown, FALSE);
-       tmp = gs_markdown_parse (markdown, text);
-       if (tmp != NULL)
-               return tmp;
        return g_strdup (text);
 }
 


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