Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37799551
en ru br
Репозитории ALT
S:1.10.2-alt2
5.1: 1.9.9-alt3
4.1: 1.9.9-alt2.M41.1
4.0: 1.9.9-alt0.1
3.0: 1.9.2-alt1
www.altlinux.org/Changes

Группа :: Науки/Химия
Пакет: xdrawchem

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: xdrawchem-ob22.patch
Скачать


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<string> 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();
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin