mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Use win_save_println in core.c
This commit is contained in:
parent
db9028d9c3
commit
1273d850a4
@ -1179,15 +1179,15 @@ _ui_current_recipient(void)
|
|||||||
static void
|
static void
|
||||||
_ui_current_print_line(const char * const msg, ...)
|
_ui_current_print_line(const char * const msg, ...)
|
||||||
{
|
{
|
||||||
ProfWin *current = wins_get_current();
|
ProfWin *window = wins_get_current();
|
||||||
va_list arg;
|
va_list arg;
|
||||||
va_start(arg, msg);
|
va_start(arg, msg);
|
||||||
GString *fmt_msg = g_string_new(NULL);
|
GString *fmt_msg = g_string_new(NULL);
|
||||||
g_string_vprintf(fmt_msg, msg, arg);
|
g_string_vprintf(fmt_msg, msg, arg);
|
||||||
win_save_print(current, '-', NULL, 0, 0, "", fmt_msg->str);
|
win_save_println(window, fmt_msg->str);
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
g_string_free(fmt_msg, TRUE);
|
g_string_free(fmt_msg, TRUE);
|
||||||
win_update_virtual(current);
|
win_update_virtual(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1724,12 +1724,12 @@ _ui_status(void)
|
|||||||
{
|
{
|
||||||
char *recipient = ui_current_recipient();
|
char *recipient = ui_current_recipient();
|
||||||
PContact pcontact = roster_get_contact(recipient);
|
PContact pcontact = roster_get_contact(recipient);
|
||||||
ProfWin *current = wins_get_current();
|
ProfWin *window = wins_get_current();
|
||||||
|
|
||||||
if (pcontact != NULL) {
|
if (pcontact != NULL) {
|
||||||
win_show_contact(current, pcontact);
|
win_show_contact(window, pcontact);
|
||||||
} else {
|
} else {
|
||||||
win_save_print(current, '-', NULL, 0, 0, "", "Error getting contact info.");
|
win_save_println(window, "Error getting contact info.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1738,12 +1738,12 @@ _ui_info(void)
|
|||||||
{
|
{
|
||||||
char *recipient = ui_current_recipient();
|
char *recipient = ui_current_recipient();
|
||||||
PContact pcontact = roster_get_contact(recipient);
|
PContact pcontact = roster_get_contact(recipient);
|
||||||
ProfWin *current = wins_get_current();
|
ProfWin *window = wins_get_current();
|
||||||
|
|
||||||
if (pcontact != NULL) {
|
if (pcontact != NULL) {
|
||||||
win_show_info(current, pcontact);
|
win_show_info(window, pcontact);
|
||||||
} else {
|
} else {
|
||||||
win_save_print(current, '-', NULL, 0, 0, "", "Error getting contact info.");
|
win_save_println(window, "Error getting contact info.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1752,12 +1752,12 @@ _ui_status_private(void)
|
|||||||
{
|
{
|
||||||
Jid *jid = jid_create(ui_current_recipient());
|
Jid *jid = jid_create(ui_current_recipient());
|
||||||
PContact pcontact = muc_get_participant(jid->barejid, jid->resourcepart);
|
PContact pcontact = muc_get_participant(jid->barejid, jid->resourcepart);
|
||||||
ProfWin *current = wins_get_current();
|
ProfWin *window = wins_get_current();
|
||||||
|
|
||||||
if (pcontact != NULL) {
|
if (pcontact != NULL) {
|
||||||
win_show_contact(current, pcontact);
|
win_show_contact(window, pcontact);
|
||||||
} else {
|
} else {
|
||||||
win_save_print(current, '-', NULL, 0, 0, "", "Error getting contact info.");
|
win_save_println(window, "Error getting contact info.");
|
||||||
}
|
}
|
||||||
|
|
||||||
jid_destroy(jid);
|
jid_destroy(jid);
|
||||||
@ -1768,12 +1768,12 @@ _ui_info_private(void)
|
|||||||
{
|
{
|
||||||
Jid *jid = jid_create(ui_current_recipient());
|
Jid *jid = jid_create(ui_current_recipient());
|
||||||
PContact pcontact = muc_get_participant(jid->barejid, jid->resourcepart);
|
PContact pcontact = muc_get_participant(jid->barejid, jid->resourcepart);
|
||||||
ProfWin *current = wins_get_current();
|
ProfWin *window = wins_get_current();
|
||||||
|
|
||||||
if (pcontact != NULL) {
|
if (pcontact != NULL) {
|
||||||
win_show_info(current, pcontact);
|
win_show_info(window, pcontact);
|
||||||
} else {
|
} else {
|
||||||
win_save_print(current, '-', NULL, 0, 0, "", "Error getting contact info.");
|
win_save_println(window, "Error getting contact info.");
|
||||||
}
|
}
|
||||||
|
|
||||||
jid_destroy(jid);
|
jid_destroy(jid);
|
||||||
|
Loading…
Reference in New Issue
Block a user