/* * plugin management */ static void curses_plugin_mgmt(void) { DEBUG_MSG("curses_plugin_mgmt"); /* create the array for the list widget */ curses_create_plug_array(); /* if the object already exist, set the focus to it */ if (wdg_plugin) { /* set the new array */ wdg_list_set_elements(wdg_plugin, wdg_plugin_elements); return; } wdg_create_object(&wdg_plugin, WDG_LIST, WDG_OBJ_WANT_FOCUS); wdg_set_size(wdg_plugin, 1, 2, -1, SYSMSG_WIN_SIZE - 1); wdg_set_title(wdg_plugin, "Select a plugin...", WDG_ALIGN_LEFT); wdg_set_color(wdg_plugin, WDG_COLOR_SCREEN, EC_COLOR); wdg_set_color(wdg_plugin, WDG_COLOR_WINDOW, EC_COLOR); wdg_set_color(wdg_plugin, WDG_COLOR_BORDER, EC_COLOR_BORDER); wdg_set_color(wdg_plugin, WDG_COLOR_FOCUS, EC_COLOR_FOCUS); wdg_set_color(wdg_plugin, WDG_COLOR_TITLE, EC_COLOR_TITLE); /* set the elements */ wdg_list_set_elements(wdg_plugin, wdg_plugin_elements); /* add the destroy callback */ wdg_add_destroy_key(wdg_plugin, CTRL('Q'), curses_plug_destroy); /* add the callback */ wdg_list_select_callback(wdg_plugin, curses_select_plugin); wdg_list_add_callback(wdg_plugin, ' ', curses_plugin_help); wdg_draw_object(wdg_plugin); wdg_set_focus(wdg_plugin); }
static void refresh_filter_list(void) { build_filter_list(); wdg_list_set_elements(wdg_filters, wdg_filters_elements); wdg_list_refresh(wdg_filters); }