[gnome-software] Fix the argument order of gs_app_set_licence()
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Fix the argument order of gs_app_set_licence()
- Date: Fri, 26 Feb 2016 11:07:32 +0000 (UTC)
commit 82608193bae01c6a2a32a0f2b794ebec17e5b657
Author: Richard Hughes <richard hughsie com>
Date: Fri Feb 26 11:06:43 2016 +0000
Fix the argument order of gs_app_set_licence()
Make it match all the other functions that do this.
src/gs-app.c | 2 +-
src/gs-app.h | 4 ++--
src/plugins/gs-plugin-appstream.c | 4 ++--
src/plugins/gs-plugin-dummy.c | 3 ++-
src/plugins/gs-plugin-fwupd.c | 4 ++--
src/plugins/gs-plugin-packagekit-refine.c | 4 ++--
src/plugins/gs-plugin-packagekit-refresh.c | 2 +-
7 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 700686a..4c37315 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -1291,7 +1291,7 @@ gs_app_get_licence_token_is_nonfree (const gchar *token)
* gs_app_set_licence:
*/
void
-gs_app_set_licence (GsApp *app, const gchar *licence, GsAppQuality quality)
+gs_app_set_licence (GsApp *app, GsAppQuality quality, const gchar *licence)
{
GString *urld;
guint i;
diff --git a/src/gs-app.h b/src/gs-app.h
index e26f3a2..18bfe5a 100644
--- a/src/gs-app.h
+++ b/src/gs-app.h
@@ -137,8 +137,8 @@ void gs_app_set_url (GsApp *app,
const gchar *gs_app_get_licence (GsApp *app);
gboolean gs_app_get_licence_is_free (GsApp *app);
void gs_app_set_licence (GsApp *app,
- const gchar *licence,
- GsAppQuality quality);
+ GsAppQuality quality,
+ const gchar *licence);
gchar **gs_app_get_menu_path (GsApp *app);
void gs_app_set_menu_path (GsApp *app,
gchar **menu_path);
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 075340d..7249be9 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -635,8 +635,8 @@ gs_plugin_refine_item (GsPlugin *plugin, GsApp *app, AsApp *item, GError **error
/* set licence */
if (as_app_get_project_license (item) != NULL && gs_app_get_licence (app) == NULL)
gs_app_set_licence (app,
- as_app_get_project_license (item),
- GS_APP_QUALITY_HIGHEST);
+ GS_APP_QUALITY_HIGHEST,
+ as_app_get_project_license (item));
/* set keywords */
if (as_app_get_keywords (item, NULL) != NULL &&
diff --git a/src/plugins/gs-plugin-dummy.c b/src/plugins/gs-plugin-dummy.c
index c6b7df2..ff47d78 100644
--- a/src/plugins/gs-plugin-dummy.c
+++ b/src/plugins/gs-plugin-dummy.c
@@ -156,7 +156,8 @@ gs_plugin_refine (GsPlugin *plugin,
app = GS_APP (l->data);
if (gs_app_get_name (app) == NULL) {
if (g_strcmp0 (gs_app_get_id (app), "gnome-boxes") == 0) {
- gs_app_set_licence (app, "GPL-2.0+", GS_APP_QUALITY_NORMAL);
+ gs_app_set_licence (app, GS_APP_QUALITY_NORMAL,
+ "GPL-2.0+");
gs_app_set_name (app, GS_APP_QUALITY_NORMAL,
"Boxes");
gs_app_set_url (app, AS_URL_KIND_HOMEPAGE,
diff --git a/src/plugins/gs-plugin-fwupd.c b/src/plugins/gs-plugin-fwupd.c
index 427d90b..37de596 100644
--- a/src/plugins/gs-plugin-fwupd.c
+++ b/src/plugins/gs-plugin-fwupd.c
@@ -234,8 +234,8 @@ gs_plugin_fwupd_set_app_from_kv (GsApp *app, const gchar *key, GVariant *val)
}
if (g_strcmp0 (key, "License") == 0) {
gs_app_set_licence (app,
- g_variant_get_string (val, NULL),
- GS_APP_QUALITY_NORMAL);
+ GS_APP_QUALITY_NORMAL,
+ g_variant_get_string (val, NULL));
return;
}
if (g_strcmp0 (key, "UpdateDescription") == 0) {
diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
index d3c379f..ef815b7 100644
--- a/src/plugins/gs-plugin-packagekit-refine.c
+++ b/src/plugins/gs-plugin-packagekit-refine.c
@@ -485,8 +485,8 @@ gs_plugin_packagekit_refine_details_app (GsPlugin *plugin,
license_spdx = as_utils_license_to_spdx (pk_details_get_license (details));
if (license_spdx != NULL) {
gs_app_set_licence (app,
- license_spdx,
- GS_APP_QUALITY_LOWEST);
+ GS_APP_QUALITY_LOWEST,
+ license_spdx);
}
}
if (gs_app_get_url (app, AS_URL_KIND_HOMEPAGE) == NULL) {
diff --git a/src/plugins/gs-plugin-packagekit-refresh.c b/src/plugins/gs-plugin-packagekit-refresh.c
index d1d1627..7aa5c96 100644
--- a/src/plugins/gs-plugin-packagekit-refresh.c
+++ b/src/plugins/gs-plugin-packagekit-refresh.c
@@ -383,7 +383,7 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
gs_app_set_url (app, AS_URL_KIND_HOMEPAGE, pk_details_get_url (item));
gs_app_set_size (app, pk_details_get_size (item));
license_spdx = as_utils_license_to_spdx (pk_details_get_license (item));
- gs_app_set_licence (app, license_spdx, GS_APP_QUALITY_LOWEST);
+ gs_app_set_licence (app, GS_APP_QUALITY_LOWEST, license_spdx);
/* look for a desktop file so we can use a valid application id */
if (!gs_plugin_packagekit_refresh_guess_app_id (plugin,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]