Package: xdrawchem
Version: 1.9.9-3
Followup-For: Bug #405131
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
After investigaing the situation I found the following: In
xdrawchem/application_ob.cpp the extension is set to .cdxml for both CDX
and CDXML filter. This might be the result of the missing functionality
of ChemData::save_cdx() in xdrawchem/chemdata_cdx.cpp. I attached a diff
that shows the problem. Maybe the easiest solution for the moment is to
comment the CDX binary filter line in the Save As dialog (see the
comment in the diff). Your opinion?
Regards, Daniel
- -- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (850, 'unstable'), (700, 'testing'), (550, 'stable'), (110,
'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17.09060920
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Versions of packages xdrawchem depends on:
ii libaudio2 1.8-2 The Network Audio System (NAS). (s
ii libc6 2.3.6.ds1-9 GNU C Library: Shared libraries
ii libfontconfig1 2.4.2-1 generic font configuration library
ii libgcc1 1:4.1.1-21 GCC support library
ii libice6 1:1.0.1-2 X11 Inter-Client Exchange library
ii libopenbabel1 2.0.2-1 Convert and manipulate chemical da
ii libpng12-0 1.2.15~beta5-1 PNG library - runtime
ii libqt3-mt 3:3.3.7-2 Qt GUI Library (Threaded runtime v
ii libsm6 1:1.0.1-3 X11 Session Management library
ii libstdc++6 4.1.1-21 The GNU Standard C++ Library v3
ii libx11-6 2:1.0.3-4 X11 client-side library
ii libxcursor1 1.1.7-4 X cursor management library
ii libxext6 1:1.0.1-2 X11 miscellaneous extension librar
ii libxft2 2.1.8.2-8 FreeType-based font drawing librar
ii libxi6 1:1.0.1-4 X11 Input extension library
ii libxinerama1 1:1.0.1-4.1 X11 Xinerama extension library
ii libxrandr2 2:1.1.0.2-5 X11 RandR extension library
ii libxrender1 1:0.9.1-3 X Rendering Extension client libra
ii libxt6 1:1.0.2-2 X11 toolkit intrinsics library
ii zlib1g 1:1.2.3-13 compression library - runtime
xdrawchem recommends no packages.
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFmYB7m0bx+wiPa4wRAr2VAJ9pL+3/wesu8yiaUH300FUcCaAVygCdFxky
+4omt7j94hBZI/WT+VJMh+g=
=hfEN
-----END PGP SIGNATURE-----
--- xdrawchem/application_ob.cpp.orig 2007-01-01 22:33:53.000000000 +0100
+++ xdrawchem/application_ob.cpp 2007-01-01 22:39:14.000000000 +0100
@@ -35,13 +35,15 @@ void ApplicationWindow::OBGetFilters() {
str1 = tr("--Select a filter-- (*)");
readFilters.append(str1);
writeFilters.append(str1);
- str1 = tr("CDXML - ChemDraw text/XML format (*)");
+ str1 = tr("CDXML - ChemDraw text/XML format (*.cdxml)");
readFilters.append(str1);
writeFilters.append(str1);
- str1 = tr("CDX - ChemDraw binary format (*)");
+ // maybe simply comment the following 3 lines to workaround
+ // bug 405131 - because save_cdx doesn't seem to be functional
+ str1 = tr("CDX - ChemDraw binary format (*.cdx)");
readFilters.append(str1);
writeFilters.append(str1);
- str1 = tr("XDC - XDrawChem native format (*)");
+ str1 = tr("XDC - XDrawChem native format (*.xdc)");
readFilters.append(str1);
writeFilters.append(str1);
@@ -213,7 +215,7 @@ void ApplicationWindow::OBNewSave() {
statusBar()->message( tr( "Saved file ") + filename );
return;
}
- if (str1.left(3) == "CDX") {
+ if (str1.left(5) == "CDXML") {
if (filename.right(6).lower() != ".cdxml")
filename.append(".cdxml");
if ( !c->save(filename) ) {
@@ -224,6 +226,17 @@ void ApplicationWindow::OBNewSave() {
statusBar()->message( tr( "Saved file ") + filename );
return;
}
+ if (str1.left(3) == "CDX") {
+ if (filename.right(4).lower() != ".cdx")
+ filename.append(".cdx");
+ if ( !c->save(filename) ) {
+ statusBar()->message( tr("Could not write to ") + filename );
+ return;
+ }
+ setCaption( QString(XDC_VERSION) + QString(" - ") + filename );
+ statusBar()->message( tr( "Saved file ") + filename );
+ return;
+ }
int cutpt = str1.find(" -- ");
str1.truncate(cutpt);
const char *tmpchar = str1.latin1();