about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/command/cmd_funcs.c12
-rw-r--r--src/plugins/api.c4
-rw-r--r--src/ui/chatwin.c12
-rw-r--r--src/ui/core.c46
-rw-r--r--src/ui/mucwin.c112
-rw-r--r--src/ui/privwin.c14
-rw-r--r--src/ui/window.c8
-rw-r--r--src/ui/window_list.c2
8 files changed, 105 insertions, 105 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index cd0328de..8aa1fceb 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -3881,7 +3881,7 @@ cmd_kick(ProfWin *window, const char *const command, gchar **args)
             char *reason = args[1];
             iq_room_kick_occupant(mucwin->roomjid, nick, reason);
         } else {
-            win_printf((ProfWin*) mucwin, '!', 0, NULL, 0, THEME_DEFAULT, "", "Occupant does not exist: %s", nick);
+            win_printf_line(window, THEME_DEFAULT, '!', "Occupant does not exist: %s", nick);
         }
     } else {
         cons_bad_cmd_usage(command);
@@ -3942,7 +3942,7 @@ cmd_subject(ProfWin *window, const char *const command, gchar **args)
             win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room subject: ");
             win_printf(window, '!', 0, NULL, NO_DATE, THEME_DEFAULT, "", "%s", subject);
         } else {
-            win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room has no subject");
+            win_printf_line(window, THEME_ROOMINFO, '!', "Room has no subject");
         }
         return TRUE;
     }
@@ -4050,7 +4050,7 @@ cmd_affiliation(ProfWin *window, const char *const command, gchar **args)
             iq_room_affiliation_list(mucwin->roomjid, "member");
             iq_room_affiliation_list(mucwin->roomjid, "outcast");
         } else if (g_strcmp0(affiliation, "none") == 0) {
-            win_printf((ProfWin*) mucwin, '!', 0, NULL, 0, THEME_DEFAULT, "", "Cannot list users with no affiliation.");
+            win_printf_line(window, THEME_DEFAULT, '!', "Cannot list users with no affiliation.");
         } else {
             iq_room_affiliation_list(mucwin->roomjid, affiliation);
         }
@@ -4118,7 +4118,7 @@ cmd_role(ProfWin *window, const char *const command, gchar **args)
             iq_room_role_list(mucwin->roomjid, "participant");
             iq_room_role_list(mucwin->roomjid, "visitor");
         } else if (g_strcmp0(role, "none") == 0) {
-            win_printf((ProfWin*) mucwin, '!', 0, NULL, 0, THEME_DEFAULT, "", "Cannot list users with no role.");
+            win_printf_line(window, THEME_DEFAULT, '!', "Cannot list users with no role.");
         } else {
             iq_room_role_list(mucwin->roomjid, role);
         }
@@ -4180,12 +4180,12 @@ cmd_room(ProfWin *window, const char *const command, gchar **args)
     if (g_strcmp0(args[0], "accept") == 0) {
         gboolean requires_config = muc_requires_config(mucwin->roomjid);
         if (!requires_config) {
-            win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Current room does not require configuration.");
+            win_printf_line(window, THEME_ROOMINFO, '!', "Current room does not require configuration.");
             return TRUE;
         } else {
             iq_confirm_instant_room(mucwin->roomjid);
             muc_set_requires_config(mucwin->roomjid, FALSE);
-            win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room unlocked.");
+            win_printf_line(window, THEME_ROOMINFO, '!', "Room unlocked.");
             return TRUE;
         }
     }
diff --git a/src/plugins/api.c b/src/plugins/api.c
index 4073b5f5..606a4811 100644
--- a/src/plugins/api.c
+++ b/src/plugins/api.c
@@ -368,7 +368,7 @@ api_win_show(const char *tag, const char *line)
     }
 
     ProfWin *window = (ProfWin*)pluginwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "%s", line);
+    win_printf_line(window, THEME_DEFAULT, '!', "%s", line);
 
     return 1;
 }
@@ -393,7 +393,7 @@ api_win_show_themed(const char *tag, const char *const group, const char *const
 
     theme_item_t themeitem = plugin_themes_get(group, key, def);
     ProfWin *window = (ProfWin*)pluginwin;
-    win_printf(window, '!', 0, NULL, 0, themeitem, "", "%s", line);
+    win_printf_line(window, themeitem, '!', "%s", line);
 
     return 1;
 }
diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c
index 550ba384..05a259f7 100644
--- a/src/ui/chatwin.c
+++ b/src/ui/chatwin.c
@@ -96,9 +96,9 @@ chatwin_otr_secured(ProfChatWin *chatwin, gboolean trusted)
 
     ProfWin *window = (ProfWin*) chatwin;
     if (trusted) {
-        win_printf(window, '!', 0, NULL, 0, THEME_OTR_STARTED_TRUSTED, "", "OTR session started (trusted).");
+        win_printf_line(window, THEME_OTR_STARTED_TRUSTED, '!', "OTR session started (trusted).");
     } else {
-        win_printf(window, '!', 0, NULL, 0, THEME_OTR_STARTED_UNTRUSTED, "", "OTR session started (untrusted).");
+        win_printf_line(window, THEME_OTR_STARTED_UNTRUSTED, '!', "OTR session started (untrusted).");
     }
 
     if (wins_is_current(window)) {
@@ -125,7 +125,7 @@ chatwin_otr_unsecured(ProfChatWin *chatwin)
     chatwin->otr_is_trusted = FALSE;
 
     ProfWin *window = (ProfWin*)chatwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_OTR_ENDED, "", "OTR session ended.");
+    win_printf_line(window, THEME_OTR_ENDED, '!', "OTR session ended.");
     if (wins_is_current(window)) {
         title_bar_switch();
     }
@@ -188,7 +188,7 @@ chatwin_otr_trust(ProfChatWin *chatwin)
     chatwin->otr_is_trusted = TRUE;
 
     ProfWin *window = (ProfWin*)chatwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_OTR_TRUSTED, "", "OTR session trusted.");
+    win_printf_line(window, THEME_OTR_TRUSTED, '!', "OTR session trusted.");
     if (wins_is_current(window)) {
         title_bar_switch();
     }
@@ -203,7 +203,7 @@ chatwin_otr_untrust(ProfChatWin *chatwin)
     chatwin->otr_is_trusted = FALSE;
 
     ProfWin *window = (ProfWin*)chatwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_OTR_UNTRUSTED, "", "OTR session untrusted.");
+    win_printf_line(window, THEME_OTR_UNTRUSTED, '!', "OTR session untrusted.");
     if (wins_is_current(window)) {
         title_bar_switch();
     }
@@ -227,7 +227,7 @@ chatwin_recipient_gone(ProfChatWin *chatwin)
         display_usr = chatwin->barejid;
     }
 
-    win_printf((ProfWin*)chatwin, '!', 0, NULL, 0, THEME_GONE, "", "<- %s has left the conversation.", display_usr);
+    win_printf_line((ProfWin*)chatwin, THEME_GONE, '!', "<- %s has left the conversation.", display_usr);
 }
 
 void
diff --git a/src/ui/core.c b/src/ui/core.c
index 859b67f6..42881d30 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -413,19 +413,19 @@ ui_handle_recipient_error(const char *const recipient, const char *const err_msg
 
     ProfChatWin *chatwin = wins_get_chat(recipient);
     if (chatwin) {
-        win_printf((ProfWin*)chatwin, '!', 0, NULL, 0, THEME_ERROR, "", "Error from %s: %s", recipient, err_msg);
+        win_printf_line((ProfWin*)chatwin, THEME_ERROR, '!', "Error from %s: %s", recipient, err_msg);
         return;
     }
 
     ProfMucWin *mucwin = wins_get_muc(recipient);
     if (mucwin) {
-        win_printf((ProfWin*)mucwin, '!', 0, NULL, 0, THEME_ERROR, "", "Error from %s: %s", recipient, err_msg);
+        win_printf_line((ProfWin*)mucwin, THEME_ERROR, '!', "Error from %s: %s", recipient, err_msg);
         return;
     }
 
     ProfPrivateWin *privatewin = wins_get_private(recipient);
     if (privatewin) {
-        win_printf((ProfWin*)privatewin, '!', 0, NULL, 0, THEME_ERROR, "", "Error from %s: %s", recipient, err_msg);
+        win_printf_line((ProfWin*)privatewin, THEME_ERROR, '!', "Error from %s: %s", recipient, err_msg);
         return;
     }
 }
@@ -435,7 +435,7 @@ ui_handle_otr_error(const char *const barejid, const char *const message)
 {
     ProfChatWin *chatwin = wins_get_chat(barejid);
     if (chatwin) {
-        win_printf((ProfWin*)chatwin, '!', 0, NULL, 0, THEME_ERROR, "", "%s", message);
+        win_printf_line((ProfWin*)chatwin, THEME_ERROR, '!', "%s", message);
     } else {
         cons_show_error("%s - %s", barejid, message);
     }
@@ -752,7 +752,7 @@ ui_current_print_formatted_line(const char show_char, int attrs, const char *con
     va_start(arg, msg);
     GString *fmt_msg = g_string_new(NULL);
     g_string_vprintf(fmt_msg, msg, arg);
-    win_printf(current, show_char, 0, NULL, 0, attrs, "", "%s", fmt_msg->str);
+    win_printf_line(current, attrs, show_char, "%s", fmt_msg->str);
     va_end(arg);
     g_string_free(fmt_msg, TRUE);
 }
@@ -823,7 +823,7 @@ ui_room_join(const char *const roomjid, gboolean focus)
         status_bar_active(num);
         ProfWin *console = wins_get_console();
         char *nick = muc_nick(roomjid);
-        win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "-> Autojoined %s as %s (%d).", roomjid, nick, num);
+        win_printf_line(console, THEME_TYPING, '!', "-> Autojoined %s as %s (%d).", roomjid, nick, num);
     }
 
     GList *privwins = wins_get_private_chats(roomjid);
@@ -898,16 +898,16 @@ ui_room_destroyed(const char *const roomjid, const char *const reason, const cha
         ProfWin *console = wins_get_console();
 
         if (reason) {
-            win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- Room destroyed: %s, reason: %s", roomjid, reason);
+            win_printf_line(console, THEME_TYPING, '!', "<- Room destroyed: %s, reason: %s", roomjid, reason);
         } else {
-            win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- Room destroyed: %s", roomjid);
+            win_printf_line(console, THEME_TYPING, '!', "<- Room destroyed: %s", roomjid);
         }
 
         if (new_jid) {
             if (password) {
-                win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "Replacement room: %s, password: %s", new_jid, password);
+                win_printf_line(console, THEME_TYPING, '!', "Replacement room: %s, password: %s", new_jid, password);
             } else {
-                win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "Replacement room: %s", new_jid);
+                win_printf_line(console, THEME_TYPING, '!', "Replacement room: %s", new_jid);
             }
         }
     }
@@ -944,7 +944,7 @@ ui_room_kicked(const char *const roomjid, const char *const actor, const char *c
         }
 
         ProfWin *console = wins_get_console();
-        win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- %s", message->str);
+        win_printf_line(console, THEME_TYPING, '!', "<- %s", message->str);
         g_string_free(message, TRUE);
     }
 
@@ -980,7 +980,7 @@ ui_room_banned(const char *const roomjid, const char *const actor, const char *c
         }
 
         ProfWin *console = wins_get_console();
-        win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- %s", message->str);
+        win_printf_line(console, THEME_TYPING, '!', "<- %s", message->str);
         g_string_free(message, TRUE);
     }
 
@@ -1028,13 +1028,13 @@ ui_ask_pgp_passphrase(const char *hint, int prev_fail)
     win_println(current, 0, "");
 
     if (prev_fail) {
-        win_printf(current, '!', 0, NULL, 0, THEME_DEFAULT, "", "Incorrect passphrase");
+        win_printf_line(current, THEME_DEFAULT, '!', "Incorrect passphrase");
     }
 
     if (hint) {
-        win_printf(current, '!', 0, NULL, 0, THEME_DEFAULT, "", "Enter PGP key passphrase for %s", hint);
+        win_printf_line(current, THEME_DEFAULT, '!', "Enter PGP key passphrase for %s", hint);
     } else {
-        win_printf(current, '!', 0, NULL, 0, THEME_DEFAULT, "", "Enter PGP key passphrase");
+        win_printf_line(current, THEME_DEFAULT, '!', "Enter PGP key passphrase");
     }
 
     ui_update();
@@ -1182,7 +1182,7 @@ ui_handle_room_config_submit_result(const char *const roomjid)
 
         if (muc_window) {
             ui_focus_win((ProfWin*)muc_window);
-            win_printf(muc_window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room configuration successful");
+            win_printf_line(muc_window, THEME_ROOMINFO, '!', "Room configuration successful");
         } else {
             ProfWin *console = wins_get_console();
             ui_focus_win(console);
@@ -1209,25 +1209,25 @@ ui_handle_room_config_submit_result_error(const char *const roomjid, const char
 
         if (form_window) {
             if (message) {
-                win_printf(form_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error: %s", message);
+                win_printf_line(form_window, THEME_ERROR, '!', "Configuration error: %s", message);
             } else {
-                win_printf(form_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error");
+                win_printf_line(form_window, THEME_ERROR, '!', "Configuration error");
             }
         } else if (muc_window) {
             if (message) {
-                win_printf(muc_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error: %s", message);
+                win_printf_line(muc_window, THEME_ERROR, '!', "Configuration error: %s", message);
             } else {
-                win_printf(muc_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error");
+                win_printf_line(muc_window, THEME_ERROR, '!', "Configuration error");
             }
         } else {
             if (message) {
-                win_printf(console, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error for %s: %s", roomjid, message);
+                win_printf_line(console, THEME_ERROR, '!', "Configuration error for %s: %s", roomjid, message);
             } else {
-                win_printf(console, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error for %s", roomjid);
+                win_printf_line(console, THEME_ERROR, '!', "Configuration error for %s", roomjid);
             }
         }
     } else {
-        win_printf(console, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error");
+        win_printf_line(console, THEME_ERROR, '!', "Configuration error");
     }
 }
 
diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c
index b9e095ae..75fbc8d4 100644
--- a/src/ui/mucwin.c
+++ b/src/ui/mucwin.c
@@ -153,7 +153,7 @@ mucwin_room_info_error(ProfMucWin *mucwin, const char *const error)
     assert(mucwin != NULL);
 
     ProfWin *window = (ProfWin*)mucwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Room info request failed: %s", error);
+    win_printf_line(window, THEME_DEFAULT, '!', "Room info request failed: %s", error);
     win_printf_line(window, THEME_DEFAULT, '-', "");
 }
 
@@ -166,7 +166,7 @@ mucwin_room_disco_info(ProfMucWin *mucwin, GSList *identities, GSList *features)
     if ((identities && (g_slist_length(identities) > 0)) ||
         (features && (g_slist_length(features) > 0))) {
         if (identities) {
-            win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Identities:");
+            win_printf_line(window, THEME_DEFAULT, '!', "Identities:");
         }
         while (identities) {
             DiscoIdentity *identity = identities->data;  // anme trpe, cat
@@ -182,16 +182,16 @@ mucwin_room_disco_info(ProfMucWin *mucwin, GSList *identities, GSList *features)
             if (identity->category) {
                 identity_str = g_string_append(identity_str, identity->category);
             }
-            win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "%s", identity_str->str);
+            win_printf_line(window, THEME_DEFAULT, '!', "%s", identity_str->str);
             g_string_free(identity_str, TRUE);
             identities = g_slist_next(identities);
         }
 
         if (features) {
-            win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Features:");
+            win_printf_line(window, THEME_DEFAULT, '!', "Features:");
         }
         while (features) {
-            win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  %s", features->data);
+            win_printf_line(window, THEME_DEFAULT, '!', "  %s", features->data);
             features = g_slist_next(features);
         }
         win_printf_line(window, THEME_DEFAULT, '-', "");
@@ -206,9 +206,9 @@ mucwin_roster(ProfMucWin *mucwin, GList *roster, const char *const presence)
     ProfWin *window = (ProfWin*)mucwin;
     if ((roster == NULL) || (g_list_length(roster) == 0)) {
         if (presence == NULL) {
-            win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room is empty.");
+            win_printf_line(window, THEME_ROOMINFO, '!', "Room is empty.");
         } else {
-            win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "No occupants %s.", presence);
+            win_printf_line(window, THEME_ROOMINFO, '!', "No occupants %s.", presence);
         }
     } else {
         int length = g_list_length(roster);
@@ -242,7 +242,7 @@ mucwin_occupant_offline(ProfMucWin *mucwin, const char *const nick)
     assert(mucwin != NULL);
 
     ProfWin *window = (ProfWin*)mucwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s has left the room.", nick);
+    win_printf_line(window, THEME_OFFLINE, '!', "<- %s has left the room.", nick);
 }
 
 void
@@ -263,7 +263,7 @@ mucwin_occupant_kicked(ProfMucWin *mucwin, const char *const nick, const char *c
         g_string_append(message, reason);
     }
 
-    win_printf(window, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
+    win_printf_line(window, THEME_OFFLINE, '!', "<- %s", message->str);
     g_string_free(message, TRUE);
 }
 
@@ -285,7 +285,7 @@ mucwin_occupant_banned(ProfMucWin *mucwin, const char *const nick, const char *c
         g_string_append(message, reason);
     }
 
-    win_printf(window, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
+    win_printf_line(window, THEME_OFFLINE, '!', "<- %s", message->str);
     g_string_free(message, TRUE);
 }
 
@@ -324,7 +324,7 @@ mucwin_occupant_nick_change(ProfMucWin *mucwin, const char *const old_nick, cons
     assert(mucwin != NULL);
 
     ProfWin *window = (ProfWin*)mucwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_THEM, "", "** %s is now known as %s", old_nick, nick);
+    win_printf_line(window, THEME_THEM, '!', "** %s is now known as %s", old_nick, nick);
 }
 
 void
@@ -333,7 +333,7 @@ mucwin_nick_change(ProfMucWin *mucwin, const char *const nick)
     assert(mucwin != NULL);
 
     ProfWin *window = (ProfWin*)mucwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_ME, "", "** You are now known as %s", nick);
+    win_printf_line(window, THEME_ME, '!', "** You are now known as %s", nick);
 }
 
 void
@@ -507,10 +507,10 @@ mucwin_requires_config(ProfMucWin *mucwin)
     }
 
     win_printf_line(window, THEME_DEFAULT, '-', "");
-    win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room locked, requires configuration.");
-    win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Use '/room accept' to accept the defaults");
-    win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Use '/room destroy' to cancel and destroy the room");
-    win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Use '/room config' to edit the room configuration");
+    win_printf_line(window, THEME_ROOMINFO, '!', "Room locked, requires configuration.");
+    win_printf_line(window, THEME_ROOMINFO, '!', "Use '/room accept' to accept the defaults");
+    win_printf_line(window, THEME_ROOMINFO, '!', "Use '/room destroy' to cancel and destroy the room");
+    win_printf_line(window, THEME_ROOMINFO, '!', "Use '/room config' to edit the room configuration");
     win_printf_line(window, THEME_DEFAULT, '-', "");
 
     // currently in groupchat window
@@ -541,9 +541,9 @@ mucwin_subject(ProfMucWin *mucwin, const char *const nick, const char *const sub
         }
     } else {
         if (nick) {
-            win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "*%s has cleared the room subject.", nick);
+            win_printf_line(window, THEME_ROOMINFO, '!', "*%s has cleared the room subject.", nick);
         } else {
-            win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room subject cleared");
+            win_printf_line(window, THEME_ROOMINFO, '!', "Room subject cleared");
         }
     }
 
@@ -563,7 +563,7 @@ mucwin_kick_error(ProfMucWin *mucwin, const char *const nick, const char *const
     assert(mucwin != NULL);
 
     ProfWin *window = (ProfWin*)mucwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error kicking %s: %s", nick, error);
+    win_printf_line(window, THEME_ERROR, '!', "Error kicking %s: %s", nick, error);
 }
 
 void
@@ -594,7 +594,7 @@ mucwin_affiliation_list_error(ProfMucWin *mucwin, const char *const affiliation,
     assert(mucwin != NULL);
 
     ProfWin *window = (ProfWin*)mucwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error retrieving %s list: %s", affiliation, error);
+    win_printf_line(window, THEME_ERROR, '!', "Error retrieving %s list: %s", affiliation, error);
 }
 
 void
@@ -604,17 +604,17 @@ mucwin_handle_affiliation_list(ProfMucWin *mucwin, const char *const affiliation
 
     ProfWin *window = (ProfWin*)mucwin;
     if (jids) {
-        win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Affiliation: %s", affiliation);
+        win_printf_line(window, THEME_DEFAULT, '!', "Affiliation: %s", affiliation);
         GSList *curr_jid = jids;
         while (curr_jid) {
             const char *jid = curr_jid->data;
-            win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  %s", jid);
+            win_printf_line(window, THEME_DEFAULT, '!', "  %s", jid);
             curr_jid = g_slist_next(curr_jid);
         }
-        win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "");
+        win_printf_line(window, THEME_DEFAULT, '!', "");
     } else {
-        win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No users found with affiliation: %s", affiliation);
-        win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "");
+        win_printf_line(window, THEME_DEFAULT, '!', "No users found with affiliation: %s", affiliation);
+        win_printf_line(window, THEME_DEFAULT, '!', "");
     }
 }
 
@@ -629,16 +629,16 @@ mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation)
     if (!occupants) {
         switch (affiliation) {
             case MUC_AFFILIATION_OWNER:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No owners found.");
+                win_printf_line(window, THEME_DEFAULT, '!', "No owners found.");
                 break;
             case MUC_AFFILIATION_ADMIN:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No admins found.");
+                win_printf_line(window, THEME_DEFAULT, '!', "No admins found.");
                 break;
             case MUC_AFFILIATION_MEMBER:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No members found.");
+                win_printf_line(window, THEME_DEFAULT, '!', "No members found.");
                 break;
             case MUC_AFFILIATION_OUTCAST:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No outcasts found.");
+                win_printf_line(window, THEME_DEFAULT, '!', "No outcasts found.");
                 break;
             default:
                 break;
@@ -647,16 +647,16 @@ mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation)
     } else {
         switch (affiliation) {
             case MUC_AFFILIATION_OWNER:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Owners:");
+                win_printf_line(window, THEME_DEFAULT, '!', "Owners:");
                 break;
             case MUC_AFFILIATION_ADMIN:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Admins:");
+                win_printf_line(window, THEME_DEFAULT, '!', "Admins:");
                 break;
             case MUC_AFFILIATION_MEMBER:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Members:");
+                win_printf_line(window, THEME_DEFAULT, '!', "Members:");
                 break;
             case MUC_AFFILIATION_OUTCAST:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Outcasts:");
+                win_printf_line(window, THEME_DEFAULT, '!', "Outcasts:");
                 break;
             default:
                 break;
@@ -667,9 +667,9 @@ mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation)
             Occupant *occupant = curr_occupant->data;
             if (occupant->affiliation == affiliation) {
                 if (occupant->jid) {
-                    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  %s (%s)", occupant->nick, occupant->jid);
+                    win_printf_line(window, THEME_DEFAULT, '!', "  %s (%s)", occupant->nick, occupant->jid);
                 } else {
-                    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  %s", occupant->nick);
+                    win_printf_line(window, THEME_DEFAULT, '!', "  %s", occupant->nick);
                 }
             }
 
@@ -686,7 +686,7 @@ mucwin_role_list_error(ProfMucWin *mucwin, const char *const role, const char *c
     assert(mucwin != NULL);
 
     ProfWin *window = (ProfWin*)mucwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error retrieving %s list: %s", role, error);
+    win_printf_line(window, THEME_ERROR, '!', "Error retrieving %s list: %s", role, error);
 }
 
 void
@@ -696,26 +696,26 @@ mucwin_handle_role_list(ProfMucWin *mucwin, const char *const role, GSList *nick
 
     ProfWin *window = (ProfWin*)mucwin;
     if (nicks) {
-        win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Role: %s", role);
+        win_printf_line(window, THEME_DEFAULT, '!', "Role: %s", role);
         GSList *curr_nick = nicks;
         while (curr_nick) {
             const char *nick = curr_nick->data;
             Occupant *occupant = muc_roster_item(mucwin->roomjid, nick);
             if (occupant) {
                 if (occupant->jid) {
-                    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  %s (%s)", nick, occupant->jid);
+                    win_printf_line(window, THEME_DEFAULT, '!', "  %s (%s)", nick, occupant->jid);
                 } else {
-                    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  %s", nick);
+                    win_printf_line(window, THEME_DEFAULT, '!', "  %s", nick);
                 }
             } else {
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  %s", nick);
+                win_printf_line(window, THEME_DEFAULT, '!', "  %s", nick);
             }
             curr_nick = g_slist_next(curr_nick);
         }
-        win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "");
+        win_printf_line(window, THEME_DEFAULT, '!', "");
     } else {
-        win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No occupants found with role: %s", role);
-        win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "");
+        win_printf_line(window, THEME_DEFAULT, '!', "No occupants found with role: %s", role);
+        win_printf_line(window, THEME_DEFAULT, '!', "");
     }
 }
 
@@ -730,13 +730,13 @@ mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role)
     if (!occupants) {
         switch (role) {
             case MUC_ROLE_MODERATOR:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No moderators found.");
+                win_printf_line(window, THEME_DEFAULT, '!', "No moderators found.");
                 break;
             case MUC_ROLE_PARTICIPANT:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No participants found.");
+                win_printf_line(window, THEME_DEFAULT, '!', "No participants found.");
                 break;
             case MUC_ROLE_VISITOR:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No visitors found.");
+                win_printf_line(window, THEME_DEFAULT, '!', "No visitors found.");
                 break;
             default:
                 break;
@@ -745,13 +745,13 @@ mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role)
     } else {
         switch (role) {
             case MUC_ROLE_MODERATOR:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Moderators:");
+                win_printf_line(window, THEME_DEFAULT, '!', "Moderators:");
                 break;
             case MUC_ROLE_PARTICIPANT:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Participants:");
+                win_printf_line(window, THEME_DEFAULT, '!', "Participants:");
                 break;
             case MUC_ROLE_VISITOR:
-                win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Visitors:");
+                win_printf_line(window, THEME_DEFAULT, '!', "Visitors:");
                 break;
             default:
                 break;
@@ -762,9 +762,9 @@ mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role)
             Occupant *occupant = curr_occupant->data;
             if (occupant->role == role) {
                 if (occupant->jid) {
-                    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  %s (%s)", occupant->nick, occupant->jid);
+                    win_printf_line(window, THEME_DEFAULT, '!', "  %s (%s)", occupant->nick, occupant->jid);
                 } else {
-                    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  %s", occupant->nick);
+                    win_printf_line(window, THEME_DEFAULT, '!', "  %s", occupant->nick);
                 }
             }
 
@@ -782,7 +782,7 @@ mucwin_affiliation_set_error(ProfMucWin *mucwin, const char *const jid, const ch
     assert(mucwin != NULL);
 
     ProfWin *window = (ProfWin*)mucwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s affiliation for %s: %s", affiliation, jid, error);
+    win_printf_line(window, THEME_ERROR, '!', "Error setting %s affiliation for %s: %s", affiliation, jid, error);
 }
 
 void
@@ -792,7 +792,7 @@ mucwin_role_set_error(ProfMucWin *mucwin, const char *const nick, const char *co
     assert(mucwin != NULL);
 
     ProfWin *window = (ProfWin*)mucwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s role for %s: %s", role, nick, error);
+    win_printf_line(window, THEME_ERROR, '!', "Error setting %s role for %s: %s", role, nick, error);
 }
 
 void
@@ -804,9 +804,9 @@ mucwin_info(ProfMucWin *mucwin)
     char *affiliation = muc_affiliation_str(mucwin->roomjid);
 
     ProfWin *window = (ProfWin*) mucwin;
-    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Room: %s", mucwin->roomjid);
-    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Affiliation: %s", affiliation);
-    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Role: %s", role);
+    win_printf_line(window, THEME_DEFAULT, '!', "Room: %s", mucwin->roomjid);
+    win_printf_line(window, THEME_DEFAULT, '!', "Affiliation: %s", affiliation);
+    win_printf_line(window, THEME_DEFAULT, '!', "Role: %s", role);
     win_printf_line(window, THEME_DEFAULT, '-', "");
 }
 
diff --git a/src/ui/privwin.c b/src/ui/privwin.c
index 47fb19a9..ae3f4fa0 100644
--- a/src/ui/privwin.c
+++ b/src/ui/privwin.c
@@ -142,7 +142,7 @@ privwin_occupant_kicked(ProfPrivateWin *privwin, const char *const actor, const
         g_string_append(message, reason);
     }
 
-    win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "<- %s", message->str);
+    win_printf_line((ProfWin*)privwin, THEME_OFFLINE, '!', "<- %s", message->str);
     g_string_free(message, TRUE);
 }
 
@@ -165,7 +165,7 @@ privwin_occupant_banned(ProfPrivateWin *privwin, const char *const actor, const
         g_string_append(message, reason);
     }
 
-    win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "<- %s", message->str);
+    win_printf_line((ProfWin*)privwin, THEME_OFFLINE, '!', "<- %s", message->str);
     g_string_free(message, TRUE);
 }
 
@@ -187,7 +187,7 @@ privwin_room_destroyed(ProfPrivateWin *privwin)
 
     privwin->room_left = TRUE;
     Jid *jidp = jid_create(privwin->fulljid);
-    win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "-- %s has been destroyed.", jidp->barejid);
+    win_printf_line((ProfWin*)privwin, THEME_OFFLINE, '!', "-- %s has been destroyed.", jidp->barejid);
     jid_destroy(jidp);
 }
 
@@ -198,7 +198,7 @@ privwin_room_joined(ProfPrivateWin *privwin)
 
     privwin->room_left = FALSE;
     Jid *jidp = jid_create(privwin->fulljid);
-    win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "-- You have joined %s.", jidp->barejid);
+    win_printf_line((ProfWin*)privwin, THEME_OFFLINE, '!', "-- You have joined %s.", jidp->barejid);
     jid_destroy(jidp);
 }
 
@@ -209,7 +209,7 @@ privwin_room_left(ProfPrivateWin *privwin)
 
     privwin->room_left = TRUE;
     Jid *jidp = jid_create(privwin->fulljid);
-    win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "-- You have left %s.", jidp->barejid);
+    win_printf_line((ProfWin*)privwin, THEME_OFFLINE, '!', "-- You have left %s.", jidp->barejid);
     jid_destroy(jidp);
 }
 
@@ -232,7 +232,7 @@ privwin_room_kicked(ProfPrivateWin *privwin, const char *const actor, const char
         g_string_append(message, reason);
     }
 
-    win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
+    win_printf_line((ProfWin*)privwin, THEME_OFFLINE, '!', "<- %s", message->str);
     g_string_free(message, TRUE);
 }
 
@@ -255,7 +255,7 @@ privwin_room_banned(ProfPrivateWin *privwin, const char *const actor, const char
         g_string_append(message, reason);
     }
 
-    win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
+    win_printf_line((ProfWin*)privwin, THEME_OFFLINE, '!', "<- %s", message->str);
     g_string_free(message, TRUE);
 }
 
diff --git a/src/ui/window.c b/src/ui/window.c
index 5a0c062b..6f63976e 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -757,11 +757,11 @@ win_show_occupant_info(ProfWin *window, const char *const room, Occupant *occupa
     win_newline(window);
 
     if (occupant->jid) {
-        win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  Jid: %s", occupant->jid);
+        win_printf_line(window, THEME_DEFAULT, '!', "  Jid: %s", occupant->jid);
     }
 
-    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  Affiliation: %s", occupant_affiliation);
-    win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "  Role: %s", occupant_role);
+    win_printf_line(window, THEME_DEFAULT, '!', "  Affiliation: %s", occupant_affiliation);
+    win_printf_line(window, THEME_DEFAULT, '!', "  Role: %s", occupant_role);
 
     Jid *jidp = jid_create_from_bare_and_resource(room, occupant->nick);
     EntityCapabilities *caps = caps_lookup(jidp->fulljid);
@@ -1123,7 +1123,7 @@ win_vprintln_ch(ProfWin *window, char ch, const char *const message, ...)
     va_start(arg, message);
     GString *fmt_msg = g_string_new(NULL);
     g_string_vprintf(fmt_msg, message, arg);
-    win_printf(window, ch, 0, NULL, 0, THEME_DEFAULT, "", "%s", fmt_msg->str);
+    win_printf_line(window, THEME_DEFAULT, ch, "%s", fmt_msg->str);
     g_string_free(fmt_msg, TRUE);
     va_end(arg);
 }
diff --git a/src/ui/window_list.c b/src/ui/window_list.c
index 4996719d..2f95ff79 100644
--- a/src/ui/window_list.c
+++ b/src/ui/window_list.c
@@ -280,7 +280,7 @@ wins_private_nick_change(const char *const roomjid, const char *const oldnick, c
 
         Jid *newjid = jid_create_from_bare_and_resource(roomjid, newnick);
         privwin->fulljid = strdup(newjid->fulljid);
-        win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_THEM, NULL, "** %s is now known as %s.", oldjid->resourcepart, newjid->resourcepart);
+        win_printf_line((ProfWin*)privwin, THEME_THEM, '!', "** %s is now known as %s.", oldjid->resourcepart, newjid->resourcepart);
 
         autocomplete_remove(wins_ac, oldjid->fulljid);
         autocomplete_remove(wins_close_ac, oldjid->fulljid);