[gnome-software/wip/kalev/arrows-fallout] app row: trivial: Fix fallout from breaking out arrows to separate label
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/arrows-fallout] app row: trivial: Fix fallout from breaking out arrows to separate label
- Date: Fri, 28 Sep 2018 12:14:42 +0000 (UTC)
commit bed90dde4208a5446ac753e01430f8eebd6db4f6
Author: Kalev Lember <klember redhat com>
Date: Fri Sep 28 13:11:40 2018 +0100
app row: trivial: Fix fallout from breaking out arrows to separate label
Try harder to hide the arrow (and the empty version label) when we only
have one of the versions set, but not the other.
src/gs-app-row.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 1a3af912..3af5a09d 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -349,21 +349,28 @@ gs_app_row_refresh (GsAppRow *app_row)
gtk_label_set_label (GTK_LABEL (priv->version_current_label),
version_current);
gtk_widget_show (priv->version_current_label);
+ } else {
+ gtk_widget_hide (priv->version_current_label);
}
/* update version */
tmp = gs_app_get_update_version_ui (priv->app);
- if (tmp != NULL && tmp[0] != '\0') {
+ if (tmp != NULL && tmp[0] != '\0' &&
+ g_strcmp0 (tmp, version_current) != 0) {
version_update = tmp;
gtk_label_set_label (GTK_LABEL (priv->version_update_label),
version_update);
gtk_widget_show (priv->version_update_label);
+ } else {
+ gtk_widget_hide (priv->version_update_label);
}
/* have both: show arrow */
if (version_current != NULL && version_update != NULL &&
g_strcmp0 (version_current, version_update) != 0) {
gtk_widget_show (priv->version_arrow_label);
+ } else {
+ gtk_widget_hide (priv->version_arrow_label);
}
/* show the box if we have either of the versions */
@@ -371,6 +378,7 @@ gs_app_row_refresh (GsAppRow *app_row)
gtk_widget_show (priv->version_box);
else
gtk_widget_hide (priv->version_box);
+
gtk_widget_hide (priv->star);
} else {
gtk_widget_hide (priv->version_box);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]