diff -up xdrawchem-1.9.9/xdrawchem/application_ob.cpp.ob xdrawchem-1.9.9/xdrawchem/application_ob.cpp --- xdrawchem-1.9.9/xdrawchem/application_ob.cpp.ob 2005-11-30 04:47:14.000000000 +0100 +++ xdrawchem-1.9.9/xdrawchem/application_ob.cpp 2008-04-04 21:24:48.000000000 +0200 @@ -45,23 +45,36 @@ void ApplicationWindow::OBGetFilters() { readFilters.append(str1); writeFilters.append(str1); - Formatpos pos; + int i; OBFormat* pFormat; - const char* str=NULL; - while(OBConversion::GetNextFormat(pos,str,pFormat)) + vector pFormats=Conv.GetSupportedInputFormat(); + + for(i=0; i < pFormats.size(); i++) { //std::cout << " " << str << std::endl; - if((pFormat->Flags() & NOTWRITABLE) && (pFormat->Flags() & NOTREADABLE)) + pFormat=Conv.FindFormat(pFormats[i].c_str()); + if(pFormat != NULL && pFormat->Flags() & NOTREADABLE) + continue; + str1 = pFormats[i]; + myext = str1.left( str1.find(" -- ") ); + str1.append("(*."); + str1.append(myext); + str1.append(")"); + readFilters.append(str1); + } + + pFormats=Conv.GetSupportedOutputFormat(); + for(i=0; i < pFormats.size(); i++) + { + pFormat=Conv.FindFormat(pFormats[i].c_str()); + if(pFormat != NULL && pFormat->Flags() & NOTWRITABLE) continue; - str1 = str; + str1 = pFormats[i]; myext = str1.left( str1.find(" -- ") ); str1.append("(*."); str1.append(myext); str1.append(")"); - if ( (pFormat->Flags() & NOTREADABLE) == 0 ) - readFilters.append(str1); - if ( (pFormat->Flags() & NOTWRITABLE) == 0 ) - writeFilters.append(str1); + writeFilters.append(str1); } filters.sort();