1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Add win_print_http_upload

This commit is contained in:
James Booth 2016-10-11 23:40:15 +01:00
parent 0890179fc4
commit af42bc4434
3 changed files with 11 additions and 1 deletions

View File

@ -146,7 +146,7 @@ http_file_put(void *userdata)
if (asprintf(&msg, "Uploading '%s': 0%%", upload->filename) == -1) {
msg = strdup(FALLBACK_MSG);
}
win_print_with_receipt(upload->window, '!', 0, NULL, 0, THEME_TEXT_ME, NULL, msg, upload->put_url);
win_print_http_upload(upload->window, msg, upload->put_url);
free(msg);
char *cert_path = prefs_get_string(PREF_TLS_CERTPATH);

View File

@ -1038,6 +1038,12 @@ win_printf(ProfWin *window, const char show_char, int pad_indent, GDateTime *tim
va_end(arg);
}
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);
}
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)

View File

@ -61,8 +61,12 @@ void win_show_status_string(ProfWin *window, const char *const from,
const char *const default_show);
void win_print_incoming_message(ProfWin *window, GDateTime *timestamp,
const char *const from, const char *const message, prof_enc_t enc_mode);
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_newline(ProfWin *window);
void win_redraw(ProfWin *window);
int win_roster_cols(void);