Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37524394
en ru br
ALT Linux repositórios
S:1.10.2-alt2
5.0: 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

Group :: Ciências/Química
RPM: xdrawchem

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: xdrawchem-ob22.patch
Download


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();
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009