- m_wildCard = wildCard;
-
- GtkFileChooser* chooser = GTK_FILE_CHOOSER(m_widget);
-
- // empty current filter list:
- GSList* ifilters = gtk_file_chooser_list_filters(chooser);
- GSList* filters = ifilters;
- while (ifilters)
- {
- gtk_file_chooser_remove_filter(chooser,GTK_FILE_FILTER(ifilters->data));
- ifilters = ifilters->next;
- }
- g_slist_free(filters);
-
- // parse filters
- wxArrayString wildDescriptions, wildFilters;
- if (!wxParseCommonDialogsFilter(m_wildCard, wildDescriptions, wildFilters))
- {
- wxFAIL_MSG( wxT("Wrong file type description") );
- }
- else