diff options
Diffstat (limited to 'amiga/hotlist.c')
-rwxr-xr-x | amiga/hotlist.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/amiga/hotlist.c b/amiga/hotlist.c index e9841d3f2..70f014349 100755 --- a/amiga/hotlist.c +++ b/amiga/hotlist.c @@ -22,12 +22,12 @@ #include "desktop/hotlist.h" struct ami_hotlist_ctx { - struct gui_window_2 *gw; + void *userdata; int level; int item; const char *folder; /* folder we're interested in */ bool in_menu; /* set if we are in that folder */ - bool (*cb)(struct gui_window_2 *gw, int level, int item, const char *title, nsurl *url, bool folder); + bool (*cb)(void *userdata, int level, int item, const char *title, nsurl *url, bool folder); }; @@ -51,7 +51,7 @@ static nserror ami_hotlist_folder_enter_cb(void *ctx, const char *title) struct ami_hotlist_ctx *menu_ctx = (struct ami_hotlist_ctx *)ctx; if(menu_ctx->in_menu == true) { - if(menu_ctx->cb(menu_ctx->gw, menu_ctx->level, menu_ctx->item, title, NULL, true) == true) + if(menu_ctx->cb(menu_ctx->userdata, menu_ctx->level, menu_ctx->item, title, NULL, true) == true) menu_ctx->item++; } else { if((menu_ctx->level == 0) && (strcmp(title, menu_ctx->folder) == 0)) @@ -66,7 +66,7 @@ static nserror ami_hotlist_address_cb(void *ctx, nsurl *url, const char *title) struct ami_hotlist_ctx *menu_ctx = (struct ami_hotlist_ctx *)ctx; if(menu_ctx->in_menu == true) { - if(menu_ctx->cb(menu_ctx->gw, menu_ctx->level, menu_ctx->item, title, url, false) == true) + if(menu_ctx->cb(menu_ctx->userdata, menu_ctx->level, menu_ctx->item, title, url, false) == true) menu_ctx->item++; } @@ -85,8 +85,8 @@ static nserror ami_hotlist_folder_leave_cb(void *ctx) return NSERROR_OK; } -nserror ami_hotlist_scan(struct gui_window_2 *gwin, int first_item, const char *folder, - bool (*cb_add_item)(struct gui_window_2 *gw, int level, int item, const char *title, nsurl *url, bool folder)) +nserror ami_hotlist_scan(void *userdata, int first_item, const char *folder, + bool (*cb_add_item)(void *userdata, int level, int item, const char *title, nsurl *url, bool folder)) { struct ami_hotlist_ctx ctx; @@ -94,7 +94,7 @@ nserror ami_hotlist_scan(struct gui_window_2 *gwin, int first_item, const char * ctx.item = first_item; ctx.folder = folder; ctx.in_menu = false; - ctx.gw = gwin; + ctx.userdata = userdata; ctx.cb = cb_add_item; return hotlist_iterate(&ctx, |