Changeset 2641 for neercs/trunk
- Timestamp:
- Aug 2, 2008, 12:53:55 PM (13 years ago)
- Location:
- neercs/trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
neercs/trunk/src/effects.c
r2627 r2641 213 213 } 214 214 215 215 int update_window_list(int c, struct screen_list *screen_list) 216 { 217 debug("Got %x\n", c); 218 219 switch(c) 220 { 221 case 0x111: 222 if(screen_list->cur_in_list>0) 223 screen_list->cur_in_list--; 224 break; 225 case 0x112: 226 if(screen_list->cur_in_list<screen_list->count-1) 227 screen_list->cur_in_list++; 228 break; 229 case 0xd: 230 screen_list->window_list = 0; 231 screen_list->prevpty = screen_list->pty; 232 screen_list->pty = screen_list->cur_in_list; 233 break; 234 case 0x22: 235 screen_list->window_list = 0; 236 break; 237 default: 238 break; 239 } 240 241 return 1; 242 } 243 244 void draw_list(struct screen_list *screen_list) 245 { 246 int i; 247 int w = (cucul_get_canvas_width(screen_list->cv)); 248 int h = (cucul_get_canvas_height(screen_list->cv)); 249 250 debug("Drawing list\n"); 251 cucul_set_color_ansi(screen_list->cv, CUCUL_BLACK, CUCUL_BLACK); 252 cucul_fill_box(screen_list->cv, 253 0, 0, 254 w, h, '#'); 255 cucul_set_color_ansi(screen_list->cv, CUCUL_DEFAULT, CUCUL_DEFAULT); 256 cucul_draw_cp437_box(screen_list->cv, 257 0, 0, 258 w, h); 259 260 cucul_printf(screen_list->cv, 2, 1, "Num \tName"); 261 for(i = 0; i < screen_list->count; i++) 262 { 263 char line[1024]; 264 if(screen_list->cur_in_list == i) 265 cucul_set_color_ansi(screen_list->cv, CUCUL_BLACK, CUCUL_WHITE); 266 else 267 cucul_set_color_ansi(screen_list->cv, CUCUL_DEFAULT, CUCUL_DEFAULT); 268 sprintf(line, "%d \t%s", i+1, screen_list->screen[i]->title); 269 270 cucul_printf(screen_list->cv, 2, i+3, line); 271 } 272 } 216 273 217 274 /* Close a window by animating it collapsing */ -
neercs/trunk/src/input.c
r2639 r2641 74 74 int refresh = 0; 75 75 76 debug("Key %x\n", c); 77 76 78 if(c >= '0' && c<='9') 77 79 { … … 148 150 refresh = 1; 149 151 break; 152 case '"': 153 case 0x34: //CTRL+" 154 screen_list->cur_in_list = screen_list->pty; 155 screen_list->window_list = !screen_list->window_list; 156 refresh = 1; 157 break; 150 158 case 'd': 151 159 case 0x04: //CACA_KEY_CTRL_D: -
neercs/trunk/src/main.c
r2639 r2641 478 478 screen_list->help = 0; 479 479 screen_list->status = 1; 480 screen_list->window_list = 0; 480 481 screen_list->wm_type = WM_VSPLIT; 481 482 screen_list->in_bell = 0; -
neercs/trunk/src/neercs.h
r2624 r2641 168 168 int mini; /* Thumbnails */ 169 169 int status; /* Status bar */ 170 int help; /* help */ 170 int help; /* Help */ 171 int window_list; /* Window list */ 172 int cur_in_list; /* Window list */ 171 173 172 174 /* ScreenSaver stuff */ … … 250 252 void draw_status(struct screen_list *screen_list); 251 253 void draw_help(struct screen_list *screen_list); 254 int update_window_list(int c, struct screen_list *screen_list); 255 void draw_list(struct screen_list *screen_list); 252 256 void draw_lock(struct screen_list *screen_list); 253 257 int update_lock(int c, struct screen_list *screen_list); -
neercs/trunk/src/screens.c
r2639 r2641 267 267 draw_help(screen_list); 268 268 } 269 if(screen_list->window_list) 270 { 271 draw_list(screen_list); 272 } 269 273 } 270 274 -
neercs/trunk/src/server.c
r2639 r2641 234 234 /* Handle lock window */ 235 235 if(screen_list->locked) 236 { 236 237 refresh |= update_lock(c, screen_list); 238 } 239 else if(screen_list->window_list) { 240 refresh |= update_window_list(c, screen_list); 241 } 237 242 else 238 243 {
Note: See TracChangeset
for help on using the changeset viewer.