summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tuiclient/mainwindow.cpp')
-rw-r--r--tuiclient/mainwindow.cpp38
1 files changed, 22 insertions, 16 deletions
diff --git a/tuiclient/mainwindow.cpp b/tuiclient/mainwindow.cpp
index 6a27022..55a16e7 100644
--- a/tuiclient/mainwindow.cpp
+++ b/tuiclient/mainwindow.cpp
@@ -40,24 +40,24 @@ void Tmainwindow::disconnected(){
set_status("[Connecting... Attempt:"+toString(attempt_num)+". Waiting for 1 sec, before next reconnect.]");
}
void Tmainwindow::msg_status(){
- msg_short(0,width/2-13,"tuiclient to segget daemon");
+ msg_short(0,2,"Tuiclient "+status_str);
+ msg_short(0,width-40,"[h-Help] [q-Quit]");
msg_short(0,width-20,"[Lines:"+toString(top_position+1)+"-"+toString(top_position+1+bottom_screenline_num)+"/"+toString(max_received_screenline_num+1)+"]");
- msg_short(height-1,2,status_str);
- msg_short(height-1,width-18,"[h-Help] [q-Quit]");
+// msg_short(height-1,2,status_str);
+// msg_short(height-1,width-18,"");
}
void Tmainwindow::compose(){
//clear();
box(window, ACS_VLINE, ACS_HLINE);
getmaxyx(window,height,width);
- bottom_screenline_num=height-3;
- color_status();
+ screenlines[27]=sms;
+ bottom_screenline_num=height-2;
+ color_status(window);
msg_status();
- color_info();
- for (uint y=bottom_screenline_num,status_line_num=0; y<height-2; y++,status_line_num++){
- msg_line(y+1,screen_info_lines[status_line_num]);
- }
- color_downloads();
+ color_info(window);
+ msg_short(height-1,2,screen_info_lines[0]);
+ color_downloads(window);
// screenlines[26]="Max_num:"+toString(max_received_screenline_num);
for (int y=0, line_num=top_position; y<bottom_screenline_num; y++, line_num++){
msg_line(y+1,screenlines[line_num]);
@@ -65,14 +65,19 @@ void Tmainwindow::compose(){
wrefresh(window);
//and show children
if (log_win.visible && error_log_win.visible){
- int modd = (height-3)%4;
- log_win.resize((height-3)/4+modd, width, 1+(height-3)/4*2, 0);
- error_log_win.resize((height-3)/4, width, 1+(height-3)/4*3+modd, 0);
+ int modd = (height-2)%4;
+ log_win.resize((height-2)/4+modd, width, 1+(height-2)/4*2, 0);
+ error_log_win.resize((height-2)/4, width, 1+(height-2)/4*3+modd, 0);
}else{
- int modd = (height-3)%2;
- log_win.resize((height-3)/2+modd, width, 1+(height-3)/2, 0);
- error_log_win.resize((height-3)/2+modd, width, 1+(height-3)/2, 0);
+ int modd = (height-2)%2;
+ log_win.resize((height-2)/2+modd, width, 1+(height-2)/2, 0);
+ error_log_win.resize((height-2)/2+modd, width, 1+(height-2)/2, 0);
}
+ int modd = (height-2)%2;
+ distfiles_win.resize((height-3)/2+modd, width, 1+(height-3)/2, 0);
+
+ distfiles_win.show();
+
log_win.show();
error_log_win.show();
@@ -113,6 +118,7 @@ void Tmainwindow::init(){
notfresh=TRUE;
help_win.init(" HELP ",14,31,5,5);
log_win.init(" LOG ",12,50,5,5);
+ distfiles_win.init(" DISTFILES ",12,50,5,5);
error_log_win.init(" ERROR LOG ",12,50,5,5);
}