[gtk+] widgetpath: correctly print the siblings index



commit 92e64441634a16a30382e63f8cc442a6ff40c04b
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Nov 23 11:22:30 2011 -0500

    widgetpath: correctly print the siblings index
    
    In gtk_widget_path_to_string() we were counting siblings from zero
    instead of one, resulting in confusing output.

 gtk/gtkwidgetpath.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidgetpath.c b/gtk/gtkwidgetpath.c
index a694f7b..5720b38 100644
--- a/gtk/gtkwidgetpath.c
+++ b/gtk/gtkwidgetpath.c
@@ -331,7 +331,7 @@ gtk_widget_path_to_string (const GtkWidgetPath *path)
 
       if (elem->siblings)
         g_string_append_printf (string, "[%d/%d]",
-                                elem->sibling_index,
+                                elem->sibling_index + 1,
                                 gtk_widget_path_length (elem->siblings));
 
       if (elem->classes)



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