[evolution] Bug 619900 - First widget skipped in e_shell_hide_widgets_for_express_mode()



commit 06e053a5bd70f99171cdf38583ba1660f421616a
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri May 28 09:50:11 2010 -0400

    Bug 619900 - First widget skipped in e_shell_hide_widgets_for_express_mode()

 shell/e-shell-utils.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c
index 9fbb0bb..1b19d17 100644
--- a/shell/e-shell-utils.c
+++ b/shell/e-shell-utils.c
@@ -373,7 +373,6 @@ e_shell_hide_widgets_for_express_mode (EShell *shell,
                                        ...)
 {
 	va_list args;
-	const gchar *name;
 
 	g_return_if_fail (E_IS_SHELL (shell));
 	g_return_if_fail (GTK_IS_BUILDER (builder));
@@ -384,21 +383,20 @@ e_shell_hide_widgets_for_express_mode (EShell *shell,
 
 	va_start (args, widget_name);
 
-	name = va_arg (args, const gchar *);
-	while (name) {
+	while (widget_name != NULL) {
 		GObject *object;
 
-		object = gtk_builder_get_object (builder, name);
+		object = gtk_builder_get_object (builder, widget_name);
 		if (!GTK_IS_WIDGET (object)) {
 			g_error (
 				"Object '%s' was not found in the builder "
-				"file, or it is not a GtkWidget", name);
+				"file, or it is not a GtkWidget", widget_name);
 			g_assert_not_reached ();
 		}
 
 		gtk_widget_hide (GTK_WIDGET (object));
 
-		name = va_arg (args, const gchar *);
+		widget_name = va_arg (args, const gchar *);
 	}
 
 	va_end (args);



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