Display download filename in download confirm message.

This commit is contained in:
Ole Loots 2013-01-17 02:04:43 +01:00
parent 6a62cde9d6
commit 7cf178f286
3 changed files with 5 additions and 3 deletions

View File

@ -257,6 +257,7 @@ struct gui_download_window * gui_download_window_create(download_context *ctx,
struct gui_download_window * gdw;
int dlgres = 0;
OBJECT * tree = get_tree(DOWNLOAD);
char alert[200];
LOG(("Creating download window for gui window: %p", parent));
@ -269,7 +270,9 @@ struct gui_download_window * gui_download_window_create(download_context *ctx,
}
filename = download_context_get_filename((const download_context*)ctx);
dlgres = form_alert(2, "[2][Accept download?][Yes|Save as...|No]");
snprintf(alert, 200, "[2][Accept download?|%.*s][Yes|Save as...|No]",
40,filename);
dlgres = form_alert(2, alert);
if( dlgres == 3){
return( NULL );
}

View File

@ -383,8 +383,6 @@ static short preproc_mu_button(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
ev_out->emo_events = oldevents;
retval = 1;
} else {
printf("not within");
dbg_grect("tb", &tb_area);
if (gw->toolbar_edit_obj != -1) {
gw->toolbar_edit_obj = -1;
}

View File

@ -411,6 +411,7 @@ void toolbar_redraw(struct s_toolbar *tb, GRECT *clip)
.y1 = MAX(0,area.g_y - area_ro.g_y) + area.g_h
};
//dbg_rect("tb textarea clip: ", &r);
// TODO: let this be handled by an userdef object redraw function:
textarea_redraw(tb->url.textarea, 0, 0, &r, &toolbar_rdrw_ctx);
}
}