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

Samuel samuel.verstraete at gmail.com
Sat Aug 27 10:29:58 CEST 2011


commit c83e7040c5c501e2134a0656734c6c5069077eed
Author: Samuel <samuel.verstraete at gmail.com>
Date:   Sat Aug 27 10:29:58 2011 +0200

    lconnman: clean up
---
 src/gui/choice_window.vala |    5 ++---
 src/lconnman.vala          |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gui/choice_window.vala b/src/gui/choice_window.vala
index 0a1acff..78b42cf 100644
--- a/src/gui/choice_window.vala
+++ b/src/gui/choice_window.vala
@@ -19,8 +19,8 @@ public class ChoiceWindow {
     this.Choices = choices;
 
     //put the window in the middle of the screen;
-    int startx = (80 - Width) / 2;
-    int starty = (24 - Height) / 2;
+    int startx = (COLS - Width) / 2;
+    int starty = (LINES - Height) / 2;
 
     this.window = new Window (Height, Width, starty, startx);
     this.window.bkgdset (COLOR_PAIR(1));
@@ -60,7 +60,6 @@ public class ChoiceWindow {
       if (this.choice != 0) //user pushed enter, quit infinite loop
         break;
     }
-    this.window.clrtoeol();
     this.window.refresh();
   }
 
diff --git a/src/lconnman.vala b/src/lconnman.vala
index d1128e6..effe0d8 100644
--- a/src/lconnman.vala
+++ b/src/lconnman.vala
@@ -10,7 +10,7 @@ int main() {
   init_pair((short)1, Color.WHITE, Color.BLUE);
 
   string[] services =  get_services();
-  ChoiceWindow cw = new ChoiceWindow(services, 60, 10);
+  ChoiceWindow cw = new ChoiceWindow(services, COLS, (int)(0.8 * LINES));
 
   endwin();
   return 0;


More information about the Lunar-commits mailing list