linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / scripts / kconfig / lxdialog / checklist.c
index 7988641..db07ae7 100644 (file)
@@ -187,20 +187,17 @@ int dialog_checklist(const char *title, const char *prompt, int height,
 
        /* Print the list */
        for (i = 0; i < max_choice; i++) {
-               if (i != choice)
-                       print_item(list, items[(scroll + i) * 3 + 1],
-                                  status[i + scroll], i, 0);
+               print_item(list, items[(scroll + i) * 3 + 1],
+                          status[i + scroll], i, i == choice);
        }
-       print_item(list, items[(scroll + choice) * 3 + 1],
-                  status[choice + scroll], choice, 1);
 
        print_arrows(dialog, choice, item_no, scroll,
                     box_y, box_x + check_x + 5, list_height);
 
        print_buttons(dialog, height, width, 0);
 
-       wnoutrefresh(dialog);
        wnoutrefresh(list);
+       wnoutrefresh(dialog);
        doupdate();
 
        while (key != ESC) {
@@ -228,11 +225,12 @@ int dialog_checklist(const char *title, const char *prompt, int height,
                                        }
                                        scroll--;
                                        print_item(list, items[scroll * 3 + 1], status[scroll], 0, TRUE);
+                                       wnoutrefresh(list);
+
                                        print_arrows(dialog, choice, item_no,
                                                     scroll, box_y, box_x + check_x + 5, list_height);
 
-                                       wnoutrefresh(dialog);
-                                       wrefresh(list);
+                                       wrefresh(dialog);
 
                                        continue;       /* wait for another key press */
                                } else
@@ -254,12 +252,12 @@ int dialog_checklist(const char *title, const char *prompt, int height,
                                        scroll++;
                                        print_item(list, items[(scroll + max_choice - 1) * 3 + 1],
                                                   status[scroll + max_choice - 1], max_choice - 1, TRUE);
+                                       wnoutrefresh(list);
 
                                        print_arrows(dialog, choice, item_no,
                                                     scroll, box_y, box_x + check_x + 5, list_height);
 
-                                       wnoutrefresh(dialog);
-                                       wrefresh(list);
+                                       wrefresh(dialog);
 
                                        continue;       /* wait for another key press */
                                } else
@@ -273,8 +271,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
                                choice = i;
                                print_item(list, items[(scroll + choice) * 3 + 1],
                                           status[scroll + choice], choice, TRUE);
-                               wnoutrefresh(dialog);
-                               wrefresh(list);
+                               wnoutrefresh(list);
+                               wrefresh(dialog);
                        }
                        continue;       /* wait for another key press */
                }
@@ -308,8 +306,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
                                                print_item(list, items[(scroll + i) * 3 + 1],
                                                           status[scroll + i], i, i == choice);
                                }
-                               wnoutrefresh(dialog);
-                               wrefresh(list);
+                               wnoutrefresh(list);
+                               wrefresh(dialog);
 
                                for (i = 0; i < item_no; i++)
                                        if (status[i])