about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-10-15 17:17:17 +0100
committerJames Booth <boothj5@gmail.com>2016-10-15 17:17:17 +0100
commit5488fd6e72de5c2143dfb5532043e9e1f9fb8343 (patch)
tree1ba83bbcd1ddefdd6b23494f8fdf2920bf9813e7 /src/ui
parent478c749ff96a78bdd97d4cc9928f8f3b25eec067 (diff)
downloadprofani-tty-5488fd6e72de5c2143dfb5532043e9e1f9fb8343.tar.gz
Remove win_vprintln_ch
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/chatwin.c24
-rw-r--r--src/ui/ui.h1
-rw-r--r--src/ui/window.c12
3 files changed, 12 insertions, 25 deletions
diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c
index 05a259f7..ba2bdc38 100644
--- a/src/ui/chatwin.c
+++ b/src/ui/chatwin.c
@@ -138,41 +138,41 @@ chatwin_otr_smp_event(ProfChatWin *chatwin, prof_otr_smp_event_t event, void *da
 
     switch (event) {
         case PROF_OTR_SMP_INIT:
-            win_vprintln_ch((ProfWin*)chatwin, '!',
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!',
                 "%s wants to authenticate your identity, use '/otr secret <secret>'.", chatwin->barejid);
             break;
         case PROF_OTR_SMP_INIT_Q:
-            win_vprintln_ch((ProfWin*)chatwin, '!',
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!',
                 "%s wants to authenticate your identity with the following question:", chatwin->barejid);
-            win_vprintln_ch((ProfWin*)chatwin, '!', "  %s", (char*)data);
-            win_vprintln_ch((ProfWin*)chatwin, '!', "use '/otr answer <answer>'.");
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!', "  %s", (char*)data);
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!', "use '/otr answer <answer>'.");
             break;
         case PROF_OTR_SMP_SENDER_FAIL:
-            win_vprintln_ch((ProfWin*)chatwin, '!',
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!',
                 "Authentication failed, the secret you entered does not match the secret entered by %s.",
                 chatwin->barejid);
             break;
         case PROF_OTR_SMP_RECEIVER_FAIL:
-            win_vprintln_ch((ProfWin*)chatwin, '!',
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!',
                 "Authentication failed, the secret entered by %s does not match yours.", chatwin->barejid);
             break;
         case PROF_OTR_SMP_ABORT:
-            win_vprintln_ch((ProfWin*)chatwin, '!', "SMP session aborted.");
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!', "SMP session aborted.");
             break;
         case PROF_OTR_SMP_SUCCESS:
-            win_vprintln_ch((ProfWin*)chatwin, '!', "Authentication successful.");
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!', "Authentication successful.");
             break;
         case PROF_OTR_SMP_SUCCESS_Q:
-            win_vprintln_ch((ProfWin*)chatwin, '!', "%s successfully authenticated you.", chatwin->barejid);
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!', "%s successfully authenticated you.", chatwin->barejid);
             break;
         case PROF_OTR_SMP_FAIL_Q:
-            win_vprintln_ch((ProfWin*)chatwin, '!', "%s failed to authenticate you.", chatwin->barejid);
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!', "%s failed to authenticate you.", chatwin->barejid);
             break;
         case PROF_OTR_SMP_AUTH:
-            win_vprintln_ch((ProfWin*)chatwin, '!', "Authenticating %s...", chatwin->barejid);
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!', "Authenticating %s...", chatwin->barejid);
             break;
         case PROF_OTR_SMP_AUTH_WAIT:
-            win_vprintln_ch((ProfWin*)chatwin, '!', "Awaiting authentication from %s...", chatwin->barejid);
+            win_printf_line((ProfWin*)chatwin, THEME_DEFAULT, '!', "Awaiting authentication from %s...", chatwin->barejid);
             break;
         default:
             break;
diff --git a/src/ui/ui.h b/src/ui/ui.h
index c858a889..fbc6babb 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -364,7 +364,6 @@ void win_show_occupant_info(ProfWin *window, const char *const room, Occupant *o
 void win_show_contact(ProfWin *window, PContact contact);
 void win_show_info(ProfWin *window, PContact contact);
 void win_println(ProfWin *window, int pad, const char *const message);
-void win_vprintln_ch(ProfWin *window, char ch, const char *const message, ...);
 void win_clear(ProfWin *window);
 char* win_to_string(ProfWin *window);
 
diff --git a/src/ui/window.c b/src/ui/window.c
index 13edd847..f5ab998f 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1116,18 +1116,6 @@ win_println(ProfWin *window, int pad, const char *const message)
 }
 
 void
-win_vprintln_ch(ProfWin *window, char ch, const char *const message, ...)
-{
-    va_list arg;
-    va_start(arg, message);
-    GString *fmt_msg = g_string_new(NULL);
-    g_string_vprintf(fmt_msg, message, arg);
-    win_printf_line(window, THEME_DEFAULT, ch, "%s", fmt_msg->str);
-    g_string_free(fmt_msg, TRUE);
-    va_end(arg);
-}
-
-void
 win_newline(ProfWin *window)
 {
     win_printf(window, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", "");
344'>344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639