struct NewMenu *ami_create_menu(struct gui_window_2 *gwin) { int i; gwin->menu = AllocVecTags(sizeof(struct NewMenu) * (AMI_MENU_AREXX_MAX + 1), AVT_ClearWithValue, 0, TAG_DONE); ami_init_menulabs(gwin); ami_menu_scan(ami_tree_get_tree(hotlist_window), gwin); ami_menu_arexx_scan(gwin); gwin = ami_menu_layout(gwin); #if defined(WITH_JS) || defined(WITH_MOZJS) gwin->menu[M_JS].nm_Flags = CHECKIT | MENUTOGGLE; if(nsoption_bool(enable_javascript) == true) gwin->menu[M_JS].nm_Flags |= CHECKED; #endif gwin->menu[M_PRINT].nm_Flags = NM_ITEMDISABLED; gwin->menu[M_IMGFORE].nm_Flags = CHECKIT | MENUTOGGLE; if(nsoption_bool(foreground_images) == true) gwin->menu[M_IMGFORE].nm_Flags |= CHECKED; gwin->menu[M_IMGBACK].nm_Flags = CHECKIT | MENUTOGGLE; if(nsoption_bool(background_images) == true) gwin->menu[M_IMGBACK].nm_Flags |= CHECKED; /* Set up scheduler to refresh the hotlist menu */ if(nsoption_int(menu_refresh) > 0) schedule(nsoption_int(menu_refresh), (void *)ami_menu_refresh, gwin); return(gwin->menu); }
void ami_global_history_initialise(void) { global_history_window = ami_tree_create(history_global_get_tree_flags(), NULL); if(!global_history_window) return; history_global_initialise(ami_tree_get_tree(global_history_window), tree_directory_icon_name); }
void ami_cookies_initialise(void) { cookies_window = ami_tree_create(cookies_get_tree_flags(), NULL); if(!cookies_window) return; cookies_initialise(ami_tree_get_tree(cookies_window), tree_directory_icon_name, tree_content_icon_name); }
void ami_hotlist_initialise(const char *hotlist_file) { hotlist_window = ami_tree_create(hotlist_get_tree_flags(), NULL); if(!hotlist_window) return; hotlist_initialise(ami_tree_get_tree(hotlist_window), hotlist_file, tree_directory_icon_name); }