}
String query = search_query.getText();
search_query.setText("");
if (query.length()==0) return ;
SearchQuery search_query = new SearchQuery(query+"");
if ((searchType.getSelectionIndex()==0))
search_query.setQueryType(SearchQueryType.SERVER);
if ((searchType.getSelectionIndex()==1))
search_query.setQueryType(SearchQueryType.KAD);
if ((searchType.getSelectionIndex()==2))
search_query.setQueryType(SearchQueryType.SERVER_KAD);
if (show_advanced_options) {
if (fileType != FileType.ANY)
search_query.setFileType(fileType);
if (extension.length()!=0)
search_query.setExtension(extension);
if (availableSources!=0)
search_query.setMinAvailability(availableSources);
if (completedSources!=0)
search_query.setMinCompleteSources(completedSources);
if ((minFileSize!=0)||(maxFileSize!=0)) {
search_query.setMinimalSize(minFileSize);
search_query.setMaximalSize(maxFileSize);
}
}
SearchManager manager = _core.getSearchManager();