aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-10-11 23:47:13 +0100
committerJames Booth <boothj5@gmail.com>2016-10-11 23:47:13 +0100
commit7b31af30609e7045a1f6b39668d7abedfb1755da (patch)
tree2357f7e8319dca91b7483e9e81ad5b6d278cdd85
parentaf42bc4434a4eedaf13e057a73e17fe46e0eb110 (diff)
downloadprofani-tty-7b31af30609e7045a1f6b39668d7abedfb1755da.tar.gz
Remove args from win_print_with_receipt
-rw-r--r--src/ui/chatwin.c2
-rw-r--r--src/ui/window.c18
-rw-r--r--src/ui/window.h4
3 files changed, 9 insertions, 15 deletions
diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c
index a0b53749..0d7f01b0 100644
--- a/src/ui/chatwin.c
+++ b/src/ui/chatwin.c
@@ -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);
}
diff --git a/src/ui/window.c b/src/ui/window.c
index b0ca6215..81ecb3cd 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -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);
diff --git a/src/ui/window.h b/src/ui/window.h
index 4b82b1d4..ee53b1de 100644
--- a/src/ui/window.h
+++ b/src/ui/window.h
@@ -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);