]> git.neil.brown.name Git - plato.git/commitdiff
listsel: minor cleanups
authorNeilBrown <neilb@suse.de>
Wed, 1 Jan 2014 00:45:48 +0000 (11:45 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 1 Jan 2014 00:45:48 +0000 (11:45 +1100)
alarm/listsel.c

index d6e20f59bb158a0a0840fa4135396b05a1736d78..54d220335cfe4e9a85ab5246987b042e3edf4d1a 100644 (file)
@@ -104,9 +104,6 @@ void calc_layout_no(struct sellist *list)
        if (top > sel)
                top = sel;
 
- retry_cols:
-       // did_scroll = 0;
- retry_scroll:
        /* lay things out from 'top' */
        i = top; col = 0; row = 0;
        while (col < cols) {
@@ -126,12 +123,12 @@ void calc_layout_no(struct sellist *list)
                }
                e->need_draw = 1;
        }
-       
+
        list->han->get_size(e, &w, &h);
        cols = list->width / w;
        if (cols == 0)
                cols = 1;
- col_retry:
+col_retry:
        dist = 0;
        i = sel;
        e = list->han->getitem(list->list, i);
@@ -272,7 +269,6 @@ void calc_layout(struct sellist *list)
        if (sel < 0 || list->han->getitem(list->list, sel) == NULL)
                sel = 0;
 
-
  retry:
        //printf("try with top=%d cols=%d\n", top, cols);
        pos = top; col=0; row=0; last= -1;
@@ -356,7 +352,6 @@ void calc_layout(struct sellist *list)
        //printf("top=%d last=%d cols=%d\n", top, last, cols);
 }
 
-
 void configure(GtkWidget *draw, void *event, struct sellist *list)
 {
        GtkAllocation alloc;
@@ -448,7 +443,6 @@ void *listsel_new(void *list, struct list_handlers *han)
        return rv;
 }
 
-
 #ifdef MAIN
 
 struct list_entry_text *entries;
@@ -474,6 +468,7 @@ struct list_entry *item(void *list, int n)
        else
                return NULL;
 }
+
 int size(struct list_entry *i, int *width, int*height)
 {
        PangoRectangle ink, log;