diff options
author | Ole Loots <ole@monochrom.net> | 2013-09-22 03:10:12 +0200 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2013-10-06 01:24:18 +0200 |
commit | c1085580ed22aa332bebe327e845f4a4acf4d86b (patch) | |
tree | e552258e43d3e1c299e9cbedfe9f4ce25b7fe759 /atari/hotlist.c | |
parent | f81fc0472293ecdb6197df2ca7a64893f9694179 (diff) | |
download | netsurf-c1085580ed22aa332bebe327e845f4a4acf4d86b.tar.gz netsurf-c1085580ed22aa332bebe327e845f4a4acf4d86b.tar.bz2 |
Fixed warnings for incomptible pointer type
The API expects to receive core_window as window handle now.
Diffstat (limited to 'atari/hotlist.c')
-rw-r--r-- | atari/hotlist.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/atari/hotlist.c b/atari/hotlist.c index 8db18b0f8..95b169390 100644 --- a/atari/hotlist.c +++ b/atari/hotlist.c @@ -116,21 +116,30 @@ static void atari_hotlist_mouse_action(struct core_window *cw, static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]) { struct atari_treeview_window *tv=NULL; + struct core_window *cw; GRECT tb_area; GUIWIN * gemtk_win; struct gui_window * gw; char *cur_url = NULL; char *cur_title = NULL; + OBJECT *toolbar; LOG(("")); + tv = (struct atari_treeview_window*) gemtk_wm_get_user_data(win); + cw = (struct core_window *)tv; + if(ev_out->emo_events & MU_MESAG){ switch (msg[0]) { case WM_TOOLBAR: LOG(("WM_TOOLBAR")); - tv = (struct atari_treeview_window*) gemtk_wm_get_user_data(win); + + toolbar = gemtk_obj_get_tree(TOOLBAR_HOTLIST); + + assert(toolbar); assert(tv); + switch (msg[4]) { case TOOLBAR_HOTLIST_CREATE_FOLDER: hotlist_add_folder(NULL, 0, 0); @@ -161,10 +170,10 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]) break; } - gemtk_win = atari_treeview_get_gemtk_window(tv); + gemtk_win = atari_treeview_get_gemtk_window(cw); assert(gemtk_win); - gemtk_obj_get_tree(TOOLBAR_HOTLIST)[msg[4]].ob_state &= ~OS_SELECTED; - atari_treeview_get_grect(tv, TREEVIEW_AREA_TOOLBAR, &tb_area); + toolbar[msg[4]].ob_state &= ~OS_SELECTED; + atari_treeview_get_grect(cw, TREEVIEW_AREA_TOOLBAR, &tb_area); evnt_timer(150); gemtk_wm_exec_redraw(gemtk_win, &tb_area); break; @@ -286,8 +295,8 @@ void atari_hotlist_add_page( const char * url, const char * title ) struct node * selected = NULL; struct node * folder = NULL; nsurl *nsurl; - ATARI_TREEVIEW_PTR tv = hl.tv; - if(hl.tv == NULL ) + + if(hl.tv == NULL) return; atari_hotlist_open(); |