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, "", "");