[gnome-software] trivial: Check if we toggled the buttons earlier before we re-request data



commit 7807b665d3139a1573842bdb2ba72c9b26a2e1cf
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jan 24 11:41:03 2013 +0000

    trivial: Check if we toggled the buttons earlier before we re-request data

 src/gs-main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-main.c b/src/gs-main.c
index 3151169..107d392 100644
--- a/src/gs-main.c
+++ b/src/gs-main.c
@@ -929,9 +929,6 @@ gs_main_set_overview_mode_ui (GsMainPrivate *priv, GsMainMode mode)
 {
 	GtkWidget *widget;
 
-	if (priv->ignore_primary_buttons)
-		return;
-
 	priv->ignore_primary_buttons = TRUE;
 	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_new"));
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), mode == GS_MAIN_MODE_NEW);
@@ -1004,6 +1001,9 @@ gs_main_set_overview_mode_ui (GsMainPrivate *priv, GsMainMode mode)
 static void
 gs_main_set_overview_mode (GsMainPrivate *priv, GsMainMode mode)
 {
+	if (priv->ignore_primary_buttons)
+		return;
+
 	/* set controls */
 	gs_main_set_overview_mode_ui (priv, mode);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]