mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[dialogs] cast
This commit is contained in:
parent
24b01f0dc7
commit
723bc935d2
@ -58,7 +58,7 @@ do_abort_download(struct file_download *file_download)
|
||||
static widget_handler_status_T
|
||||
dlg_set_notify(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
{
|
||||
struct file_download *file_download = dlg_data->dlg->udata;
|
||||
struct file_download *file_download = (struct file_download *)dlg_data->dlg->udata;
|
||||
|
||||
file_download->notify = 1;
|
||||
/* The user of this terminal wants to be notified about the
|
||||
@ -82,7 +82,7 @@ dlg_set_notify(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
static widget_handler_status_T
|
||||
dlg_abort_download(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
{
|
||||
struct file_download *file_download = dlg_data->dlg->udata;
|
||||
struct file_download *file_download = (struct file_download *)dlg_data->dlg->udata;
|
||||
|
||||
object_unlock(file_download);
|
||||
register_bottom_half(do_abort_download, file_download);
|
||||
@ -92,7 +92,7 @@ dlg_abort_download(struct dialog_data *dlg_data, struct widget_data *widget_data
|
||||
static widget_handler_status_T
|
||||
push_delete_button(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
{
|
||||
struct file_download *file_download = dlg_data->dlg->udata;
|
||||
struct file_download *file_download = (struct file_download *)dlg_data->dlg->udata;
|
||||
|
||||
file_download->delete_ = 1;
|
||||
#ifdef CONFIG_BITTORRENT
|
||||
@ -107,7 +107,7 @@ push_delete_button(struct dialog_data *dlg_data, struct widget_data *widget_data
|
||||
static widget_handler_status_T
|
||||
dlg_undisplay_download(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
{
|
||||
struct file_download *file_download = dlg_data->dlg->udata;
|
||||
struct file_download *file_download = (struct file_download *)dlg_data->dlg->udata;
|
||||
|
||||
object_unlock(file_download);
|
||||
register_bottom_half(undisplay_download, file_download);
|
||||
@ -118,7 +118,7 @@ dlg_undisplay_download(struct dialog_data *dlg_data, struct widget_data *widget_
|
||||
static void
|
||||
download_abort_function(struct dialog_data *dlg_data)
|
||||
{
|
||||
struct file_download *file_download = dlg_data->dlg->udata;
|
||||
struct file_download *file_download = (struct file_download *)dlg_data->dlg->udata;
|
||||
|
||||
file_download->dlg_data = NULL;
|
||||
}
|
||||
@ -127,7 +127,7 @@ download_abort_function(struct dialog_data *dlg_data)
|
||||
static void
|
||||
download_dialog_layouter(struct dialog_data *dlg_data)
|
||||
{
|
||||
struct file_download *file_download = dlg_data->dlg->udata;
|
||||
struct file_download *file_download = (struct file_download *)dlg_data->dlg->udata;
|
||||
struct terminal *term = dlg_data->win->term;
|
||||
int w = dialog_max_width(term);
|
||||
int rw = w;
|
||||
@ -309,7 +309,7 @@ is_file_download_used(struct listbox_item *item)
|
||||
static char *
|
||||
get_file_download_text(struct listbox_item *item, struct terminal *term)
|
||||
{
|
||||
struct file_download *file_download = item->udata;
|
||||
struct file_download *file_download = (struct file_download *)item->udata;
|
||||
char *uristring;
|
||||
|
||||
uristring = get_uri_string(file_download->uri, URI_PUBLIC);
|
||||
@ -334,7 +334,7 @@ get_file_download_info(struct listbox_item *item, struct terminal *term)
|
||||
static struct uri *
|
||||
get_file_download_uri(struct listbox_item *item)
|
||||
{
|
||||
struct file_download *file_download = item->udata;
|
||||
struct file_download *file_download = (struct file_download *)item->udata;
|
||||
|
||||
return get_uri_reference(file_download->uri);
|
||||
}
|
||||
@ -354,7 +354,7 @@ can_delete_file_download(struct listbox_item *item)
|
||||
static void
|
||||
delete_file_download(struct listbox_item *item, int last)
|
||||
{
|
||||
struct file_download *file_download = item->udata;
|
||||
struct file_download *file_download = (struct file_download *)item->udata;
|
||||
|
||||
assert(!is_object_used(file_download));
|
||||
register_bottom_half(do_abort_download, file_download);
|
||||
@ -375,7 +375,7 @@ static void
|
||||
draw_file_download(struct listbox_item *item, struct listbox_context *context,
|
||||
int x, int y, int width)
|
||||
{
|
||||
struct file_download *file_download = item->udata;
|
||||
struct file_download *file_download = (struct file_download *)item->udata;
|
||||
struct download *download = &file_download->download;
|
||||
char *stylename;
|
||||
struct color_pair *color;
|
||||
@ -478,8 +478,8 @@ push_info_button(struct dialog_data *dlg_data, struct widget_data *button)
|
||||
{
|
||||
struct listbox_data *box = get_dlg_listbox_data(dlg_data);
|
||||
struct terminal *term = dlg_data->win->term;
|
||||
struct session *ses = dlg_data->dlg->udata;
|
||||
struct file_download *file_download = box->sel ? box->sel->udata : NULL;
|
||||
struct session *ses = (struct session *)dlg_data->dlg->udata;
|
||||
struct file_download *file_download = (struct file_download *)(box->sel ? box->sel->udata : NULL);
|
||||
|
||||
assert(ses);
|
||||
|
||||
|
@ -51,7 +51,7 @@ struct keys_toggle_info {
|
||||
static void
|
||||
push_toggle_keys_display_button(void *data)
|
||||
{
|
||||
struct keys_toggle_info *info = data;
|
||||
struct keys_toggle_info *info = (struct keys_toggle_info *)data;
|
||||
|
||||
menu_keys(info->term, (void *) (long) !info->toggle, NULL);
|
||||
}
|
||||
|
@ -52,8 +52,8 @@
|
||||
static void
|
||||
menu_url_shortcut(struct terminal *term, void *url_, void *ses_)
|
||||
{
|
||||
char *url = url_;
|
||||
struct session *ses = ses_;
|
||||
char *url = (char *)url_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
struct uri *uri = get_uri(url, URI_NONE);
|
||||
|
||||
if (!uri) return;
|
||||
@ -104,7 +104,7 @@ save_url_as(struct session *ses)
|
||||
static void
|
||||
really_exit_prog(void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
|
||||
register_bottom_half(destroy_terminal, ses->tab->term);
|
||||
}
|
||||
@ -112,7 +112,7 @@ really_exit_prog(void *ses_)
|
||||
static inline void
|
||||
dont_exit_prog(void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
|
||||
ses->exit_query = 0;
|
||||
}
|
||||
@ -156,8 +156,8 @@ exit_prog(struct session *ses, int query)
|
||||
static void
|
||||
go_historywards(struct terminal *term, void *target_, void *ses_)
|
||||
{
|
||||
struct location *target = target_;
|
||||
struct session *ses = ses_;
|
||||
struct location *target = (struct location *)target_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
|
||||
go_history(ses, target);
|
||||
}
|
||||
@ -205,7 +205,7 @@ history_menu_common(struct terminal *term, struct session *ses, int unhist)
|
||||
static void
|
||||
history_menu(struct terminal *term, void *xxx, void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
|
||||
history_menu_common(term, ses, 0);
|
||||
}
|
||||
@ -213,7 +213,7 @@ history_menu(struct terminal *term, void *xxx, void *ses_)
|
||||
static void
|
||||
unhistory_menu(struct terminal *term, void *xxx, void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
|
||||
history_menu_common(term, ses, 1);
|
||||
}
|
||||
@ -300,7 +300,7 @@ tab_menu(struct session *ses, int x, int y, int place_above_cursor)
|
||||
static void
|
||||
do_submenu(struct terminal *term, void *menu_, void *ses_)
|
||||
{
|
||||
struct menu_item *menu = menu_;
|
||||
struct menu_item *menu = (struct menu_item *)menu_;
|
||||
|
||||
do_menu(term, menu, ses_, 1);
|
||||
}
|
||||
@ -510,7 +510,7 @@ static struct menu_item tools_menu[] = {
|
||||
static void
|
||||
do_setup_menu(struct terminal *term, void *xxx, void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
|
||||
if (!get_cmd_opt_bool("anonymous"))
|
||||
do_menu(term, setup_menu, ses, 1);
|
||||
@ -700,8 +700,8 @@ send_open_new_window(struct terminal *term, const struct open_in_new *open,
|
||||
void
|
||||
open_in_new_window(struct terminal *term, void *func_, void *ses_)
|
||||
{
|
||||
menu_func_T func = func_;
|
||||
struct session *ses = ses_;
|
||||
menu_func_T func = (menu_func_T)func_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
struct menu_item *mi;
|
||||
int posibilities;
|
||||
|
||||
@ -761,7 +761,7 @@ add_new_win_to_menu(struct menu_item **mi, char *text,
|
||||
static void
|
||||
do_pass_uri_to_command(struct terminal *term, void *command_, void *xxx)
|
||||
{
|
||||
char *command = command_;
|
||||
char *command = (char *)command_;
|
||||
int block = command[0] == 'b' ? TERM_EXEC_BG : TERM_EXEC_FG;
|
||||
|
||||
exec_on_terminal(term, command + 1, "", block);
|
||||
@ -1037,7 +1037,7 @@ complete_file_menu(struct terminal *term, int no_elevator, void *data,
|
||||
|
||||
/* Only one entry */
|
||||
if (direntries + fileentries == 1) {
|
||||
char *text = menu[FILE_COMPLETION_MENU_OFFSET].data;
|
||||
char *text = (char *)menu[FILE_COMPLETION_MENU_OFFSET].data;
|
||||
|
||||
mem_free(menu);
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
static void
|
||||
display_codepage(struct terminal *term, void *name_, void *xxx)
|
||||
{
|
||||
char *name = name_;
|
||||
char *name = (char *)name_;
|
||||
struct option *opt = get_opt_rec(term->spec, "charset");
|
||||
int index = get_cp_index(name);
|
||||
|
||||
@ -46,7 +46,7 @@ display_codepage(struct terminal *term, void *name_, void *xxx)
|
||||
void
|
||||
charset_list(struct terminal *term, void *xxx, void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
int i, items;
|
||||
int sel = 0;
|
||||
const char *const sel_mime = get_cp_mime_name(
|
||||
@ -118,7 +118,7 @@ static widget_handler_status_T
|
||||
push_ok_button(struct dialog_data *dlg_data, struct widget_data *button)
|
||||
{
|
||||
struct terminal *term = dlg_data->win->term;
|
||||
union option_value *values = dlg_data->dlg->udata;
|
||||
union option_value *values = (union option_value *)dlg_data->dlg->udata;
|
||||
|
||||
update_dialog_data(dlg_data);
|
||||
|
||||
@ -285,7 +285,7 @@ static char height_str[4];
|
||||
static void
|
||||
push_resize_button(void *data)
|
||||
{
|
||||
struct terminal *term = data;
|
||||
struct terminal *term = (struct terminal *)data;
|
||||
char str[MAX_STR_LEN];
|
||||
|
||||
snprintf(str, sizeof(str), "%s,%s,%d,%d",
|
||||
|
@ -308,7 +308,7 @@ display_tab_bar(struct session *ses, struct terminal *term, int tabs_count)
|
||||
struct color_pair *color = normal_color;
|
||||
struct window *tab = get_tab_by_number(term, tab_num);
|
||||
struct document_view *doc_view;
|
||||
struct session *tab_ses = tab->data;
|
||||
struct session *tab_ses = (struct session *)tab->data;
|
||||
int actual_tab_width = tab_width - 1;
|
||||
char *msg;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user