[Lunar-commits] <lconnman> lconnman: clean up

Samuel Verstraete samuel.verstraete at gmail.com
Sat Aug 20 08:25:50 CEST 2011


commit 63b0e01317076ee6e6f9cfc74b70ad472be9f60f
Author: Samuel Verstraete <samuel.verstraete at gmail.com>
Date:   Sat Aug 20 08:25:50 2011 +0200

    lconnman: clean up
---
 src/gui/choice_window.vala |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/src/gui/choice_window.vala b/src/gui/choice_window.vala
index 03a5d73..fe928d2 100644
--- a/src/gui/choice_window.vala
+++ b/src/gui/choice_window.vala
@@ -18,15 +18,6 @@ public class ChoiceWindow {
     this.Height = height;
     this.Choices = choices;
 
-    //initscr();
-
-    //start_color();
-    //init_pair((short)1, Color.WHITE, Color.BLUE);
-
-    //clear();
-    //noecho();
-    //cbreak();
-
     //put the window in the middle of the screen;
     int startx = (80 - Width) / 2;
     int starty = (24 - Height) / 2;
@@ -39,8 +30,6 @@ public class ChoiceWindow {
     //this will not work, need to figure out a way, maybe create a new window?
     //mvprintw(0,0, "Use arrow keys to go up and down, Press enter to select a choice");
 
-    this.window.refresh();
-
     this.print_choice_menu();
 
     while(true){
@@ -70,11 +59,11 @@ public class ChoiceWindow {
           break;
       }
       this.print_choice_menu();
-      if (this.choice != 0)
+      if (this.choice != 0) //user pushed enter, quit infinite loop
         break;
     }
     this.window.clrtoeol();
-    refresh();
+    this.window.refresh();
   }
 
   private void print_choice_menu() {
@@ -92,5 +81,6 @@ public class ChoiceWindow {
       }
       y++;
     }
+    this.window.refresh();
   }
 }


More information about the Lunar-commits mailing list