[gnome-software] Improve display of recently installed updates
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Improve display of recently installed updates
- Date: Thu, 20 Mar 2014 00:45:11 +0000 (UTC)
commit 137b5dbe1f8aa9952e4944db9480be989a346c4d
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Mar 19 20:39:25 2014 -0400
Improve display of recently installed updates
Don't show the number of updates in the tab button. This is
misleading since the button is not depressed, so having the
number there gives the impression that there is _another_ tab
with that number of updates, when in fact the number refers
to the already installed updates that we are showing.
Also, don't show a refresh button for already installed updates.
src/gs-shell-updates.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-shell-updates.c b/src/gs-shell-updates.c
index 1765575..ae6d45d 100644
--- a/src/gs-shell-updates.c
+++ b/src/gs-shell-updates.c
@@ -268,7 +268,8 @@ gs_shell_updates_update_ui_state (GsShellUpdates *shell_updates)
gtk_image_set_from_icon_name (GTK_IMAGE (widget),
"view-refresh-symbolic", 0);
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_refresh"));
- gtk_widget_show (widget);
+ gtk_widget_set_visible (widget,
+ gs_shell_get_mode (priv->shell) != GS_SHELL_MODE_UPDATED);
break;
case GS_SHELL_UPDATES_STATE_NO_UPDATES:
gtk_image_set_from_icon_name (GTK_IMAGE (widget),
@@ -384,7 +385,8 @@ gs_shell_updates_get_updates_cb (GsPluginLoader *plugin_loader,
list = gs_plugin_loader_get_updates_finish (plugin_loader, res, &error);
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_updates_counter"));
- if (list != NULL && g_list_length (list) > 0) {
+ if (list != NULL &&
+ gs_shell_get_mode (priv->shell) != GS_SHELL_MODE_UPDATED) {
gchar *text;
text = g_strdup_printf ("%d", g_list_length (list));
gtk_label_set_label (GTK_LABEL (widget), text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]