static void nav_close(nav_page_t *np, int with_prop) { navigator_t *nav = np->np_nav; prop_unsubscribe(np->np_close_sub); prop_unsubscribe(np->np_url_sub); prop_unsubscribe(np->np_direct_close_sub); if(nav->nav_page_current == np) nav->nav_page_current = NULL; if(np->np_inhistory) nav_remove_from_history(nav, np); TAILQ_REMOVE(&nav->nav_pages, np, np_global_link); if(with_prop) { prop_destroy(np->np_prop_root); nav_update_cango(nav); } free(np->np_url); free(np->np_view); free(np); }
static void nav_select(navigator_t *nav, nav_page_t *np, prop_t *origin) { prop_link(np->np_prop_root, nav->nav_prop_curpage); prop_select_ex(np->np_prop_root, origin, NULL); nav->nav_page_current = np; nav_update_cango(nav); }