[gtksourceview/wip/gutter-draw-refactoring: 3/3] gutter: better variable name for the lines count



commit baa9b313f226158db263723dff7eb67c801d750f
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Nov 23 18:08:12 2014 +0100

    gutter: better variable name for the lines count

 gtksourceview/gtksourcegutter.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gtksourceview/gtksourcegutter.c b/gtksourceview/gtksourcegutter.c
index 65451cc..aff06e1 100644
--- a/gtksourceview/gtksourcegutter.c
+++ b/gtksourceview/gtksourcegutter.c
@@ -1028,7 +1028,7 @@ draw_cells (GtkSourceGutter *gutter,
            GArray          *pixels,
            GArray          *heights,
            GArray          *numbers,
-           gint             count,
+           gint             lines_count,
            GtkTextIter     *first_line,
            cairo_t         *cr)
 {
@@ -1069,8 +1069,9 @@ draw_cells (GtkSourceGutter *gutter,
        }
 
        start = *first_line;
+       i = 0;
 
-       for (i = 0; i < count; i++)
+       while (i < lines_count)
        {
                GtkTextIter end;
                GdkRectangle background_area;
@@ -1177,6 +1178,7 @@ draw_cells (GtkSourceGutter *gutter,
                        background_area.x += background_area.width;
                }
 
+               i++;
                gtk_text_iter_forward_line (&start);
        }
 }
@@ -1210,7 +1212,7 @@ on_view_draw (GtkSourceView   *view,
        GArray *pixels;
        GArray *heights;
        GArray *numbers;
-       gint count;
+       gint lines_count;
        GtkTextIter start;
        GtkTextIter end;
        GdkRectangle background_area;
@@ -1257,7 +1259,7 @@ on_view_draw (GtkSourceView   *view,
                                            pixels,
                                            heights,
                                            numbers,
-                                           &count,
+                                           &lines_count,
                                            &start,
                                            &end);
 
@@ -1285,7 +1287,7 @@ on_view_draw (GtkSourceView   *view,
                    pixels,
                    heights,
                    numbers,
-                   count,
+                   lines_count,
                    &start,
                    cr);
 


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