[gnome-software] Put an emphasis on the updates button when there are updates
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Put an emphasis on the updates button when there are updates
- Date: Thu, 29 Aug 2013 23:43:37 +0000 (UTC)
commit 63987576ced2ab4eca07f8fcfeca2af70e5e3700
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Aug 29 19:42:08 2013 -0400
Put an emphasis on the updates button when there are updates
This uses the newly introduced throbbing style. We only
put the emphasis on the button if we are not already on
the updates page.
src/gs-shell-updates.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-updates.c b/src/gs-shell-updates.c
index b0608e6..6b33068 100644
--- a/src/gs-shell-updates.c
+++ b/src/gs-shell-updates.c
@@ -113,6 +113,12 @@ gs_shell_updates_get_updates_cb (GsPluginLoader *plugin_loader,
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "scrolledwindow_updates"));
gtk_widget_set_visible (widget, list != NULL);
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_updates"));
+ if (list != NULL && gs_shell_get_mode (priv->shell) != GS_SHELL_MODE_UPDATES)
+ gtk_style_context_add_class (gtk_widget_get_style_context (widget), "needs-attention");
+ else
+ gtk_style_context_remove_class (gtk_widget_get_style_context (widget), "needs-attention");
+
if (gs_shell_get_mode (priv->shell) == GS_SHELL_MODE_UPDATES) {
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_update_all"));
gtk_widget_set_visible (widget, list != NULL);
@@ -155,6 +161,8 @@ gs_shell_updates_refresh (GsShellUpdates *shell_updates)
/* no need to refresh */
if (priv->cache_valid) {
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_updates"));
+ gtk_style_context_remove_class (gtk_widget_get_style_context (widget), "needs-attention");
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_update_all"));
list = gtk_container_get_children (GTK_CONTAINER (priv->list_box_updates));
gtk_widget_set_visible (widget, list != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]