Hello community,
here is the log from the commit of package chemtool
checked in at Sun Aug 6 21:30:30 CEST 2006.
--------
--- chemtool/chemtool.changes 2006-01-25 21:34:57.000000000 +0100
+++ chemtool/chemtool.changes 2006-08-03 12:41:47.000000000 +0200
@@ -1,0 +2,11 @@
+Thu Aug 3 12:29:27 CEST 2006 - anosek@suse.cz
+
+- updated to 1.6.9
+ - Fixed placement of right-justified labels containing sub-
+ and/or superscripts on screen and in all XFig-based export modes.
+ - Worked around a bug in fig2dev that prevented creation of EMF files
+ - Improved spacing of sub/superscripted labels in GTK2 builds
+ - Corrected line spacing of triple and quadruple bonds.
+- removed not existing .desktop category Edutainment
+
+-------------------------------------------------------------------
Old:
----
chemtool-1.6.8-Makefile.diff
chemtool-1.6.8-memmove.diff
chemtool-1.6.8-mime.diff
chemtool-1.6.8.tar.bz2
New:
----
chemtool-1.6.9-Makefile.diff
chemtool-1.6.9-memmove.diff
chemtool-1.6.9-mime.diff
chemtool-1.6.9.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ chemtool.spec ++++++
--- /var/tmp/diff_new_pack.peF5Ac/_old 2006-08-06 21:30:04.000000000 +0200
+++ /var/tmp/diff_new_pack.peF5Ac/_new 2006-08-06 21:30:04.000000000 +0200
@@ -1,11 +1,11 @@
#
-# spec file for package chemtool (Version 1.6.8)
+# spec file for package chemtool (Version 1.6.9)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://bugs.opensuse.org
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
@@ -13,8 +13,8 @@
Name: chemtool
BuildRequires: gtk2-devel shared-mime-info update-desktop-files
%define name0 cht
-Summary: Chemtool is a program for 2D drawing organic molecules
-Version: 1.6.8
+Summary: Program for Drawing 2D Organic Molecules
+Version: 1.6.9
Release: 1
License: GPL
PreReq: shared-mime-info
@@ -28,9 +28,9 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
-Chemtool is a program for drawing organic molecules easily and store
-them as a X bitmap, Xfig or EPS file. It runs under the X Window System
-using the GTK widget set.
+Chemtool is a program for drawing organic molecules easily and storing
+them as an X bitmap, Xfig, or EPS file. It runs under the X Window
+System using the GTK widget set.
@@ -67,7 +67,7 @@
install -m 0644 %SOURCE1 \
$RPM_BUILD_ROOT/opt/gnome/share/applications/
DESTDIR=$RPM_BUILD_ROOT mime-info-to-mime
-%suse_update_desktop_file %name Edutainment Chemistry
+%suse_update_desktop_file %name Chemistry
%clean
rm -rf $RPM_BUILD_ROOT
@@ -91,6 +91,14 @@
/usr/share/mime/packages/*.xml
%changelog -n chemtool
+* Thu Aug 03 2006 - anosek@suse.cz
+- updated to 1.6.9
+- Fixed placement of right-justified labels containing sub-
+ and/or superscripts on screen and in all XFig-based export modes.
+- Worked around a bug in fig2dev that prevented creation of EMF files
+- Improved spacing of sub/superscripted labels in GTK2 builds
+- Corrected line spacing of triple and quadruple bonds.
+- removed not existing .desktop category Edutainment
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 05 2006 - mmarek@suse.cz
++++++ chemtool-1.6.8-Makefile.diff -> chemtool-1.6.9-Makefile.diff ++++++
++++++ chemtool-1.6.8-memmove.diff -> chemtool-1.6.9-memmove.diff ++++++
++++++ chemtool-1.6.8-mime.diff -> chemtool-1.6.9-mime.diff ++++++
++++++ chemtool-1.6.8.tar.bz2 -> chemtool-1.6.9.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/chemtool-1.6.8/ChangeLog new/chemtool-1.6.9/ChangeLog
--- old/chemtool-1.6.8/ChangeLog 2005-11-19 22:20:53.000000000 +0100
+++ new/chemtool-1.6.9/ChangeLog 2006-02-27 22:40:12.000000000 +0100
@@ -955,4 +955,13 @@
button spacing in gtk2 builds to keep rightmost button in full view.
Mouse button 3 (right button) in move or rotate mode now aborts/undoes
the transformation. Added a function to export files through babel.
-
+1.6.9 Fixed placement of sub/superscripted, right-justified labels in gtk2
+ screen view and fig-based exports. Improved character spacing in gtk2
+ label output. Fig-based EMF export now uses a temporary file to work
+ around a bug in fig2dev. Corrected whitespace calculation for gtk2
+ screen rendering of labels. Labels that (incorrectly) end with a sub-
+ or superscript marker are now truncated before rendering. Corrected
+ screen and file rendering of triple bonds with all three lines of
+ equal length, and screen rendering of quadruple bonds.
+
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/chemtool-1.6.8/NEWS new/chemtool-1.6.9/NEWS
--- old/chemtool-1.6.8/NEWS 2005-12-17 14:21:27.000000000 +0100
+++ new/chemtool-1.6.9/NEWS 2006-02-27 22:41:21.000000000 +0100
@@ -1,3 +1,11 @@
+Fixes and enhancements in chemtool 1.6.9
+
+- Fixed placement of right-justified labels containing sub-
+ and/or superscripts on screen and in all XFig-based export modes.
+- Worked around a bug in fig2dev that prevented creation of EMF files
+- Improved spacing of sub/superscripted labels in GTK2 builds
+- Corrected line spacing of triple and quadruple bonds.
+
Fixes and enhancements in chemtool 1.6.8
- Fixed an ugly bug that could crash the program on startup, especially
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/chemtool-1.6.8/chemtool.spec new/chemtool-1.6.9/chemtool.spec
--- old/chemtool-1.6.8/chemtool.spec 2006-01-02 17:35:09.000000000 +0100
+++ new/chemtool-1.6.9/chemtool.spec 2006-02-23 22:44:11.000000000 +0100
@@ -2,7 +2,7 @@
Summary(de): Chemtool ist ein Programm zum Zeichnen von MolekÃŒlformeln
Summary(pl): Chemtool - program do rysowania 2-wymiarowych czsteczek organicznych.
Name: chemtool
-Version: 1.6.8
+Version: 1.6.9
Release: 1
Copyright: GPL
Group: Applications/Chemistry
@@ -80,6 +80,8 @@
%changelog
+* Thu Feb 23 2006 Martin Kroeker
+- Updated version number
* Mon Jan 2 2006 Martin Kroeker
- Removed rpm icon resource
- Incorporated Polish translation of the descriptions from the old pld
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/chemtool-1.6.8/ct.h new/chemtool-1.6.9/ct.h
--- old/chemtool-1.6.8/ct.h 2005-11-19 21:56:36.000000000 +0100
+++ new/chemtool-1.6.9/ct.h 2006-01-23 21:44:07.000000000 +0100
@@ -17,7 +17,7 @@
# endif
#endif
-#define VERSION "1.6.8"
+#define VERSION "1.6.9"
#define PIXMAPWIDTH 1600
#define PIXMAPHEIGHT 1200
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/chemtool-1.6.8/ct1.h new/chemtool-1.6.9/ct1.h
--- old/chemtool-1.6.8/ct1.h 2005-11-19 21:56:47.000000000 +0100
+++ new/chemtool-1.6.9/ct1.h 2006-01-23 21:43:59.000000000 +0100
@@ -17,7 +17,7 @@
# endif
#endif
-#define VERSION "1.6.8"
+#define VERSION "1.6.9"
#define PIXMAPWIDTH 1600
#define PIXMAPHEIGHT 1200
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/chemtool-1.6.8/graph.c new/chemtool-1.6.9/graph.c
--- old/chemtool-1.6.8/graph.c 2005-09-13 22:58:51.000000000 +0200
+++ new/chemtool-1.6.9/graph.c 2006-03-05 14:42:05.000000000 +0100
@@ -259,18 +259,18 @@
break;
case 18:
{ /*triple, equal lengths */
- Drawline (hpc->x, hpc->y, hpc->tx, hpc->ty, hpc->smarked + hpc->tmarked,hpc->color); /*single */
- coord = center_double_bond (hpc->x, hpc->y, hpc->tx, hpc->ty, db_dist);
+ coord = center_double_bond (hpc->x, hpc->y, hpc->tx, hpc->ty, 2*db_dist);
Drawline (coord->x, coord->y, coord->tx, coord->ty,
hpc->smarked + hpc->tmarked,hpc->color);
coord++;
Drawline (coord->x, coord->y, coord->tx, coord->ty,
hpc->smarked + hpc->tmarked,hpc->color);
+ Drawline (hpc->x, hpc->y, hpc->tx, hpc->ty, hpc->smarked + hpc->tmarked,hpc->color); /*single */
}
break;
case 19:
{ /*quadruple */
- coord = center_double_bond (hpc->x, hpc->y, hpc->tx, hpc->ty, db_dist+1);
+ coord = center_double_bond (hpc->x, hpc->y, hpc->tx, hpc->ty, db_dist+3);
tmpx1=coord->x;
tmpy1=coord->y;
tmptx1=coord->tx;
@@ -280,13 +280,13 @@
tmpy2=coord->y;
tmptx2=coord->tx;
tmpty2=coord->ty;
- coord = center_double_bond (tmpx1, tmpy1, tmptx1, tmpty1, db_dist-1);
+ coord = center_double_bond (tmpx1, tmpy1, tmptx1, tmpty1, db_dist);
Drawline (coord->x, coord->y, coord->tx, coord->ty,
hpc->smarked + hpc->tmarked,hpc->color);
coord++;
Drawline (coord->x, coord->y, coord->tx, coord->ty,
hpc->smarked + hpc->tmarked,hpc->color);
- coord = center_double_bond (tmpx2, tmpy2,tmptx2, tmpty2, db_dist-1);
+ coord = center_double_bond (tmpx2, tmpy2,tmptx2, tmpty2, db_dist);
Drawline (coord->x, coord->y, coord->tx, coord->ty,
hpc->smarked + hpc->tmarked,hpc->color);
coord++;
@@ -1024,6 +1024,7 @@
int variance[MAXCL];
gchar *c;
#ifdef GTK2
+ int dummy;
gchar *l=" ";
gunichar hc, hl;
gunichar text[MAXCL];
@@ -1076,9 +1077,9 @@
a = gdk_char_height (font[fontsize], 'X');
ha = gdk_char_height (font[fontsize], 'x') / 2;
n = (int)strlen (c);
+ tw = gdk_char_width (font[fontsize], 'x') ;
#endif
-
#ifdef GTK2
for (d = 0; d < n; d++)
{
@@ -1087,7 +1088,7 @@
bold[d]=FALSE;
hc = g_utf8_get_char(c);
-
+
if (shiftall != 0)
{
if (hc == '}')
@@ -1117,6 +1118,8 @@
else
{
variance[d] = 0;
+ n=d;
+ continue;
}
}
}
@@ -1126,6 +1129,7 @@
{
symbol[d] = TRUE;
text[d] = hl;
+ c = g_utf8_next_char(c);
--n;
}
@@ -1133,6 +1137,7 @@
{
slanted[d] = TRUE;
text[d] = hl;
+ c = g_utf8_next_char(c);
--n;
}
@@ -1140,6 +1145,7 @@
{
bold[d] = TRUE;
text[d] = hl;
+ c = g_utf8_next_char(c);
--n;
}
@@ -1233,7 +1239,7 @@
#ifdef GTK2
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,smallfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
#else
tw = gdk_char_width (smallfont[fontsize], text[d]) + 2;
#endif
@@ -1242,7 +1248,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,ssymbfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
}
#else
tw = gdk_char_width (ssymbfont[fontsize], text[d]);
@@ -1265,7 +1271,7 @@
#ifdef GTK2
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,font[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
#else
tw = 1 + gdk_char_width (font[fontsize], text[d]);
#endif
@@ -1274,7 +1280,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,symbfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
}
#else
tw = gdk_char_width (symbfont[fontsize], text[d]);
@@ -1284,7 +1290,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,boldfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
}
#else
tw = gdk_char_width (boldfont[fontsize], text[d]);
@@ -1294,12 +1300,12 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,slfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
}
#else
tw = 1 + gdk_char_width (slfont[fontsize], text[d]);
#endif
- if (save_x < x)
+ if (save_x < x)
{
if (sub_lastx < sup_lastx)
x = sup_lastx;
@@ -1312,6 +1318,10 @@
if (chl == 0)
chl = tw;
}
+ if (x != sub_lastx || x != sup_lastx) save_x+= tw; // if the label ends with a sub/superscripted character,
+ // add its length to the current position (which is before
+ // the sub/superscript to allow vertical alignment of simultaneous
+ // sub- and superscripts
textl = save_x;
switch (direct)
{
@@ -1332,13 +1342,17 @@
save_x = sub_lastx = sup_lastx = x;
for (d = 0; d < n; d++)
{
+#ifdef GTK2
+// l = g_locale_to_utf8((const gchar*) &text[d],1,NULL,NULL,NULL);
+ g_unichar_to_utf8((gunichar)text[d], l);
+#endif
if (variance[d])
{
#ifdef GTK2
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,smallfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
}
#else
tw = gdk_char_width (smallfont[fontsize], text[d]) + 2;
@@ -1348,7 +1362,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,ssymbfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
}
#else
tw = gdk_char_width (ssymbfont[fontsize], text[d]);
@@ -1371,7 +1385,7 @@
#ifdef GTK2
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,font[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
#else
tw = 1 + gdk_char_width (font[fontsize], text[d]);
#endif
@@ -1380,7 +1394,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,symbfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
}
#else
tw = gdk_char_width (symbfont[fontsize], text[d]);
@@ -1390,7 +1404,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,boldfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
}
#else
tw = gdk_char_width (boldfont[fontsize], text[d]);
@@ -1400,7 +1414,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,slfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
}
#else
tw = 1 + gdk_char_width (slfont[fontsize], text[d]);
@@ -1425,17 +1439,17 @@
tw + 8 * size_factor, a + 10 * size_factor, 0, 360 * 64);
else
gdk_draw_arc (picture, background_gc, 1,
- x - 5 * size_factor,
- y - a + ha - 5 * size_factor + variance[d],
- tw + 8 * size_factor, a + 10 * size_factor, 0, 360 * 64);
- }
+ x - 2 * size_factor,
+ y -a + ha + size_factor * variance[d],
+ tw + 8 * size_factor, a + 2 * size_factor, 0, 360 * 64);
x = x + tw;
+ }
}
n = nch;
x = hx;
-#ifdef GTK2
+#ifdef GTK2
y -= a ;
#endif
@@ -1443,9 +1457,12 @@
for (d = 0; d < n; d++)
{
#ifdef GTK2
-// memset(l,0,sizeof(l));
- memset(l,0,2);
+ memset(l,0,sizeof(l));
+//#ifdef GTK2
+// l = g_locale_to_utf8((const gchar*) &text[d],1,NULL,NULL,NULL);
+// memset(l,0,2);
g_unichar_to_utf8((gunichar)text[d], l);
+
if (symbol[d]) {
unsigned int unicodechar=text[d]+848;
@@ -1549,7 +1566,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,smallfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
}
#else
tw = gdk_char_width (smallfont[fontsize], text[d]) + 2;
@@ -1559,7 +1576,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,ssymbfont[fontsize]);
- pango_layout_get_pixel_size(thelayout, &tw, &a);
+ pango_layout_get_pixel_size(thelayout, &tw, &dummy);
}
#else
tw = gdk_char_width (ssymbfont[fontsize], text[d]);
@@ -1615,7 +1632,7 @@
#ifdef GTK2
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,font[fontsize]);
- pango_layout_get_pixel_size(thelayout,&tw,&a);
+ pango_layout_get_pixel_size(thelayout,&tw,&dummy);
#else
tw = 1 + gdk_char_width (font[fontsize], text[d]);
#endif
@@ -1624,7 +1641,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,symbfont[fontsize]);
- pango_layout_get_pixel_size(thelayout,&tw,&a);
+ pango_layout_get_pixel_size(thelayout,&tw,&dummy);
}
#else
tw = gdk_char_width (symbfont[fontsize], text[d]);
@@ -1634,7 +1651,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,boldfont[fontsize]);
- pango_layout_get_pixel_size(thelayout,&tw,&a);
+ pango_layout_get_pixel_size(thelayout,&tw,&dummy);
}
#else
tw = gdk_char_width (boldfont[fontsize], text[d]);
@@ -1644,7 +1661,7 @@
{
pango_layout_set_text(thelayout,l,-1);
pango_layout_set_font_description(thelayout,slfont[fontsize]);
- pango_layout_get_pixel_size(thelayout,&tw,&a);
+ pango_layout_get_pixel_size(thelayout,&tw,&dummy);
}
#else
tw = 1 + gdk_char_width (slfont[fontsize], text[d]);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/chemtool-1.6.8/inout.c new/chemtool-1.6.9/inout.c
--- old/chemtool-1.6.8/inout.c 2005-11-19 22:31:34.000000000 +0100
+++ new/chemtool-1.6.9/inout.c 2006-02-27 22:36:58.000000000 +0100
@@ -2017,7 +2017,7 @@
}
fprintf (fp,
"