mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Remove args from win_print_with_receipt
This commit is contained in:
parent
af42bc4434
commit
7b31af3060
@ -306,7 +306,7 @@ chatwin_outgoing_msg(ProfChatWin *chatwin, const char *const message, char *id,
|
||||
}
|
||||
|
||||
if (request_receipt && id) {
|
||||
win_print_with_receipt((ProfWin*)chatwin, enc_char, 0, NULL, 0, THEME_TEXT_ME, "me", message, id);
|
||||
win_print_with_receipt((ProfWin*)chatwin, enc_char, "me", message, id);
|
||||
} else {
|
||||
win_printf((ProfWin*)chatwin, enc_char, 0, NULL, 0, THEME_TEXT_ME, "me", message);
|
||||
}
|
||||
|
@ -1041,27 +1041,21 @@ win_printf(ProfWin *window, const char show_char, int pad_indent, GDateTime *tim
|
||||
void
|
||||
win_print_http_upload(ProfWin *window, const char *const message, char *url)
|
||||
{
|
||||
win_print_with_receipt(window, '!', 0, NULL, 0, THEME_TEXT_ME, NULL, message, url);
|
||||
win_print_with_receipt(window, '!', NULL, message, url);
|
||||
}
|
||||
|
||||
void
|
||||
win_print_with_receipt(ProfWin *window, const char show_char, int pad_indent, GTimeVal *tstamp,
|
||||
int flags, theme_item_t theme_item, const char *const from, const char *const message, char *id)
|
||||
win_print_with_receipt(ProfWin *window, const char show_char, const char *const from, const char *const message,
|
||||
char *id)
|
||||
{
|
||||
GDateTime *time;
|
||||
|
||||
if (tstamp == NULL) {
|
||||
time = g_date_time_new_now_local();
|
||||
} else {
|
||||
time = g_date_time_new_from_timeval_utc(tstamp);
|
||||
}
|
||||
GDateTime *time = g_date_time_new_now_local();
|
||||
|
||||
DeliveryReceipt *receipt = malloc(sizeof(struct delivery_receipt_t));
|
||||
receipt->id = strdup(id);
|
||||
receipt->received = FALSE;
|
||||
|
||||
buffer_push(window->layout->buffer, show_char, pad_indent, time, flags, theme_item, from, message, receipt);
|
||||
_win_print(window, show_char, pad_indent, time, flags, theme_item, from, message, receipt);
|
||||
buffer_push(window->layout->buffer, show_char, 0, time, 0, THEME_TEXT_ME, from, message, receipt);
|
||||
_win_print(window, show_char, 0, time, 0, THEME_TEXT_ME, from, message, receipt);
|
||||
// TODO: cross-reference.. this should be replaced by a real event-based system
|
||||
inp_nonblocking(TRUE);
|
||||
g_date_time_unref(time);
|
||||
|
@ -64,8 +64,8 @@ void win_print_incoming_message(ProfWin *window, GDateTime *timestamp,
|
||||
|
||||
void win_print_http_upload(ProfWin *window, const char *const message, char *url);
|
||||
|
||||
void win_print_with_receipt(ProfWin *window, const char show_char, int pad_indent, GTimeVal *tstamp, int flags,
|
||||
theme_item_t theme_item, const char *const from, const char *const message, char *id);
|
||||
void win_print_with_receipt(ProfWin *window, const char show_char, const char *const from, const char *const message,
|
||||
char *id);
|
||||
|
||||
void win_newline(ProfWin *window);
|
||||
void win_redraw(ProfWin *window);
|
||||
|
Loading…
Reference in New Issue
Block a user