[gnome-software] packagekit: Set the application description for long single line package descriptions



commit 0a61a5e464bd3d7088662e940ed625cb3834efff
Author: Richard Hughes <richard hughsie com>
Date:   Fri Feb 7 21:15:39 2014 +0100

    packagekit: Set the application description for long single line package descriptions

 src/plugins/gs-plugin-packagekit-refresh.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-refresh.c b/src/plugins/gs-plugin-packagekit-refresh.c
index e37059b..08c4efb 100644
--- a/src/plugins/gs-plugin-packagekit-refresh.c
+++ b/src/plugins/gs-plugin-packagekit-refresh.c
@@ -166,6 +166,7 @@ out:
  *
  * The cases we have to deal with:
  *  - Single line text, so all to summary
+ *  - Single line long text, so all to description
  *  - Multiple line text, so first line to summary and the rest to description
  */
 static void
@@ -178,7 +179,11 @@ gs_plugin_packagekit_refresh_set_text (GsApp *app, const gchar *text)
        tmp = g_strdup (text);
        nl = g_strstr_len (tmp, -1, "\n");
        if (nl == NULL) {
-               gs_app_set_summary (app, GS_APP_QUALITY_LOWEST, text);
+               if (strlen (text) < 40) {
+                       gs_app_set_summary (app, GS_APP_QUALITY_LOWEST, text);
+                       goto out;
+               }
+               gs_app_set_description (app, GS_APP_QUALITY_LOWEST, text);
                goto out;
        }
        *nl = '\0';


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