[gnome-software/wip/rancell/ubuntu-3-20-rebase: 3/28] gs-app: Make subsume copy over more things



commit 332254491985ee860a668bd0b9b36015867d8498
Author: Iain Lane <iain orangesquash org uk>
Date:   Wed Apr 13 18:53:44 2016 +0100

    gs-app: Make subsume copy over more things

 src/gs-app.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index c213459..6132c51 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -2135,6 +2135,8 @@ gs_app_subsume (GsApp *app, GsApp *other)
        }
 
        /* save any properties we already know */
+       if (other->id != NULL)
+               gs_app_set_id (app, other->id);
        if (other->sources->len > 0)
                gs_app_set_sources (app, other->sources);
        if (other->project_group != NULL)
@@ -2169,11 +2171,19 @@ gs_app_subsume (GsApp *app, GsApp *other)
                        gs_app_add_category (app, tmp);
                }
        }
+       if (other->licence != NULL) {
+               /* can't use setter as the incoming text is lost */
+               app->licence = g_strdup (other->licence);
+               app->licence_is_free = other->licence_is_free;
+       }
+       if (other->origin != NULL)
+               gs_app_set_origin (app, other->origin);
        for (i = 0; i < other->related->len; i++) {
                app_tmp = g_ptr_array_index (other->related, i);
                gs_app_add_related (app, app_tmp);
        }
        app->kudos |= other->kudos;
+       app->quirk |= other->quirk;
 
        /* copy metadata from @other to @app unless the app already has a key
         * of that name */


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