[gnome-software] trivial: Write the correct metadata values for distro upgrades
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Write the correct metadata values for distro upgrades
- Date: Thu, 11 May 2017 14:25:05 +0000 (UTC)
commit 49d0a870f2d1a4ef6a1491d85edefe326e548794
Author: Richard Hughes <richard hughsie com>
Date: Thu May 11 15:20:34 2017 +0100
trivial: Write the correct metadata values for distro upgrades
src/gs-editor.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/src/gs-editor.c b/src/gs-editor.c
index c3d4c41..74f7a8a 100644
--- a/src/gs-editor.c
+++ b/src/gs-editor.c
@@ -354,8 +354,13 @@ gs_editor_refresh_details (GsEditor *self)
GtkTextIter iter_start;
g_autofree gchar *css_existing = NULL;
- css = as_app_get_metadata_item (self->selected_item,
- "GnomeSoftware::FeatureTile-css");
+ if (app_kind == AS_APP_KIND_OS_UPGRADE) {
+ css = as_app_get_metadata_item (self->selected_item,
+ "GnomeSoftware::UpgradeBanner-css");
+ } else {
+ css = as_app_get_metadata_item (self->selected_item,
+ "GnomeSoftware::FeatureTile-css");
+ }
if (css == NULL)
css = "";
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
@@ -437,8 +442,13 @@ gs_design_dialog_buffer_changed_cb (GtkTextBuffer *buffer, GsEditor *self)
gtk_text_buffer_get_bounds (buffer, &iter_start, &iter_end);
css = gtk_text_buffer_get_text (buffer, &iter_start, &iter_end, FALSE);
g_debug ("CSS now '%s'", css);
- as_app_add_metadata (self->selected_item, "GnomeSoftware::FeatureTile-css", NULL);
- as_app_add_metadata (self->selected_item, "GnomeSoftware::FeatureTile-css", css);
+ if (as_app_get_kind (self->selected_item) == AS_APP_KIND_OS_UPGRADE) {
+ as_app_add_metadata (self->selected_item, "GnomeSoftware::UpgradeBanner-css", NULL);
+ as_app_add_metadata (self->selected_item, "GnomeSoftware::UpgradeBanner-css", css);
+ } else {
+ as_app_add_metadata (self->selected_item, "GnomeSoftware::FeatureTile-css", NULL);
+ as_app_add_metadata (self->selected_item, "GnomeSoftware::FeatureTile-css", css);
+ }
self->pending_changes = TRUE;
gs_design_dialog_refresh_details_delayed (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]