[gnome-software/wip/rancell/ubuntu-3-20-rebase: 9/37] Format update descriptions to be suitable for Ubuntu.
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/rancell/ubuntu-3-20-rebase: 9/37] Format update descriptions to be suitable for Ubuntu.
- Date: Sat, 17 Jun 2017 09:26:17 +0000 (UTC)
commit 3e65e49188655b555628fdb78aadcdce5953704d
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Mar 15 14:12:13 2016 +1300
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 | 16 ----------------
src/gs-update-dialog.c | 12 ++----------
2 files changed, 2 insertions(+), 26 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index d2f94a8..b7f9551 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -85,22 +85,6 @@ gs_app_row_get_description (GsAppRow *app_row)
const gchar *tmp = NULL;
g_autofree gchar *escaped = 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') {
- g_autoptr(GsMarkdown) markdown = NULL;
- markdown = gs_markdown_new (GS_MARKDOWN_OUTPUT_PANGO);
- gs_markdown_set_smart_quoting (markdown, FALSE);
- gs_markdown_set_autocode (markdown, FALSE);
- gs_markdown_set_autolinkify (markdown, FALSE);
- escaped = gs_markdown_parse (markdown, tmp);
- return g_string_new (escaped);
- }
- }
-
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/gs-update-dialog.c b/src/gs-update-dialog.c
index 937c9a0..9f8e449 100644
--- a/src/gs-update-dialog.c
+++ b/src/gs-update-dialog.c
@@ -92,8 +92,7 @@ set_updates_description_ui (GsUpdateDialog *dialog, GsApp *app)
{
AsAppKind kind;
const GdkPixbuf *pixbuf;
- const gchar *update_details;
- g_autofree gchar *update_desc = NULL;
+ const gchar *update_desc;
/* set window title */
kind = gs_app_get_kind (app);
@@ -123,14 +122,7 @@ set_updates_description_ui (GsUpdateDialog *dialog, GsApp *app)
_("No update description available."));
/* get the update description */
- update_details = gs_app_get_update_details (app);
- if (update_details != NULL) {
- g_autoptr(GsMarkdown) markdown = NULL;
- markdown = gs_markdown_new (GS_MARKDOWN_OUTPUT_PANGO);
- gs_markdown_set_smart_quoting (markdown, FALSE);
- gs_markdown_set_autocode (markdown, TRUE);
- update_desc = gs_markdown_parse (markdown, update_details);
- }
+ update_desc = gs_app_get_update_details (app);
/* set update header */
gtk_widget_set_visible (dialog->box_header, kind == AS_APP_KIND_DESKTOP);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]