Changeset 369707ed232a584a6b9f06c3e2c84ce4eb9f281e
- Timestamp:
- 10/27/09 20:51:52 (4 weeks ago)
- git-author:
- Nelson Elhage <nelhage@mit.edu> / 2009-10-07T23:16:48Z-0400
- Parents:
- da0bfb7e0400c87413670a4a305849165e63181a
- Children:
- 2447a1ba09d4f7cff926232db18cfe3ac3c96ea6
- git-committer:
- Nelson Elhage <nelhage@mit.edu> / 2009-10-27T20:51:52Z-0400
- Files:
-
- 6 modified
Legend:
- Unmodified
- Added
- Removed
-
cmd.c
r36486be r369707e 88 88 if (argc < 0) { 89 89 owl_free(tmpbuff); 90 sepbar(NULL);91 90 owl_function_makemsg("Unbalanced quotes"); 92 91 return NULL; … … 99 98 owl_parsefree(argv, argc); 100 99 owl_free(tmpbuff); 101 sepbar(NULL);102 100 return retval; 103 101 } -
functions.c
rda0bfb7 r369707e 1054 1054 } 1055 1055 1056 sepbar("");1057 1056 owl_function_makemsg(""); 1058 1057 -
global.c
r4212827 r369707e 440 440 /* refresh stuff */ 441 441 owl_mainwin_redisplay(&(g->mw)); 442 sepbar(NULL);443 442 owl_editwin_redisplay(g->tw, 0); 444 443 owl_function_full_redisplay(); -
mainwin.c
r4212827 r369707e 196 196 reframe_normal(mw); 197 197 } 198 } 199 200 void sepbar(void) /* noproto */ 201 { 202 char buff[1024]; 203 WINDOW *sepwin; 204 const owl_messagelist *ml; 205 const owl_view *v; 206 owl_view_iterator *iter; 207 int x, y; 208 const char *foo, *appendtosepbar; 209 210 iter = owl_view_iterator_free_later(owl_view_iterator_new()); 211 212 sepwin=owl_global_get_curs_sepwin(&g); 213 ml=owl_global_get_msglist(&g); 214 v=owl_global_get_current_view(&g); 215 216 werase(sepwin); 217 wattron(sepwin, A_REVERSE); 218 if (owl_global_is_fancylines(&g)) { 219 whline(sepwin, ACS_HLINE, owl_global_get_cols(&g)); 220 } else { 221 whline(sepwin, '-', owl_global_get_cols(&g)); 222 } 223 224 if (owl_global_is_sepbar_disable(&g)) { 225 getyx(sepwin, y, x); 226 wmove(sepwin, y, owl_global_get_cols(&g)-1); 227 return; 228 } 229 230 wmove(sepwin, 0, 2); 231 232 if (owl_messagelist_get_size(ml)==0) { 233 strcpy(buff, " (-) "); 234 } else { 235 snprintf(buff, 1024, " (%i) ", owl_messagelist_get_size(ml)); 236 } 237 waddstr(sepwin, buff); 238 239 foo=owl_view_get_filtname(v); 240 if (strcmp(foo, owl_global_get_view_home(&g))) wattroff(sepwin, A_REVERSE); 241 waddstr(sepwin, " "); 242 waddstr(sepwin, owl_view_get_filtname(v)); 243 waddstr(sepwin, " "); 244 if (strcmp(foo, owl_global_get_view_home(&g))) wattron(sepwin, A_REVERSE); 245 246 if (owl_mainwin_is_curmsg_truncated(owl_global_get_mainwin(&g))) { 247 getyx(sepwin, y, x); 248 wmove(sepwin, y, x+2); 249 wattron(sepwin, A_BOLD); 250 waddstr(sepwin, " <truncated> "); 251 wattroff(sepwin, A_BOLD); 252 } 253 254 owl_view_iterator_clone(iter, owl_global_get_mainwin(&g)->end); 255 if (owl_view_iterator_is_valid(iter) 256 && !owl_view_iterator_is_at_end(iter)) { 257 getyx(sepwin, y, x); 258 wmove(sepwin, y, x+2); 259 wattron(sepwin, A_BOLD); 260 waddstr(sepwin, " <more> "); 261 wattroff(sepwin, A_BOLD); 262 } 263 264 if (owl_global_get_rightshift(&g)>0) { 265 getyx(sepwin, y, x); 266 wmove(sepwin, y, x+2); 267 snprintf(buff, 1024, " right: %i ", owl_global_get_rightshift(&g)); 268 waddstr(sepwin, buff); 269 } 270 271 if (owl_global_is_zaway(&g) || owl_global_is_aaway(&g)) { 272 getyx(sepwin, y, x); 273 wmove(sepwin, y, x+2); 274 wattron(sepwin, A_BOLD); 275 wattroff(sepwin, A_REVERSE); 276 if (owl_global_is_zaway(&g) && owl_global_is_aaway(&g)) { 277 waddstr(sepwin, " AWAY "); 278 } else if (owl_global_is_zaway(&g)) { 279 waddstr(sepwin, " Z-AWAY "); 280 } else if (owl_global_is_aaway(&g)) { 281 waddstr(sepwin, " A-AWAY "); 282 } 283 wattron(sepwin, A_REVERSE); 284 wattroff(sepwin, A_BOLD); 285 } 286 287 if (owl_global_get_curmsg_vert_offset(&g)) { 288 getyx(sepwin, y, x); 289 wmove(sepwin, y, x+2); 290 wattron(sepwin, A_BOLD); 291 wattroff(sepwin, A_REVERSE); 292 waddstr(sepwin, " SCROLL "); 293 wattron(sepwin, A_REVERSE); 294 wattroff(sepwin, A_BOLD); 295 } 296 297 appendtosepbar = owl_global_get_appendtosepbar(&g); 298 if (appendtosepbar && *appendtosepbar) { 299 getyx(sepwin, y, x); 300 wmove(sepwin, y, x+2); 301 waddstr(sepwin, " "); 302 waddstr(sepwin, owl_global_get_appendtosepbar(&g)); 303 waddstr(sepwin, " "); 304 } 305 306 getyx(sepwin, y, x); 307 wmove(sepwin, y, owl_global_get_cols(&g)-1); 308 309 wattroff(sepwin, A_BOLD); 310 wattroff(sepwin, A_REVERSE); 311 wnoutrefresh(sepwin); 198 312 } 199 313 … … 341 455 342 456 wnoutrefresh(mw->win.win); 457 458 sepbar(); 343 459 } 344 460 -
owl.c
r4212827 r369707e 591 591 ); 592 592 } 593 sepbar(NULL);594 593 595 594 /* process the startup file */ … … 674 673 owl_function_do_newmsgproc(); 675 674 } 676 675 677 676 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 678 if (newmsgs)679 sepbar(NULL);680 677 681 678 if (owl_popwin_is_active(owl_global_get_popwin(&g))) { -
util.c
r4212827 r369707e 5 5 #include <ctype.h> 6 6 #include <pwd.h> 7 8 void sepbar(const char *in)9 {10 char buff[1024];11 WINDOW *sepwin;12 const owl_messagelist *ml;13 const owl_view *v;14 owl_view_iterator *iter;15 int x, y;16 const char *foo, *appendtosepbar;17 18 iter = owl_view_iterator_free_later(owl_view_iterator_new());19 20 sepwin=owl_global_get_curs_sepwin(&g);21 ml=owl_global_get_msglist(&g);22 v=owl_global_get_current_view(&g);23 24 werase(sepwin);25 wattron(sepwin, A_REVERSE);26 if (owl_global_is_fancylines(&g)) {27 whline(sepwin, ACS_HLINE, owl_global_get_cols(&g));28 } else {29 whline(sepwin, '-', owl_global_get_cols(&g));30 }31 32 if (owl_global_is_sepbar_disable(&g)) {33 getyx(sepwin, y, x);34 wmove(sepwin, y, owl_global_get_cols(&g)-1);35 return;36 }37 38 wmove(sepwin, 0, 2);39 40 if (owl_messagelist_get_size(ml)==0) {41 strcpy(buff, " (-) ");42 } else {43 snprintf(buff, 1024, " (%i) ", owl_messagelist_get_size(ml));44 }45 waddstr(sepwin, buff);46 47 foo=owl_view_get_filtname(v);48 if (strcmp(foo, owl_global_get_view_home(&g))) wattroff(sepwin, A_REVERSE);49 waddstr(sepwin, " ");50 waddstr(sepwin, owl_view_get_filtname(v));51 waddstr(sepwin, " ");52 if (strcmp(foo, owl_global_get_view_home(&g))) wattron(sepwin, A_REVERSE);53 54 if (owl_mainwin_is_curmsg_truncated(owl_global_get_mainwin(&g))) {55 getyx(sepwin, y, x);56 wmove(sepwin, y, x+2);57 wattron(sepwin, A_BOLD);58 waddstr(sepwin, " <truncated> ");59 wattroff(sepwin, A_BOLD);60 }61 62 owl_view_iterator_clone(iter, owl_global_get_mainwin(&g)->end);63 if (owl_view_iterator_is_valid(iter)64 && !owl_view_iterator_is_at_end(iter)) {65 getyx(sepwin, y, x);66 wmove(sepwin, y, x+2);67 wattron(sepwin, A_BOLD);68 waddstr(sepwin, " <more> ");69 wattroff(sepwin, A_BOLD);70 }71 72 if (owl_global_get_rightshift(&g)>0) {73 getyx(sepwin, y, x);74 wmove(sepwin, y, x+2);75 snprintf(buff, 1024, " right: %i ", owl_global_get_rightshift(&g));76 waddstr(sepwin, buff);77 }78 79 if (owl_global_is_zaway(&g) || owl_global_is_aaway(&g)) {80 getyx(sepwin, y, x);81 wmove(sepwin, y, x+2);82 wattron(sepwin, A_BOLD);83 wattroff(sepwin, A_REVERSE);84 if (owl_global_is_zaway(&g) && owl_global_is_aaway(&g)) {85 waddstr(sepwin, " AWAY ");86 } else if (owl_global_is_zaway(&g)) {87 waddstr(sepwin, " Z-AWAY ");88 } else if (owl_global_is_aaway(&g)) {89 waddstr(sepwin, " A-AWAY ");90 }91 wattron(sepwin, A_REVERSE);92 wattroff(sepwin, A_BOLD);93 }94 95 if (owl_global_get_curmsg_vert_offset(&g)) {96 getyx(sepwin, y, x);97 wmove(sepwin, y, x+2);98 wattron(sepwin, A_BOLD);99 wattroff(sepwin, A_REVERSE);100 waddstr(sepwin, " SCROLL ");101 wattron(sepwin, A_REVERSE);102 wattroff(sepwin, A_BOLD);103 }104 105 if (in) {106 getyx(sepwin, y, x);107 wmove(sepwin, y, x+2);108 waddstr(sepwin, in);109 }110 111 appendtosepbar = owl_global_get_appendtosepbar(&g);112 if (appendtosepbar && *appendtosepbar) {113 getyx(sepwin, y, x);114 wmove(sepwin, y, x+2);115 waddstr(sepwin, " ");116 waddstr(sepwin, owl_global_get_appendtosepbar(&g));117 waddstr(sepwin, " ");118 }119 120 getyx(sepwin, y, x);121 wmove(sepwin, y, owl_global_get_cols(&g)-1);122 123 wattroff(sepwin, A_BOLD);124 wattroff(sepwin, A_REVERSE);125 wnoutrefresh(sepwin);126 }127 7 128 8 char **atokenize(const char *buffer, const char *sep, int *i)
