Beispiel #1
0
bool script_available(const ustring & script)
// Returns whether "script" is available.
{
  vector < ustring > scripts = scripts_get_all();
  set < ustring > scripts_set(scripts.begin(), scripts.end());
  return scripts_set.find(script) != scripts_set.end();
}
void FiltersDialog::load_filters(const ustring & selection)
{
  vector < ustring > filters = scripts_get_all();
  combobox_set_strings(combobox_filters, filters);
  if (!selection.empty())
    combobox_set_string(combobox_filters, selection);
  else if (filters.size() > 1)
    combobox_set_index(combobox_filters, 1);
  else
    combobox_set_index(combobox_filters, 0);
  on_combobox_filters();
}