comparison mcabber/src/screen.c @ 1159:53c0c5be43fa

Small fixes, typos and cleanups
author Mikael Berthe <mikael@lilotux.net>
date Thu, 15 Feb 2007 23:20:24 +0100
parents 5c857f0f0ab8
children 14f5876b5555
comparison
equal deleted inserted replaced
1158:c30c315dc447 1159:53c0c5be43fa
468 if(scr_BuddyBufferExists(id)) 468 if(scr_BuddyBufferExists(id))
469 tmp->bd=(scr_SearchWindow(id, FALSE))->bd; 469 tmp->bd=(scr_SearchWindow(id, FALSE))->bd;
470 else 470 else
471 tmp->bd=(scr_new_buddy(id, TRUE))->bd; 471 tmp->bd=(scr_new_buddy(id, TRUE))->bd;
472 g_free(id); 472 g_free(id);
473 } 473 } else { // Load buddy history from file (if enabled)
474 else {// Load buddy history from file (if enabled)
475 tmp->bd = g_new0(buffdata, 1); 474 tmp->bd = g_new0(buffdata, 1);
476 hlog_read_history(title, &tmp->bd->hbuf, maxX - Roster_Width - PREFIX_WIDTH); 475 hlog_read_history(title, &tmp->bd->hbuf,
476 maxX - Roster_Width - PREFIX_WIDTH);
477 } 477 }
478 478
479 id = g_strdup(title); 479 id = g_strdup(title);
480 mc_strtolower(id); 480 mc_strtolower(id);
481 g_hash_table_insert(winbufhash, id, tmp); 481 g_hash_table_insert(winbufhash, id, tmp);
482 } else { 482 } else {
483 tmp->bd = g_new0(buffdata, 1); 483 tmp->bd = g_new0(buffdata, 1);
484 } 484 }
485 return tmp; 485 return tmp;
486 } 486 }
487 487
488 // scr_UpdateWindow() 488 // scr_UpdateWindow()
581 break; 581 break;
582 } 582 }
583 } 583 }
584 g_free(lines); 584 g_free(lines);
585 } 585 }
586 586
587 static winbuf * scr_CreateWindow(const char *winId, int special, int dont_show) 587 static winbuf *scr_CreateWindow(const char *winId, int special, int dont_show)
588 { 588 {
589 if (special) { 589 if (special) {
590 if (!statusWindow) { 590 if (!statusWindow) {
591 statusWindow = scr_new_buddy(NULL, dont_show); 591 statusWindow = scr_new_buddy(NULL, dont_show);
592 statusWindow->bd->hbuf = statushbuf; 592 statusWindow->bd->hbuf = statushbuf;